Skip to content

Commit

Permalink
Deploying to gh-pages from @ 7643714 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
SchoolGuy committed Nov 9, 2024
1 parent b1e826b commit 5a2f2b4
Show file tree
Hide file tree
Showing 72 changed files with 6,531 additions and 3,421 deletions.
281 changes: 278 additions & 3 deletions classes/Utils.html
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,18 @@ <h6><b>Methods</b></h6>
<tr>
<td class="col-md-4">
<ul class="index-list">
<li>
<span class="modifier">Static</span>
<a href="#deduplicateDirtyValues" >deduplicateDirtyValues</a>
</li>
<li>
<span class="modifier">Static</span>
<a href="#floatToDate" >floatToDate</a>
</li>
<li>
<span class="modifier">Static</span>
<a href="#getDirtyValues" >getDirtyValues</a>
</li>
<li>
<span class="modifier">Static</span>
<a href="#toHTML" >toHTML</a>
Expand All @@ -163,6 +175,225 @@ <h6><b>Methods</b></h6>
<h3 id="methods">
Methods
</h3>
<table class="table table-sm table-bordered">
<tbody>
<tr>
<td class="col-md-4">
<a name="deduplicateDirtyValues"></a>
<span class="name">
<span class="modifier">Static</span>
<span ><b>deduplicateDirtyValues</b></span>
<a href="#deduplicateDirtyValues"><span class="icon ion-ios-link"></span></a>
</span>
</td>
</tr>
<tr>
<td class="col-md-4">
<span class="modifier-icon icon ion-ios-reset"></span>
<code>deduplicateDirtyValues(formGroup: FormGroup, values: <a href="https://www.typescriptlang.org/docs/handbook/basic-types.html" target="_blank">any</a>)</code>
</td>
</tr>


<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="26"
class="link-to-prism">projects/cobbler-frontend/src/app/utils.ts:26</a></div>
</td>
</tr>


<tr>
<td class="col-md-4">

<div class="io-description">
<b>Parameters :</b>

<table class="params">
<thead>
<tr>
<td>Name</td>
<td>Type</td>
<td>Optional</td>
</tr>
</thead>
<tbody>
<tr>
<td>formGroup</td>
<td>
<code>FormGroup</code>
</td>

<td>
No
</td>


</tr>
<tr>
<td>values</td>
<td>
<code><a href="https://www.typescriptlang.org/docs/handbook/basic-types.html" target="_blank" >any</a></code>
</td>

<td>
No
</td>


</tr>
</tbody>
</table>
</div>
<div class="io-description">
<b>Returns : </b> <code>Map&lt;string, any&gt;</code>

</div>
<div class="io-description">

</div>
</td>
</tr>
</tbody>
</table>
<table class="table table-sm table-bordered">
<tbody>
<tr>
<td class="col-md-4">
<a name="floatToDate"></a>
<span class="name">
<span class="modifier">Static</span>
<span ><b>floatToDate</b></span>
<a href="#floatToDate"><span class="icon ion-ios-link"></span></a>
</span>
</td>
</tr>
<tr>
<td class="col-md-4">
<span class="modifier-icon icon ion-ios-reset"></span>
<code>floatToDate(value: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/number" target="_blank">number</a>)</code>
</td>
</tr>


<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="47"
class="link-to-prism">projects/cobbler-frontend/src/app/utils.ts:47</a></div>
</td>
</tr>


<tr>
<td class="col-md-4">

<div class="io-description">
<b>Parameters :</b>

<table class="params">
<thead>
<tr>
<td>Name</td>
<td>Type</td>
<td>Optional</td>
</tr>
</thead>
<tbody>
<tr>
<td>value</td>
<td>
<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/number" target="_blank" >number</a></code>
</td>

<td>
No
</td>


</tr>
</tbody>
</table>
</div>
<div class="io-description">
<b>Returns : </b> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date" target="_blank" >Date</a></code>

</div>
<div class="io-description">

</div>
</td>
</tr>
</tbody>
</table>
<table class="table table-sm table-bordered">
<tbody>
<tr>
<td class="col-md-4">
<a name="getDirtyValues"></a>
<span class="name">
<span class="modifier">Static</span>
<span ><b>getDirtyValues</b></span>
<a href="#getDirtyValues"><span class="icon ion-ios-link"></span></a>
</span>
</td>
</tr>
<tr>
<td class="col-md-4">
<span class="modifier-icon icon ion-ios-reset"></span>
<code>getDirtyValues(form: <a href="https://www.typescriptlang.org/docs/handbook/basic-types.html" target="_blank">any</a>)</code>
</td>
</tr>


<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="9"
class="link-to-prism">projects/cobbler-frontend/src/app/utils.ts:9</a></div>
</td>
</tr>


<tr>
<td class="col-md-4">

<div class="io-description">
<b>Parameters :</b>

<table class="params">
<thead>
<tr>
<td>Name</td>
<td>Type</td>
<td>Optional</td>
</tr>
</thead>
<tbody>
<tr>
<td>form</td>
<td>
<code><a href="https://www.typescriptlang.org/docs/handbook/basic-types.html" target="_blank" >any</a></code>
</td>

<td>
No
</td>


</tr>
</tbody>
</table>
</div>
<div class="io-description">
<b>Returns : </b> <code><a href="https://www.typescriptlang.org/docs/handbook/basic-types.html" target="_blank" >any</a></code>

</div>
<div class="io-description">

</div>
</td>
</tr>
</tbody>
</table>
<table class="table table-sm table-bordered">
<tbody>
<tr>
Expand All @@ -185,8 +416,8 @@ <h3 id="methods">

<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="2"
class="link-to-prism">projects/cobbler-frontend/src/app/utils.ts:2</a></div>
<div class="io-line">Defined in <a href="" data-line="4"
class="link-to-prism">projects/cobbler-frontend/src/app/utils.ts:4</a></div>
</td>
</tr>

Expand Down Expand Up @@ -242,11 +473,55 @@ <h3 id="methods">


<div class="tab-pane fade tab-source-code" id="source">
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">export default class Utils {
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import { FormGroup } from &#x27;@angular/forms&#x27;;

export default class Utils {
static toHTML(input: string): any {
return new DOMParser().parseFromString(input, &#x27;text/html&#x27;).documentElement
.textContent;
}

static getDirtyValues(form: any): any {
// https://stackoverflow.com/a/53613855
let dirtyValues &#x3D; {};

Object.keys(form.controls).forEach((key) &#x3D;&gt; {
let currentControl &#x3D; form.controls[key];

if (currentControl.dirty) {
if (currentControl.controls)
dirtyValues[key] &#x3D; this.getDirtyValues(currentControl);
else dirtyValues[key] &#x3D; currentControl.value;
}
});

return dirtyValues;
}

static deduplicateDirtyValues(
formGroup: FormGroup,
values: any,
): Map&lt;string, any&gt; {
let result &#x3D; new Map&lt;string, any&gt;();
for (const [key, value] of Object.entries(values)) {
if (key.endsWith(&#x27;_inherited&#x27;)) {
const nonInheritKey &#x3D; key.slice(0, key.length - 10);
if (value) {
result.set(nonInheritKey, &#x27;&lt;&lt;inherit&gt;&gt;&#x27;);
} else {
// Key might or might not be in the dirty map
result.set(nonInheritKey, formGroup.get(nonInheritKey).value);
}
} else {
result.set(key, value);
}
}
return result;
}

static floatToDate(value: number): Date {
return new Date(value * 1000);
}
}
</code></pre>
</div>
Expand Down
2 changes: 1 addition & 1 deletion components/AppComponent.html
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ <h3 id="constructor">Constructor</h3>
<script src="../js/libs/deep-iterator.js"></script>
<script>
var COMPONENT_TEMPLATE = '<div><div class="full-height"> <cobbler-manage-menu></cobbler-manage-menu></div></div>'
var COMPONENTS = [{'name': 'AppComponent', 'selector': 'cobbler-root'},{'name': 'AppEventsComponent', 'selector': 'cobbler-app-events'},{'name': 'AppManageComponent', 'selector': 'cobbler-app-manage'},{'name': 'BuildISOComponent', 'selector': 'cobbler-build-iso'},{'name': 'CheckSysComponent', 'selector': 'cobbler-check-sys'},{'name': 'DialogBoxTextConfirmComponent', 'selector': 'cobbler-dialog-box-text-confirm'},{'name': 'DialogItemCopyComponent', 'selector': 'cobbler-dialog-item-copy'},{'name': 'DialogItemRenameComponent', 'selector': 'cobbler-dialog-item-rename'},{'name': 'DialogTextInputComponent', 'selector': 'cobbler-dialog-text-input'},{'name': 'DistroEditComponent', 'selector': 'cobbler-edit'},{'name': 'DistrosOverviewComponent', 'selector': 'cobbler-distros'},{'name': 'FileEditComponent', 'selector': 'cobbler-edit'},{'name': 'FileOverviewComponent', 'selector': 'cobbler-overview'},{'name': 'HardlinkComponent', 'selector': 'cobbler-hardlink'},{'name': 'ImageEditComponent', 'selector': 'cobbler-image-edit'},{'name': 'ImageOverviewComponent', 'selector': 'cobbler-overview'},{'name': 'ImportDVDComponent', 'selector': 'cobbler-import-dvd'},{'name': 'KeyValueEditorComponent', 'selector': 'cobbler-key-value-editor'},{'name': 'LogInFormComponent', 'selector': 'cobbler-login'},{'name': 'ManagementClassEditComponent', 'selector': 'cobbler-edit'},{'name': 'ManagementClassOverviewComponent', 'selector': 'cobbler-overview'},{'name': 'ManageMenuComponent', 'selector': 'cobbler-manage-menu'},{'name': 'MkloadersComponent', 'selector': 'cobbler-mkloaders'},{'name': 'MultiSelectComponent', 'selector': 'cobbler-multi-select'},{'name': 'NavbarComponent', 'selector': 'cobbler-navbar'},{'name': 'NotFoundComponent', 'selector': 'cobbler-not-found'},{'name': 'PackageEditComponent', 'selector': 'cobbler-edit'},{'name': 'PackageOverviewComponent', 'selector': 'cobbler-overview'},{'name': 'ProfileEditComponent', 'selector': 'cobbler-edit'},{'name': 'ProfileOverviewComponent', 'selector': 'cobbler-overview'},{'name': 'ReplicateComponent', 'selector': 'cobbler-replicate'},{'name': 'RepositoryEditComponent', 'selector': 'cobbler-edit'},{'name': 'RepositoryOverviewComponent', 'selector': 'cobbler-overview'},{'name': 'RepoSyncComponent', 'selector': 'cobbler-repo-sync'},{'name': 'SettingsViewComponent', 'selector': 'cobbler-settings-view'},{'name': 'SignaturesComponent', 'selector': 'cobbler-signatures'},{'name': 'SnippetEditComponent', 'selector': 'cobbler-edit'},{'name': 'SnippetOverviewComponent', 'selector': 'cobbler-overview'},{'name': 'StatusComponent', 'selector': 'cobbler-status'},{'name': 'SyncComponent', 'selector': 'cobbler-sync'},{'name': 'SystemEditComponent', 'selector': 'cobbler-edit'},{'name': 'SystemOverviewComponent', 'selector': 'cobbler-overview'},{'name': 'TemplateEditComponent', 'selector': 'cobbler-edit'},{'name': 'TemplateOverviewComponent', 'selector': 'cobbler-overview'},{'name': 'UnauthorizedComponent', 'selector': 'cobbler-unauthorized'},{'name': 'ValidateAutoinstallsComponent', 'selector': 'cobbler-validate-autoinstalls'},{'name': 'ViewableTreeComponent', 'selector': 'cobbler-viewable-tree'}];
var COMPONENTS = [{'name': 'AppComponent', 'selector': 'cobbler-root'},{'name': 'AppEventsComponent', 'selector': 'cobbler-app-events'},{'name': 'AppManageComponent', 'selector': 'cobbler-app-manage'},{'name': 'BuildISOComponent', 'selector': 'cobbler-build-iso'},{'name': 'CheckSysComponent', 'selector': 'cobbler-check-sys'},{'name': 'DialogBoxConfirmCancelEditComponent', 'selector': 'cobbler-dialog-box-confirm-cancel-edit'},{'name': 'DialogBoxTextConfirmComponent', 'selector': 'cobbler-dialog-box-text-confirm'},{'name': 'DialogItemCopyComponent', 'selector': 'cobbler-dialog-item-copy'},{'name': 'DialogItemRenameComponent', 'selector': 'cobbler-dialog-item-rename'},{'name': 'DialogKeyValueInputComponent', 'selector': 'cobbler-dialog-key-value-input'},{'name': 'DialogTextInputComponent', 'selector': 'cobbler-dialog-text-input'},{'name': 'DistroEditComponent', 'selector': 'cobbler-edit'},{'name': 'DistrosOverviewComponent', 'selector': 'cobbler-distros'},{'name': 'FileEditComponent', 'selector': 'cobbler-edit'},{'name': 'FileOverviewComponent', 'selector': 'cobbler-overview'},{'name': 'HardlinkComponent', 'selector': 'cobbler-hardlink'},{'name': 'ImageEditComponent', 'selector': 'cobbler-image-edit'},{'name': 'ImageOverviewComponent', 'selector': 'cobbler-overview'},{'name': 'ImportDVDComponent', 'selector': 'cobbler-import-dvd'},{'name': 'KeyValueEditorComponent', 'selector': 'cobbler-key-value-editor'},{'name': 'LogInFormComponent', 'selector': 'cobbler-login'},{'name': 'ManagementClassEditComponent', 'selector': 'cobbler-edit'},{'name': 'ManagementClassOverviewComponent', 'selector': 'cobbler-overview'},{'name': 'ManageMenuComponent', 'selector': 'cobbler-manage-menu'},{'name': 'MkloadersComponent', 'selector': 'cobbler-mkloaders'},{'name': 'MultiSelectComponent', 'selector': 'cobbler-multi-select'},{'name': 'NavbarComponent', 'selector': 'cobbler-navbar'},{'name': 'NotFoundComponent', 'selector': 'cobbler-not-found'},{'name': 'PackageEditComponent', 'selector': 'cobbler-edit'},{'name': 'PackageOverviewComponent', 'selector': 'cobbler-overview'},{'name': 'ProfileEditComponent', 'selector': 'cobbler-edit'},{'name': 'ProfileOverviewComponent', 'selector': 'cobbler-overview'},{'name': 'ReplicateComponent', 'selector': 'cobbler-replicate'},{'name': 'RepositoryEditComponent', 'selector': 'cobbler-edit'},{'name': 'RepositoryOverviewComponent', 'selector': 'cobbler-overview'},{'name': 'RepoSyncComponent', 'selector': 'cobbler-repo-sync'},{'name': 'SettingsViewComponent', 'selector': 'cobbler-settings-view'},{'name': 'SignaturesComponent', 'selector': 'cobbler-signatures'},{'name': 'SnippetEditComponent', 'selector': 'cobbler-edit'},{'name': 'SnippetOverviewComponent', 'selector': 'cobbler-overview'},{'name': 'StatusComponent', 'selector': 'cobbler-status'},{'name': 'SyncComponent', 'selector': 'cobbler-sync'},{'name': 'SystemEditComponent', 'selector': 'cobbler-edit'},{'name': 'SystemOverviewComponent', 'selector': 'cobbler-overview'},{'name': 'TemplateEditComponent', 'selector': 'cobbler-edit'},{'name': 'TemplateOverviewComponent', 'selector': 'cobbler-overview'},{'name': 'UnauthorizedComponent', 'selector': 'cobbler-unauthorized'},{'name': 'ValidateAutoinstallsComponent', 'selector': 'cobbler-validate-autoinstalls'},{'name': 'ViewableTreeComponent', 'selector': 'cobbler-viewable-tree'}];
var DIRECTIVES = [];
var ACTUAL_COMPONENT = {'name': 'AppComponent'};
</script>
Expand Down
Loading

0 comments on commit 5a2f2b4

Please sign in to comment.