@c8y/ng1-modules 1018.486.5 → 1018.496.6
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/NOTICES +1 -1
- package/administration-alarmMapping/views/index.html +2 -2
- package/administration-auditLogs/views/list.html +8 -7
- package/administration-deviceUsers/views/list.html +55 -18
- package/app-logs/app-logs/app-logs.html +10 -9
- package/applicationLinks/index.js +1 -1
- package/binaryArtefactsManagement/views/list.html +63 -23
- package/core/core/services/measurements.js +1 -1
- package/core/locales/de.po +246 -102
- package/core/locales/en.po +34 -15
- package/core/locales/es.po +21 -103
- package/core/locales/fr.po +20 -102
- package/core/locales/ja_JP.po +20 -102
- package/core/locales/ko.po +20 -102
- package/core/locales/nl.po +20 -102
- package/core/locales/pl.po +21 -103
- package/core/locales/pt_BR.po +38 -120
- package/core/locales/ru.po +21 -103
- package/core/locales/zh_CN.po +21 -103
- package/core/locales/zh_TW.po +21 -103
- package/core/ui/directives/map2.js +1 -1
- package/core/ui/itemSelector/itemSelector.html +1 -1
- package/core/ui/services/measurementsReport.js +1 -1
- package/core/ui/user/editUser.directive.html +3 -3
- package/core/ui/user/rolesUiStrings.constant.js +1 -1
- package/core/ui/views/modal.html +1 -1
- package/dataBroker/connectors/connectors.html +87 -32
- package/dataPointExplorer/controllers/dataPointExplorer.js +1 -1
- package/dataPointExplorer/index.js +1 -1
- package/dataPointExplorer/views/explorer.html +6 -2
- package/dataPointExplorer/views/widgetConfig.html +1 -0
- package/dataPointTable/index.js +1 -1
- package/dataPointTable/views/widgetConfig.html +1 -3
- package/device-protocol-deviceDatabase4/device-type-protocol-base.provider.js +1 -1
- package/device-protocols/deviceProtocolList.html +4 -4
- package/device-protocols/deviceProtocolView.html +34 -14
- package/deviceDatabase4/cumulocity.json +4 -6
- package/deviceDatabase4/detail/device-type-detail.component.js +1 -1
- package/deviceDatabase4/detail/device-type-detail.html +1 -0
- package/deviceDatabase4/modals/configure-register.component.js +1 -1
- package/deviceDatabase4/modals/configure-register.html +2 -2
- package/deviceDatabase4/validate-measurement-fragment.directive.js +1 -0
- package/deviceList/views/index.html +4 -1
- package/devicemanagement-alarmList/views/index.html +57 -19
- package/devicemanagement-availability/controllers/availability.js +1 -1
- package/devicemanagement-availability/views/detail.html +19 -8
- package/devicemanagement-eventList/views/index.html +6 -2
- package/enterpriseEdition/enterpriseEdition.module.js +1 -1
- package/eventList/index.js +1 -1
- package/export/directives/timespan.js +1 -1
- package/export/services/filters.js +1 -1
- package/export/views/detail.html +1 -1
- package/export/views/list.html +21 -0
- package/export/views/properties.html +3 -3
- package/export/views/timespan.html +38 -9
- package/measurements/fragmentChart/fragmentChart.component.js +1 -1
- package/measurements/measurements2/series.service.js +1 -1
- package/modbusConfiguration4/fieldbus-config.html +2 -1
- package/modbusConfiguration4/fieldbus-device-list.html +3 -1
- package/package.json +1 -1
- package/platformConfiguration/cumulocity.json +1 -1
- package/platformConfiguration/platformConfiguration.component.js +1 -0
- package/platformConfiguration/platformConfiguration.html +22 -0
- package/platformConfiguration/platformConfigurationUi.provider.js +1 -1
- package/scada/config.controller.js +1 -1
- package/scada/views/componentConfig.html +28 -14
- package/scada/widget.controller.js +1 -1
- package/tenantPolicies/tenantPolicyList/tenantPolicyList.html +90 -25
- package/tenantStatistics/tenant-statistics.html +23 -14
- package/tenants/views/detail.html +1 -1
- package/userRoles/inventoryRolesTab/inventoryRolesTab.component.js +1 -1
- package/userRoles/inventoryRolesTab/inventoryRolesTab.html +16 -10
- package/users/userListView/userListView.html +47 -17
- package/users/usersUi.provider.js +1 -1
- package/deviceControlMessage/controllers/deviceControlMessageWidget.js +0 -1
- package/deviceControlMessage/cumulocity.json +0 -15
- package/deviceControlMessage/img/message-widget-pr.png +0 -0
- package/deviceControlMessage/index.js +0 -1
- package/deviceControlMessage/views/deviceControlMessageWidget.html +0 -26
- package/infoGauge/cumulocity.json +0 -20
- package/infoGauge/img/info-gauge-widget-pr.png +0 -0
- package/infoGauge/index.js +0 -1
- package/infoGauge/infoGauge.controller.js +0 -1
- package/infoGauge/infoGauge.service.js +0 -1
- package/infoGauge/infoGaugeConfig.controller.js +0 -1
- package/infoGauge/infoGaugeWidget.config.html +0 -58
- package/infoGauge/infoGaugeWidget.html +0 -32
- package/infoGauge/style.less +0 -0
- package/platformConfiguration/platformConfigurationForm.component.js +0 -1
- package/platformConfiguration/platformConfigurationForm.html +0 -50
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";!function(){function n(n,o,t,i,r,e){var s,a=this;function u(){return o.all({hasAdminPermissions:r.hasAnyRole(["ROLE_OPTION_MANAGEMENT_ADMIN"]),configuration:t.getConfiguration()}).then(function(n){s=_.cloneDeep(n.configuration),_.assign(a,n)})}_.assign(a,{$onInit:u,save:function(n){return t.saveConfiguration(n,s).then(u).then(function(){return i.success(e("Configuration saved."))})}})}n.$inject=["$scope","$q","c8yPlatformConfigurationUi","c8yAlert","c8yPermissions","gettext"],angular.module("c8y.platformConfiguration").component("c8yPlatformConfiguration",{templateUrl:":::PLUGIN_PATH:::/platformConfiguration.html",bindings:{optionsGroups:"<"},controller:n,controllerAs:"vm"})}();
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<c8y-ui-title-set title="'Enterprise tenant' | translate"></c8y-ui-title-set>
|
|
2
|
+
<c8y-breadcrumbs-set>
|
|
3
|
+
<c8y-breadcrumbs-item
|
|
4
|
+
icon="cog"
|
|
5
|
+
label="{{ 'Configuration' | translate }}"
|
|
6
|
+
></c8y-breadcrumbs-item>
|
|
7
|
+
<c8y-breadcrumbs-item
|
|
8
|
+
icon="cog"
|
|
9
|
+
label="{{ 'Enterprise tenant' | translate }}"
|
|
10
|
+
></c8y-breadcrumbs-item>
|
|
11
|
+
<c8y-breadcrumbs-item
|
|
12
|
+
icon="cog"
|
|
13
|
+
label="{{ 'Settings' | translate }}"
|
|
14
|
+
></c8y-breadcrumbs-item>
|
|
15
|
+
</c8y-breadcrumbs-set>
|
|
16
|
+
|
|
17
|
+
<c8y-platform-configuration-form
|
|
18
|
+
[read-only]="vm.hasAdminPermissions === false"
|
|
19
|
+
[form-value]="vm.configuration"
|
|
20
|
+
[options-groups]="vm.optionsGroups"
|
|
21
|
+
(on-save)="vm.save($event)"
|
|
22
|
+
></c8y-platform-configuration-form>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";!function(){function e(e,t,n){y.$inject=["$q","c8yBase","c8ySettings","c8yPermissions","c8yTenant","gettextCatalog"];var i={path:"configuration",icon:"sliders",view:{template:"<c8y-platform-configuration-form></c8y-platform-configuration-form>"},requiresAnyRole:["ROLE_OPTION_MANAGEMENT_READ"],showIf:["c8yTenant",function(e){return e.isCurrentUserTopTenant()}]},p="configuration",a={title:n("Passwords"),id:"passwordsOptions",items:["system.password.enforce.strength","system.password.limit.validity","system.password.history.size","system.password.green.min-length"]},r={title:n("Two-factor authentication"),id:"twoFactorAuthenticationOptions",items:["two-factor-authentication.token.sms.template"]},s={title:n("Support link"),id:"supportLinkOptions",items:["system.support.url"]},o={title:n("Password reset"),id:"passwordResetOptions",items:["passwordReset.sendNotificationToUnknownEmails","passwordReset.token.email.template","passwordReset.user.not.found.email.template","passwordReset.email.subject","passwordReset.success.email.template","passwordReset.invite.template"]},l={title:n("Support user"),id:"supportUserOptions",items:["system.support-user.enabled","system.support-user.validity-limit"]},m={title:n("Email server"),id:"emailServerOptions",items:["ui.email.protocolAndEncryption","email.host","email.port","email.username","credentials.email.password","email.from"]},c={title:n("Data export"),id:"dataExportOptions",items:["export.data.mail.subject","export.data.mail.text","export.data.mail.text.userunauthorized"]},d={title:n("Storage limit"),id:"storageLimitOptions",items:["storageLimit.warning.email.subject","storageLimit.warning.email.template","storageLimit.process.email.subject","storageLimit.process.email.template"]},u={title:n("Suspending tenants"),id:"suspendingTenantsOptions",items:["tenantSuspend.mail.sendtosuspended","tenantSuspend.mail.additional.address","tenantSuspend.mail.subject","tenantSuspend.mail.text"]},g=["credentials.email.password"],h=[a,r,s,o,l,m,c,d,u];return{$get:y,init:function(){f(),t.addNavigation({name:n("Configuration"),parent:n("Settings"),path:i.path,icon:i.icon,showIfPermissions:{anyRole:i.requiresAnyRole},showIf:i.showIf})},hookViews:f};function f(){e.when("/".concat(i.path),i.view)}function y(r,n,s,e,t,i){var o;return r.all({eeTenant:t.isEnterpriseEditionTenant(),managementTenant:t.isCurrentUserTopTenant()}).then(function(e){var t=e.eeTenant,e=e.managementTenant;o=t&&!e}),{getSchema:a,getForm:function(t){var n=t?[]:h;return _.forEach(h,function(e){_.includes(t,e.id)&&n.push(e)}),r.when(_.map(n,l))},getSchemaFormOptions:function(){return e.hasAnyRole(["ROLE_OPTION_MANAGEMENT_ADMIN"]).then(function(e){return{formDefaults:{readonly:!e}}})},getConfiguration:function(){return r.all({options:s.listAllBy(p),schema:a()}).then(function(e){var t=e.options,i=e.schema,n=_.transform(t,function(e,t){var n=t.key,t=(e[n]=s.parseOptionRawValue(t.value),e[n]);"string"===_.get(i,["properties",n,"type"])&&_.isFunction(_.get(t,"toString"))&&(e[n]=t.toString())},{});return _.forEach(i.properties,function(e,t){e=e.convertValueOnLoad;e&&(n[t]=e(n[t],n))}),n})},saveConfiguration:function(t,i){return a().then(function(e){return a=i,e=e,n=_.cloneDeep(t),_.forEach(e.properties,function(e,t){e=e.convertValueOnSave;e&&(n[t]=e(n[t],n))}),_.forEach(e.properties,function(e,t){e.skipOnSave&&_.unset(n,t)}),_(n).map(function(e,t){var n,i=_.get(a,[t]);return n=_.isEqual(i,e)?n:{key:t,oldValue:i,newValue:e}}).filter().value();var a,n}).then(m)}};function a(){var e=i.getString("Use [Enter] or <br> tag to add a new line"),t="<br>".concat(e);return r.when({type:"object",properties:{"system.password.enforce.strength":{title:i.getString('Enforce "green" passwords for all users'),type:"boolean"},"system.password.limit.validity":{title:i.getString("Password validity limit (days)"),description:i.getString("The number of days a password may be valid before it must be reset; minimum value is 0, maximum value is 999999. Leave empty to use the value from the tenant options."),type:"number",minimum:0,maximum:999999},"system.password.history.size":{title:i.getString("Password history size"),description:i.getString("The number of times before the current password can be reused. Minimum value is 0, preset value is 10."),type:"number",minimum:0,"x-schema-form":{placeholder:"".concat(i.getString("e.g.")," 10")}},"system.password.green.min-length":{title:i.getString('Minimal length of "green" password'),description:i.getString("The minimum number of characters which are required for a safe password. Minimum (and preset) value is 8, maximum value is 32. Leave empty to skip this constraint."),type:"number",minimum:8,maximum:32},"ui.email.protocolAndEncryption":{title:i.getString("Protocol and encryption"),type:"string",enum:["SMTP_PLAIN","SMTP_ENCRYPTED","SMTPS_ENCRYPTED"],"x-schema-form":{titleMap:[{value:"SMTP_PLAIN",name:i.getString("SMTP (no encryption)")},{value:"SMTP_ENCRYPTED",name:i.getString("SMTP (STARTTLS)")},{value:"SMTPS_ENCRYPTED",name:i.getString("SMTPS (SSL/TLS)")}]},convertValueOnLoad:function(e,t){var n=t["email.protocol"],t=t["email.connection.encrypted"]||!1;return"smtp"===n?t?"SMTP_ENCRYPTED":"SMTP_PLAIN":"smtps"===n?"SMTPS_ENCRYPTED":void 0},skipOnSave:!0},"email.protocol":{title:i.getString("Protocol"),type:"string",enum:["smtp","smtps"],"x-schema-form":{titleMap:[{value:"smtp",name:"SMTP"},{value:"smtps",name:"SMTPS"}]},convertValueOnSave:function(e,t){t=t["ui.email.protocolAndEncryption"]||"",t=_.get(t.match(/^(.+?)_(.+?)$/),1);return t&&_.toLower(t)}},"email.connection.encrypted":{title:i.getString("Connection encrypted"),type:"boolean",convertValueOnSave:function(e,t){t=t["ui.email.protocolAndEncryption"]||"";return"ENCRYPTED"===_.get(t.match(/^(.+?)_(.+?)$/),2)}},"email.host":{title:i.getString("Host"),type:"string","x-schema-form":{placeholder:"".concat(i.getString("e.g.")," localhost")}},"email.port":{title:i.getString("Port"),type:"number",minimum:1,maximum:65535,"x-schema-form":{placeholder:"".concat(i.getString("e.g.")," 25")}},"email.username":{title:i.getString("Username"),type:"string"},"credentials.email.password":{title:i.getString("Password"),type:"string","x-schema-form":{type:"password"}},"email.from":{title:i.getString("Sender address"),type:"string","x-schema-form":{type:"email"}},"passwordReset.sendNotificationToUnknownEmails":{title:i.getString("Send notifications to unknown email addresses"),type:"boolean"},"passwordReset.email.subject":{title:i.getString("Email subject"),description:i.getString("Subject used for all password reset related emails"),type:"string"},"passwordReset.token.email.template":{title:i.getString("Password reset email template (when address is known)"),description:"".concat(i.getString("Placeholders: {tenant-domain}, {host}, {token}, {username}, {email}. Whole link to reset password can be, for example: {tenant-domain}/apps/devicemanagement/index.html?token={token}&email={email}")).concat(t),type:"string","x-schema-form":{type:"textarea"}},"passwordReset.user.not.found.email.template":{title:i.getString("Password reset email template (when address is not known)"),description:"".concat(e),type:"string","x-schema-form":{type:"textarea"}},"passwordReset.success.email.template":{title:i.getString("Password change confirmation email template"),description:"".concat(i.getString("Placeholders: {host}, {tenant-domain}, {username}")).concat(t),type:"string","x-schema-form":{type:"textarea"}},"passwordReset.invite.template":{title:i.getString("Invitation email template"),description:"".concat(i.getString("Placeholders: {tenant-domain}, {host}, {token}, {username}, {email}. Whole link to setup password can be, for example: {tenant-domain}/apps/devicemanagement/index.html?token={token}")).concat(t),type:"string","x-schema-form":{type:"textarea"}},"export.data.mail.subject":{title:i.getString("Email subject"),description:i.getString("Placeholders: {tenant-domain}, {host}, {binaryId}. Whole link to result file is: {tenant-domain}/inventory/binaries/{binaryId}"),type:"string"},"export.data.mail.text":{title:i.getString("Email template"),description:"".concat(i.getString("Placeholders: {tenant-domain}, {host}, {binaryId}. Whole link to result file is: {tenant-domain}/inventory/binaries/{binaryId}")).concat(t),type:"string","x-schema-form":{type:"textarea"}},"export.data.mail.text.userunauthorized":{title:i.getString("User unauthorized error message"),description:i.getString("Placeholders: {user}, {exportApi}"),type:"string"},"two-factor-authentication.token.sms.template":{title:i.getString("Verification token SMS template"),description:i.getString("Placeholder: {token} - created token"),type:"string","x-schema-form":{placeholder:i.getString("e.g.: Verification code: {token}")}},"system.support.url":{title:i.getString("URL"),type:"string",description:i.getString('Possible values: URL string, "false`KEEP_ORIGINAL`" (hides the link), leave empty (uses the default)')},"storageLimit.warning.email.subject":{title:i.getString("Warning email subject"),description:i.getString("Email which will be sent one day before data is deleted"),type:"string"},"storageLimit.warning.email.template":{title:i.getString("Warning email template"),description:"".concat(i.getString("Email which will be sent one day before data is deleted. Placeholders: {tenant-domain}, {tenant}, {size} - storage usage in %")).concat(t),type:"string","x-schema-form":{type:"textarea"}},"storageLimit.process.email.subject":{title:i.getString("Limit exceeded email subject"),description:i.getString("Email which will be sent after over-limit data has been deleted"),type:"string"},"storageLimit.process.email.template":{title:i.getString("Limit exceeded email template"),description:"".concat(i.getString("Email which will be sent after over-limit data has been deleted. Placeholders: {tenant-domain}, {tenant}, {size} - storage usage in %")).concat(t),type:"string","x-schema-form":{type:"textarea"}},"tenantSuspend.mail.sendtosuspended":{title:i.getString("Send email to suspended tenant's administrator"),type:"boolean"},"tenantSuspend.mail.additional.address":{title:i.getString("Tenant suspended email additional receiver"),type:"string","x-schema-form":{type:"email"}},"tenantSuspend.mail.subject":{title:i.getString("Tenant suspended email subject"),description:i.getString("Placeholder: {tenant} - suspended tenant's ID; {tenant-domain} - tenant's domain"),type:"string"},"tenantSuspend.mail.text":{title:i.getString("Tenant suspended email template"),description:"".concat(i.getString("Placeholder: {tenant} - suspended tenant's ID; {tenant-domain} - tenant's domain")).concat(t),type:"string","x-schema-form":{type:"textarea"}},"system.support-user.enabled":{title:i.getString("Activate support user"),description:i.getString('Possible values: "true`KEEP_ORIGINAL`", "false`KEEP_ORIGINAL`", or a specific date until the user should remain active, for example, "{{ exampleDate }}". Leaving it blank, will set the value to "true`KEEP_ORIGINAL`".',{exampleDate:moment().add(1,"day").format(n.dateFullFormat)}),type:"string","x-schema-form":{placeholder:"".concat(i.getString("e.g."),": ").concat(moment().add(1,"day").format(n.dateFullFormat))}},"system.support-user.validity-limit":{title:i.getString("Validity limit"),description:i.getString('Each support user request from subtenant user will prolong support user access by the given number of hours (default: 24 hours). Leaving it blank, will set the value to "24".'),type:"number",minimum:0,"x-schema-form":{placeholder:"".concat(i.getString("e.g.")," 24")}}}})}function l(e){var t={type:"section"};return _.assign(t,e),t.items=_.map(t.items,function(e){return{key:[e]}}),t.title=i.getString(t.title),t}function m(e){return _.reduce(e,function(e,t){var n=_.constant(r.when()),i=_.isNull(t.newValue),a=""===t.newValue;return i||a&&(i=t.key,!o||!g.includes(i))?_.isUndefined(t.oldValue)||(n=s.deleteOption):n=s.updateOption,e.then(_.partial(n,{category:p,key:t.key,value:t.newValue}))},r.when())}}}e.$inject=["c8yViewsProvider","c8yNavigatorProvider","gettext"],angular.module("c8y.platformConfiguration").provider("c8yPlatformConfigurationUi",e)}();
|
|
1
|
+
"use strict";!function(){function n(n,t,e){a.$inject=["$q","c8yBase","c8ySettings","c8yPermissions","c8yTenant"],o.$inject=["$scope"];var i={path:"configuration",icon:"sliders",view:{template:'<c8y-platform-configuration options-groups="optionsGroups"></c8y-platform-configuration>',controller:o},requiresAnyRole:["ROLE_OPTION_MANAGEMENT_READ"],showIf:["c8yTenant",function(n){return n.isCurrentUserTopTenant()}]};function o(n){n.optionsGroups=["passwordsOptions","twoFactorAuthenticationOptions","supportLinkOptions","passwordResetOptions","supportUserOptions","emailServerOptions","dataExportOptions","storageLimitOptions","suspendingTenantsOptions"]}var u="configuration",c=["credentials.email.password"];return{$get:a,init:function(){r(),t.addNavigation({name:e("Configuration"),parent:e("Settings"),path:i.path,icon:i.icon,showIfPermissions:{anyRole:i.requiresAnyRole},showIf:i.showIf})},hookViews:r};function r(){n.when("/".concat(i.path),i.view)}function a(r,n,a,t,e){var s;return r.all({eeTenant:e.isEnterpriseEditionTenant(),managementTenant:e.isCurrentUserTopTenant()}).then(function(n){var t=n.eeTenant,n=n.managementTenant;s=t&&!n}),{getConfiguration:function(){return a.listAllBy(u).then(function(n){var t={};return n.forEach(function(n){t[n.key]=n.value}),t})},saveConfiguration:function(n,t){return function(n){return _.reduce(n,function(n,t){var e=_.constant(r.when()),i=_.isNull(t.newValue),o=""===t.newValue;return i||o&&(i=t.key,!s||!c.includes(i))?_.isUndefined(t.oldValue)||(e=a.deleteOption):e=a.updateOption,n.then(_.partial(e,{category:u,key:t.key,value:t.newValue}))},r.when())}(function(n,o){n=_.cloneDeep(n);return _(n).map(function(n,t){var e,i=_.get(o,[t]);return e=_.isEqual(JSON.stringify(i),JSON.stringify(n))?e:{key:t,oldValue:i,newValue:n}}).filter().value()}(n,t))}}}}n.$inject=["c8yViewsProvider","c8yNavigatorProvider","gettext"],angular.module("c8y.platformConfiguration").provider("c8yPlatformConfigurationUi",n)}();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";!function(){function e(
|
|
1
|
+
"use strict";!function(){function e(o,i,c,a,t,n,d,r,f,s){var g=this,u="",e={c8y_Global:{}};function p(e){var n,i,t,c,a;return g.svgFile.data=e,g.svgFile&&(n=o.config.mapping||{},i=o.config.deviceIds||{},t=o.config.device&&o.config.device.id,o.config.mapping={},o.config.deviceIds={},_.forEach(function(e){var n=[],i=/{{\s*([$\w]+?)\s*}}/g,t=i.exec(e);for(;null!==t;)n.push(t[1]),t=i.exec(e);return n}(g.svgFile.data),function(e){o.config.mapping[e]=n[e]||null,o.config.deviceIds[e]=i[e]||t||null}),c=o.config.deviceIds,a=o.config.mapping,c)&&a&&_.forOwn(c,function(e,n){var e=l(e),i=r.generatePaths(e);f.list().then(function(e){e=_.sortBy(e,function(e){return e.keyPath.length}).reverse();null===a[n]&&(_.forEach(e,function(e){_.last(e.keyPath).toUpperCase()===n.toUpperCase()&&(a[n]=e)}),_.forEach(i,function(e){_.last(e).toUpperCase()===n.toUpperCase()&&(a[n]=r.createProperty(e))}))})}),e}function l(n){return _.find(g.devices,function(e){return n===e.id})}function v(e,n){g.device&&g.device.id!==n.id||_.assign(g.device,n)}function h(){e=o.config.deviceIds;var e=_(e).values().uniq().value().sort(function(e,n){return e-n}).join(",");e!==u&&(u.length&&n.stop(o.$id,"/managedobjects/".concat(u)),e.length&&(n.addListener(o.$id,"/managedobjects/".concat(e),"UPDATE",v),n.start(o.$id,"/managedobjects/".concat(e)),o.$on("$destroy",_.partial(n.stop,o.$id,"/managedobjects/".concat(e)))),u=e)}this.deviceDetail=function(e,n){var t;e&&(t=!n||!(e.name===n.name&&e.id===n.id),a.detail(e.id).then(function(e){g.device=e.data;e=_.union([g.device.id],_.map(_.union(g.device.childAssets.references,g.device.childDevices.references),function(e){return e.managedObject.id}));_.remove(e,_.isUndefined),i.all(_.map(e,function(e){return a.detail(e)})).then(function(e){var i;g.devices=_.map(e,function(e){e=e.data;return _.assign({},e,{name:c("truncate")(e.name)})}),i=t,_.forOwn(o.config.mapping,function(e,n){1!==g.devices.length&&!i||(o.config.deviceIds[n]=o.config.device.id),o.config.deviceIds[n]=o.config.deviceIds[n]||o.config.device.id}),g.updateComputedProperties(o.config.deviceIds,o.config.mapping)})}))},this.onSelectFile=function(n){g.loading=!0,t.upload(n,e).then(function(e){g.binaryFile=e.data,o.config.binaryId=e.data.id,g.retrieveSvgData(n),o.forms.componentForm.$setDirty()}).finally(function(){g.loading=!1})},this.updateComputedProperties=function(e,t){_.isEmpty(e)||_.isEmpty(t)||_.forOwn(e,function(e,n){var i=[t[n]];t[n]&&(n=l(e),d.attach(n,_.filter(i,function(e){return _.isObjectLike(e)})))})},this.onMappingChange=function(){g.updateComputedProperties(o.config.deviceIds,o.config.mapping)},this.onDeviceIdsChange=function(){g.updateComputedProperties(o.config.deviceIds,o.config.mapping),h()},this.retrieveSvgData=function(n){g.svgFile={name:n.name,size:n.length},(n instanceof Blob?t.readDataUri(n):t.downloadAsDataUri(n)).then(t.decodeDataUri).then(function(e){return new File([e],n.name,{type:n.type})}).then(function(e){return s.sanitizeFileByLevel(e,o.config.sanitization)}).then(function(e){return t.readDataUri(e)}).then(t.decodeDataUri).then(p)},g.binaryFile={},o.config.mapping=o.config.mapping||{},o.config.deviceIds=o.config.deviceIds||{},o.config.devices&&delete o.config.devices,function(){if(!o.config.binaryId)return i.when();g.loading=!0,o.config.sanitization||(o.config.sanitization="none"),t.detail(o.config.binaryId).then(function(e){g.binaryFile=e.data,g.retrieveSvgData(g.binaryFile),g.loading=!1}).then(function(){var e=[];e.push({file:g.svgFile}),g.files=e})}(),h(),o.$watch("config.device",this.deviceDetail,!0),o.$watch("config.mapping",this.onMappingChange,!0),o.$on("$destroy",function(){_.forEach(o.config.deviceIds,function(e){d.detach(l(e))})})}e.$inject=["$scope","$q","$filter","c8yDevices","c8yBinary","c8yRealtime","c8yComputedProperties","fieldbusPropertyGenerator","c8yPropertiesLibrary","c8ySanitizeHtml"],angular.module("c8y.parts.scadaWidget").controller("ScadaWidgetConfigCtrl",e)}();
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
<div
|
|
2
|
-
ng-controller="ScadaWidgetConfigCtrl as ctrl"
|
|
3
2
|
class="p-t-8"
|
|
3
|
+
ng-controller="ScadaWidgetConfigCtrl as ctrl"
|
|
4
4
|
>
|
|
5
5
|
<div>
|
|
6
6
|
<label>
|
|
7
7
|
<span translate>SVG</span>
|
|
8
8
|
<button
|
|
9
9
|
class="btn-help btn-help--sm"
|
|
10
|
-
type="button"
|
|
11
10
|
aria-label="{{ 'Help' | translate }}"
|
|
11
|
+
type="button"
|
|
12
12
|
uib-popover="{{ 'Toggle help text' | translate }}"
|
|
13
13
|
popover-placement="right"
|
|
14
14
|
popover-trigger="'focus'"
|
|
@@ -65,26 +65,38 @@
|
|
|
65
65
|
</div>
|
|
66
66
|
|
|
67
67
|
<div class="form-group">
|
|
68
|
-
<label
|
|
68
|
+
<label
|
|
69
|
+
for="sanitization"
|
|
70
|
+
translate
|
|
71
|
+
>
|
|
72
|
+
Select code sanitization option
|
|
73
|
+
</label>
|
|
69
74
|
<div class="c8y-select-wrapper">
|
|
70
75
|
<select
|
|
71
76
|
class="form-control"
|
|
72
77
|
id="sanitization"
|
|
73
78
|
ng-model="config.sanitization"
|
|
74
79
|
ng-init="config.sanitization = config.sanitization || 'strict'"
|
|
80
|
+
ng-change="ctrl.retrieveSvgData(ctrl.binaryFile)"
|
|
75
81
|
>
|
|
76
82
|
<option
|
|
77
83
|
value="strict"
|
|
78
84
|
translate
|
|
79
|
-
>
|
|
85
|
+
>
|
|
86
|
+
strict`code sanitization`
|
|
87
|
+
</option>
|
|
80
88
|
<option
|
|
81
89
|
value="lax"
|
|
82
90
|
translate
|
|
83
|
-
>
|
|
91
|
+
>
|
|
92
|
+
lax`code sanitization`
|
|
93
|
+
</option>
|
|
84
94
|
<option
|
|
85
95
|
value="none"
|
|
86
96
|
translate
|
|
87
|
-
>
|
|
97
|
+
>
|
|
98
|
+
none`code sanitization`
|
|
99
|
+
</option>
|
|
88
100
|
</select>
|
|
89
101
|
</div>
|
|
90
102
|
</div>
|
|
@@ -98,20 +110,23 @@
|
|
|
98
110
|
<input type="hidden" />
|
|
99
111
|
</div>
|
|
100
112
|
</div>
|
|
101
|
-
|
|
113
|
+
<div class="form-group p-t-16">
|
|
102
114
|
<label class="input-group">{{ 'Preview' | translate }}</label>
|
|
103
115
|
<span
|
|
104
|
-
id="helpBlock"
|
|
105
116
|
class="help-block m-b-8"
|
|
117
|
+
id="helpBlock"
|
|
118
|
+
ng-if="config.sanitization !== 'none'"
|
|
106
119
|
translate
|
|
107
|
-
>
|
|
120
|
+
>
|
|
121
|
+
SVG content will be sanitized.
|
|
122
|
+
</span>
|
|
108
123
|
<span
|
|
109
|
-
ng-show="ctrl.loading"
|
|
110
124
|
class="m-l-4"
|
|
125
|
+
ng-show="ctrl.loading"
|
|
111
126
|
>
|
|
112
127
|
<i
|
|
113
|
-
c8y-icon="spinner"
|
|
114
128
|
class="icon-spin"
|
|
129
|
+
c8y-icon="spinner"
|
|
115
130
|
></i>
|
|
116
131
|
</span>
|
|
117
132
|
<div ng-switch="!!(ctrl.device && forms.componentForm.mapping.$valid && config.mapping)">
|
|
@@ -125,8 +140,8 @@
|
|
|
125
140
|
device-ids="config.deviceIds"
|
|
126
141
|
></div>
|
|
127
142
|
<div
|
|
128
|
-
ng-switch-default
|
|
129
143
|
class="alert alert-info"
|
|
144
|
+
ng-switch-default
|
|
130
145
|
translate
|
|
131
146
|
>
|
|
132
147
|
Select a device and fill all mappings to preview an SVG.
|
|
@@ -134,13 +149,12 @@
|
|
|
134
149
|
</div>
|
|
135
150
|
</div>
|
|
136
151
|
<div
|
|
137
|
-
c8y-scada-mapping
|
|
138
152
|
name="mapping"
|
|
153
|
+
c8y-scada-mapping
|
|
139
154
|
ng-model="config.mapping"
|
|
140
155
|
device="ctrl.device"
|
|
141
156
|
devices="ctrl.devices"
|
|
142
157
|
device-ids="config.deviceIds"
|
|
143
158
|
on-device-ids-change="ctrl.onDeviceIdsChange()"
|
|
144
159
|
></div>
|
|
145
|
-
|
|
146
160
|
</div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";!function(){function i(e,n,c,
|
|
1
|
+
"use strict";!function(){function i(e,n,t,c,d,a,o){var r=this;function u(n){return _.find(r.devices,function(i){return n===i.id})}this.init=function(){e.child.config.deviceIds||(e.child.config.deviceIds={},_.forOwn(e.child.config.mapping,function(i,n){e.child.config.deviceIds[n]=e.child.config.device.id}));var i=_(e.child.config.deviceIds).values().uniq().map(function(i){return d.detailRealtime(i,e,function(i){i.name=t("truncate")(i.name)})}).value();n.all(i).then(function(i){r.devices=i,r.updateComputedProperties(e.child.config.deviceIds,e.child.config.mapping)}),c.detail(e.child.config.binaryId).then(function(i){r.svgFile=i.data,c.downloadAsDataUri(r.svgFile).then(c.decodeDataUri).then(function(i){return new File([i],r.svgFile.name,{type:r.svgFile.type})}).then(function(i){return o.sanitizeFileByLevel(i,e.child.config.sanitization)}).then(function(i){return c.readDataUri(i)}).then(c.decodeDataUri).then(function(i){r.svgFile.data=i})})},this.updateComputedProperties=function(i,e){i&&e&&_.forOwn(i,function(i,n){n=[e[n]];n.length&&a.attach(u(i),n)})},e.$watch("child.config",this.init,!0),e.$on("$destroy",function(){var i=_.uniq(_.values(e.child.config.deviceIds));_.forEach(i,function(i){a.detach(u(i))})})}i.$inject=["$scope","$q","$filter","c8yBinary","c8yDevices","c8yComputedProperties","c8ySanitizeHtml"],angular.module("c8y.parts.scadaWidget").controller("ScadaWidgetCtrl",i)}();
|
|
@@ -1,39 +1,57 @@
|
|
|
1
1
|
<c8y-ui-title-set title="vm.TITLE | translate"></c8y-ui-title-set>
|
|
2
2
|
<c8y-breadcrumbs-set>
|
|
3
|
-
<c8y-breadcrumbs-item label="{{ vm.TITLE | translate }}" icon="c8y-layers"></c8y-breadcrumbs-item>
|
|
4
3
|
<c8y-breadcrumbs-item
|
|
5
|
-
label="{{ 'Tenants' | translate }}"
|
|
6
4
|
icon="c8y-layers"
|
|
5
|
+
label="{{ vm.TITLE | translate }}"
|
|
6
|
+
></c8y-breadcrumbs-item>
|
|
7
|
+
<c8y-breadcrumbs-item
|
|
8
|
+
icon="c8y-layers"
|
|
9
|
+
label="{{ 'Tenants' | translate }}"
|
|
7
10
|
></c8y-breadcrumbs-item>
|
|
8
11
|
</c8y-breadcrumbs-set>
|
|
9
12
|
<c8y-ui-action-bar-set>
|
|
10
|
-
<li
|
|
13
|
+
<li
|
|
14
|
+
class="navbar-form"
|
|
15
|
+
action-bar-position="left"
|
|
16
|
+
>
|
|
11
17
|
<c8y-list-display-control
|
|
12
18
|
list-length="vm.policies.length"
|
|
13
19
|
on-list-class-change="vm.listClass = listClass"
|
|
14
20
|
></c8y-list-display-control>
|
|
15
21
|
</li>
|
|
16
22
|
|
|
17
|
-
<li
|
|
23
|
+
<li
|
|
24
|
+
class="navbar-form"
|
|
25
|
+
action-bar-position="left"
|
|
26
|
+
>
|
|
18
27
|
<div class="input-group input-group-search">
|
|
19
28
|
<input
|
|
20
29
|
class="form-control"
|
|
21
|
-
id="search"
|
|
22
30
|
title="{{ 'Filter tenant policies' | translate }}"
|
|
23
|
-
|
|
31
|
+
id="search"
|
|
24
32
|
placeholder="{{ 'Filter' | translate }}…"
|
|
33
|
+
type="search"
|
|
25
34
|
ng-model="vm.searchString"
|
|
26
35
|
/>
|
|
27
36
|
<span class="input-group-addon">
|
|
28
|
-
<i c8y-icon="search" ng-if="vm.searchString.length === 0 || !vm.searchString"></i>
|
|
29
37
|
<i
|
|
30
|
-
c8y-icon="
|
|
38
|
+
c8y-icon="search"
|
|
39
|
+
ng-if="vm.searchString.length === 0 || !vm.searchString"
|
|
40
|
+
></i>
|
|
41
|
+
<i
|
|
31
42
|
class="text-muted"
|
|
43
|
+
c8y-icon="times"
|
|
32
44
|
ng-if="vm.searchString.length > 0"
|
|
33
45
|
ng-click="vm.searchString = ''"
|
|
34
46
|
></i>
|
|
35
47
|
</span>
|
|
36
|
-
<span
|
|
48
|
+
<span
|
|
49
|
+
class="sr-only"
|
|
50
|
+
for="search"
|
|
51
|
+
translate
|
|
52
|
+
>
|
|
53
|
+
Search
|
|
54
|
+
</span>
|
|
37
55
|
</div>
|
|
38
56
|
</li>
|
|
39
57
|
|
|
@@ -59,10 +77,10 @@
|
|
|
59
77
|
|
|
60
78
|
<!-- empty state -->
|
|
61
79
|
<c8y-ui-empty-state
|
|
62
|
-
ng-if="vm.policies.length === 0"
|
|
63
80
|
[icon]="'c8y-tenant-policies'"
|
|
64
81
|
[title]="'No tenant policies to display.' | translate"
|
|
65
82
|
[subtitle]="'Click below to add your first tenant policy.' | translate"
|
|
83
|
+
ng-if="vm.policies.length === 0"
|
|
66
84
|
>
|
|
67
85
|
<a
|
|
68
86
|
class="btn btn-primary"
|
|
@@ -73,8 +91,14 @@
|
|
|
73
91
|
</a>
|
|
74
92
|
</c8y-ui-empty-state>
|
|
75
93
|
|
|
76
|
-
<div
|
|
77
|
-
|
|
94
|
+
<div
|
|
95
|
+
class="card-group"
|
|
96
|
+
ng-class="vm.listClass"
|
|
97
|
+
>
|
|
98
|
+
<div
|
|
99
|
+
class="page-sticky-header hidden-xs"
|
|
100
|
+
ng-if="vm.policies.length > 0"
|
|
101
|
+
>
|
|
78
102
|
<div class="d-flex a-i-center">
|
|
79
103
|
<div class="card-header">
|
|
80
104
|
<div class="card-icon"></div>
|
|
@@ -89,7 +113,12 @@
|
|
|
89
113
|
<div translate>Retention rules</div>
|
|
90
114
|
</div>
|
|
91
115
|
<div class="card-column-50">
|
|
92
|
-
<div
|
|
116
|
+
<div
|
|
117
|
+
class="m-l-auto"
|
|
118
|
+
translate
|
|
119
|
+
>
|
|
120
|
+
Tenant options
|
|
121
|
+
</div>
|
|
93
122
|
</div>
|
|
94
123
|
</div>
|
|
95
124
|
</div>
|
|
@@ -100,19 +129,31 @@
|
|
|
100
129
|
class="col-xs-12 col-sm-6 col-md-4 col-lg-3"
|
|
101
130
|
ng-repeat="policy in vm.policies | orderBy:'name' | filter:vm.searchString as filtered"
|
|
102
131
|
>
|
|
103
|
-
<div
|
|
104
|
-
|
|
105
|
-
|
|
132
|
+
<div
|
|
133
|
+
class="card card--d-col"
|
|
134
|
+
ng-click="vm.edit(policy.id)"
|
|
135
|
+
>
|
|
136
|
+
<div
|
|
137
|
+
class="card-actions"
|
|
138
|
+
ng-click="$event.stopPropagation();"
|
|
139
|
+
>
|
|
140
|
+
<div
|
|
141
|
+
class="dropdown settings"
|
|
142
|
+
uib-dropdown
|
|
143
|
+
>
|
|
106
144
|
<button
|
|
107
145
|
class="dropdown-toggle c8y-dropdown"
|
|
108
146
|
title="{{ 'Actions' | translate }}"
|
|
109
|
-
uib-dropdown-toggle
|
|
110
147
|
aria-haspopup="true"
|
|
148
|
+
uib-dropdown-toggle
|
|
111
149
|
ng-click="::$event.stopPropagation()"
|
|
112
150
|
>
|
|
113
151
|
<i c8y-icon="ellipsis-v"></i>
|
|
114
152
|
</button>
|
|
115
|
-
<ul
|
|
153
|
+
<ul
|
|
154
|
+
class="dropdown-menu dropdown-menu-right"
|
|
155
|
+
uib-dropdown-menu
|
|
156
|
+
>
|
|
116
157
|
<li>
|
|
117
158
|
<button
|
|
118
159
|
title="{{ 'Edit' | translate }}"
|
|
@@ -150,7 +191,10 @@
|
|
|
150
191
|
<div class="card-icon">
|
|
151
192
|
<i c8y-icon="{{ vm.ICON }} c8y-icon-duocolor"></i>
|
|
152
193
|
</div>
|
|
153
|
-
<div
|
|
194
|
+
<div
|
|
195
|
+
class="card-title text-truncate"
|
|
196
|
+
title="{{ policy.name | translate }}"
|
|
197
|
+
>
|
|
154
198
|
{{ policy.name | translate }}
|
|
155
199
|
</div>
|
|
156
200
|
</div>
|
|
@@ -159,7 +203,10 @@
|
|
|
159
203
|
<span class="text-label-small">
|
|
160
204
|
{{ 'Description' | translate }}
|
|
161
205
|
</span>
|
|
162
|
-
<p
|
|
206
|
+
<p
|
|
207
|
+
class="text-truncate"
|
|
208
|
+
title="{{ policy.description | translate }}"
|
|
209
|
+
>
|
|
163
210
|
<small>
|
|
164
211
|
{{ policy.description | translate }}
|
|
165
212
|
</small>
|
|
@@ -169,12 +216,30 @@
|
|
|
169
216
|
<div class="card-footer separator card-column-30">
|
|
170
217
|
<div class="d-flex fit-w">
|
|
171
218
|
<div class="flex-grow card-column-50 m-r-4">
|
|
172
|
-
<span
|
|
173
|
-
|
|
219
|
+
<span
|
|
220
|
+
class="badge badge-info"
|
|
221
|
+
data-cy="tenantPolicyList--retentionRulesNumber"
|
|
222
|
+
ng-bind="::(policy.retentions.length || 0)"
|
|
223
|
+
></span>
|
|
224
|
+
<span
|
|
225
|
+
class="m-t-auto text-label-small"
|
|
226
|
+
translate
|
|
227
|
+
>
|
|
228
|
+
Retention rules
|
|
229
|
+
</span>
|
|
174
230
|
</div>
|
|
175
231
|
<div class="card-column-50 m-l-4">
|
|
176
|
-
<span
|
|
177
|
-
|
|
232
|
+
<span
|
|
233
|
+
class="badge badge-info"
|
|
234
|
+
data-cy="tenantPolicyList--tenantOptionsNumber"
|
|
235
|
+
ng-bind="::(policy.options.length || 0)"
|
|
236
|
+
></span>
|
|
237
|
+
<span
|
|
238
|
+
class="m-t-auto text-label-small"
|
|
239
|
+
translate
|
|
240
|
+
>
|
|
241
|
+
Tenant options
|
|
242
|
+
</span>
|
|
178
243
|
</div>
|
|
179
244
|
</div>
|
|
180
245
|
</div>
|
|
@@ -184,8 +249,8 @@
|
|
|
184
249
|
|
|
185
250
|
<!-- no results empty state -->
|
|
186
251
|
<c8y-ui-empty-state
|
|
187
|
-
ng-if="filtered.length === 0 && vm.searchString.length > 0"
|
|
188
252
|
[icon]="'search'"
|
|
189
253
|
[title]="'No results to display.' | translate"
|
|
190
254
|
[subtitle]="'Refine your search terms or check your spelling.' | translate"
|
|
255
|
+
ng-if="filtered.length === 0 && vm.searchString.length > 0"
|
|
191
256
|
></c8y-ui-empty-state>
|
|
@@ -5,20 +5,27 @@
|
|
|
5
5
|
|
|
6
6
|
<c8y-breadcrumbs-set>
|
|
7
7
|
<c8y-breadcrumbs-item
|
|
8
|
+
icon="cog"
|
|
8
9
|
label="{{ 'Usage statistics' | translate }}"
|
|
10
|
+
></c8y-breadcrumbs-item>
|
|
11
|
+
<c8y-breadcrumbs-item
|
|
9
12
|
icon="cog"
|
|
13
|
+
label="{{ 'Tenants' | translate }}"
|
|
10
14
|
></c8y-breadcrumbs-item>
|
|
11
|
-
<c8y-breadcrumbs-item label="{{ 'Tenants' | translate }}" icon="cog"></c8y-breadcrumbs-item>
|
|
12
15
|
</c8y-breadcrumbs-set>
|
|
13
16
|
|
|
14
17
|
<c8y-ui-action-bar-set>
|
|
15
|
-
<li
|
|
18
|
+
<li
|
|
19
|
+
class="navbar-form"
|
|
20
|
+
action-bar-position="left"
|
|
21
|
+
>
|
|
16
22
|
<form class="d-flex-sm">
|
|
17
23
|
<div class="form-group datepicker">
|
|
18
24
|
<input
|
|
25
|
+
class="form-control text-center"
|
|
19
26
|
title="{{ 'Date from' | translate }}"
|
|
27
|
+
placeholder="{{ 'Date from' | translate }}"
|
|
20
28
|
type="date"
|
|
21
|
-
class="form-control text-center"
|
|
22
29
|
ng-model="vm.dateFrom"
|
|
23
30
|
uib-datepicker-popup
|
|
24
31
|
datepicker-options="{ maxDate: vm.dateTo, showWeeks: true }"
|
|
@@ -26,14 +33,14 @@
|
|
|
26
33
|
show-button-bar="false"
|
|
27
34
|
is-open="openFrom"
|
|
28
35
|
ng-click="openFrom=true"
|
|
29
|
-
placeholder="{{ 'Date from' | translate }}"
|
|
30
36
|
/>
|
|
31
37
|
</div>
|
|
32
38
|
<div class="form-group datepicker m-r-md-8">
|
|
33
39
|
<input
|
|
40
|
+
class="form-control text-center"
|
|
34
41
|
title="{{ 'Date to' | translate }}"
|
|
42
|
+
placeholder="{{ 'Date to' | translate }}"
|
|
35
43
|
type="date"
|
|
36
|
-
class="form-control text-center"
|
|
37
44
|
ng-model="vm.dateTo"
|
|
38
45
|
uib-datepicker-popup
|
|
39
46
|
datepicker-options="{ minDate: vm.dateFrom, showWeeks: true }"
|
|
@@ -41,27 +48,26 @@
|
|
|
41
48
|
show-button-bar="false"
|
|
42
49
|
is-open="openTo"
|
|
43
50
|
ng-click="openTo=true"
|
|
44
|
-
placeholder="{{ 'Date to' | translate }}"
|
|
45
51
|
/>
|
|
46
52
|
</div>
|
|
47
53
|
<button
|
|
54
|
+
class="btn btn-default"
|
|
48
55
|
title="{{ 'Apply filters' | translate }}"
|
|
49
|
-
type="button"
|
|
50
56
|
name="apply"
|
|
57
|
+
type="button"
|
|
51
58
|
type="submit"
|
|
52
|
-
class="btn btn-default"
|
|
53
59
|
ng-click="vm.filter()"
|
|
54
60
|
>
|
|
55
61
|
<i c8y-icon="filter"></i>
|
|
56
62
|
{{ 'Apply`filters`' | translate }}
|
|
57
63
|
</button>
|
|
58
64
|
<button
|
|
65
|
+
class="btn btn-default"
|
|
59
66
|
title="{{ 'Clear filters' | translate }}"
|
|
60
|
-
type="button"
|
|
61
|
-
ng-if="vm.dateFrom || vm.dateTo"
|
|
62
67
|
name="clear"
|
|
63
68
|
type="button"
|
|
64
|
-
|
|
69
|
+
type="button"
|
|
70
|
+
ng-if="vm.dateFrom || vm.dateTo"
|
|
65
71
|
ng-click="vm.clearFilter()"
|
|
66
72
|
>
|
|
67
73
|
<i c8y-icon="clear-filters"></i>
|
|
@@ -71,9 +77,9 @@
|
|
|
71
77
|
</li>
|
|
72
78
|
|
|
73
79
|
<button
|
|
80
|
+
class="btn btn-link"
|
|
74
81
|
title="{{ 'Export CSV' | translate }}"
|
|
75
82
|
type="button"
|
|
76
|
-
class="btn btn-link"
|
|
77
83
|
c8y-csv-exporter
|
|
78
84
|
c8y-headers="vm.getCsvHeaders()"
|
|
79
85
|
c8y-data="vm.getCsvData()"
|
|
@@ -84,12 +90,15 @@
|
|
|
84
90
|
</button>
|
|
85
91
|
|
|
86
92
|
<button
|
|
93
|
+
class="btn btn-link"
|
|
87
94
|
title="{{ 'Reload' | translate }}"
|
|
88
95
|
type="button"
|
|
89
|
-
class="btn btn-link"
|
|
90
96
|
ng-click="vm.refresh()"
|
|
91
97
|
>
|
|
92
|
-
<i
|
|
98
|
+
<i
|
|
99
|
+
ng-class="{ 'icon-spin': vm.refreshLoading }"
|
|
100
|
+
c8y-icon="refresh"
|
|
101
|
+
></i>
|
|
93
102
|
{{ 'Reload' | translate }}
|
|
94
103
|
</button>
|
|
95
104
|
</c8y-ui-action-bar-set>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ownKeys(
|
|
1
|
+
"use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ownKeys(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(r),!0).forEach(function(e){_defineProperty(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function _defineProperty(e,t,r){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"===_typeof(e)?e:String(e)}function _toPrimitive(e,t){if("object"!==_typeof(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!==_typeof(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){var r;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,s,l=[],a=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;a=!1}else for(;!(a=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{if(!a&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw o}}return l}}function _arrayWithHoles(e){if(Array.isArray(e))return e}!function(){function e(e,t,r,n,o,i,s,l){var a=this;function c(){t.listInventoryRoles(a.userId).then(r.getResData).then(function(e){a.assignedRoles=_.keyBy(e.inventoryAssignments,"managedObject")}),t.detail(a.userId).then(r.getResData).then(function(e){a.user=e,a.user.owner?t.listInventoryRoles(a.user.owner).then(r.getResData).then(function(e){a.ownerAssignedRoles=_.keyBy(e.inventoryAssignments,"managedObject"),_.isEmpty(a.ownerAssignedRoles)&&(a.displayNoOwnerRolesAlert=!0),a.failedToFetchOwnerInventoryRoles=!1}).catch(function(){a.failedToFetchOwnerInventoryRoles=!0}):a.failedToFetchOwnerInventoryRoles=!1})}function u(){c(),s.success(l.getPlural(y(),"Inventory role updated","Inventory roles updated",{}))}function y(){return _.filter(a.assignedRoles,"isModified").length}function f(e){var t="replace"===e.process,e=e.roles,r=_.map(a.assignedRoles);return n.copyUserRoles(e,r,a.userId,t).then(c).then(o.successUserRolesCopy)}_.assign(a,{$onChange:function(e){e.user&&c()},onChangeRoles:function(e){var t=e.roles,e=e.managedObjectId;a.assignedRoles[e]=a.assignedRoles[e]||{},_.assign(a.assignedRoles[e],{managedObject:e,roles:t,isModified:!0}),a.assignedRoles=_objectSpread({},a.assignedRoles)},onSaveInventoryRoles:function(){n.onSaveInventoryRoles(a.userId,a.assignedRoles).then(u)},copyRoles:function(){o.copyFromUserDialog(a.userId).then(f)},loadAssignedRoles:c,isUnchanged:function(){return 0===y()},pageSize:20,scrollToTop:function(){var e=_slicedToArray(angular.element(document.querySelector("#inventory-roles-container")),1)[0];e&&e.scrollTo(0,0)},helpLink:i.getUserGuideLink(_.get(o.STRINGS,"LINKS.ROLES_INVENTORY")),stopEventPropagation:function(e){e.stopPropagation()},displayNoOwnerRolesAlert:!1,failedToFetchOwnerInventoryRoles:null}),c()}e.$inject=["$q","c8yUser","c8yBase","c8yUserInventoryRoles","c8yUserRolesUi","c8yDocs","c8yAlert","gettextCatalog"],angular.module("c8y.userRoles").component("c8yUserInventoryRolesTab",{templateUrl:":::PLUGIN_PATH:::/inventoryRolesTab/inventoryRolesTab.html",controllerAs:"vm",controller:e,bindings:{userId:"<"}})}();
|
|
@@ -201,16 +201,22 @@
|
|
|
201
201
|
You can also copy inventory roles from another user or replace this user's roles with the
|
|
202
202
|
roles of another user.
|
|
203
203
|
</p>
|
|
204
|
-
<
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
rel="noopener noreferrer"
|
|
204
|
+
<span
|
|
205
|
+
ng-click="vm.stopEventPropagation($event)"
|
|
206
|
+
>
|
|
207
|
+
<small
|
|
208
|
+
ng-show="::vm.helpLink"
|
|
210
209
|
>
|
|
211
|
-
<
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
210
|
+
<a
|
|
211
|
+
title="{{ 'Help & documentation' | translate }}"
|
|
212
|
+
ng-href="{{::vm.helpLink}}"
|
|
213
|
+
target="_blank"
|
|
214
|
+
rel="noopener noreferrer"
|
|
215
|
+
>
|
|
216
|
+
<i c8y-icon="question-circle-o" class="text-info"></i>
|
|
217
|
+
<span translate>Help & documentation</span>
|
|
218
|
+
</a>
|
|
219
|
+
</small>
|
|
220
|
+
</span>
|
|
215
221
|
</div>
|
|
216
222
|
</script>
|