@c8y/ngx-components 1021.22.0 → 1021.22.27
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/alarms/alarms-date-filter.component.d.ts +23 -10
- package/alarms/alarms-date-filter.component.d.ts.map +1 -1
- package/alarms/alarms-type-filter.component.d.ts +21 -14
- package/alarms/alarms-type-filter.component.d.ts.map +1 -1
- package/alarms/alarms-view.service.d.ts +7 -0
- package/alarms/alarms-view.service.d.ts.map +1 -1
- package/alarms/alarms.model.d.ts +1 -6
- package/alarms/alarms.model.d.ts.map +1 -1
- package/alarms/alarms.module.d.ts +1 -1
- package/alarms/index.d.ts +1 -0
- package/alarms/index.d.ts.map +1 -1
- package/branding/shared/data/branding-tracking.service.d.ts +20 -0
- package/branding/shared/data/branding-tracking.service.d.ts.map +1 -0
- package/branding/shared/data/branding-version.service.d.ts.map +1 -1
- package/branding/shared/data/index.d.ts +1 -0
- package/branding/shared/data/index.d.ts.map +1 -1
- package/branding/shared/data/store-branding.service.d.ts +8 -1
- package/branding/shared/data/store-branding.service.d.ts.map +1 -1
- package/branding/shared/lazy/branding/branding.component.d.ts +3 -2
- package/branding/shared/lazy/branding/branding.component.d.ts.map +1 -1
- package/branding/shared/lazy/branding-theme-form/branding-theme-form.component.d.ts.map +1 -1
- package/branding/shared/lazy/edit-branding-router-outlet/edit-branding-router-outlet.component.d.ts.map +1 -1
- package/cockpit-config/cockpit-config.module.d.ts +1 -1
- package/cockpit-config/cockpit-config.module.d.ts.map +1 -1
- package/context-dashboard/context-dashboard.service.d.ts +1 -1
- package/context-dashboard/context-dashboard.service.d.ts.map +1 -1
- package/core/bootstrap/bootstrap.component.d.ts.map +1 -1
- package/core/common/service-registry.model.d.ts +2 -1
- package/core/common/service-registry.model.d.ts.map +1 -1
- package/core/common/ui-state.service.d.ts +0 -1
- package/core/common/ui-state.service.d.ts.map +1 -1
- package/core/i18n/missing-translation-custom.handler.d.ts +1 -0
- package/core/i18n/missing-translation-custom.handler.d.ts.map +1 -1
- package/core/plugins/index.d.ts +1 -0
- package/core/plugins/index.d.ts.map +1 -1
- package/core/plugins/plugin-loaded.pipe.d.ts +12 -0
- package/core/plugins/plugin-loaded.pipe.d.ts.map +1 -0
- package/core/plugins/plugins-resolve.service.d.ts +4 -2
- package/core/plugins/plugins-resolve.service.d.ts.map +1 -1
- package/core/plugins/plugins.model.d.ts +3 -1
- package/core/plugins/plugins.model.d.ts.map +1 -1
- package/core/plugins/plugins.service.d.ts +3 -0
- package/core/plugins/plugins.service.d.ts.map +1 -1
- package/core/router/router-tabs.resolver.d.ts +2 -2
- package/core/router/router-tabs.resolver.d.ts.map +1 -1
- package/core/router/scoped-context-route.service.d.ts.map +1 -1
- package/ecosystem/application-plugins/application-plugins.component.d.ts.map +1 -1
- package/ecosystem/application-plugins/application-plugins.guard.d.ts.map +1 -1
- package/ecosystem/application-plugins/orphaned-status-cell-renderer.component.d.ts.map +1 -1
- package/esm2022/alarms/alarm-info.component.mjs +3 -3
- package/esm2022/alarms/alarm-severity-to-label.pipe.mjs +2 -2
- package/esm2022/alarms/alarms-date-filter.component.mjs +94 -42
- package/esm2022/alarms/alarms-type-filter.component.mjs +102 -72
- package/esm2022/alarms/alarms-view.service.mjs +16 -2
- package/esm2022/alarms/alarms.component.mjs +3 -3
- package/esm2022/alarms/alarms.model.mjs +1 -1
- package/esm2022/alarms/alarms.module.mjs +3 -3
- package/esm2022/alarms/index.mjs +2 -1
- package/esm2022/branding/shared/data/branding-tracking.service.mjs +58 -0
- package/esm2022/branding/shared/data/branding-version.service.mjs +9 -5
- package/esm2022/branding/shared/data/index.mjs +2 -1
- package/esm2022/branding/shared/data/store-branding.service.mjs +15 -4
- package/esm2022/branding/shared/lazy/branding/branding.component.mjs +16 -12
- package/esm2022/branding/shared/lazy/branding-theme-form/branding-theme-form.component.mjs +5 -2
- package/esm2022/branding/shared/lazy/edit-branding-router-outlet/edit-branding-router-outlet.component.mjs +2 -2
- package/esm2022/cockpit-config/cockpit-config.module.mjs +6 -3
- package/esm2022/cockpit-config/feature-config.component.mjs +5 -4
- package/esm2022/context-dashboard/context-dashboard.service.mjs +47 -13
- package/esm2022/core/bootstrap/bootstrap.component.mjs +4 -3
- package/esm2022/core/common/service-registry.model.mjs +1 -1
- package/esm2022/core/common/ui-state.service.mjs +1 -19
- package/esm2022/core/i18n/missing-translation-custom.handler.mjs +5 -1
- package/esm2022/core/i18n/translation-loader.service.mjs +2 -2
- package/esm2022/core/plugins/index.mjs +2 -1
- package/esm2022/core/plugins/plugin-loaded.pipe.mjs +26 -0
- package/esm2022/core/plugins/plugins-resolve.service.mjs +5 -1
- package/esm2022/core/plugins/plugins.model.mjs +2 -1
- package/esm2022/core/plugins/plugins.service.mjs +13 -5
- package/esm2022/core/router/router-tabs.resolver.mjs +22 -8
- package/esm2022/core/router/scoped-context-route.service.mjs +9 -4
- package/esm2022/core/tabs/tabs-outlet.component.mjs +3 -3
- package/esm2022/core/version/websdk-plugin-version.factory.mjs +2 -2
- package/esm2022/datapoint-selector/datapoint-selection-list/datapoint-selection-list.component.mjs +3 -3
- package/esm2022/ecosystem/activity-log/activity-log.component.mjs +3 -3
- package/esm2022/ecosystem/application-plugins/application-plugins.component.mjs +67 -23
- package/esm2022/ecosystem/application-plugins/application-plugins.guard.mjs +8 -2
- package/esm2022/ecosystem/application-plugins/orphaned-status-cell-renderer.component.mjs +7 -1
- package/esm2022/interval-picker/interval-picker.component.mjs +1 -1
- package/esm2022/interval-picker/interval-picker.model.mjs +1 -1
- package/esm2022/protocol-lwm2m/ng1/plugin-checker.service.mjs +5 -1
- package/esm2022/widgets/definitions/alarms/alarm-list/index.mjs +2 -1
- package/esm2022/widgets/implementations/alarms/alarm-list-widget-config/alarm-list-widget-config.component.mjs +73 -4
- package/esm2022/widgets/implementations/alarms/alarm-list-widget-view/alarm-list-widget.component.mjs +29 -5
- package/esm2022/widgets/implementations/alarms/alarm-list-widget.model.mjs +7 -1
- package/esm2022/widgets/implementations/alarms/alarm-widget.service.mjs +12 -2
- package/fesm2022/c8y-ngx-components-alarms.mjs +200 -107
- package/fesm2022/c8y-ngx-components-alarms.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-branding-shared-data.mjs +76 -9
- package/fesm2022/c8y-ngx-components-branding-shared-data.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-branding-shared-lazy.mjs +19 -12
- package/fesm2022/c8y-ngx-components-branding-shared-lazy.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-cockpit-config.mjs +7 -5
- package/fesm2022/c8y-ngx-components-cockpit-config.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard.mjs +46 -12
- package/fesm2022/c8y-ngx-components-context-dashboard.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-selector.mjs +2 -2
- package/fesm2022/c8y-ngx-components-datapoint-selector.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ecosystem-application-plugins.mjs +79 -23
- package/fesm2022/c8y-ngx-components-ecosystem-application-plugins.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ecosystem.mjs +81 -25
- package/fesm2022/c8y-ngx-components-ecosystem.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-interval-picker.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-protocol-lwm2m.mjs +4 -0
- package/fesm2022/c8y-ngx-components-protocol-lwm2m.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-alarms-alarm-list.mjs +1 -0
- package/fesm2022/c8y-ngx-components-widgets-definitions-alarms-alarm-list.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs +124 -15
- package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components.mjs +91 -50
- package/fesm2022/c8y-ngx-components.mjs.map +1 -1
- package/interval-picker/interval-picker.component.d.ts +2 -2
- package/interval-picker/interval-picker.component.d.ts.map +1 -1
- package/interval-picker/interval-picker.model.d.ts +5 -0
- package/interval-picker/interval-picker.model.d.ts.map +1 -1
- package/locales/de.po +431 -538
- package/locales/en.po +2 -889
- package/locales/en_US.po +2 -880
- package/locales/es.po +462 -540
- package/locales/fr.po +470 -549
- package/locales/ja_JP.po +405 -598
- package/locales/ko.po +649 -502
- package/locales/locales.pot +27 -12
- package/locales/nl.po +463 -541
- package/locales/pl.po +502 -552
- package/locales/pt_BR.po +466 -543
- package/locales/zh_CN.po +650 -498
- package/locales/zh_TW.po +650 -498
- package/package.json +1 -1
- package/protocol-lwm2m/ng1/plugin-checker.service.d.ts +4 -0
- package/protocol-lwm2m/ng1/plugin-checker.service.d.ts.map +1 -1
- package/widgets/definitions/alarms/alarm-list/index.d.ts.map +1 -1
- package/widgets/implementations/alarms/alarm-list-widget-config/alarm-list-widget-config.component.d.ts +12 -1
- package/widgets/implementations/alarms/alarm-list-widget-config/alarm-list-widget-config.component.d.ts.map +1 -1
- package/widgets/implementations/alarms/alarm-list-widget-view/alarm-list-widget.component.d.ts +12 -1
- package/widgets/implementations/alarms/alarm-list-widget-view/alarm-list-widget.component.d.ts.map +1 -1
- package/widgets/implementations/alarms/alarm-list-widget.model.d.ts +11 -1
- package/widgets/implementations/alarms/alarm-list-widget.model.d.ts.map +1 -1
- package/widgets/implementations/alarms/alarm-widget.service.d.ts.map +1 -1
|
@@ -463,6 +463,12 @@ class OrphanedStatusCellRendererComponent {
|
|
|
463
463
|
text: gettext('LATEST`plugin status`'),
|
|
464
464
|
class: 'label-success'
|
|
465
465
|
};
|
|
466
|
+
case ApplicationPluginStatus.AUTO:
|
|
467
|
+
return {
|
|
468
|
+
value: statusValue,
|
|
469
|
+
text: gettext('AUTO`plugin status`'),
|
|
470
|
+
class: 'label-success'
|
|
471
|
+
};
|
|
466
472
|
default:
|
|
467
473
|
return null;
|
|
468
474
|
}
|
|
@@ -587,8 +593,25 @@ class ApplicationPluginsComponent {
|
|
|
587
593
|
this.allAvailablePlugins$
|
|
588
594
|
]).pipe(map(([remotePlugins, allPlugins]) => this.getInstalledPlugins(allPlugins, remotePlugins)), shareReplay(1));
|
|
589
595
|
this.orphanedPlugins$ = this.installedPlugins$.pipe(map(plugins => plugins.filter(p => p.status === ApplicationPluginStatus.ORPHANED)));
|
|
590
|
-
this.isStandard$ = combineLatest([this.installedPlugins$, this.selfPlugins$]).pipe(map(([installedPlugins, selfPlugins]) =>
|
|
591
|
-
|
|
596
|
+
this.isStandard$ = combineLatest([this.installedPlugins$, this.selfPlugins$]).pipe(map(([installedPlugins, selfPlugins]) => {
|
|
597
|
+
const manifestRemotes = this.app?.manifest?.remotes || {};
|
|
598
|
+
// ensure that every installed plugin is a self plugin or a plugin from the manifest
|
|
599
|
+
const allInstalledPluginsAreSelf = installedPlugins.every(p => selfPlugins.some(selfPlugin => selfPlugin.id === p.id) ||
|
|
600
|
+
(Array.isArray(manifestRemotes[p.contextPath]) &&
|
|
601
|
+
manifestRemotes[p.contextPath].includes(p.module)));
|
|
602
|
+
// ensure that every self plugin is installed
|
|
603
|
+
const allSelfPluginsAreInstalled = selfPlugins.every(selfPlugin => installedPlugins.some(p => p.id === selfPlugin.id));
|
|
604
|
+
const configRemotes = this.app?.config?.remotes || {};
|
|
605
|
+
// ensure that every remote from the manifest is in the config
|
|
606
|
+
// if no config exists we are also all good
|
|
607
|
+
const everyRemoteFromManifestIsInConfig = !this.app?.config?.remotes ||
|
|
608
|
+
Object.keys(manifestRemotes).every(contextPath => Array.isArray(configRemotes[contextPath]) &&
|
|
609
|
+
Array.isArray(manifestRemotes[contextPath]) &&
|
|
610
|
+
manifestRemotes[contextPath].every(module => configRemotes[contextPath].includes(module)));
|
|
611
|
+
return (allInstalledPluginsAreSelf &&
|
|
612
|
+
allSelfPluginsAreInstalled &&
|
|
613
|
+
everyRemoteFromManifestIsInConfig);
|
|
614
|
+
}));
|
|
592
615
|
this.title = gettext('Installed plugins');
|
|
593
616
|
this.loadMoreItemsLabel = gettext('Load more packages');
|
|
594
617
|
this.loadingItemsLabel = gettext('Loading packages…');
|
|
@@ -620,9 +643,16 @@ class ApplicationPluginsComponent {
|
|
|
620
643
|
{
|
|
621
644
|
name: 'Version',
|
|
622
645
|
header: gettext('Version'),
|
|
623
|
-
path: '
|
|
646
|
+
path: 'version',
|
|
624
647
|
filterable: false
|
|
625
648
|
},
|
|
649
|
+
{
|
|
650
|
+
name: 'Tag',
|
|
651
|
+
header: gettext('Tag`noun`'),
|
|
652
|
+
path: 'installedViaTag',
|
|
653
|
+
filterable: false,
|
|
654
|
+
cellRendererComponent: LabelCellRendererComponent
|
|
655
|
+
},
|
|
626
656
|
{
|
|
627
657
|
name: 'description',
|
|
628
658
|
header: gettext('Description'),
|
|
@@ -669,7 +699,7 @@ class ApplicationPluginsComponent {
|
|
|
669
699
|
}
|
|
670
700
|
async resetToDefault() {
|
|
671
701
|
this.isLoading = true;
|
|
672
|
-
await this.pluginsService.
|
|
702
|
+
await this.pluginsService.resetRemotes(this.app);
|
|
673
703
|
await this.loadData();
|
|
674
704
|
this.alertService.success(gettext('The application was reset to its default plugins.'));
|
|
675
705
|
}
|
|
@@ -894,29 +924,46 @@ class ApplicationPluginsComponent {
|
|
|
894
924
|
}
|
|
895
925
|
getInstallModalInitState() {
|
|
896
926
|
return {
|
|
897
|
-
plugins$: combineLatest([
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
927
|
+
plugins$: combineLatest([this.allAvailablePlugins$, this.installedPlugins$]).pipe(map(([allPlugins, installedPlugins]) => {
|
|
928
|
+
// to not mutate the original array and objects contained in it
|
|
929
|
+
const allPluginsAsNewObjects = allPlugins.map(p => ({ ...p }));
|
|
930
|
+
for (const plugin of installedPlugins) {
|
|
931
|
+
let installedPlugin = allPluginsAsNewObjects.find(p => p.id === plugin.id);
|
|
932
|
+
if (!installedPlugin && plugin.installedViaTag) {
|
|
933
|
+
installedPlugin = allPluginsAsNewObjects.find(p => p.contextPath === plugin.contextPath &&
|
|
934
|
+
p.module === plugin.module &&
|
|
935
|
+
p.tags?.includes(plugin.installedViaTag));
|
|
936
|
+
}
|
|
937
|
+
if (installedPlugin) {
|
|
938
|
+
installedPlugin.installed = true;
|
|
939
|
+
continue;
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
return allPluginsAsNewObjects.map(p => ({ ...p, installed: !!p.installed }));
|
|
907
943
|
}), shareReplay(1))
|
|
908
944
|
};
|
|
909
945
|
}
|
|
910
946
|
getOrphanedPlugins(orphanedPluginIds, allPlugins) {
|
|
911
947
|
const orphanedPlugins = orphanedPluginIds.map(p => this.extractDetails(p));
|
|
912
948
|
const orphanedPluginsUpdated = orphanedPlugins.map(p => {
|
|
949
|
+
const pluginWithMatchingTag = allPlugins.find(tmp => tmp.contextPath === p.contextPath &&
|
|
950
|
+
tmp.module === p.module &&
|
|
951
|
+
tmp.tags?.includes(p.version || 'latest'));
|
|
952
|
+
if (pluginWithMatchingTag) {
|
|
953
|
+
return {
|
|
954
|
+
...pluginWithMatchingTag,
|
|
955
|
+
id: p.id,
|
|
956
|
+
status: ApplicationPluginStatus.AUTO,
|
|
957
|
+
installedViaTag: p.version || 'latest'
|
|
958
|
+
};
|
|
959
|
+
}
|
|
913
960
|
const pluginInDifferentVersion = allPlugins.find(tmp => tmp.contextPath === p.contextPath && tmp.module === p.module);
|
|
914
961
|
if (pluginInDifferentVersion) {
|
|
915
962
|
return {
|
|
916
963
|
...pluginInDifferentVersion,
|
|
917
|
-
version: p.version
|
|
964
|
+
version: p.version,
|
|
918
965
|
id: p.id,
|
|
919
|
-
status:
|
|
966
|
+
status: ApplicationPluginStatus.OUTDATED
|
|
920
967
|
};
|
|
921
968
|
}
|
|
922
969
|
return p;
|
|
@@ -949,12 +996,15 @@ class ApplicationPluginsComponent {
|
|
|
949
996
|
}));
|
|
950
997
|
const orphanedPluginIds = remotePlugins.filter(r => !availablePlugins.find(plugin => plugin.id === r));
|
|
951
998
|
const orphanedPlugins = this.getOrphanedPlugins(orphanedPluginIds, allPlugins);
|
|
952
|
-
const
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
999
|
+
const notActuallyOrphanedPlugins = orphanedPlugins.filter(p => p.status === ApplicationPluginStatus.AUTO);
|
|
1000
|
+
const orphanedOrRevokedPlugins = orphanedPlugins.filter(p => p.status !== ApplicationPluginStatus.AUTO);
|
|
1001
|
+
const { actuallyOrphanedPlugins, revokedPlugins } = this.splitOrphanedPluginsIntoOrphanedAndRevokedPlugins(allPlugins, orphanedOrRevokedPlugins);
|
|
1002
|
+
return [
|
|
1003
|
+
...availablePlugins,
|
|
1004
|
+
...notActuallyOrphanedPlugins,
|
|
1005
|
+
...revokedPlugins,
|
|
1006
|
+
...actuallyOrphanedPlugins
|
|
1007
|
+
];
|
|
958
1008
|
}
|
|
959
1009
|
extractDetails(pluginId) {
|
|
960
1010
|
const contextPath = this.getStringMatchingRegex(pluginId, /^[^@]*(@|\/)/);
|
|
@@ -1000,9 +1050,15 @@ class ApplicationPluginsGuard {
|
|
|
1000
1050
|
if (!app) {
|
|
1001
1051
|
return false;
|
|
1002
1052
|
}
|
|
1053
|
+
const manifest = app.manifest;
|
|
1054
|
+
if (!manifest) {
|
|
1055
|
+
return false;
|
|
1056
|
+
}
|
|
1003
1057
|
return (app.type === ApplicationType.HOSTED &&
|
|
1004
1058
|
this.ecosystemService.isOwner(app) &&
|
|
1005
|
-
!this.ecosystemService.isPackage(app)
|
|
1059
|
+
!this.ecosystemService.isPackage(app) &&
|
|
1060
|
+
// apps like e.g. the public-options should not have the plugins tab
|
|
1061
|
+
!manifest.noAppSwitcher);
|
|
1006
1062
|
}
|
|
1007
1063
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: ApplicationPluginsGuard, deps: [{ token: i3.EcosystemService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1008
1064
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: ApplicationPluginsGuard }); }
|