@c8y/ng1-modules 1018.487.7 → 1018.497.2
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/binaryArtefactsManagement/views/list.html +63 -23
- package/core/core/services/measurements.js +1 -1
- package/core/locales/de.po +3 -3
- package/core/locales/en.po +5 -5
- 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/services/measurementsReport.js +1 -1
- 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/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-protocols/deviceProtocolList.html +4 -4
- package/device-protocols/deviceProtocolView.html +34 -14
- package/deviceDatabase4/cumulocity.json +2 -2
- 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/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/deviceDatabase4/detail/device-type-detail.service.js +0 -1
- 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
package/export/views/list.html
CHANGED
|
@@ -151,6 +151,27 @@
|
|
|
151
151
|
</span>
|
|
152
152
|
</div>
|
|
153
153
|
<div class="col-4">
|
|
154
|
+
<span ng-show="::row.config.queryParameters.dateType == 'LAST_24HOURS'">
|
|
155
|
+
<i
|
|
156
|
+
class="m-r-4"
|
|
157
|
+
c8y-icon="calendar"
|
|
158
|
+
></i>
|
|
159
|
+
<translate>Last 24 hours</translate>
|
|
160
|
+
</span>
|
|
161
|
+
<span ng-show="::row.config.queryParameters.dateType == 'LAST_7DAYS'">
|
|
162
|
+
<i
|
|
163
|
+
class="m-r-4"
|
|
164
|
+
c8y-icon="calendar"
|
|
165
|
+
></i>
|
|
166
|
+
<translate>Last 7 days</translate>
|
|
167
|
+
</span>
|
|
168
|
+
<span ng-show="::row.config.queryParameters.dateType == 'LAST_30DAYS'">
|
|
169
|
+
<i
|
|
170
|
+
class="m-r-4"
|
|
171
|
+
c8y-icon="calendar"
|
|
172
|
+
></i>
|
|
173
|
+
<translate>Last 30 days</translate>
|
|
174
|
+
</span>
|
|
154
175
|
<span ng-show="::row.config.queryParameters.dateType == 'LAST_WEEK'">
|
|
155
176
|
<i
|
|
156
177
|
class="m-r-4"
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
</tbody>
|
|
77
77
|
</table>
|
|
78
78
|
</div>
|
|
79
|
-
<div class="m-t-8 m-b-16 d-flex">
|
|
79
|
+
<div class="m-t-8 m-b-16 d-flex gap-8 flex-wrap">
|
|
80
80
|
<button
|
|
81
81
|
class="btn btn-default"
|
|
82
82
|
type="button"
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
{{ 'Add' | translate }}
|
|
88
88
|
</button>
|
|
89
89
|
<button
|
|
90
|
-
class="btn btn-default m-l-
|
|
90
|
+
class="btn btn-default m-l-xs-0"
|
|
91
91
|
type="button"
|
|
92
92
|
title="{{ 'Add predefined' | translate }}"
|
|
93
93
|
ng-click="api.addPredefined();"
|
|
@@ -95,5 +95,5 @@
|
|
|
95
95
|
<i c8y-icon="plus-circle"></i>
|
|
96
96
|
{{ 'Add predefined' | translate }}
|
|
97
97
|
</button>
|
|
98
|
-
<div class="flex-grow m-l-
|
|
98
|
+
<div class="flex-grow m-l-xs-0" ng-if="api.template" ng-include="api.template"></div>
|
|
99
99
|
</div>
|
|
@@ -1,14 +1,43 @@
|
|
|
1
1
|
<div class="row export-timespan">
|
|
2
|
-
<div class="
|
|
3
|
-
<div class="
|
|
4
|
-
<select
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
<div class="form-group">
|
|
3
|
+
<div class="col-sm-4 col-xs-12">
|
|
4
|
+
<div class="c8y-select-wrapper" >
|
|
5
|
+
<select
|
|
6
|
+
aria-label="{{ 'Time range' | translate }}"
|
|
7
|
+
class="form-control input-sm"
|
|
8
|
+
ng-model="timespan.dateType"
|
|
9
|
+
ng-options="key as (label | translate) for (key, label) in types"
|
|
10
|
+
></select>
|
|
11
|
+
<span ></span>
|
|
12
|
+
</div>
|
|
11
13
|
</div>
|
|
14
|
+
<button
|
|
15
|
+
ng-show="timespan.dateType === 'LAST_MONTH'"
|
|
16
|
+
class="btn-help btn-help--sm"
|
|
17
|
+
type="button"
|
|
18
|
+
aria-label="{{ 'Help' | translate }}"
|
|
19
|
+
uib-popover="{{ 'From midnight last month to now. More in documentation.' | translate }}"
|
|
20
|
+
popover-placement="right"
|
|
21
|
+
popover-trigger="'focus'"
|
|
22
|
+
></button>
|
|
23
|
+
<button
|
|
24
|
+
ng-show="timespan.dateType === 'LAST_WEEK'"
|
|
25
|
+
class="btn-help btn-help--sm"
|
|
26
|
+
type="button"
|
|
27
|
+
aria-label="{{ 'Help' | translate }}"
|
|
28
|
+
uib-popover="{{ 'From midnight last week to now. More in documentation.' | translate }}"
|
|
29
|
+
popover-placement="right"
|
|
30
|
+
popover-trigger="'focus'"
|
|
31
|
+
></button>
|
|
32
|
+
<button
|
|
33
|
+
ng-show="timespan.dateType === 'LAST_YEAR'"
|
|
34
|
+
class="btn-help btn-help--sm"
|
|
35
|
+
type="button"
|
|
36
|
+
aria-label="{{ 'Help' | translate }}"
|
|
37
|
+
uib-popover="{{ 'From midnight last year to now. More in documentation.' | translate }}"
|
|
38
|
+
popover-placement="right"
|
|
39
|
+
popover-trigger="'focus'"
|
|
40
|
+
></button>
|
|
12
41
|
</div>
|
|
13
42
|
<div class="col-xs-12" ng-if="timespan.dateType === 'CUSTOM'">
|
|
14
43
|
<div class="row">
|
|
@@ -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 _defineProperty(e,t,n){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,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 n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}!function(){function e(a,n,e){var o,u=this,m=d3.scale.category10();function r(e){var t=e.currentValue,e=e.previousValue;return!_.isEmpty(t)&&!_.isEmpty(e)&&!_.isEqual(t,e)}function i(e){u.fragmentSeriesPairs=_.groupBy(e,"fragment")}function c(){u.channel="/measurements/".concat(o)}function f(){var n,r,i,e=_.get(u.fragmentSeriesPairs,u.fragment),e=_.reduce(e,function(e,t){var n=t.series,t=t.unit;return _.assign(e,_defineProperty({},n,{unit:t}))},{}),e=(n=0,r=u.fragment,i={__target:{id:o},fragment:r,lineType:"line",renderType:"area"},_.map(e,function(e,t){return _.assign({series:t,unit:e.unit,label:a.humanizeFragment("".concat(r," => ").concat(t)),color:m(n++),__active:!0},i)}));_.set(u,"dataPoints",e)}u.aggregation="MINUTELY",u.interval=e._defaultDuration,_.assign(u,{$onChanges:function(e){var t=e.device,e=e.fragment;u.device&&u.fragment&&((r(t)||r(e))&&(u.fragmentSeriesPairs=void 0),o=a.getId(u.device),u.fragmentSeriesPairs?(c(),f()):n.getSupportedSeries(o
|
|
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 _defineProperty(e,t,n){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,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 n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}!function(){function e(a,n,e){var o,u=this,m=d3.scale.category10();function r(e){var t=e.currentValue,e=e.previousValue;return!_.isEmpty(t)&&!_.isEmpty(e)&&!_.isEqual(t,e)}function i(e){u.fragmentSeriesPairs=_.groupBy(e,"fragment")}function c(){u.channel="/measurements/".concat(o)}function f(){var n,r,i,e=_.get(u.fragmentSeriesPairs,u.fragment),e=_.reduce(e,function(e,t){var n=t.series,t=t.unit;return _.assign(e,_defineProperty({},n,{unit:t}))},{}),e=(n=0,r=u.fragment,i={__target:{id:o},fragment:r,lineType:"line",renderType:"area"},_.map(e,function(e,t){return _.assign({series:t,unit:e.unit,label:a.humanizeFragment("".concat(r," => ").concat(t)),color:m(n++),__active:!0},i)}));_.set(u,"dataPoints",e)}u.aggregation="MINUTELY",u.interval=e._defaultDuration,_.assign(u,{$onChanges:function(e){var t=e.device,e=e.fragment;u.device&&u.fragment&&((r(t)||r(e))&&(u.fragmentSeriesPairs=void 0),o=a.getId(u.device),u.fragmentSeriesPairs?(c(),f()):n.getSupportedSeries(o).then(i).then(function(){c(),f()}))},$onInit:function(){u.dateFrom=moment().subtract(1,"hour").toDate(),u.dateTo=new Date},onUpdateDates:function(e,t){u.dateFrom=e;e=moment().diff(moment(t),"seconds")<10;u.realtime&&!e&&(u.realtime=!1);u.dateTo=t},updateScale:function(e){_.forEach(e.series,function(e){var t,n=e.dataPoint,r=_.find(u.dataPoints,function(e){return e.fragment===n.fragment&&e.series===n.series});r&&(e=e.values,(t=_.minBy(e,"val.min").val.min)===(e=_.maxBy(e,"val.max").val.max)&&(--t,e+=1),r.min=t,r.max=e)})}})}e.$inject=["c8yBase","c8yDevices","INTERVAL_CONSTANTS"],angular.module("c8y.core.measurements2").component("c8yMeasurementsFragmentChart",{templateUrl:":::PLUGIN_PATH:::/fragmentChart/fragmentChart.html",controllerAs:"vm",controller:e,bindings:{fragment:"<",device:"<",dateFrom:"=",dateTo:"=",realtime:"=?",hideRealtimeButton:"=?"}})}();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";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 n;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _iterableToArrayLimit(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function _arrayWithHoles(e){if(Array.isArray(e))return e}!function(){function e(e,r,a,s){var i;function o(e,t,n,r,i){return a.listForDataPoint(e,t,n,"NONE"!==r?r:void 0,i)}function t(e,t){var n=this;return n.chart=e,n.dataPoint=t,n.hoverItems=[],n.values=[],n.implicitDomain={},n.bisect=d3.bisector(function(e){return e.time}).right,n.loadSeriesData=r.latest(o),n}return i=e.has("ngZone")?e.get("ngZone"):{runOutsideAngular:function(e){return e()}},t.prototype={defaultRenderType:"min",defaultLineType:"line",loadDataAndRender:function(e,t,n){var r=this;r.loadData(e,t,n).finally(function(){r.chart.render()})},loadData:function(e,t,n){var r=this,i=r.dataPoint,a=r._aggregation;return this.loadSeriesData(i,e,t,n,r.chart).then(function(e){return a!==n&&(r.values.length=0,r._aggregation=n,r.resetImplicitDomain()),r.appendValues(e.values),e})},appendValues:function(e){var i=this,a=i.values,o=i.implicitDomain;return _.forEach(e,function(e){var t,n,r;_.isFinite(e.min)&&_.isFinite(e.max)&&(r=new Date(e.time),t=r.getTime(),n=_.find(a,function(e){return t===e.time.getTime()}),r={time:r,val:{min:e.min,max:e.max}},a.length&&_.last(a).time.getTime()>t&&(i._valuesSortingNeeded=!0),n?_.assign(n,r):a.push(r),(_.isUndefined(o.min)||e.min<o.min)&&(o.min=e.min),_.isUndefined(o.max)||e.max>o.max)&&(o.max=e.max)}),a},destroy:function(){this.svg&&this.svg.remove(),this.hoverItems=[],delete this.svg},resetImplicitDomain:function(){this.implicitDomain.min=void 0,this.implicitDomain.max=void 0},domain:function(){var e=this.dataPoint,t=this.implicitDomain,n=_.isUndefined(e.min)||""===e.min||_.isNull(e.min)?t.min:Number(e.min),e=_.isUndefined(e.max)||""===e.max||_.isNull(e.max)?t.max:Number(e.max);return(_.isUndefined(n)||Number.isNaN(n))&&(n=d3.min(this.values,function(e){return e.val.min}),_.isUndefined(n)||(t.min=n),n=n||0),(_.isUndefined(e)||Number.isNaN(e))&&(e=d3.max(this.values,function(e){return e.val.max}),_.isUndefined(e)||(t.max=e),e=e||0),n===e&&(--n,e+=1),[n,e]},scale:function(){return this.chart.scaleY().domain(this.domain())},getRenderType:function(){return this.dataPoint.renderType||this.renderType||this.defaultRenderType},getLineType:function(){return this.dataPoint.lineType||this.lineType||this.defaultLineType},render:function(){var e,t=this,n=t.chart.svgSeries,r=t.getRenderType(),i=t.getLineType(),a=t.values,o=t.svg;!o||o.minOrMax===r&&o.chartType===r||t.destroy(),t.svg||(e=t.chart.margins,t.svg=n.append("g").attr("transform",s.translate(e.l,e.t)).attr("class","series"),(o=t.svg).minOrMax=r,o.chartType=i),t._valuesSortingNeeded&&(delete t._valuesSortingNeeded,a.sort(function(e,t){return e.time>t.time?1:e.time<t.time?-1:0})),t.chart.allowSelectFocusTime||t.removeOldHiddenValues(),"bars"===i?t._render_bars():"area"!==r?t._render_path(r):t._render_area()},removeOldHiddenValues:function(){var e=this.values,n=this.chart.axisX._from,r=0;_.forEach(e,function(e,t){return!moment(e.time).isSameOrAfter(n)||(r=t-1,!1)}),r&&e.splice(0,r)},_render_path:function(t){var n=this,e=n.svg._path;function r(e){return n.chart.axisX.scale()(e.time)}function i(e){return n.scale()(e.val[t])}function a(){return n.dataPoint.color}e||(n.svg._path=n.svg.append("path"),(e=n.svg._path).style({"pointer-events":"none"})),n._create_update_focusPoint(1),n._render_path_line(e,r,i,a),n._render_path_points(r,i,a)},_render_path_line:function(e,t,n,r){var i=this,a=i.getLineType()||"linear",o=d3.svg.line().interpolate(a).x(t).y(n);_.includes(["bars","points"],i.getLineType())?(e.remove(),i.svg._path=void 0):e.attr("d",function(){return o(i.values)}).style({fill:"transparent",stroke:r})},_render_path_points:function(e,t,n){var r;_.includes(["points","linePoints"],this.getLineType())?((r=this.svg.selectAll("circle.point").data(this.values)).enter().append("circle").attr("class","point"),r.exit().remove(),r.attr("cx",e).attr("cy",t).attr("r",4).attr("fill","transparent").attr("stroke",n)):this.svg.selectAll("circle.point").remove()},_render_bars:function(){var r=this,e=_.filter(r.chart.series,function(e){return e.getLineType()===r.getLineType()}),n=e.length,i=_.findIndex(e,function(e){return e===r}),a=r.svg.minOrMax,e=function(){var t=r.chart.axisX.scale();if(r._aggregation)return function(e){return t(e.time)-n*s()/2+i*s()};return function(e){return t(e.time)}}(),t=c(),o=u(t),s=function(){var e=1;{var t;r._aggregation&&(t=function(e){var t=r.chart.axisX.scale(),n=_slicedToArray(t.domain(),1)[0],e=moment(n).add(1,{MINUTELY:"minute",HOURLY:"hour",DAILY:"day"}[e]).toDate();return t(e)-t(n)}(r._aggregation),(e=20<(e=t/(n+1))?20:e)<1)&&(e=1)}return _.constant(e)}();function c(e){var t=r.scale(),n=(n=e)||("area"===a?"max":a);return function(e){return t(e.val[n])}}function l(t){var n=_.max(r.scale().range());return function(e){e=t(e);return n<e?n:e}}function u(t){var n=r.scale().range();return function(e){return Math.abs(_.max(n)-t(e))}}var e={x:e,y:l(t),width:s,height:o,fill:function(){return r.dataPoint.color}},t=r.svg.selectAll(".bars").data(r.values),o=t.enter().append("g").style("pointer-events","none").attr("class",function(e,t){return"bar index".concat(t)});o.append("rect").attr("class","barmain"),t.exit().remove(),t.select(".barmain").attr(e),"area"===a&&r._aggregation&&(o.append("rect").attr("class","barmin").style("opacity","0.2"),o=c("min"),o=_.defaults({fill:"#000",y:l(o),height:u(o)},e),t.select(".barmin").attr(o)),r._aggregation||r._create_update_focusPoint(1)},hover:function(e){var t=this,n=t.getRenderType(),r=t.getLineType(),i=t.values[e];(t.overPoint=i)&&(t._focusPointTime=i.time,"bars"===r)&&this._hover_bars(e),t._render_focusPoint(1,"area"!==n?n:"max"),t._render_focusPoint(2,"area"!==n?n:"min")},_hover_bars:function(e){this.svg.select(".hover").classed("hover",!1).style({opacity:1}),this.svg.select(".index".concat(e," .barmain")).classed("hover",!0).style({opacity:.5})},mouseleave:function(){"bars"===this.getLineType()&&this.svg.select(".hover").classed("hover",!1).style({opacity:1})},_create_update_focusPoint:function(e){var t=this,e="focusPoint".concat(e),n=t.svg[e];n||(t.svg[e]=t.svg.append("circle").style({visibility:t.chart.hoverItemsVisible?"visible":"hidden","pointer-events":"all"}).attr({cx:0,cy:0,r:3}),n=t.svg[e],t.addFocusPointEvent(n),t.hoverItems.push(n)),n.attr({fill:function(){return t.dataPoint.color}})},_render_focusPoint:function(e,t){var n=this.chart.axisX.scale(),r=this.scale(),i=this.svg,a=this.overPoint,e=i&&i["focusPoint".concat(e)];e&&(a?(i=i.xFocusScale?i.xFocusScale(a):n(a.time),n=r(a.val[t]),e.attr({cx:i,cy:n})):e.style("visibility","hidden"))},_render_area:function(){var t=this,e=t.getLineType()||"linear";function n(e){return t.chart.axisX.scale()(e.time)}function r(e){return t.scale()(e.val.max)}function i(e){return t.scale()(e.val.min)}function a(){return t.dataPoint.color}var o=d3.svg.area().interpolate(e).x(n).y0(r).y1(i),e=t.svg._path;e||(t.svg._path=t.svg.append("path").style({"pointer-events":"none",opacity:.8})),e=t.svg._path,t._create_update_focusPoint(1),t._create_update_focusPoint(2),e.attr("d",function(){return o(t.values)}).style({"pointer-events":"none",stroke:a,fill:a}),_.includes(["points","linePoints"],t.getLineType())?(t.svg.selectAll("circle.point.max").data(t.values).enter().append("circle").attr("class","point max"),t.svg.selectAll("circle.point.min").data(t.values).enter().append("circle").attr("class","point min"),t.svg.selectAll("circle.point.max").attr("cx",n).attr("cy",r).attr("r",4).attr("fill","transparent").attr("stroke",a),t.svg.selectAll("circle.point.min").attr("cx",n).attr("cy",i).attr("r",4).attr("fill","transparent").attr("stroke",a)):t.svg.selectAll("circle.point").remove()},onMove:function(e,t){var n=this.getNearIndex(e);this.hover(n,e,t)},hoverValue:function(){var e,t=this.getRenderType(),n=this.overPoint,r=this.dataPoint.unit||"",i=" -- ";return i=n&&(e=(n=n.val).min,n=n.max,"min"===t&&(i="".concat(e," ").concat(r)),"max"===t&&(i="".concat(n," ").concat(r)),"area"===t)?"".concat(e," ").concat(r," — ").concat(n," ").concat(r):i},hoverTime:function(){var e=this.overPoint;return e?moment(e.time):"--"},getNearIndex:function(e){var t=e,n=this.values,r=n.length-1,e=this.bisect(n,e,1,r),r=n[e-1]&&n[e-1].time,n=n[e]&&n[e].time;return!_.isUndefined(r)&&(_.isUndefined(n)||t-r<n-t)?e-1:e},measurementFits:function(e){return a.rtMeasurementForDatapoint(this.dataPoint)(e)},addFocusPointEvent:function(e){var n=this,r=n.chart;e.on("click",function(){var e,t;r.allowSelectFocusTime&&(e={target:(n.dataPoint.__target||{}).id,date:moment(n._focusPointTime).format("YYYY-MM-DDTHH:mm:ss.SSSZ")},(t=r.selectedPoint)&&moment(e.date).isSame(moment(t.date))?r.clearSelectPoint():r.setSelectPoint(e))}),e.on("mouseenter",function(){r.allowSelectFocusTime&&e.style({cursor:"pointer"}).attr({r:6})}),e.on("mouseleave",function(){r.allowSelectFocusTime&&e.style({cursor:"default"}).attr({r:3})})},realtimeMeasurement:function(e){function t(){r.appendValues(_.flattenDeep(r.__realtimeToAppend)),r.__realtimeToAppend=[],r.__realtimeToAppendTimout=void 0,r.chart.render()}var n,r=this,e=r.measurementFits(e);return e&&(r.__realtimeToAppend||(r.__realtimeToAppend=[]),r.__realtimeToAppend.push(e.values),(n=r.chart.axisX.getDebouncePreference()).reset?(clearTimeout(r.__realtimeToAppendTimout),t()):r.__realtimeToAppendTimout||i.runOutsideAngular(function(){r.__realtimeToAppendTimout=setTimeout(t,n.debounceTime)})),e}},t}e.$inject=["$injector","c8yBase","c8yMeasurements","c8yChartCommon"],angular.module("c8y.core.measurements2").factory("c8ySeries",e)}();
|
|
1
|
+
"use strict";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 n;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _iterableToArrayLimit(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function _arrayWithHoles(e){if(Array.isArray(e))return e}!function(){function e(e,r,a,s){var i;function o(e,t,n,r,i){return a.listForDataPoint(e,t,n,"NONE"!==r?r:void 0,i)}function t(e,t){var n=this;return n.chart=e,n.dataPoint=t,n.hoverItems=[],n.values=[],n.implicitDomain={},n.bisect=d3.bisector(function(e){return e.time}).right,n.loadSeriesData=r.latest(o),n}return i=e.has("ngZone")?e.get("ngZone"):{runOutsideAngular:function(e){return e()}},t.prototype={defaultRenderType:"min",defaultLineType:"line",loadDataAndRender:function(e,t,n){var r=this;return r.loadData(e,t,n).finally(function(){r.chart.render()})},loadData:function(e,t,n){var r=this,i=r.dataPoint,a=r._aggregation;return this.loadSeriesData(i,e,t,n,r.chart).then(function(e){return a!==n&&(r.values.length=0,r._aggregation=n,r.resetImplicitDomain()),r.appendValues(e.values),i.unit=e.dataPoint.unit,e})},appendValues:function(e){var i=this,a=i.values,o=i.implicitDomain;return _.forEach(e,function(e){var t,n,r;_.isFinite(e.min)&&_.isFinite(e.max)&&(r=new Date(e.time),t=r.getTime(),n=_.find(a,function(e){return t===e.time.getTime()}),r={time:r,val:{min:e.min,max:e.max}},a.length&&_.last(a).time.getTime()>t&&(i._valuesSortingNeeded=!0),n?_.assign(n,r):a.push(r),(_.isUndefined(o.min)||e.min<o.min)&&(o.min=e.min),_.isUndefined(o.max)||e.max>o.max)&&(o.max=e.max)}),a},destroy:function(){this.svg&&this.svg.remove(),this.hoverItems=[],delete this.svg},resetImplicitDomain:function(){this.implicitDomain.min=void 0,this.implicitDomain.max=void 0},domain:function(){var e=this.dataPoint,t=this.implicitDomain,n=_.isUndefined(e.min)||""===e.min||_.isNull(e.min)?t.min:Number(e.min),e=_.isUndefined(e.max)||""===e.max||_.isNull(e.max)?t.max:Number(e.max);return(_.isUndefined(n)||Number.isNaN(n))&&(n=d3.min(this.values,function(e){return e.val.min}),_.isUndefined(n)||(t.min=n),n=n||0),(_.isUndefined(e)||Number.isNaN(e))&&(e=d3.max(this.values,function(e){return e.val.max}),_.isUndefined(e)||(t.max=e),e=e||0),n===e&&(--n,e+=1),[n,e]},scale:function(){return this.chart.scaleY().domain(this.domain())},getRenderType:function(){return this.dataPoint.renderType||this.renderType||this.defaultRenderType},getLineType:function(){return this.dataPoint.lineType||this.lineType||this.defaultLineType},render:function(){var e,t=this,n=t.chart.svgSeries,r=t.getRenderType(),i=t.getLineType(),a=t.values,o=t.svg;!o||o.minOrMax===r&&o.chartType===r||t.destroy(),t.svg||(e=t.chart.margins,t.svg=n.append("g").attr("transform",s.translate(e.l,e.t)).attr("class","series"),(o=t.svg).minOrMax=r,o.chartType=i),t._valuesSortingNeeded&&(delete t._valuesSortingNeeded,a.sort(function(e,t){return e.time>t.time?1:e.time<t.time?-1:0})),t.chart.allowSelectFocusTime||t.removeOldHiddenValues(),"bars"===i?t._render_bars():"area"!==r?t._render_path(r):t._render_area()},removeOldHiddenValues:function(){var e=this.values,n=this.chart.axisX._from,r=0;_.forEach(e,function(e,t){return!moment(e.time).isSameOrAfter(n)||(r=t-1,!1)}),r&&e.splice(0,r)},_render_path:function(t){var n=this,e=n.svg._path;function r(e){return n.chart.axisX.scale()(e.time)}function i(e){return n.scale()(e.val[t])}function a(){return n.dataPoint.color}e||(n.svg._path=n.svg.append("path"),(e=n.svg._path).style({"pointer-events":"none"})),n._create_update_focusPoint(1),n._render_path_line(e,r,i,a),n._render_path_points(r,i,a)},_render_path_line:function(e,t,n,r){var i=this,a=i.getLineType()||"linear",o=d3.svg.line().interpolate(a).x(t).y(n);_.includes(["bars","points"],i.getLineType())?(e.remove(),i.svg._path=void 0):e.attr("d",function(){return o(i.values)}).style({fill:"transparent",stroke:r})},_render_path_points:function(e,t,n){var r;_.includes(["points","linePoints"],this.getLineType())?((r=this.svg.selectAll("circle.point").data(this.values)).enter().append("circle").attr("class","point"),r.exit().remove(),r.attr("cx",e).attr("cy",t).attr("r",4).attr("fill","transparent").attr("stroke",n)):this.svg.selectAll("circle.point").remove()},_render_bars:function(){var r=this,e=_.filter(r.chart.series,function(e){return e.getLineType()===r.getLineType()}),n=e.length,i=_.findIndex(e,function(e){return e===r}),a=r.svg.minOrMax,e=function(){var t=r.chart.axisX.scale();if(r._aggregation)return function(e){return t(e.time)-n*s()/2+i*s()};return function(e){return t(e.time)}}(),t=c(),o=u(t),s=function(){var e=1;{var t;r._aggregation&&(t=function(e){var t=r.chart.axisX.scale(),n=_slicedToArray(t.domain(),1)[0],e=moment(n).add(1,{MINUTELY:"minute",HOURLY:"hour",DAILY:"day"}[e]).toDate();return t(e)-t(n)}(r._aggregation),(e=20<(e=t/(n+1))?20:e)<1)&&(e=1)}return _.constant(e)}();function c(e){var t=r.scale(),n=(n=e)||("area"===a?"max":a);return function(e){return t(e.val[n])}}function l(t){var n=_.max(r.scale().range());return function(e){e=t(e);return n<e?n:e}}function u(t){var n=r.scale().range();return function(e){return Math.abs(_.max(n)-t(e))}}var e={x:e,y:l(t),width:s,height:o,fill:function(){return r.dataPoint.color}},t=r.svg.selectAll(".bars").data(r.values),o=t.enter().append("g").style("pointer-events","none").attr("class",function(e,t){return"bar index".concat(t)});o.append("rect").attr("class","barmain"),t.exit().remove(),t.select(".barmain").attr(e),"area"===a&&r._aggregation&&(o.append("rect").attr("class","barmin").style("opacity","0.2"),o=c("min"),o=_.defaults({fill:"#000",y:l(o),height:u(o)},e),t.select(".barmin").attr(o)),r._aggregation||r._create_update_focusPoint(1)},hover:function(e){var t=this,n=t.getRenderType(),r=t.getLineType(),i=t.values[e];(t.overPoint=i)&&(t._focusPointTime=i.time,"bars"===r)&&this._hover_bars(e),t._render_focusPoint(1,"area"!==n?n:"max"),t._render_focusPoint(2,"area"!==n?n:"min")},_hover_bars:function(e){this.svg.select(".hover").classed("hover",!1).style({opacity:1}),this.svg.select(".index".concat(e," .barmain")).classed("hover",!0).style({opacity:.5})},mouseleave:function(){"bars"===this.getLineType()&&this.svg.select(".hover").classed("hover",!1).style({opacity:1})},_create_update_focusPoint:function(e){var t=this,e="focusPoint".concat(e),n=t.svg[e];n||(t.svg[e]=t.svg.append("circle").style({visibility:t.chart.hoverItemsVisible?"visible":"hidden","pointer-events":"all"}).attr({cx:0,cy:0,r:3}),n=t.svg[e],t.addFocusPointEvent(n),t.hoverItems.push(n)),n.attr({fill:function(){return t.dataPoint.color}})},_render_focusPoint:function(e,t){var n=this.chart.axisX.scale(),r=this.scale(),i=this.svg,a=this.overPoint,e=i&&i["focusPoint".concat(e)];e&&(a?(i=i.xFocusScale?i.xFocusScale(a):n(a.time),n=r(a.val[t]),e.attr({cx:i,cy:n})):e.style("visibility","hidden"))},_render_area:function(){var t=this,e=t.getLineType()||"linear";function n(e){return t.chart.axisX.scale()(e.time)}function r(e){return t.scale()(e.val.max)}function i(e){return t.scale()(e.val.min)}function a(){return t.dataPoint.color}var o=d3.svg.area().interpolate(e).x(n).y0(r).y1(i),e=t.svg._path;e||(t.svg._path=t.svg.append("path").style({"pointer-events":"none",opacity:.8})),e=t.svg._path,t._create_update_focusPoint(1),t._create_update_focusPoint(2),e.attr("d",function(){return o(t.values)}).style({"pointer-events":"none",stroke:a,fill:a}),_.includes(["points","linePoints"],t.getLineType())?(t.svg.selectAll("circle.point.max").data(t.values).enter().append("circle").attr("class","point max"),t.svg.selectAll("circle.point.min").data(t.values).enter().append("circle").attr("class","point min"),t.svg.selectAll("circle.point.max").attr("cx",n).attr("cy",r).attr("r",4).attr("fill","transparent").attr("stroke",a),t.svg.selectAll("circle.point.min").attr("cx",n).attr("cy",i).attr("r",4).attr("fill","transparent").attr("stroke",a)):t.svg.selectAll("circle.point").remove()},onMove:function(e,t){var n=this.getNearIndex(e);this.hover(n,e,t)},hoverValue:function(){var e,t=this.getRenderType(),n=this.overPoint,r=this.dataPoint.unit||"",i=" -- ";return i=n&&(e=(n=n.val).min,n=n.max,"min"===t&&(i="".concat(e," ").concat(r)),"max"===t&&(i="".concat(n," ").concat(r)),"area"===t)?"".concat(e," ").concat(r," — ").concat(n," ").concat(r):i},hoverTime:function(){var e=this.overPoint;return e?moment(e.time):"--"},getNearIndex:function(e){var t=e,n=this.values,r=n.length-1,e=this.bisect(n,e,1,r),r=n[e-1]&&n[e-1].time,n=n[e]&&n[e].time;return!_.isUndefined(r)&&(_.isUndefined(n)||t-r<n-t)?e-1:e},measurementFits:function(e){return a.rtMeasurementForDatapoint(this.dataPoint)(e)},addFocusPointEvent:function(e){var n=this,r=n.chart;e.on("click",function(){var e,t;r.allowSelectFocusTime&&(e={target:(n.dataPoint.__target||{}).id,date:moment(n._focusPointTime).format("YYYY-MM-DDTHH:mm:ss.SSSZ")},(t=r.selectedPoint)&&moment(e.date).isSame(moment(t.date))?r.clearSelectPoint():r.setSelectPoint(e))}),e.on("mouseenter",function(){r.allowSelectFocusTime&&e.style({cursor:"pointer"}).attr({r:6})}),e.on("mouseleave",function(){r.allowSelectFocusTime&&e.style({cursor:"default"}).attr({r:3})})},realtimeMeasurement:function(e){function t(){r.appendValues(_.flattenDeep(r.__realtimeToAppend)),r.__realtimeToAppend=[],r.__realtimeToAppendTimout=void 0,r.chart.render()}var n,r=this,e=r.measurementFits(e);return e&&(r.__realtimeToAppend||(r.__realtimeToAppend=[]),r.__realtimeToAppend.push(e.values),(n=r.chart.axisX.getDebouncePreference()).reset?(clearTimeout(r.__realtimeToAppendTimout),t()):r.__realtimeToAppendTimout||i.runOutsideAngular(function(){r.__realtimeToAppendTimout=setTimeout(t,n.debounceTime)})),e}},t}e.$inject=["$injector","c8yBase","c8yMeasurements","c8yChartCommon"],angular.module("c8y.core.measurements2").factory("c8ySeries",e)}();
|
package/package.json
CHANGED
|
@@ -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>
|