@c8y/ngx-components 1018.0.271 → 1018.0.273

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -640,9 +640,10 @@ class ConfigurationDetailComponent {
640
640
  }
641
641
  async ngOnInit() {
642
642
  this.configs = await this.repositoryService.listRepositoryEntries(RepositoryType.CONFIGURATION);
643
- if (this.selected) {
643
+ if (this.mo) {
644
644
  this.uploadChoice = this.binary.file ? 'uploadBinary' : 'uploadUrl';
645
645
  this.existingBinary = this.binary.file;
646
+ this.configurationTypeMO = this.mo;
646
647
  }
647
648
  this.setPipe('');
648
649
  this.submitButtonTitle = this.mo.id
@@ -684,11 +685,17 @@ class ConfigurationDetailComponent {
684
685
  async save() {
685
686
  try {
686
687
  this.saving = true;
687
- const { selected, version, description, binary, deviceType } = this;
688
+ const { version, description, binary, deviceType } = this;
688
689
  if (this.existingBinary === this.binary.file) {
689
690
  binary.file = undefined;
690
691
  }
691
- await this.repositoryService.create({ selected, version, description, binary, deviceType }, RepositoryType.CONFIGURATION, this.mo);
692
+ await this.repositoryService.create({
693
+ version,
694
+ description,
695
+ binary,
696
+ deviceType,
697
+ configurationType: this.configurationTypeMO?.configurationType
698
+ }, RepositoryType.CONFIGURATION, this.mo);
692
699
  this.alert.success(this.mo.id ? gettext('Configuration updated.') : gettext('Configuration created.'));
693
700
  this.bsModalRef.hide();
694
701
  this._save();
@@ -703,10 +710,10 @@ class ConfigurationDetailComponent {
703
710
  }
704
711
  }
705
712
  ConfigurationDetailComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ConfigurationDetailComponent, deps: [{ token: i3.RepositoryService }, { token: i3$1.BsModalRef }, { token: i2.AlertService }], target: i0.ɵɵFactoryTarget.Component });
706
- ConfigurationDetailComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: ConfigurationDetailComponent, selector: "c8y-configuration-detail", viewQueries: [{ propertyName: "configurationForm", first: true, predicate: ["configurationForm"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"viewport-modal\">\n <div class=\"modal-header dialog-header\" id=\"configurationModalTitle\">\n <i [c8yIcon]=\"'cogs'\"></i>\n <h4 id=\"modal-title\" translate *ngIf=\"mo.id\">Update configuration</h4>\n <h4 id=\"modal-title\" translate *ngIf=\"!mo.id\">Add configuration</h4>\n </div>\n\n <form\n class=\"d-contents\"\n #configurationForm=\"ngForm\"\n (ngSubmit)=\"configurationForm.form.valid && save()\"\n >\n <div class=\"modal-inner-scroll\" id=\"modal-body\">\n <div class=\"modal-body\" id=\"configurationModalDescription\">\n <c8y-form-group>\n <label translate>Name</label>\n <input\n type=\"text\"\n class=\"form-control\"\n placeholder=\"{{ 'e.g.' | translate }} hosts\"\n autocomplete=\"off\"\n required\n maxlength=\"254\"\n [(ngModel)]=\"version\"\n name=\"version\"\n />\n </c8y-form-group>\n\n <c8y-form-group>\n <label translate>Device type</label>\n <input\n type=\"text\"\n class=\"form-control\"\n placeholder=\"{{ 'e.g.' | translate }} c8y_Linux\"\n maxlength=\"254\"\n autocomplete=\"off\"\n [(ngModel)]=\"deviceType\"\n name=\"deviceType\"\n />\n </c8y-form-group>\n\n <c8y-form-group>\n <label translate>Description</label>\n <input\n type=\"text\"\n class=\"form-control\"\n placeholder=\"{{ 'e.g. Host configuration' | translate }} c8y_Linux\"\n maxlength=\"254\"\n autocomplete=\"off\"\n [(ngModel)]=\"description\"\n name=\"description\"\n />\n </c8y-form-group>\n\n <c8y-form-group>\n <label translate>Configuration type</label>\n <c8y-typeahead\n [(ngModel)]=\"selected\"\n name=\"confType\"\n placeholder=\"{{ 'e.g.' | translate }} ssh\"\n maxlength=\"254\"\n (onSearch)=\"setPipe($event)\"\n displayProperty=\"configurationType\"\n >\n <c8y-li\n *c8yFor=\"let config of configs; pipe: filterPipe; notFound: notFoundTemplate\"\n class=\"p-l-8 p-r-8 c8y-list__item--link\"\n (click)=\"selected = config; setPipe('')\"\n [active]=\"selected === config\"\n >\n <c8y-highlight\n [text]=\"config.configurationType || '--'\"\n [pattern]=\"pattern\"\n ></c8y-highlight>\n </c8y-li>\n <ng-template #notFoundTemplate>\n <c8y-li class=\"bg-level-2 p-8\" *ngIf=\"pattern.length > 0\">\n <span translate>No match found.</span>\n <button\n title=\"{{ 'Add new`configuration type`' | translate }}\"\n type=\"button\"\n class=\"btn btn-primary btn-xs m-l-8\"\n translate\n >\n Add new`configuration type`\n </button>\n </c8y-li>\n </ng-template>\n </c8y-typeahead>\n </c8y-form-group>\n\n <c8y-form-group>\n <div class=\"legend form-block m-t-40\" translate>Configuration file</div>\n <c8y-file-picker\n [maxAllowedFiles]=\"1\"\n (onFilesPicked)=\"onFile($event)\"\n [uploadChoice]=\"uploadChoice\"\n [fileUrl]=\"binary.url\"\n [fileBinary]=\"binary.file\"\n [fileUrlPopover]=\"textForConfigurationUrlPopover\"\n >\n </c8y-file-picker>\n </c8y-form-group>\n </div>\n </div>\n\n <div class=\"modal-footer\">\n <button\n (click)=\"cancel()\"\n type=\"button\"\n class=\"btn btn-default\"\n title=\"{{ 'Cancel' | translate }}\"\n [disabled]=\"saving\"\n >\n <span translate>Cancel</span>\n </button>\n <button\n class=\"btn btn-primary\"\n type=\"submit\"\n title=\"{{ submitButtonTitle | translate }}\"\n [ngClass]=\"{ 'btn-pending': saving }\"\n [disabled]=\"\n !configurationForm.valid ||\n configurationForm.pristine ||\n (!binary?.url && !binary?.file) ||\n saving\n \"\n >\n {{ submitButtonTitle | translate }}\n </button>\n </div>\n </form>\n</div>\n", dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i2.ForOfDirective, selector: "[c8yFor]", inputs: ["c8yForOf", "c8yForLoadMore", "c8yForPipe", "c8yForNotFound", "c8yForMaxIterations", "c8yForLoadingTemplate", "c8yForLoadNextLabel", "c8yForRealtime", "c8yForRealtimeOptions", "c8yForComparator", "c8yForEnableVirtualScroll", "c8yForVirtualScrollElementSize", "c8yForVirtualScrollStrategy", "c8yForVirtualScrollContainerHeight"], outputs: ["c8yForCount"] }, { kind: "component", type: i2.HighlightComponent, selector: "c8y-highlight", inputs: ["pattern", "text", "elementClass", "shouldTrimPattern"] }, { kind: "component", type: i2.TypeaheadComponent, selector: "c8y-typeahead", inputs: ["required", "maxlength", "disabled", "allowFreeEntries", "placeholder", "displayProperty", "icon", "name", "autoClose", "hideNew", "container", "selected"], outputs: ["onSearch", "onIconClick"] }, { kind: "directive", type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i2.FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "directive", type: i2.RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "component", type: i2.ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "emptyActions", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "component", type: i2.FilePickerComponent, selector: "c8y-file-picker", inputs: ["maxAllowedFiles", "uploadChoice", "fileUrl", "fileBinary", "config", "fileUrlPopover"], outputs: ["onFilesPicked"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }] });
713
+ ConfigurationDetailComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: ConfigurationDetailComponent, selector: "c8y-configuration-detail", viewQueries: [{ propertyName: "configurationForm", first: true, predicate: ["configurationForm"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"viewport-modal\">\n <div\n class=\"modal-header dialog-header\"\n id=\"configurationModalTitle\"\n >\n <i [c8yIcon]=\"'cogs'\"></i>\n <h4\n id=\"modal-title\"\n translate\n *ngIf=\"mo.id\"\n >\n Update configuration\n </h4>\n <h4\n id=\"modal-title\"\n translate\n *ngIf=\"!mo.id\"\n >\n Add configuration\n </h4>\n </div>\n\n <form\n class=\"d-contents\"\n #configurationForm=\"ngForm\"\n (ngSubmit)=\"configurationForm.form.valid && save()\"\n >\n <div\n class=\"modal-inner-scroll\"\n id=\"modal-body\"\n >\n <div\n class=\"modal-body\"\n id=\"configurationModalDescription\"\n >\n <c8y-form-group>\n <label translate>Name</label>\n <input\n class=\"form-control\"\n placeholder=\"{{ 'e.g.' | translate }} hosts\"\n name=\"version\"\n type=\"text\"\n autocomplete=\"off\"\n required\n maxlength=\"254\"\n [(ngModel)]=\"version\"\n />\n </c8y-form-group>\n\n <c8y-form-group>\n <label translate>Device type</label>\n <input\n class=\"form-control\"\n placeholder=\"{{ 'e.g.' | translate }} c8y_Linux\"\n name=\"deviceType\"\n type=\"text\"\n autocomplete=\"off\"\n maxlength=\"254\"\n [(ngModel)]=\"deviceType\"\n />\n </c8y-form-group>\n\n <c8y-form-group>\n <label translate>Description</label>\n <input\n class=\"form-control\"\n placeholder=\"{{ 'e.g. Host configuration' | translate }} c8y_Linux\"\n name=\"description\"\n type=\"text\"\n autocomplete=\"off\"\n maxlength=\"254\"\n [(ngModel)]=\"description\"\n />\n </c8y-form-group>\n\n <c8y-form-group>\n <label translate>Configuration type</label>\n <c8y-typeahead\n placeholder=\"{{ 'e.g.' | translate }} ssh\"\n name=\"confType\"\n [(ngModel)]=\"configurationTypeMO\"\n maxlength=\"254\"\n (onSearch)=\"setPipe($event)\"\n displayProperty=\"configurationType\"\n >\n <c8y-li\n class=\"p-l-8 p-r-8 c8y-list__item--link\"\n *c8yFor=\"let config of configs; pipe: filterPipe; notFound: notFoundTemplate\"\n (click)=\"configurationTypeMO = config; setPipe('')\"\n [active]=\"configurationTypeMO === config\"\n >\n <c8y-highlight\n [text]=\"config.configurationType || '--'\"\n [pattern]=\"pattern\"\n ></c8y-highlight>\n </c8y-li>\n <ng-template #notFoundTemplate>\n <c8y-li\n class=\"bg-level-2 p-8\"\n *ngIf=\"pattern.length > 0\"\n >\n <span translate>No match found.</span>\n <button\n class=\"btn btn-primary btn-xs m-l-8\"\n title=\"{{ 'Add new`configuration type`' | translate }}\"\n type=\"button\"\n translate\n >\n Add new`configuration type`\n </button>\n </c8y-li>\n </ng-template>\n </c8y-typeahead>\n </c8y-form-group>\n\n <c8y-form-group>\n <div\n class=\"legend form-block m-t-40\"\n translate\n >\n Configuration file\n </div>\n <c8y-file-picker\n [maxAllowedFiles]=\"1\"\n (onFilesPicked)=\"onFile($event)\"\n [uploadChoice]=\"uploadChoice\"\n [fileUrl]=\"binary.url\"\n [fileBinary]=\"binary.file\"\n [fileUrlPopover]=\"textForConfigurationUrlPopover\"\n ></c8y-file-picker>\n </c8y-form-group>\n </div>\n </div>\n\n <div class=\"modal-footer\">\n <button\n class=\"btn btn-default\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n (click)=\"cancel()\"\n [disabled]=\"saving\"\n >\n <span translate>Cancel</span>\n </button>\n <button\n class=\"btn btn-primary\"\n title=\"{{ submitButtonTitle | translate }}\"\n type=\"submit\"\n [ngClass]=\"{ 'btn-pending': saving }\"\n [disabled]=\"\n !configurationForm.valid ||\n configurationForm.pristine ||\n (!binary?.url && !binary?.file) ||\n saving\n \"\n >\n {{ submitButtonTitle | translate }}\n </button>\n </div>\n </form>\n</div>\n", dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i2.ForOfDirective, selector: "[c8yFor]", inputs: ["c8yForOf", "c8yForLoadMore", "c8yForPipe", "c8yForNotFound", "c8yForMaxIterations", "c8yForLoadingTemplate", "c8yForLoadNextLabel", "c8yForRealtime", "c8yForRealtimeOptions", "c8yForComparator", "c8yForEnableVirtualScroll", "c8yForVirtualScrollElementSize", "c8yForVirtualScrollStrategy", "c8yForVirtualScrollContainerHeight"], outputs: ["c8yForCount"] }, { kind: "component", type: i2.HighlightComponent, selector: "c8y-highlight", inputs: ["pattern", "text", "elementClass", "shouldTrimPattern"] }, { kind: "component", type: i2.TypeaheadComponent, selector: "c8y-typeahead", inputs: ["required", "maxlength", "disabled", "allowFreeEntries", "placeholder", "displayProperty", "icon", "name", "autoClose", "hideNew", "container", "selected"], outputs: ["onSearch", "onIconClick"] }, { kind: "directive", type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i2.FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "directive", type: i2.RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "component", type: i2.ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "emptyActions", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "component", type: i2.FilePickerComponent, selector: "c8y-file-picker", inputs: ["maxAllowedFiles", "uploadChoice", "fileUrl", "fileBinary", "config", "fileUrlPopover"], outputs: ["onFilesPicked"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }] });
707
714
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ConfigurationDetailComponent, decorators: [{
708
715
  type: Component,
709
- args: [{ selector: 'c8y-configuration-detail', template: "<div class=\"viewport-modal\">\n <div class=\"modal-header dialog-header\" id=\"configurationModalTitle\">\n <i [c8yIcon]=\"'cogs'\"></i>\n <h4 id=\"modal-title\" translate *ngIf=\"mo.id\">Update configuration</h4>\n <h4 id=\"modal-title\" translate *ngIf=\"!mo.id\">Add configuration</h4>\n </div>\n\n <form\n class=\"d-contents\"\n #configurationForm=\"ngForm\"\n (ngSubmit)=\"configurationForm.form.valid && save()\"\n >\n <div class=\"modal-inner-scroll\" id=\"modal-body\">\n <div class=\"modal-body\" id=\"configurationModalDescription\">\n <c8y-form-group>\n <label translate>Name</label>\n <input\n type=\"text\"\n class=\"form-control\"\n placeholder=\"{{ 'e.g.' | translate }} hosts\"\n autocomplete=\"off\"\n required\n maxlength=\"254\"\n [(ngModel)]=\"version\"\n name=\"version\"\n />\n </c8y-form-group>\n\n <c8y-form-group>\n <label translate>Device type</label>\n <input\n type=\"text\"\n class=\"form-control\"\n placeholder=\"{{ 'e.g.' | translate }} c8y_Linux\"\n maxlength=\"254\"\n autocomplete=\"off\"\n [(ngModel)]=\"deviceType\"\n name=\"deviceType\"\n />\n </c8y-form-group>\n\n <c8y-form-group>\n <label translate>Description</label>\n <input\n type=\"text\"\n class=\"form-control\"\n placeholder=\"{{ 'e.g. Host configuration' | translate }} c8y_Linux\"\n maxlength=\"254\"\n autocomplete=\"off\"\n [(ngModel)]=\"description\"\n name=\"description\"\n />\n </c8y-form-group>\n\n <c8y-form-group>\n <label translate>Configuration type</label>\n <c8y-typeahead\n [(ngModel)]=\"selected\"\n name=\"confType\"\n placeholder=\"{{ 'e.g.' | translate }} ssh\"\n maxlength=\"254\"\n (onSearch)=\"setPipe($event)\"\n displayProperty=\"configurationType\"\n >\n <c8y-li\n *c8yFor=\"let config of configs; pipe: filterPipe; notFound: notFoundTemplate\"\n class=\"p-l-8 p-r-8 c8y-list__item--link\"\n (click)=\"selected = config; setPipe('')\"\n [active]=\"selected === config\"\n >\n <c8y-highlight\n [text]=\"config.configurationType || '--'\"\n [pattern]=\"pattern\"\n ></c8y-highlight>\n </c8y-li>\n <ng-template #notFoundTemplate>\n <c8y-li class=\"bg-level-2 p-8\" *ngIf=\"pattern.length > 0\">\n <span translate>No match found.</span>\n <button\n title=\"{{ 'Add new`configuration type`' | translate }}\"\n type=\"button\"\n class=\"btn btn-primary btn-xs m-l-8\"\n translate\n >\n Add new`configuration type`\n </button>\n </c8y-li>\n </ng-template>\n </c8y-typeahead>\n </c8y-form-group>\n\n <c8y-form-group>\n <div class=\"legend form-block m-t-40\" translate>Configuration file</div>\n <c8y-file-picker\n [maxAllowedFiles]=\"1\"\n (onFilesPicked)=\"onFile($event)\"\n [uploadChoice]=\"uploadChoice\"\n [fileUrl]=\"binary.url\"\n [fileBinary]=\"binary.file\"\n [fileUrlPopover]=\"textForConfigurationUrlPopover\"\n >\n </c8y-file-picker>\n </c8y-form-group>\n </div>\n </div>\n\n <div class=\"modal-footer\">\n <button\n (click)=\"cancel()\"\n type=\"button\"\n class=\"btn btn-default\"\n title=\"{{ 'Cancel' | translate }}\"\n [disabled]=\"saving\"\n >\n <span translate>Cancel</span>\n </button>\n <button\n class=\"btn btn-primary\"\n type=\"submit\"\n title=\"{{ submitButtonTitle | translate }}\"\n [ngClass]=\"{ 'btn-pending': saving }\"\n [disabled]=\"\n !configurationForm.valid ||\n configurationForm.pristine ||\n (!binary?.url && !binary?.file) ||\n saving\n \"\n >\n {{ submitButtonTitle | translate }}\n </button>\n </div>\n </form>\n</div>\n" }]
716
+ args: [{ selector: 'c8y-configuration-detail', template: "<div class=\"viewport-modal\">\n <div\n class=\"modal-header dialog-header\"\n id=\"configurationModalTitle\"\n >\n <i [c8yIcon]=\"'cogs'\"></i>\n <h4\n id=\"modal-title\"\n translate\n *ngIf=\"mo.id\"\n >\n Update configuration\n </h4>\n <h4\n id=\"modal-title\"\n translate\n *ngIf=\"!mo.id\"\n >\n Add configuration\n </h4>\n </div>\n\n <form\n class=\"d-contents\"\n #configurationForm=\"ngForm\"\n (ngSubmit)=\"configurationForm.form.valid && save()\"\n >\n <div\n class=\"modal-inner-scroll\"\n id=\"modal-body\"\n >\n <div\n class=\"modal-body\"\n id=\"configurationModalDescription\"\n >\n <c8y-form-group>\n <label translate>Name</label>\n <input\n class=\"form-control\"\n placeholder=\"{{ 'e.g.' | translate }} hosts\"\n name=\"version\"\n type=\"text\"\n autocomplete=\"off\"\n required\n maxlength=\"254\"\n [(ngModel)]=\"version\"\n />\n </c8y-form-group>\n\n <c8y-form-group>\n <label translate>Device type</label>\n <input\n class=\"form-control\"\n placeholder=\"{{ 'e.g.' | translate }} c8y_Linux\"\n name=\"deviceType\"\n type=\"text\"\n autocomplete=\"off\"\n maxlength=\"254\"\n [(ngModel)]=\"deviceType\"\n />\n </c8y-form-group>\n\n <c8y-form-group>\n <label translate>Description</label>\n <input\n class=\"form-control\"\n placeholder=\"{{ 'e.g. Host configuration' | translate }} c8y_Linux\"\n name=\"description\"\n type=\"text\"\n autocomplete=\"off\"\n maxlength=\"254\"\n [(ngModel)]=\"description\"\n />\n </c8y-form-group>\n\n <c8y-form-group>\n <label translate>Configuration type</label>\n <c8y-typeahead\n placeholder=\"{{ 'e.g.' | translate }} ssh\"\n name=\"confType\"\n [(ngModel)]=\"configurationTypeMO\"\n maxlength=\"254\"\n (onSearch)=\"setPipe($event)\"\n displayProperty=\"configurationType\"\n >\n <c8y-li\n class=\"p-l-8 p-r-8 c8y-list__item--link\"\n *c8yFor=\"let config of configs; pipe: filterPipe; notFound: notFoundTemplate\"\n (click)=\"configurationTypeMO = config; setPipe('')\"\n [active]=\"configurationTypeMO === config\"\n >\n <c8y-highlight\n [text]=\"config.configurationType || '--'\"\n [pattern]=\"pattern\"\n ></c8y-highlight>\n </c8y-li>\n <ng-template #notFoundTemplate>\n <c8y-li\n class=\"bg-level-2 p-8\"\n *ngIf=\"pattern.length > 0\"\n >\n <span translate>No match found.</span>\n <button\n class=\"btn btn-primary btn-xs m-l-8\"\n title=\"{{ 'Add new`configuration type`' | translate }}\"\n type=\"button\"\n translate\n >\n Add new`configuration type`\n </button>\n </c8y-li>\n </ng-template>\n </c8y-typeahead>\n </c8y-form-group>\n\n <c8y-form-group>\n <div\n class=\"legend form-block m-t-40\"\n translate\n >\n Configuration file\n </div>\n <c8y-file-picker\n [maxAllowedFiles]=\"1\"\n (onFilesPicked)=\"onFile($event)\"\n [uploadChoice]=\"uploadChoice\"\n [fileUrl]=\"binary.url\"\n [fileBinary]=\"binary.file\"\n [fileUrlPopover]=\"textForConfigurationUrlPopover\"\n ></c8y-file-picker>\n </c8y-form-group>\n </div>\n </div>\n\n <div class=\"modal-footer\">\n <button\n class=\"btn btn-default\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n (click)=\"cancel()\"\n [disabled]=\"saving\"\n >\n <span translate>Cancel</span>\n </button>\n <button\n class=\"btn btn-primary\"\n title=\"{{ submitButtonTitle | translate }}\"\n type=\"submit\"\n [ngClass]=\"{ 'btn-pending': saving }\"\n [disabled]=\"\n !configurationForm.valid ||\n configurationForm.pristine ||\n (!binary?.url && !binary?.file) ||\n saving\n \"\n >\n {{ submitButtonTitle | translate }}\n </button>\n </div>\n </form>\n</div>\n" }]
710
717
  }], ctorParameters: function () { return [{ type: i3.RepositoryService }, { type: i3$1.BsModalRef }, { type: i2.AlertService }]; }, propDecorators: { configurationForm: [{
711
718
  type: ViewChild,
712
719
  args: ['configurationForm', { static: true }]
@@ -759,7 +766,6 @@ class ConfigurationListComponent {
759
766
  ariaLabelledBy: 'configurationModalTitle',
760
767
  ignoreBackdropClick: true,
761
768
  initialState: {
762
- selected: configuration,
763
769
  version: configuration.name,
764
770
  deviceType: configuration.deviceType,
765
771
  description: configuration.description,