@c8y/ngx-components 1009.0.34 → 1009.0.35
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.
- package/bundles/c8y-ngx-components-repository.umd.js +8 -4
- package/bundles/c8y-ngx-components-repository.umd.js.map +1 -1
- package/bundles/c8y-ngx-components-repository.umd.min.js +1 -1
- package/bundles/c8y-ngx-components-repository.umd.min.js.map +1 -1
- package/bundles/c8y-ngx-components.umd.js +14 -8
- package/bundles/c8y-ngx-components.umd.js.map +1 -1
- package/bundles/c8y-ngx-components.umd.min.js +1 -1
- package/bundles/c8y-ngx-components.umd.min.js.map +1 -1
- package/c8y-ngx-components.metadata.json +1 -1
- package/core/file-picker/file-picker.component.d.ts +8 -0
- package/esm2015/core/file-picker/file-picker.component.js +12 -2
- package/esm2015/core/file-picker/file-picker.module.js +6 -8
- package/esm2015/repository/configuration/configuration-detail.component.js +7 -2
- package/esm2015/repository/firmware/add-firmware-modal.component.js +7 -2
- package/esm2015/repository/firmware/add-firmware-patch-modal.component.js +7 -2
- package/esm2015/repository/software/add-software-modal.component.js +7 -2
- package/esm5/core/file-picker/file-picker.component.js +12 -2
- package/esm5/core/file-picker/file-picker.module.js +6 -8
- package/esm5/repository/configuration/configuration-detail.component.js +3 -2
- package/esm5/repository/firmware/add-firmware-modal.component.js +3 -2
- package/esm5/repository/firmware/add-firmware-patch-modal.component.js +3 -2
- package/esm5/repository/software/add-software-modal.component.js +3 -2
- package/fesm2015/c8y-ngx-components-repository.js +24 -4
- package/fesm2015/c8y-ngx-components-repository.js.map +1 -1
- package/fesm2015/c8y-ngx-components.js +14 -8
- package/fesm2015/c8y-ngx-components.js.map +1 -1
- package/fesm5/c8y-ngx-components-repository.js +8 -4
- package/fesm5/c8y-ngx-components-repository.js.map +1 -1
- package/fesm5/c8y-ngx-components.js +14 -8
- package/fesm5/c8y-ngx-components.js.map +1 -1
- package/locales/locales.pot +24 -3
- package/package.json +2 -2
- package/repository/c8y-ngx-components-repository.metadata.json +1 -1
- package/repository/configuration/configuration-detail.component.d.ts +1 -0
- package/repository/firmware/add-firmware-modal.component.d.ts +1 -0
- package/repository/firmware/add-firmware-patch-modal.component.d.ts +1 -0
- package/repository/software/add-software-modal.component.d.ts +1 -0
|
@@ -1328,6 +1328,7 @@ var AddFirmwareModalComponent = /** @class */ (function () {
|
|
|
1328
1328
|
};
|
|
1329
1329
|
this.saving = false;
|
|
1330
1330
|
this.firmwarePreselected = false;
|
|
1331
|
+
this.textForFirmwareUrlPopover = gettext("Path for binaries can vary depending on device agent implementation, e.g.:\n /firmware/binaries/firmware1.bin\n https://firmware/binary/123\n ftp://firmware/binary/123.tar.gz\n ");
|
|
1331
1332
|
}
|
|
1332
1333
|
AddFirmwareModalComponent.prototype.ngOnInit = function () {
|
|
1333
1334
|
this.setInitialState();
|
|
@@ -1433,7 +1434,7 @@ var AddFirmwareModalComponent = /** @class */ (function () {
|
|
|
1433
1434
|
AddFirmwareModalComponent = __decorate([
|
|
1434
1435
|
Component({
|
|
1435
1436
|
selector: 'c8y-add-firmware-software-modal',
|
|
1436
|
-
template: "<div class=\"viewport-modal\">\n <div class=\"modal-header dialog-header\">\n <i [c8yIcon]=\"'c8y-firmware'\"></i>\n <h4 translate>\n Add firmware\n </h4>\n </div>\n <div class=\"p-16 text-center separator-bottom\" *ngIf=\"!firmwarePreselected\">\n <p class=\"lead m-0\" translate>\n Select or create new firmware\n </p>\n </div>\n <form\n class=\"d-contents\"\n autocomplete=\"off\"\n #firmwareForm=\"ngForm\"\n (ngSubmit)=\"firmwareForm.form.valid && save()\"\n >\n <div class=\"modal-inner-scroll\">\n <div class=\"modal-body\">\n <div [hidden]=\"firmwarePreselected\">\n <c8y-form-group>\n <label for=\"firmwareName\" translate>Firmware</label>\n <c8y-typeahead\n [(ngModel)]=\"model.selected\"\n name=\"firmwareName\"\n placeholder=\"{{ 'Select or enter' | translate }}\"\n (onSearch)=\"onInput.next($event)\"\n [required]=\"true\"\n >\n <c8y-li\n *c8yFor=\"\n let firmware of firmwaresResult;\n loadMore: 'auto';\n notFound: notFoundTemplate\n \"\n class=\"p-l-8 p-r-8 c8y-list__item--link\"\n (click)=\"onFirmwareSelect(firmware)\"\n [active]=\"model.selected === firmware\"\n >\n <c8y-highlight\n [text]=\"firmware.name || '--'\"\n [pattern]=\"onInput | async\"\n ></c8y-highlight>\n </c8y-li>\n <ng-template #notFoundTemplate>\n <c8y-li class=\"bg-gray-lighter p-8\" *ngIf=\"(onInput | async)?.length > 0\">\n <span translate>No match found, add new`firmware`? </span>\n <button\n title=\"{{ 'Create new`firmware`' | translate }}\"\n type=\"button\"\n class=\"btn btn-primary btn-xs m-l-16\"\n translate\n >\n Create new`firmware`\n </button>\n </c8y-li>\n </ng-template>\n </c8y-typeahead>\n </c8y-form-group>\n\n <c8y-form-group>\n <label for=\"firmwareDescription\" translate>Description</label>\n <input\n id=\"firmwareDescription\"\n class=\"form-control\"\n autocomplete=\"off\"\n name=\"description\"\n [(ngModel)]=\"model.description\"\n placeholder=\"{{ 'e.g. Firmware for hardware revision b' | translate }}\"\n [disabled]=\"model.selected?.id\"\n [required]=\"true\"\n />\n </c8y-form-group>\n\n <c8y-form-group>\n <label for=\"firmwareDeviceTypeFilter\" translate>Device type filter</label>\n <input\n id=\"firmwareDeviceTypeFilter\"\n class=\"form-control\"\n name=\"firmwareDeviceTypeFilter\"\n popover=\"{{\n 'If the filter is set, the firmware will show up for installation only for devices of that type. If no filter is set, it will be available for all devices.'\n | translate\n }}\"\n [(ngModel)]=\"model.deviceType\"\n placeholder=\"{{ 'e.g.' | translate }} c8y_Linux\"\n [disabled]=\"model.selected?.id\"\n />\n </c8y-form-group>\n </div>\n\n <c8y-form-group>\n <label for=\"firmwareVersion\" translate>Version</label>\n <input\n id=\"firmwareVersion\"\n class=\"form-control\"\n autocomplete=\"off\"\n name=\"version\"\n [(ngModel)]=\"model.version\"\n placeholder=\"{{ 'e.g.' | translate }} 1.0.0\"\n [required]=\"true\"\n />\n </c8y-form-group>\n\n <c8y-form-group>\n <div class=\"legend form-block top-m-xxl\" translate>Firmware file</div>\n <c8y-file-picker [maxAllowedFiles]=\"1\" (onFilesPicked)=\"onFile($event)\">\n </c8y-file-picker>\n </c8y-form-group>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button\n title=\"{{ 'Cancel' | translate }}\"\n class=\"btn btn-default\"\n type=\"button\"\n (click)=\"cancel()\"\n [disabled]=\"saving\"\n translate\n >\n Cancel\n </button>\n\n <button\n title=\"{{ 'Add firmware' | translate }}\"\n class=\"btn btn-primary\"\n type=\"submit\"\n [ngClass]=\"{ 'btn-pending': saving }\"\n [disabled]=\"\n !firmwareForm.form.valid ||\n firmwareForm.form.pristine ||\n saving ||\n (!model.binary?.url && !model.binary?.file)\n \"\n translate\n >\n Add firmware\n </button>\n </div>\n </form>\n</div>\n"
|
|
1437
|
+
template: "<div class=\"viewport-modal\">\n <div class=\"modal-header dialog-header\">\n <i [c8yIcon]=\"'c8y-firmware'\"></i>\n <h4 translate>\n Add firmware\n </h4>\n </div>\n <div class=\"p-16 text-center separator-bottom\" *ngIf=\"!firmwarePreselected\">\n <p class=\"lead m-0\" translate>\n Select or create new firmware\n </p>\n </div>\n <form\n class=\"d-contents\"\n autocomplete=\"off\"\n #firmwareForm=\"ngForm\"\n (ngSubmit)=\"firmwareForm.form.valid && save()\"\n >\n <div class=\"modal-inner-scroll\">\n <div class=\"modal-body\">\n <div [hidden]=\"firmwarePreselected\">\n <c8y-form-group>\n <label for=\"firmwareName\" translate>Firmware</label>\n <c8y-typeahead\n [(ngModel)]=\"model.selected\"\n name=\"firmwareName\"\n placeholder=\"{{ 'Select or enter' | translate }}\"\n (onSearch)=\"onInput.next($event)\"\n [required]=\"true\"\n >\n <c8y-li\n *c8yFor=\"\n let firmware of firmwaresResult;\n loadMore: 'auto';\n notFound: notFoundTemplate\n \"\n class=\"p-l-8 p-r-8 c8y-list__item--link\"\n (click)=\"onFirmwareSelect(firmware)\"\n [active]=\"model.selected === firmware\"\n >\n <c8y-highlight\n [text]=\"firmware.name || '--'\"\n [pattern]=\"onInput | async\"\n ></c8y-highlight>\n </c8y-li>\n <ng-template #notFoundTemplate>\n <c8y-li class=\"bg-gray-lighter p-8\" *ngIf=\"(onInput | async)?.length > 0\">\n <span translate>No match found, add new`firmware`? </span>\n <button\n title=\"{{ 'Create new`firmware`' | translate }}\"\n type=\"button\"\n class=\"btn btn-primary btn-xs m-l-16\"\n translate\n >\n Create new`firmware`\n </button>\n </c8y-li>\n </ng-template>\n </c8y-typeahead>\n </c8y-form-group>\n\n <c8y-form-group>\n <label for=\"firmwareDescription\" translate>Description</label>\n <input\n id=\"firmwareDescription\"\n class=\"form-control\"\n autocomplete=\"off\"\n name=\"description\"\n [(ngModel)]=\"model.description\"\n placeholder=\"{{ 'e.g. Firmware for hardware revision b' | translate }}\"\n [disabled]=\"model.selected?.id\"\n [required]=\"true\"\n />\n </c8y-form-group>\n\n <c8y-form-group>\n <label for=\"firmwareDeviceTypeFilter\" translate>Device type filter</label>\n <input\n id=\"firmwareDeviceTypeFilter\"\n class=\"form-control\"\n name=\"firmwareDeviceTypeFilter\"\n popover=\"{{\n 'If the filter is set, the firmware will show up for installation only for devices of that type. If no filter is set, it will be available for all devices.'\n | translate\n }}\"\n [(ngModel)]=\"model.deviceType\"\n placeholder=\"{{ 'e.g.' | translate }} c8y_Linux\"\n [disabled]=\"model.selected?.id\"\n />\n </c8y-form-group>\n </div>\n\n <c8y-form-group>\n <label for=\"firmwareVersion\" translate>Version</label>\n <input\n id=\"firmwareVersion\"\n class=\"form-control\"\n autocomplete=\"off\"\n name=\"version\"\n [(ngModel)]=\"model.version\"\n placeholder=\"{{ 'e.g.' | translate }} 1.0.0\"\n [required]=\"true\"\n />\n </c8y-form-group>\n\n <c8y-form-group>\n <div class=\"legend form-block top-m-xxl\" translate>Firmware file</div>\n <c8y-file-picker [maxAllowedFiles]=\"1\" (onFilesPicked)=\"onFile($event)\" [fileUrlPopover]=\"textForFirmwareUrlPopover\">\n </c8y-file-picker>\n </c8y-form-group>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button\n title=\"{{ 'Cancel' | translate }}\"\n class=\"btn btn-default\"\n type=\"button\"\n (click)=\"cancel()\"\n [disabled]=\"saving\"\n translate\n >\n Cancel\n </button>\n\n <button\n title=\"{{ 'Add firmware' | translate }}\"\n class=\"btn btn-primary\"\n type=\"submit\"\n [ngClass]=\"{ 'btn-pending': saving }\"\n [disabled]=\"\n !firmwareForm.form.valid ||\n firmwareForm.form.pristine ||\n saving ||\n (!model.binary?.url && !model.binary?.file)\n \"\n translate\n >\n Add firmware\n </button>\n </div>\n </form>\n</div>\n"
|
|
1437
1438
|
})
|
|
1438
1439
|
], AddFirmwareModalComponent);
|
|
1439
1440
|
return AddFirmwareModalComponent;
|
|
@@ -1446,6 +1447,7 @@ var AddFirmwarePatchModalComponent = /** @class */ (function () {
|
|
|
1446
1447
|
this.repository = repository;
|
|
1447
1448
|
this.alert = alert;
|
|
1448
1449
|
this.saved = new EventEmitter();
|
|
1450
|
+
this.textForFirmwareUrlPopover = gettext("Path for binaries can vary depending on device agent implementation, e.g.:\n /firmware/binaries/firmware1.bin\n https://firmware/binary/123\n ftp://firmware/binary/123.tar.gz\n ");
|
|
1449
1451
|
this.model = {
|
|
1450
1452
|
selected: undefined,
|
|
1451
1453
|
dependency: null,
|
|
@@ -1564,7 +1566,7 @@ var AddFirmwarePatchModalComponent = /** @class */ (function () {
|
|
|
1564
1566
|
AddFirmwarePatchModalComponent = __decorate([
|
|
1565
1567
|
Component({
|
|
1566
1568
|
selector: 'c8y-add-firmware-patch-modal.component',
|
|
1567
|
-
template: "<div class=\"viewport-modal\">\n <div class=\"modal-header dialog-header\">\n <i [c8yIcon]=\"'c8y-firmware'\"></i>\n <h4 translate>\n Add firmware patch\n </h4>\n </div>\n <div class=\"p-16 text-center separator-bottom\">\n <p class=\"lead m-0\" translate>\n Select a firmware version\n </p>\n </div>\n\n <form
|
|
1569
|
+
template: "<div class=\"viewport-modal\">\n <div class=\"modal-header dialog-header\">\n <i [c8yIcon]=\"'c8y-firmware'\"></i>\n <h4 translate>\n Add firmware patch\n </h4>\n </div>\n <div class=\"p-16 text-center separator-bottom\">\n <p class=\"lead m-0\" translate>\n Select a firmware version\n </p>\n </div>\n\n <form\n class=\"d-contents\"\n autocomplete=\"off\"\n #firmwarePatchForm=\"ngForm\"\n (ngSubmit)=\"firmwarePatchForm.form.valid && save()\"\n >\n <div class=\"modal-inner-scroll\">\n <div class=\"modal-body\">\n <div [hidden]=\"firmwarePreselected\">\n <c8y-form-group>\n <label for=\"firmwareName\" translate>Firmware</label>\n <c8y-typeahead\n [ngModel]=\"model.selected\"\n name=\"firmwareName\"\n placeholder=\"{{ 'Select or enter' | translate }}\"\n (onSearch)=\"firmwareInput$.next($event)\"\n [allowFreeEntries]=\"false\"\n [required]=\"true\"\n >\n <c8y-li\n *c8yFor=\"let firmware of firmwares$ | async; loadMore: 'auto'\"\n class=\"p-l-8 p-r-8 c8y-list__item--link\"\n (click)=\"model.selected = firmware; firmwareSelected$.next(firmware)\"\n [active]=\"model.selected === firmware\"\n >\n <c8y-highlight\n [text]=\"firmware.name || '--'\"\n [pattern]=\"firmwareInput$ | async\"\n ></c8y-highlight>\n </c8y-li>\n </c8y-typeahead>\n <c8y-messages\n ><c8y-message\n name=\"notExisting\"\n [text]=\"'Select one of the existing firmwares.' | translate\"\n ></c8y-message>\n </c8y-messages>\n </c8y-form-group>\n </div>\n\n <c8y-form-group>\n <label for=\"patchDependency\" class=\"m-r-8\" translate>Version</label>\n <c8y-typeahead\n [ngModel]=\"model.dependency\"\n name=\"patchDependency\"\n placeholder=\"{{ 'Select or enter' | translate }}\"\n (onSearch)=\"patchDependencyInput$.next($event)\"\n [displayProperty]=\"'c8y_Firmware.version'\"\n [allowFreeEntries]=\"false\"\n [disabled]=\"\n (baseVersions$ | async) === null || (baseVersions$ | async)?.data.length === 0\n \"\n [required]=\"true\"\n >\n <c8y-li\n *c8yFor=\"\n let baseVersion of baseVersions$;\n loadMore: 'auto';\n pipe: baseVersionsFilterPipe\n \"\n class=\"p-l-8 p-r-8 c8y-list__item--link\"\n (click)=\"model.dependency = baseVersion\"\n [active]=\"model.dependency === baseVersion\"\n >\n <c8y-highlight\n [text]=\"baseVersion.c8y_Firmware.version || '--'\"\n [pattern]=\"patchDependencyInput$ | async\"\n ></c8y-highlight>\n </c8y-li>\n </c8y-typeahead>\n <c8y-messages\n ><c8y-message\n name=\"notExisting\"\n [text]=\"'Select one of the existing versions.' | translate\"\n ></c8y-message>\n </c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label for=\"patchVersion\" translate>Patch</label>\n <input\n id=\"patchVersion\"\n class=\"form-control\"\n autocomplete=\"off\"\n name=\"patchVersion\"\n [(ngModel)]=\"model.patchVersion\"\n placeholder=\"{{ 'e.g.' | translate }} 1.0.0\"\n required\n />\n </c8y-form-group>\n\n <c8y-form-group>\n <div class=\"legend form-block top-m-xxl\" translate>Patch file</div>\n <c8y-file-picker [maxAllowedFiles]=\"1\" (onFilesPicked)=\"onFile($event)\" [fileUrlPopover]=\"textForFirmwareUrlPopover\">\n </c8y-file-picker>\n </c8y-form-group>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button\n title=\"{{ 'Cancel' | translate }}\"\n class=\"btn btn-default\"\n type=\"button\"\n (click)=\"cancel()\"\n [disabled]=\"saving\"\n translate\n >\n Cancel\n </button>\n <button\n title=\"{{ 'Add firmware patch' | translate }}\"\n class=\"btn btn-primary\"\n type=\"submit\"\n [ngClass]=\"{ 'btn-pending': saving }\"\n [disabled]=\"\n !firmwarePatchForm.form.valid ||\n firmwarePatchForm.form.pristine ||\n (!model.binary?.url && !model.binary?.file) ||\n saving\n \"\n translate\n >\n Add firmware patch\n </button>\n </div>\n </form>\n</div>\n"
|
|
1568
1570
|
})
|
|
1569
1571
|
], AddFirmwarePatchModalComponent);
|
|
1570
1572
|
return AddFirmwarePatchModalComponent;
|
|
@@ -1886,6 +1888,7 @@ var AddSoftwareModalComponent = /** @class */ (function () {
|
|
|
1886
1888
|
};
|
|
1887
1889
|
this.saving = false;
|
|
1888
1890
|
this.softwarePreselected = false;
|
|
1891
|
+
this.textForSoftwareUrlPopover = gettext("Path for binaries can vary depending on device agent implementation, e.g.:\n /software/binaries/software1.bin\n https://software/binary/123\n ftp://software/binary/123.tar.gz\n ");
|
|
1889
1892
|
}
|
|
1890
1893
|
AddSoftwareModalComponent.prototype.ngOnInit = function () {
|
|
1891
1894
|
this.setInitialState();
|
|
@@ -1991,7 +1994,7 @@ var AddSoftwareModalComponent = /** @class */ (function () {
|
|
|
1991
1994
|
AddSoftwareModalComponent = __decorate([
|
|
1992
1995
|
Component({
|
|
1993
1996
|
selector: 'c8y-add-software-software-modal',
|
|
1994
|
-
template: "<div class=\"viewport-modal\">\n <div class=\"modal-header dialog-header\">\n <i [c8yIcon]=\"'c8y-tools'\"></i>\n <h4 translate>\n Add software\n </h4>\n </div>\n <div class=\"p-16 text-center separator-bottom\" *ngIf=\"!softwarePreselected\">\n <p class=\"lead m-0\" translate>\n Select or create new software\n </p>\n </div>\n <form\n class=\"d-contents\"\n autocomplete=\"off\"\n #softwareForm=\"ngForm\"\n (ngSubmit)=\"softwareForm.form.valid && save()\"\n >\n <div class=\"modal-inner-scroll\">\n <div class=\"modal-body\">\n <div [hidden]=\"softwarePreselected\">\n <c8y-form-group>\n <label for=\"softwareName\" translate>Software</label>\n <c8y-typeahead\n [(ngModel)]=\"model.selected\"\n name=\"softwareName\"\n placeholder=\"{{ 'Select or enter' | translate }}\"\n (onSearch)=\"onInput.next($event)\"\n [required]=\"true\"\n >\n <c8y-li\n *c8yFor=\"\n let software of softwaresResult;\n loadMore: 'auto';\n notFound: notFoundTemplate\n \"\n class=\"p-l-8 p-r-8 c8y-list__item--link\"\n (click)=\"onSoftwareSelect(software)\"\n [active]=\"model.selected === software\"\n >\n <c8y-highlight\n [text]=\"software.name || '--'\"\n [pattern]=\"onInput | async\"\n ></c8y-highlight>\n </c8y-li>\n <ng-template #notFoundTemplate>\n <c8y-li class=\"bg-gray-lighter p-8\" *ngIf=\"(onInput | async)?.length > 0\">\n <span translate>No match found, add new`software`? </span>\n <button\n title=\"{{ 'Create new`software`' | translate }}\"\n type=\"button\"\n class=\"btn btn-primary btn-xs m-l-16\"\n translate\n >\n Create new`software`\n </button>\n </c8y-li>\n </ng-template>\n </c8y-typeahead>\n </c8y-form-group>\n\n <c8y-form-group>\n <label for=\"softwareDescription\" translate>Description</label>\n <input\n id=\"softwareDescription\"\n class=\"form-control\"\n autocomplete=\"off\"\n name=\"description\"\n [(ngModel)]=\"model.description\"\n placeholder=\"{{ 'e.g. Cloud connectivity software' | translate }}\"\n [disabled]=\"model.selected?.id\"\n [required]=\"true\"\n />\n </c8y-form-group>\n\n <c8y-form-group>\n <label for=\"softwareDeviceTypeFilter\" translate>Device type filter</label>\n <input\n id=\"softwareDeviceTypeFilter\"\n class=\"form-control\"\n name=\"softwareDeviceTypeFilter\"\n popover=\"{{\n 'If the filter is set, the firmware will show up for installation only for devices of that type. If no filter is set, it will be available for all devices.'\n | translate\n }}\"\n [(ngModel)]=\"model.deviceType\"\n placeholder=\"{{ 'e.g.' | translate }} c8y_Linux\"\n [disabled]=\"model.selected?.id\"\n />\n </c8y-form-group>\n </div>\n\n <c8y-form-group>\n <label for=\"softwareVersion\" translate>Version</label>\n <input\n id=\"softwareVersion\"\n class=\"form-control\"\n autocomplete=\"off\"\n name=\"version\"\n [(ngModel)]=\"model.version\"\n placeholder=\"{{ 'e.g.' | translate }} 1.0.0\"\n [required]=\"true\"\n />\n </c8y-form-group>\n\n <c8y-form-group>\n <div class=\"legend form-block top-m-xxl\" translate>Software file</div>\n <c8y-file-picker [maxAllowedFiles]=\"1\" (onFilesPicked)=\"onFile($event)\">\n </c8y-file-picker>\n </c8y-form-group>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button\n title=\"{{ 'Cancel' | translate }}\"\n class=\"btn btn-default\"\n type=\"button\"\n (click)=\"cancel()\"\n [disabled]=\"saving\"\n translate\n >\n Cancel\n </button>\n\n <button\n title=\"{{ 'Add software' | translate }}\"\n class=\"btn btn-primary\"\n type=\"submit\"\n [ngClass]=\"{ 'btn-pending': saving }\"\n [disabled]=\"\n !softwareForm.form.valid ||\n softwareForm.form.pristine ||\n saving ||\n (!model.binary?.url && !model.binary?.file)\n \"\n translate\n >\n Add software\n </button>\n </div>\n </form>\n</div>\n"
|
|
1997
|
+
template: "<div class=\"viewport-modal\">\n <div class=\"modal-header dialog-header\">\n <i [c8yIcon]=\"'c8y-tools'\"></i>\n <h4 translate>\n Add software\n </h4>\n </div>\n <div class=\"p-16 text-center separator-bottom\" *ngIf=\"!softwarePreselected\">\n <p class=\"lead m-0\" translate>\n Select or create new software\n </p>\n </div>\n <form\n class=\"d-contents\"\n autocomplete=\"off\"\n #softwareForm=\"ngForm\"\n (ngSubmit)=\"softwareForm.form.valid && save()\"\n >\n <div class=\"modal-inner-scroll\">\n <div class=\"modal-body\">\n <div [hidden]=\"softwarePreselected\">\n <c8y-form-group>\n <label for=\"softwareName\" translate>Software</label>\n <c8y-typeahead\n [(ngModel)]=\"model.selected\"\n name=\"softwareName\"\n placeholder=\"{{ 'Select or enter' | translate }}\"\n (onSearch)=\"onInput.next($event)\"\n [required]=\"true\"\n >\n <c8y-li\n *c8yFor=\"\n let software of softwaresResult;\n loadMore: 'auto';\n notFound: notFoundTemplate\n \"\n class=\"p-l-8 p-r-8 c8y-list__item--link\"\n (click)=\"onSoftwareSelect(software)\"\n [active]=\"model.selected === software\"\n >\n <c8y-highlight\n [text]=\"software.name || '--'\"\n [pattern]=\"onInput | async\"\n ></c8y-highlight>\n </c8y-li>\n <ng-template #notFoundTemplate>\n <c8y-li class=\"bg-gray-lighter p-8\" *ngIf=\"(onInput | async)?.length > 0\">\n <span translate>No match found, add new`software`? </span>\n <button\n title=\"{{ 'Create new`software`' | translate }}\"\n type=\"button\"\n class=\"btn btn-primary btn-xs m-l-16\"\n translate\n >\n Create new`software`\n </button>\n </c8y-li>\n </ng-template>\n </c8y-typeahead>\n </c8y-form-group>\n\n <c8y-form-group>\n <label for=\"softwareDescription\" translate>Description</label>\n <input\n id=\"softwareDescription\"\n class=\"form-control\"\n autocomplete=\"off\"\n name=\"description\"\n [(ngModel)]=\"model.description\"\n placeholder=\"{{ 'e.g. Cloud connectivity software' | translate }}\"\n [disabled]=\"model.selected?.id\"\n [required]=\"true\"\n />\n </c8y-form-group>\n\n <c8y-form-group>\n <label for=\"softwareDeviceTypeFilter\" translate>Device type filter</label>\n <input\n id=\"softwareDeviceTypeFilter\"\n class=\"form-control\"\n name=\"softwareDeviceTypeFilter\"\n popover=\"{{\n 'If the filter is set, the firmware will show up for installation only for devices of that type. If no filter is set, it will be available for all devices.'\n | translate\n }}\"\n [(ngModel)]=\"model.deviceType\"\n placeholder=\"{{ 'e.g.' | translate }} c8y_Linux\"\n [disabled]=\"model.selected?.id\"\n />\n </c8y-form-group>\n </div>\n\n <c8y-form-group>\n <label for=\"softwareVersion\" translate>Version</label>\n <input\n id=\"softwareVersion\"\n class=\"form-control\"\n autocomplete=\"off\"\n name=\"version\"\n [(ngModel)]=\"model.version\"\n placeholder=\"{{ 'e.g.' | translate }} 1.0.0\"\n [required]=\"true\"\n />\n </c8y-form-group>\n\n <c8y-form-group>\n <div class=\"legend form-block top-m-xxl\" translate>Software file</div>\n <c8y-file-picker [maxAllowedFiles]=\"1\" (onFilesPicked)=\"onFile($event)\" [fileUrlPopover]=\"textForSoftwareUrlPopover\">\n </c8y-file-picker>\n </c8y-form-group>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button\n title=\"{{ 'Cancel' | translate }}\"\n class=\"btn btn-default\"\n type=\"button\"\n (click)=\"cancel()\"\n [disabled]=\"saving\"\n translate\n >\n Cancel\n </button>\n\n <button\n title=\"{{ 'Add software' | translate }}\"\n class=\"btn btn-primary\"\n type=\"submit\"\n [ngClass]=\"{ 'btn-pending': saving }\"\n [disabled]=\"\n !softwareForm.form.valid ||\n softwareForm.form.pristine ||\n saving ||\n (!model.binary?.url && !model.binary?.file)\n \"\n translate\n >\n Add software\n </button>\n </div>\n </form>\n</div>\n"
|
|
1995
1998
|
})
|
|
1996
1999
|
], AddSoftwareModalComponent);
|
|
1997
2000
|
return AddSoftwareModalComponent;
|
|
@@ -2223,6 +2226,7 @@ var ConfigurationDetailComponent = /** @class */ (function () {
|
|
|
2223
2226
|
this.mo = {};
|
|
2224
2227
|
this.saving = false;
|
|
2225
2228
|
this.uploadChoice = 'uploadBinary';
|
|
2229
|
+
this.textForConfigurationUrlPopover = gettext("Path for binaries can vary depending on device agent implementation, e.g.:\n /configuration/binaries/configuration1.bin\n https://configuration/binary/123\n ftp://configuration/binary/123.tar.gz\n ");
|
|
2226
2230
|
this.result = new Promise(function (resolve, reject) {
|
|
2227
2231
|
_this._save = resolve;
|
|
2228
2232
|
_this._cancel = reject;
|
|
@@ -2328,7 +2332,7 @@ var ConfigurationDetailComponent = /** @class */ (function () {
|
|
|
2328
2332
|
ConfigurationDetailComponent = __decorate([
|
|
2329
2333
|
Component({
|
|
2330
2334
|
selector: 'c8y-configuration-detail',
|
|
2331
|
-
template: "<div class=\"viewport-modal\">\n <div class=\"modal-header dialog-header\">\n <i [c8yIcon]=\"'cogs'\"></i>\n <h4 translate *ngIf=\"mo.id\">Update configuration</h4>\n <h4 translate *ngIf=\"!mo.id\">Add configuration</h4>\n </div>\n\n <form class=\"d-contents\" #configurationForm=\"ngForm\" (ngSubmit)=\"configurationForm.form.valid && save()\">\n <div class=\"modal-inner-scroll\">\n <div class=\"modal-body\">\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 (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-gray-lighter p-8\" *ngIf=\"pattern.length > 0\">\n <span translate>No match found, add new`configuration`?</span>\n <button title=\"Create new`configuration`\" type=\"button\" class=\"btn btn-primary btn-xs m-l-16\" translate>\n Create new`configuration`\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 top-m-xxl\" 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 >\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"
|
|
2335
|
+
template: "<div class=\"viewport-modal\">\n <div class=\"modal-header dialog-header\">\n <i [c8yIcon]=\"'cogs'\"></i>\n <h4 translate *ngIf=\"mo.id\">Update configuration</h4>\n <h4 translate *ngIf=\"!mo.id\">Add configuration</h4>\n </div>\n\n <form class=\"d-contents\" #configurationForm=\"ngForm\" (ngSubmit)=\"configurationForm.form.valid && save()\">\n <div class=\"modal-inner-scroll\">\n <div class=\"modal-body\">\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 (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-gray-lighter p-8\" *ngIf=\"pattern.length > 0\">\n <span translate>No match found, add new`configuration`?</span>\n <button title=\"Create new`configuration`\" type=\"button\" class=\"btn btn-primary btn-xs m-l-16\" translate>\n Create new`configuration`\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 top-m-xxl\" 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"
|
|
2332
2336
|
})
|
|
2333
2337
|
], ConfigurationDetailComponent);
|
|
2334
2338
|
return ConfigurationDetailComponent;
|