@c8y/ng1-modules 1021.63.2 → 1021.67.0

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.
@@ -1440,6 +1440,9 @@ msgstr "今天的警报计数"
1440
1440
  msgid "Alarm created"
1441
1441
  msgstr "已创建警报"
1442
1442
 
1443
+ msgid "Alarm details"
1444
+ msgstr "警报详细信息"
1445
+
1443
1446
  msgid "Alarm list"
1444
1447
  msgstr "警报列表"
1445
1448
 
@@ -2255,6 +2258,12 @@ msgstr "被阻止"
2255
2258
  msgid "Back"
2256
2259
  msgstr "后退"
2257
2260
 
2261
+ msgid "Back to package overview"
2262
+ msgstr "返回包概述"
2263
+
2264
+ msgid "Back to package versions overview"
2265
+ msgstr "返回包版本概述"
2266
+
2258
2267
  msgid "Backend"
2259
2268
  msgstr "后端"
2260
2269
 
@@ -2870,6 +2879,9 @@ msgstr "更改图标"
2870
2879
  msgid "Change log"
2871
2880
  msgstr "更改日志"
2872
2881
 
2882
+ msgid "Change logs"
2883
+ msgstr "更改日志"
2884
+
2873
2885
  msgid "Change owner of original device`owner may be a human or system user`"
2874
2886
  msgstr "更改原始设备的所有者"
2875
2887
 
@@ -5790,6 +5802,9 @@ msgstr "是否要将版本 {{version}} 设置为最新版本?部署新应用
5790
5802
  msgid "Documentation"
5791
5803
  msgstr "文档"
5792
5804
 
5805
+ msgid "Documentation availability varies by plugin."
5806
+ msgstr "文档的可用性因插件而异。"
5807
+
5793
5808
  msgid "Does not match pattern {{ requiredPattern }}."
5794
5809
  msgstr "与模式 {{ requiredPattern }} 不匹配。"
5795
5810
 
@@ -10092,6 +10107,9 @@ msgstr "下一页"
10092
10107
  msgid "No"
10093
10108
  msgstr "否"
10094
10109
 
10110
+ msgid "No CHANGELOG.md found for package version"
10111
+ msgstr "未找到包版本的 CHANGELOG.md"
10112
+
10095
10113
  msgid "No Cumulocity IoT manifest found."
10096
10114
  msgstr "未找到 Cumulocity IoT 清单。"
10097
10115
 
@@ -10104,6 +10122,9 @@ msgstr "没有 RDB 快照分配到此设备。请从设备获取当前 RDB 快
10104
10122
  msgid "No README.md found"
10105
10123
  msgstr "未找到 README.md"
10106
10124
 
10125
+ msgid "No README.md found for plugin"
10126
+ msgstr "未找到插件的 README.md"
10127
+
10107
10128
  msgid "No REST API custom fields. Click below to add the first one."
10108
10129
  msgstr "无 REST API 自定义字段。在下面单击可添加第一个字段。"
10109
10130
 
@@ -10516,6 +10537,9 @@ msgstr "无匹配项目。"
10516
10537
  msgid "No matching microservices."
10517
10538
  msgstr "无匹配的微服务。"
10518
10539
 
10540
+ msgid "No matching plugins"
10541
+ msgstr "没有匹配的插件"
10542
+
10519
10543
  msgid "No matching smart rules available."
10520
10544
  msgstr "无匹配的智能规则可用。"
10521
10545
 
@@ -10582,6 +10606,9 @@ msgstr "没有此范围的权限。"
10582
10606
  msgid "No permissions required."
10583
10607
  msgstr "不需要授权。"
10584
10608
 
10609
+ msgid "No plugin selected"
10610
+ msgstr "未选择插件"
10611
+
10585
10612
  msgid "No plugins available"
10586
10613
  msgstr "没有可用的插件"
10587
10614
 
@@ -11389,9 +11416,6 @@ msgstr "软件包存档`对话框标题`"
11389
11416
  msgid "Package availability"
11390
11417
  msgstr "包可用性"
11391
11418
 
11392
- msgid "Package contents"
11393
- msgstr "包内容"
11394
-
11395
11419
  msgid "Package contents could not be determined."
11396
11420
  msgstr "无法确定包内容。"
11397
11421
 
@@ -13293,6 +13317,9 @@ msgstr "从 SmartREST 模板选择一条消息"
13293
13317
  msgid "Select a package from the list to display the package contents."
13294
13318
  msgstr "从列表中选择一个包来显示包内容。"
13295
13319
 
13320
+ msgid "Select a plugin from the list to view its documentation."
13321
+ msgstr "从列表中选择一个插件以查看其文档。"
13322
+
13296
13323
  msgid "Select a predefined command"
13297
13324
  msgstr "选择预定义命令"
13298
13325
 
@@ -13596,9 +13623,6 @@ msgstr "选择要预览的应用程序。"
13596
13623
  msgid "Select the asset, then on the available data points list, click on the plus button on the desired data point."
13597
13624
  msgstr "选择资产,然后在可用数据点列表上,单击所需数据点上的加号按钮。"
13598
13625
 
13599
- msgid "Select the compatible plugins to install"
13600
- msgstr "选择要安装的兼容插件"
13601
-
13602
13626
  msgid "Select the global roles for which the dashboard will be available"
13603
13627
  msgstr "选择仪表板可用于的全局角色"
13604
13628
 
@@ -14514,6 +14538,9 @@ msgstr "显示密码"
14514
14538
  msgid "Show percentages"
14515
14539
  msgstr "显示百分比"
14516
14540
 
14541
+ msgid "Show readme"
14542
+ msgstr "显示自述文件"
14543
+
14517
14544
  msgid "Show services updated`between dates`"
14518
14545
  msgstr "将服务显示为已更新"
14519
14546
 
@@ -16231,9 +16258,15 @@ msgstr "要复制此仪表板,请联系管理员申请必要的权限。"
16231
16258
  msgid "To see the result click <a href=\"#/device/{{deviceId}}/control\">here</a>"
16232
16259
  msgstr "要查看结果,请单击<a href=\"#/device/{{deviceId}}/control\">此处</a>"
16233
16260
 
16261
+ msgid "To view the contents of \"CHANGELOG\", add the file \"CHANGELOG.md\" to the package."
16262
+ msgstr "要查看\"CHANGELOG\"的内容,请将文件\"CHANGELOG.md\"添加到包中。"
16263
+
16234
16264
  msgid "To view the contents of \"README\", add the file \"README.md\" to the package."
16235
16265
  msgstr "要查看 \"README\" 的内容,请将文件 \"README.md\" 添加到包。"
16236
16266
 
16267
+ msgid "To view the contents of \"README\", add the file \"README.md\" to the plugin."
16268
+ msgstr "要查看\"README\"的内容,请将文件\"README.md\"添加到插件中。"
16269
+
16237
16270
  msgid "To`date`"
16238
16271
  msgstr "到"
16239
16272
 
@@ -17384,6 +17417,9 @@ msgstr "版本不匹配"
17384
17417
  msgid "Version of privacy policy"
17385
17418
  msgstr "隐私政策的版本"
17386
17419
 
17420
+ msgid "Version {{ selectedVersion }} package contents"
17421
+ msgstr "版本 {{ selectedVersion }} 包内容"
17422
+
17387
17423
  msgid "Version:"
17388
17424
  msgstr "版本:"
17389
17425
 
@@ -19239,6 +19275,9 @@ msgstr "已为品牌选择 {{ numberOfApps }} 个应用程序"
19239
19275
  msgid "{{ numberOfReports }} reports selected for widget"
19240
19276
  msgstr "{{ numberOfReports }} 为小部件选择的报告"
19241
19277
 
19278
+ msgid "{{ packageContentsTitle | translate: { selectedVersion } }}"
19279
+ msgstr "{{ packageContentsTitle | 翻译: { selectedVersion } }}"
19280
+
19242
19281
  msgid "{{ pageFirstItemIdx }} - {{ pageLastItemIdx }} of {{ itemsTotal }}"
19243
19282
  msgstr "{{ pageFirstItemIdx }} - {{ pageLastItemIdx }}/{{ itemsTotal }}"
19244
19283
 
@@ -1440,6 +1440,9 @@ msgstr "今天的警报计数"
1440
1440
  msgid "Alarm created"
1441
1441
  msgstr "已创建警报"
1442
1442
 
1443
+ msgid "Alarm details"
1444
+ msgstr "警报详细信息"
1445
+
1443
1446
  msgid "Alarm list"
1444
1447
  msgstr "警报列表"
1445
1448
 
@@ -2255,6 +2258,12 @@ msgstr "被阻止"
2255
2258
  msgid "Back"
2256
2259
  msgstr "上一步"
2257
2260
 
2261
+ msgid "Back to package overview"
2262
+ msgstr "後退⾄包概覽"
2263
+
2264
+ msgid "Back to package versions overview"
2265
+ msgstr "後退至套件版本總覽"
2266
+
2258
2267
  msgid "Backend"
2259
2268
  msgstr "后端"
2260
2269
 
@@ -2870,6 +2879,9 @@ msgstr "更改圖示"
2870
2879
  msgid "Change log"
2871
2880
  msgstr "更改日志"
2872
2881
 
2882
+ msgid "Change logs"
2883
+ msgstr "更改記錄"
2884
+
2873
2885
  msgid "Change owner of original device`owner may be a human or system user`"
2874
2886
  msgstr "更改原始設備的所有者"
2875
2887
 
@@ -5790,6 +5802,9 @@ msgstr "是否要將版本 {{version}} 設置為最新版本?部署新應用
5790
5802
  msgid "Documentation"
5791
5803
  msgstr "文檔"
5792
5804
 
5805
+ msgid "Documentation availability varies by plugin."
5806
+ msgstr "文件可用性因插件而異。"
5807
+
5793
5808
  msgid "Does not match pattern {{ requiredPattern }}."
5794
5809
  msgstr "與模式 {{ requiredPattern }} 不匹配。"
5795
5810
 
@@ -10092,6 +10107,9 @@ msgstr "下一页"
10092
10107
  msgid "No"
10093
10108
  msgstr "否"
10094
10109
 
10110
+ msgid "No CHANGELOG.md found for package version"
10111
+ msgstr "未找到包版本的 CHANGELOG.md"
10112
+
10095
10113
  msgid "No Cumulocity IoT manifest found."
10096
10114
  msgstr "未找到 Cumulocity IoT 清单。"
10097
10115
 
@@ -10104,6 +10122,9 @@ msgstr "没有 RDB 快照分配到此设备。请从设备获取当前 RDB 快
10104
10122
  msgid "No README.md found"
10105
10123
  msgstr "未找到 README.md"
10106
10124
 
10125
+ msgid "No README.md found for plugin"
10126
+ msgstr "未找到插件的 README.md"
10127
+
10107
10128
  msgid "No REST API custom fields. Click below to add the first one."
10108
10129
  msgstr "无 REST API 自定义字段。在下面单击可添加第一个字段。"
10109
10130
 
@@ -10516,6 +10537,9 @@ msgstr "無匹配項目。"
10516
10537
  msgid "No matching microservices."
10517
10538
  msgstr "無匹配的微服務。"
10518
10539
 
10540
+ msgid "No matching plugins"
10541
+ msgstr "沒有匹配的插件"
10542
+
10519
10543
  msgid "No matching smart rules available."
10520
10544
  msgstr "无匹配的智能规则可用。"
10521
10545
 
@@ -10582,6 +10606,9 @@ msgstr "没有此范围的权限。"
10582
10606
  msgid "No permissions required."
10583
10607
  msgstr "不需要授权。"
10584
10608
 
10609
+ msgid "No plugin selected"
10610
+ msgstr "未選擇插件"
10611
+
10585
10612
  msgid "No plugins available"
10586
10613
  msgstr "没有可用的插件"
10587
10614
 
@@ -11389,9 +11416,6 @@ msgstr "套件存檔`說明標題`"
11389
11416
  msgid "Package availability"
11390
11417
  msgstr "包可用性"
11391
11418
 
11392
- msgid "Package contents"
11393
- msgstr "包内容"
11394
-
11395
11419
  msgid "Package contents could not be determined."
11396
11420
  msgstr "無法確定包內容。"
11397
11421
 
@@ -13293,6 +13317,9 @@ msgstr "从 SmartREST 模板选择一条消息"
13293
13317
  msgid "Select a package from the list to display the package contents."
13294
13318
  msgstr "从列表中选择一个包来显示包内容。"
13295
13319
 
13320
+ msgid "Select a plugin from the list to view its documentation."
13321
+ msgstr "從列表中選擇一個插件以檢視其說明文件。"
13322
+
13296
13323
  msgid "Select a predefined command"
13297
13324
  msgstr "选择预定义命令"
13298
13325
 
@@ -13596,9 +13623,6 @@ msgstr "选择要预览的应用程序。"
13596
13623
  msgid "Select the asset, then on the available data points list, click on the plus button on the desired data point."
13597
13624
  msgstr "選取資產,然後在可用數據點清單上,按一下所需數據點上的加號按鈕。"
13598
13625
 
13599
- msgid "Select the compatible plugins to install"
13600
- msgstr "选择要安装的兼容插件"
13601
-
13602
13626
  msgid "Select the global roles for which the dashboard will be available"
13603
13627
  msgstr "選取儀錶板可用於的全域角色"
13604
13628
 
@@ -14514,6 +14538,9 @@ msgstr "顯示密碼"
14514
14538
  msgid "Show percentages"
14515
14539
  msgstr "顯示百分比"
14516
14540
 
14541
+ msgid "Show readme"
14542
+ msgstr "顯示 readme"
14543
+
14517
14544
  msgid "Show services updated`between dates`"
14518
14545
  msgstr "將服務顯示為已更新"
14519
14546
 
@@ -16231,9 +16258,15 @@ msgstr "若要複製此儀表板,請聯絡您的管理員申請必要的權限
16231
16258
  msgid "To see the result click <a href=\"#/device/{{deviceId}}/control\">here</a>"
16232
16259
  msgstr "要查看结果,请单击<a href=\"#/device/{{deviceId}}/control\">此处</a>"
16233
16260
 
16261
+ msgid "To view the contents of \"CHANGELOG\", add the file \"CHANGELOG.md\" to the package."
16262
+ msgstr "若要檢視「CHANGELOG」的內容,請在套件中添加「CHANGELOG.md」文件。"
16263
+
16234
16264
  msgid "To view the contents of \"README\", add the file \"README.md\" to the package."
16235
16265
  msgstr "要檢視 \"README\" 的內容,請將檔案 \"README.md\" 添加到包。"
16236
16266
 
16267
+ msgid "To view the contents of \"README\", add the file \"README.md\" to the plugin."
16268
+ msgstr "若要檢視「README」的內容,請在插件中添加「README.md」文件。"
16269
+
16237
16270
  msgid "To`date`"
16238
16271
  msgstr "到"
16239
16272
 
@@ -17384,6 +17417,9 @@ msgstr "版本不匹配"
17384
17417
  msgid "Version of privacy policy"
17385
17418
  msgstr "隱私政策的版本"
17386
17419
 
17420
+ msgid "Version {{ selectedVersion }} package contents"
17421
+ msgstr "版本 {{ selectedVersion }} 包內容"
17422
+
17387
17423
  msgid "Version:"
17388
17424
  msgstr "版本:"
17389
17425
 
@@ -19239,6 +19275,9 @@ msgstr "已為品牌選取 {{ numberOfApps }} 個應用程式"
19239
19275
  msgid "{{ numberOfReports }} reports selected for widget"
19240
19276
  msgstr "{{ numberOfReports }} 為 widget 選擇的報告"
19241
19277
 
19278
+ msgid "{{ packageContentsTitle | translate: { selectedVersion } }}"
19279
+ msgstr "{{ packageContentsTitle | translate: { selectedVersion } }}"
19280
+
19242
19281
  msgid "{{ pageFirstItemIdx }} - {{ pageLastItemIdx }} of {{ itemsTotal }}"
19243
19282
  msgstr "{{ pageFirstItemIdx }} - {{ pageLastItemIdx }}/{{ itemsTotal }}"
19244
19283
 
@@ -1 +1 @@
1
- (()=>{function e(a,i,t,r,n,o,d,s){var l=this,c=(l.datePickerOptionsFrom={showWeeks:!0},l.datePickerOptionsTo={showWeeks:!0},a.refreshLoading=!1,[]),f=!0;function u(e,t){a.events&&!a.refreshLoading&&!t||(a.events=[],a.refreshLoading=!1),a.ordering="".concat(f?"-":"","dateTime"),a.events=_.uniqBy(a.events.concat(e),"id"),_.forEach(a.events,function(e){e.dateTime=new Date(e.time)}),a.paging=e.paging,T(a.events.length),a.onEventLoaded({qty:a.events.length})}function e(){e=a.realtimeChannel,O(),n.getStatus(a.$id,e)&&e!==a.realtimeChannel&&(E(),n.stop(a.$id,e),C());var e;a.refreshLoading=!0,m(),T()}function m(e){i=(e=e)||{},_.assign(i,a.filters),_.forOwn(i,function(e,t){e||delete i[t]}),(i.source||i.deviceId)&&(i.source=i.source||i.deviceId,delete i.deviceId,i.withSourceDevices=!0,i.withSourceAssets=!0),_.isUndefined(i.pageSize)&&(i.pageSize=10),e=a.timeRangeUnit||"day",i.dateFrom&&(i.dateFrom=moment(i.dateFrom).startOf(e).format(r.dateFullFormat)),i.dateTo&&(i.dateTo=moment(i.dateTo).endOf(e).format(r.dateFullFormat));var i,e=i;return t.list(e).then(u)}function g(){a.refreshLoading=!0,f?(f=!1,y().finally(function(){a.refreshLoading=!1})):a.paging.refresh().then(_.partialRight(u,!0))}function h(e){return c.indexOf(e)}function v(e){return-1<h(e)}function y(){f=!f,a.recentFirstActive=f;var e=a.paging.statistics.totalPages,e=f?void 0:{currentPage:e};return a.refreshLoading=!0,m(e)}function p(e,t,i){var n={};e&&(n.dateFrom=moment(e).format(r.dateFullFormat)),t&&(n.dateTo=moment(t).format(r.dateFullFormat)),i?n.type=i:(delete n.type,delete a.filters.type),_.merge(a.filters,n)}function F(e){a.dateTo=void 0,a.dateFrom=void 0,l.dateTo=a.dateTo,l.dateFrom=a.dateFrom,a.filters.dateTo=void 0,a.filters.dateFrom=void 0,l.eventType=void 0,p(a.dateFrom,a.dateTo,e)}function T(e){a.filters.source||(a.title=d("Events"),a.subtitle=e?s.getString("{{qty}} loaded",{qty:e}):""),a.showPageTitles&&!a.filters.deviceId&&o.changeTitle({title:d("Events"),subtitle:e?s.getString("{{qty}} loaded",{qty:e}):""})}function $(e,t){var i;_.some(a.events,{id:t.id})||(t.dateTime=new Date(t.time),i=t.dateTime,a.filters.dateFrom&&i<moment(a.filters.dateFrom).startOf("day"))||a.filters.dateTo&&i>moment(a.filters.dateTo).endOf("day")||a.filters.type&&a.filters.type!==t.type||a.events.push(t)}function w(e,t){_.remove(a.events,{id:t.id})}function L(e,t){var i=_.findIndex(a.events,{id:t.id});a.events[i]=t}function S(){a.refreshLoading=!0,m(),T()}function C(){n.start(a.$id,a.realtimeChannel)}function E(){n.addListener(a.$id,a.realtimeChannel,"".concat(a.$id,"-subscribed"),S),n.addListener(a.$id,a.realtimeChannel,"CREATE",$),n.addListener(a.$id,a.realtimeChannel,"UPDATE",L),n.addListener(a.$id,a.realtimeChannel,"DELETE",w)}function O(){var e=a.filters.deviceId||a.filters.source;a.realtimeChannel="/eventsWithChildren/".concat(e||"*")}function b(){return r.checkIfModulesExist(["c8y.eventsBinary"])}a.$watch(function(){return l.dateFrom},function(e){l.datePickerOptionsTo={minDate:e,showWeeks:!0}}),a.$watch(function(){return l.dateTo},function(e){l.datePickerOptionsFrom={maxDate:e,showWeeks:!0}}),l.subscriberId=a.$id,l.filters=a.filters,l.filter=p,l.clearFilter=F,l.showOverviewBreadcrumbs=!(a.filters&&a.filters.deviceId),a.isEventsBinaryModuleAvailable=b,a.displayEventsBinary=function(e){return b()&&e.c8y_IsBinary},a.refresh=g,a.loadNext=function(e){a.paging.loading=!0,e?(a.refreshLoading=!0,m({pageSize:e}).finally(function(){a.refreshLoading=!1})):(e=f?"next":"prev",a.paging[e]().then(u).finally(function(){a.paging.loading=!1}))},a.isOpen=v,a.toggle=function(e){v(e)?c.splice(h(e),1):c.push(e)},a.filters=a.filters||{},a.getStandardKeys=t.getStandardKeys,a.getNonStandardKeys=function(e){return _.without(t.getNonStandardKeys(e),"dateTime")},a.recentFirst=y,a.filter=p,a.clearFilter=F;var I,R={};a.absolute=function(e){var t=R[e.id];return t||(t=i("absoluteDate")(e.time),R[e.id]=t),t},a.$watch("realtime",function(){a.realtime!==n.getStatus(a.$id,a.realtimeChannel)&&n.switchRealtime(a.$id,a.realtimeChannel)}),a.$on("eventListRefresh",g),a.$on("$destroy",function(){n.stop(a.$id,a.realtimeChannel)}),a.$watch("filters",e,!0),O(),E(),a.initialRealtimeState=(I=[a.initialRealtimeState,a.realtime],_.head(_.reject(I,_.isUndefined))),a.initialRealtimeState&&(a.realtime=a.initialRealtimeState,C())}e.$inject=["$scope","$filter","c8yEvents","c8yBase","c8yRealtime","c8yTitle","gettext","gettextCatalog"],angular.module("c8y.ui").controller("eventList",e)})();
1
+ (()=>{function e(a,i,t,r,n,o,d,s,e){var l=this,c=(l.datePickerOptionsFrom={showWeeks:!0},l.datePickerOptionsTo={showWeeks:!0},a.refreshLoading=!1,[]),f=!0;function u(e,t){a.events&&!a.refreshLoading&&!t||(a.events=[],a.refreshLoading=!1),a.ordering="".concat(f?"-":"","dateTime"),a.events=_.uniqBy(a.events.concat(e),"id"),_.forEach(a.events,function(e){e.dateTime=new Date(e.time)}),a.paging=e.paging,$(a.events.length),a.onEventLoaded({qty:a.events.length})}function m(){e=a.realtimeChannel,b(),n.getStatus(a.$id,e)&&e!==a.realtimeChannel&&(O(),n.stop(a.$id,e),E());var e;a.refreshLoading=!0,g(),$()}function g(e){i=(e=e)||{},_.assign(i,a.filters),_.forOwn(i,function(e,t){e||delete i[t]}),(i.source||i.deviceId)&&(i.source=i.source||i.deviceId,delete i.deviceId,i.withSourceDevices=!0,i.withSourceAssets=!0),_.isUndefined(i.pageSize)&&(i.pageSize=10),e=a.timeRangeUnit||"day",i.dateFrom&&(i.dateFrom=moment(i.dateFrom).startOf(e).format(r.dateFullFormat)),i.dateTo&&(i.dateTo=moment(i.dateTo).endOf(e).format(r.dateFullFormat));var i,e=i;return t.list(e).then(u)}function h(){a.refreshLoading=!0,f?(f=!1,p().finally(function(){a.refreshLoading=!1})):a.paging.refresh().then(_.partialRight(u,!0))}function v(e){return c.indexOf(e)}function y(e){return-1<v(e)}function p(){f=!f,a.recentFirstActive=f;var e=a.paging.statistics.totalPages,e=f?void 0:{currentPage:e};return a.refreshLoading=!0,g(e)}function F(e,t,i){var n={};e&&(n.dateFrom=moment(e).format(r.dateFullFormat)),t&&(n.dateTo=moment(t).format(r.dateFullFormat)),i?n.type=i:(delete n.type,delete a.filters.type),_.merge(a.filters,n)}function T(e){a.dateTo=void 0,a.dateFrom=void 0,l.dateTo=a.dateTo,l.dateFrom=a.dateFrom,a.filters.dateTo=void 0,a.filters.dateFrom=void 0,l.eventType=void 0,F(a.dateFrom,a.dateTo,e)}function $(e){a.filters.source||(a.title=d("Events"),a.subtitle=e?s.getString("{{qty}} loaded",{qty:e}):""),a.showPageTitles&&!a.filters.deviceId&&o.changeTitle({title:d("Events"),subtitle:e?s.getString("{{qty}} loaded",{qty:e}):""})}function w(e,t){var i;_.some(a.events,{id:t.id})||(t.dateTime=new Date(t.time),i=t.dateTime,a.filters.dateFrom&&i<moment(a.filters.dateFrom).startOf("day"))||a.filters.dateTo&&i>moment(a.filters.dateTo).endOf("day")||a.filters.type&&a.filters.type!==t.type||a.events.push(t)}function L(e,t){_.remove(a.events,{id:t.id})}function S(e,t){var i=_.findIndex(a.events,{id:t.id});a.events[i]=t}function C(){a.refreshLoading=!0,g(),$()}function E(){n.start(a.$id,a.realtimeChannel)}function O(){n.addListener(a.$id,a.realtimeChannel,"".concat(a.$id,"-subscribed"),C),n.addListener(a.$id,a.realtimeChannel,"CREATE",w),n.addListener(a.$id,a.realtimeChannel,"UPDATE",S),n.addListener(a.$id,a.realtimeChannel,"DELETE",L)}function b(){var e=a.filters.deviceId||a.filters.source;a.realtimeChannel="/eventsWithChildren/".concat(e||"*")}function k(){return r.checkIfModulesExist(["c8y.eventsBinary"])}a.datepickerFormat=e.getDateFormat({useUppercaseFormat:!1}),a.$watch(function(){return l.dateFrom},function(e){l.datePickerOptionsTo={minDate:e,showWeeks:!0}}),a.$watch(function(){return l.dateTo},function(e){l.datePickerOptionsFrom={maxDate:e,showWeeks:!0}}),l.subscriberId=a.$id,l.filters=a.filters,l.filter=F,l.clearFilter=T,l.showOverviewBreadcrumbs=!(a.filters&&a.filters.deviceId),a.isEventsBinaryModuleAvailable=k,a.displayEventsBinary=function(e){return k()&&e.c8y_IsBinary},a.refresh=h,a.loadNext=function(e){a.paging.loading=!0,e?(a.refreshLoading=!0,g({pageSize:e}).finally(function(){a.refreshLoading=!1})):(e=f?"next":"prev",a.paging[e]().then(u).finally(function(){a.paging.loading=!1}))},a.isOpen=y,a.toggle=function(e){y(e)?c.splice(v(e),1):c.push(e)},a.filters=a.filters||{},a.getStandardKeys=t.getStandardKeys,a.getNonStandardKeys=function(e){return _.without(t.getNonStandardKeys(e),"dateTime")},a.recentFirst=p,a.filter=F,a.clearFilter=T;var D={};a.absolute=function(e){var t=D[e.id];return t||(t=i("absoluteDate")(e.time),D[e.id]=t),t},a.$watch("realtime",function(){a.realtime!==n.getStatus(a.$id,a.realtimeChannel)&&n.switchRealtime(a.$id,a.realtimeChannel)}),a.$on("eventListRefresh",h),a.$on("$destroy",function(){n.stop(a.$id,a.realtimeChannel)}),a.$watch("filters",m,!0),b(),O(),a.initialRealtimeState=(e=[a.initialRealtimeState,a.realtime],_.head(_.reject(e,_.isUndefined))),a.initialRealtimeState&&(a.realtime=a.initialRealtimeState,E())}e.$inject=["$scope","$filter","c8yEvents","c8yBase","c8yRealtime","c8yTitle","gettext","gettextCatalog","c8yDateFormatService"],angular.module("c8y.ui").controller("eventList",e)})();
@@ -1 +1 @@
1
- (()=>{function e(o){return{restrict:"EA",require:"ngModel",templateUrl:":::PLUGIN_PATH:::/ui/views/dateTimePicker.html",replace:!0,scope:{required:"=?ngRequired",disabled:"=?ngDisabled",inputsSize:"@?",placeholder:"@",minDate:"=?",maxDate:"=?",showWeeks:"=?",showSeconds:"=?",showSpinners:"=?",withMilliseconds:"=?",appendToBody:"<?",isOpen:"=?"},link:function(a,e,t,i){function n(i,o){return function(e){var t=a[i],n=!0;return n=t?moment(t)[o](e):n}}i.$parsers.push(function(e){var t,n;return a.required||(t=null),e.date&&e.time&&(n=moment(e.date),e=moment(e.time),n.set({hour:e.hour(),minute:e.minute(),second:e.second(),millisecond:e.millisecond()}),t=a.withMilliseconds?n.format(o.dateFullFormatWithMs):n.format(o.dateFullFormat)),t}),i.$formatters.push(function(e){return{date:e&&new Date(e),time:e&&new Date(e)}}),i.$validators.minDate=n("minDate","isBefore"),i.$validators.maxDate=n("maxDate","isAfter"),i.$render=function(){_.assign(a,{value:i.$viewValue})},a.ngModelCtrl=i,a.$watch("isOpen",function(){a.isOpen&&a.appendToBody&&$("[uib-datepicker-popup-wrap]").on("click",function(e){return e.stopPropagation()})}),a.$watch("value",function(e,t){var n;t=t,(n=e).time||!n.date||t.date||((n=new Date).setHours(0,0,0,0),e.time=n,a.value.time=e.time),i.$setViewValue(_.cloneDeep(e))},!0),a.onTimeManualChange=function(e){var t=i.$viewValue;(t.time=e)&&(a.showSeconds||e.setSeconds(0),e.setMilliseconds(0)),i.$setViewValue(_.cloneDeep(t))}},controller:t}}function t(e,t){var n={},i={};e.datePickerOptions=n,e.timePickerOptions=i,e.getInputSizeClass=function(){return"input-".concat(e.inputsSize||"default")},e.$watchGroup(["minDate","maxDate","showWeeks"],function(){_.assign(n,_.defaults({minDate:e.minDate&&new Date(e.minDate),maxDate:e.maxDate&&new Date(e.maxDate),showWeeks:e.showWeeks},{showWeeks:!0})),e.ngModelCtrl&&e.ngModelCtrl.$validate()}),e.$watchGroup(["showSpinners","showSeconds"],function(){_.assign(i,_.defaults({showSpinners:e.showSpinners,showSeconds:e.showSeconds},{showSpinners:!1,showSeconds:!1})),i.show=!1,t(function(){i.show=!0})})}t.$inject=["$scope","$timeout"],e.$inject=["c8yBase"],angular.module("c8y.ui").directive("c8yDateTimePicker",e)})();
1
+ (()=>{function e(a){return{restrict:"EA",require:"ngModel",templateUrl:":::PLUGIN_PATH:::/ui/views/dateTimePicker.html",replace:!0,scope:{required:"=?ngRequired",disabled:"=?ngDisabled",inputsSize:"@?",placeholder:"@",minDate:"=?",maxDate:"=?",showWeeks:"=?",showSeconds:"=?",showSpinners:"=?",withMilliseconds:"=?",appendToBody:"<?",isOpen:"=?"},link:function(o,e,t,i){function n(i,a){return function(e){var t=o[i],n=!0;return n=t?moment(t)[a](e):n}}i.$parsers.push(function(e){var t,n;return o.required||(t=null),e.date&&e.time&&(n=moment(e.date),e=moment(e.time),n.set({hour:e.hour(),minute:e.minute(),second:e.second(),millisecond:e.millisecond()}),t=o.withMilliseconds?n.format(a.dateFullFormatWithMs):n.format(a.dateFullFormat)),t}),i.$formatters.push(function(e){return{date:e&&new Date(e),time:e&&new Date(e)}}),i.$validators.minDate=n("minDate","isBefore"),i.$validators.maxDate=n("maxDate","isAfter"),i.$render=function(){_.assign(o,{value:i.$viewValue})},o.ngModelCtrl=i,o.$watch("isOpen",function(){o.isOpen&&o.appendToBody&&$("[uib-datepicker-popup-wrap]").on("click",function(e){return e.stopPropagation()})}),o.$watch("value",function(e,t){var n;t=t,(n=e).time||!n.date||t.date||((n=new Date).setHours(0,0,0,0),e.time=n,o.value.time=e.time),i.$setViewValue(_.cloneDeep(e))},!0),o.onTimeManualChange=function(e){var t=i.$viewValue;(t.time=e)&&(o.showSeconds||e.setSeconds(0),e.setMilliseconds(0)),i.$setViewValue(_.cloneDeep(t))}},controller:t}}function t(e,t,n){var i={},a={showMeridian:n.shouldUseMeridianFormat()};e.datepickerFormat=n.getDateFormat({useUppercaseFormat:!1}),e.datePickerOptions=i,e.timePickerOptions=a,e.getInputSizeClass=function(){return"input-".concat(e.inputsSize||"default")},e.$watchGroup(["minDate","maxDate","showWeeks"],function(){_.assign(i,_.defaults({minDate:e.minDate&&new Date(e.minDate),maxDate:e.maxDate&&new Date(e.maxDate),showWeeks:e.showWeeks},{showWeeks:!0})),e.ngModelCtrl&&e.ngModelCtrl.$validate()}),e.$watchGroup(["showSpinners","showSeconds"],function(){_.assign(a,_.defaults({showSpinners:e.showSpinners,showSeconds:e.showSeconds},{showSpinners:!1,showSeconds:!1})),a.show=!1,t(function(){a.show=!0})})}t.$inject=["$scope","$timeout","c8yDateFormatService"],e.$inject=["c8yBase"],angular.module("c8y.ui").directive("c8yDateTimePicker",e)})();
@@ -388,42 +388,6 @@
388
388
  </div>
389
389
  </div>
390
390
 
391
- <div
392
- class="form-group"
393
- ng-repeat="(key, val) in getUserCustomProperties(user)"
394
- ng-hide="hideCustomProperties"
395
- >
396
- <label id="key">{{ humanize(key) }}</label>
397
- <input
398
- class="form-control"
399
- aria-labelledby="key"
400
- disabled
401
- ng-model="val"
402
- c8y-autocomplete="off"
403
- />
404
- </div>
405
-
406
- <div
407
- class="form-group p-relative"
408
- style="z-index: 1000"
409
- ng-if="!hideLanguage"
410
- >
411
- <label>{{ 'Language' | translate }}</label>
412
- <ui-select ng-model="user.language">
413
- <ui-select-match placeholder="{{ 'Select language' | translate }}">
414
- {{ $select.selected.name }}
415
- </ui-select-match>
416
- <ui-select-choices repeat="lang in languages | filter: $select.search | orderBy:'name'">
417
- <div ng-bind="lang.name"></div>
418
- </ui-select-choices>
419
- </ui-select>
420
- </div>
421
-
422
- <c8y-measurement-unit-preference
423
- ng-if="unitsConversionActive"
424
- user="user"
425
- ></c8y-measurement-unit-preference>
426
-
427
391
  <div
428
392
  class="form-group"
429
393
  ng-hide="!tfaAvailable && hideTfaOption && hidePasswordReset"
@@ -635,9 +599,54 @@
635
599
  </div>
636
600
  </div>
637
601
 
638
- <div class="form-group">
602
+
603
+ <div ng-hide="hideCustomProperties">
604
+ <div class="p-t-8 p-b-8">
605
+ <button ng-click="customPropertiesCollapsed = !customPropertiesCollapsed" class="btn-clean d-block text-medium fit-w p-t-8 p-b-8">
606
+ <i c8y-icon="{{!customPropertiesCollapsed ? 'forward' : 'expand-arrow'}}" class="m-r-4"></i>
607
+ {{ 'Custom properties' | translate }}
608
+ </button>
609
+ </div>
610
+
611
+ <div
612
+ class="p-t-16"
613
+ ng-hide="!customPropertiesCollapsed"
614
+ >
615
+ <div
616
+ class="form-group"
617
+ ng-repeat="(key, val) in getUserCustomProperties(user)"
618
+ >
619
+ <label id="key">{{ key }}</label>
620
+ <pre class="inner-scroll p-16">{{ val }}</pre>
621
+ </div>
622
+ </div>
623
+ </div>
624
+
625
+ <div
626
+ class="form-group p-relative"
627
+ style="z-index: 1000"
628
+ ng-if="!hideLanguage"
629
+ >
630
+ <label>{{ 'Language' | translate }}</label>
631
+ <ui-select ng-model="user.language">
632
+ <ui-select-match placeholder="{{ 'Select language' | translate }}">
633
+ {{ $select.selected.name }}
634
+ </ui-select-match>
635
+ <ui-select-choices repeat="lang in languages | filter: $select.search | orderBy:'name'">
636
+ <div ng-bind="lang.name"></div>
637
+ </ui-select-choices>
638
+ </ui-select>
639
+ </div>
640
+
641
+ <c8y-measurement-unit-preference
642
+ ng-if="unitsConversionActive"
643
+ user="user"
644
+ ></c8y-measurement-unit-preference>
645
+
646
+
647
+ <div class="form-group m-t-16">
639
648
  <button
640
- class="btn btn-default"
649
+ class="btn-clean fit-w text-medium p-b-8 p-t-8"
641
650
  name="changePassword"
642
651
  type="button"
643
652
  ng-show="
@@ -649,6 +658,7 @@
649
658
  "
650
659
  ng-click="resetPasswords(user)"
651
660
  >
661
+ <i c8y-icon="{{!password.showPassword ? 'forward' : 'expand-arrow'}}" class="m-r-4"></i>
652
662
  <span
653
663
  title="{{ 'Change password' | translate }}"
654
664
  ng-show="!password.showPassword"
@@ -1 +1 @@
1
- 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 e(l,c,g,m,w,f,p,h,E,P,A,S,y){return e.$inject=["$scope","$q"],{restrict:"EA",scope:{user:"=",forms:"=",password:"=",hideUsername:"=?",hideActive:"=?",hideFirstName:"=?",hideLastName:"=?",hideEmail:"=?",hideTelephone:"=?",hideCustomProperties:"=?",hideTfaOption:"=?",hidePasswordReset:"=?",hideChangePassword:"=?",hideOwner:"=?",hideDelegate:"=?",disabledEdit:"=?",hideLanguage:"=?",userTfaEnforced:"=?",topLevelTfaEnforced:"=?"},templateUrl:":::PLUGIN_PATH:::/ui/user/editUser.directive.html",controller:e,controllerAs:"vm",link:function(e,t){$(t).find("input[name=email]").bind("blur",function(){e.emailWarning=!(e.user&&e.user.email)})}};function e(o,r){var e="maxlength",a=S("Messaging application is not subscribed."),i={NEWUSERNAME:{type:"validation",text:S('Username "new" is not allowed.')},PATTERN:{type:"pattern",text:S("Invalid pattern.")},PATTERN_PASSWORD:{type:"pattern",text:y.getString(E.validation.password.message)},PATTERN_USERNAME:{type:"pattern",text:y.getString(E.validation.user.message)},PATTERN_DISPLAYNAME:{type:"pattern",text:y.getString(E.validation.loginAlias.message)},SAME_AS_CURRENT_PASSWORD:{type:"same_as_current",text:S("New password can't be the same as current one.")},PASSWORD_MISSMATCH:{type:"password_missmatch",text:S("Passwords do not match.")},REQUIRED:{type:"required",text:S("This field is required.")},EMAIL:{type:"email",text:S("Invalid email address.")},PASSWORD_STRENGTH:{type:"password_strength",text:E.validation.passwordStrengthChecklist.message},INTERNATIONALPHONENUMBER_PHONE:{type:"internationalPhoneNumber",text:y.getString(E.validation.internationalPhoneNumber.message)},MAXLENGTH_FIRSTNAME:{type:e,text:"".concat(y.getString("Max length:")," 50")},MAXLENGTH_LASTNAME:{type:e,text:"".concat(y.getString("Max length:")," 50")},MAXLENGTH_USERNAME:{type:e,text:"".concat(y.getString("Max length:")," 254")},MAXLENGTH_DISPLAYNAME:{type:e,text:"".concat(y.getString("Max length:")," 254")},MAXLENGTH_PHONE:{type:e,text:"".concat(y.getString("Max length:")," 254")},MAXLENGTH_EMAIL:{type:e,text:"".concat(y.getString("Max length:")," 254")}},d=this,u=(_.assign(o,{confirmPassword:"",invalid:angular.bind(l,l.invalid,o.forms,"userForm"),isInvalidConfirmPassword:function(){var e=o.forms.userForm,t=e.password.$pristine,e=e.confirmPassword.$touched&&e.confirmPassword.$invalid;return!t&&e},changePasswordConfirm:function(){o.forms.userForm.confirmPassword&&o.forms.userForm.confirmPassword.$setValidity(i.PASSWORD_MISSMATCH.type,o.forms.userForm.confirmPassword.$viewValue===o.user.password)},getErrorFeedback:function(s){var a=o.forms.userForm[s]||{},n=[];return _.forEach(a.$error||{},function(e,t){var r;"parse"===t?o.forms.userForm.phone.$setValidity(t,!0):(t=t.toUpperCase(),r="".concat(t,"_").concat(s.toUpperCase()),e&&a.$touched&&(e=i[r]||i[t],n.push(y.getString(e.text))))}),n.join("<br>")},getUserCustomProperties:function(e){var r={};e&&e.customProperties&&_.forEach(e.customProperties,function(e,t){"userOrigin"!==t&&(r[t]="object"===_typeof(e)?angular.toJson(e):e)});return r},humanize:l.humanizeFragment,passwordRegex:E.validation.password.pattern,resetPasswords:function(e){var t=y.getString("A user managed via your authorization server cannot change the password of the user.");c.current().then(function(e){e=c.hasExternalOrigin(e);o.password.showPassword&&e&&A.add({text:t,type:"warning"})}),o.password.showPassword=!o.password.showPassword,e.passwordStrength=o.password.strength,e.password=null,o.confirmPassword=""},tfaAvailable:!1,delegateTo:function(){c.current().then(function(e){o.user.delegatedBy=e.id}),s()},undelegate:function(){o.user.delegatedBy=null,s()},setOwner:function(e){o.user.owner=e,d.isParentDropDownOpen=!1,d.ownerHiddenForm.$setDirty()},userCanChangePasswordAndEmail:!1,requirementsFulfilled:!0,onRequirementsFulfilledChange:function(e){e=o.requirementsFulfilled=e;e||o.forms.userForm.password.$setValidity(i.PATTERN_PASSWORD.type,!0),o.forms.userForm.password.$setValidity(i.PASSWORD_STRENGTH.type,e)}}),_.assign(d,{onToggleDropdown:function(e){e&&(d.ownerDropDownInitialized=!0)},twoFactorAuthenticationCheckboxDisabled:function(){return o.topLevelTfaEnforced||o.disabledEdit||"TOTP"===d.tfaStrategy||!o.smsMicroserviceAvailable||!o.notCurrentUser&&"SMS"===d.tfaStrategy},enforceTfaCheckboxDisbaled:function(){return o.topLevelTfaEnforced||o.disabledEdit||!o.notCurrentUser||n()},messagingWarningVisible:function(){return!o.smsMicroserviceAvailable&&"SMS"===d.tfaStrategy},shouldEnableRevokeTOTPSecretButton:n}),w.getStrongPasswordSettings().then(t),o.$watch("user",function(e,t){var s,n;e&&e!==t&&(n=!(s=e).id,o.password.strength=s.passwordStrength,o.changePasswordBtn=!o.password.showPassword,o.emailWarning=!s.email,o.smsWarningPopover=a,n&&(o.userPasswordAction="sendPasswordByEmail"),delete o.confirmPassword,o.notCurrentUser=null,t=/.*/,(e=s)&&!e.id&&(t=E.validation.user.pattern),o.userNamePattern=t,o.loginAliasPattern=E.validation.loginAlias.pattern,o.hideLanguage||g.get("language").then(function(e){e&&(o.user.language={name:h.getLanguageNativeName(e),code:e}),o.languages=_.map(f.getSupportedLanguages(),function(e){return Object.assign({name:h.getLanguageNativeName(e),code:e},{})})}),P.isActivatedFor("units-conversion")&&(o.unitsConversionActive=!0),r.all({tfaAvailable:c.isTfaAvailable(),smsMicroserviceAvailable:p.isAvailable({contextPath:"messaging"}),twoFactorAuthenticationEnabled:c.isTfaActive(s),tfaStrategy:c.getTfaStrategy(),isCurrentUser:c.checkIfCurrent(s)}).then(function(e){var t=e.tfaAvailable,r=e.smsMicroserviceAvailable,s=e.twoFactorAuthenticationEnabled,a=e.tfaStrategy,e=e.isCurrentUser;o.notCurrentUser=!e,o.tfaAvailable=t,o.smsMicroserviceAvailable=!!r,d.tfaStrategy=a,o.user.twoFactorAuthenticationEnabled=!n&&s,o.userCanChangePasswordAndEmail=n||!c.hasExternalOrigin(o.user)&&e}),o.hideOwner||(o.ownerEditDisabled=!1,c.current().then(function(e){var t=m.hasRole(e,"ROLE_USER_MANAGEMENT_ADMIN"),r=m.hasRole(e,"ROLE_USER_MANAGEMENT_CREATE");!t&&r&&(d.rootOwner=[e],d.currentOwner=e.id,d.defaultOwner=e,n)&&(o.ownerEditDisabled=!0,s.owner=d.currentOwner)})),u())}));function t(e){var t=e.enforceStrength;o.passwordStrengthEnforced=t||e.strengthValidity}function s(){o.delegationHiddenForm.$setDirty()}function n(){return"TOTP"===d.tfaStrategy&&o.user.twoFactorAuthenticationEnabled}o.$watch("user.password",function(){o.forms.userForm&&o.forms.userForm.password&&o.forms.userForm.password.$setValidity(i.SAME_AS_CURRENT_PASSWORD.type,!o.notCurrentUser&&!c.isCurrentPassword(o.forms.userForm.password.$viewValue)||o.notCurrentUser)}),o.$watch("userPasswordAction",function(e,t){e!==t&&(t={setUserPasswordAndForceToReset:{sendPasswordResetEmail:!1,shouldResetPassword:!0,showPassword:!0},setUserPassword:{sendPasswordResetEmail:!1,shouldResetPassword:!1,showPassword:!0},sendPasswordByEmail:{sendPasswordResetEmail:!0,shouldResetPassword:!1,showPassword:!1}}[e])&&(o.user.sendPasswordResetEmail=t.sendPasswordResetEmail,o.user.shouldResetPassword=t.shouldResetPassword,o.password.showPassword=t.showPassword)})}}e.$inject=["c8yBase","c8yUser","c8yUserPreferences","c8yPermissions","c8yLoginOptions","c8yLocales","c8yApplication","LocalesUtil","c8yConfig","c8yBeta","c8yAlert","gettext","gettextCatalog"],angular.module("c8y.ui").directive("c8yEditUser",e).directive("c8yUiEditUser",e)})();
1
+ 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 e(l,c,g,m,w,f,p,h,E,P,A,S,y){return e.$inject=["$scope","$q"],{restrict:"EA",scope:{user:"=",forms:"=",password:"=",hideUsername:"=?",hideActive:"=?",hideFirstName:"=?",hideLastName:"=?",hideEmail:"=?",hideTelephone:"=?",hideCustomProperties:"=?",hideTfaOption:"=?",hidePasswordReset:"=?",hideChangePassword:"=?",hideOwner:"=?",hideDelegate:"=?",disabledEdit:"=?",hideLanguage:"=?",userTfaEnforced:"=?",topLevelTfaEnforced:"=?"},templateUrl:":::PLUGIN_PATH:::/ui/user/editUser.directive.html",controller:e,controllerAs:"vm",link:function(e,t){$(t).find("input[name=email]").bind("blur",function(){e.emailWarning=!(e.user&&e.user.email)})}};function e(o,r){var e="maxlength",a=S("Messaging application is not subscribed."),i={NEWUSERNAME:{type:"validation",text:S('Username "new" is not allowed.')},PATTERN:{type:"pattern",text:S("Invalid pattern.")},PATTERN_PASSWORD:{type:"pattern",text:y.getString(E.validation.password.message)},PATTERN_USERNAME:{type:"pattern",text:y.getString(E.validation.user.message)},PATTERN_DISPLAYNAME:{type:"pattern",text:y.getString(E.validation.loginAlias.message)},SAME_AS_CURRENT_PASSWORD:{type:"same_as_current",text:S("New password can't be the same as current one.")},PASSWORD_MISSMATCH:{type:"password_missmatch",text:S("Passwords do not match.")},REQUIRED:{type:"required",text:S("This field is required.")},EMAIL:{type:"email",text:S("Invalid email address.")},PASSWORD_STRENGTH:{type:"password_strength",text:E.validation.passwordStrengthChecklist.message},INTERNATIONALPHONENUMBER_PHONE:{type:"internationalPhoneNumber",text:y.getString(E.validation.internationalPhoneNumber.message)},MAXLENGTH_FIRSTNAME:{type:e,text:"".concat(y.getString("Max length:")," 50")},MAXLENGTH_LASTNAME:{type:e,text:"".concat(y.getString("Max length:")," 50")},MAXLENGTH_USERNAME:{type:e,text:"".concat(y.getString("Max length:")," 254")},MAXLENGTH_DISPLAYNAME:{type:e,text:"".concat(y.getString("Max length:")," 254")},MAXLENGTH_PHONE:{type:e,text:"".concat(y.getString("Max length:")," 254")},MAXLENGTH_EMAIL:{type:e,text:"".concat(y.getString("Max length:")," 254")}},d=this,u=(_.assign(o,{confirmPassword:"",invalid:angular.bind(l,l.invalid,o.forms,"userForm"),isInvalidConfirmPassword:function(){var e=o.forms.userForm,t=e.password.$pristine,e=e.confirmPassword.$touched&&e.confirmPassword.$invalid;return!t&&e},changePasswordConfirm:function(){o.forms.userForm.confirmPassword&&o.forms.userForm.confirmPassword.$setValidity(i.PASSWORD_MISSMATCH.type,o.forms.userForm.confirmPassword.$viewValue===o.user.password)},getErrorFeedback:function(s){var a=o.forms.userForm[s]||{},n=[];return _.forEach(a.$error||{},function(e,t){var r;"parse"===t?o.forms.userForm.phone.$setValidity(t,!0):(t=t.toUpperCase(),r="".concat(t,"_").concat(s.toUpperCase()),e&&a.$touched&&(e=i[r]||i[t],n.push(y.getString(e.text))))}),n.join("<br>")},getUserCustomProperties:function(e){var r={};e&&e.customProperties&&_.forEach(e.customProperties,function(e,t){"userOrigin"!==t&&(r[t]="object"===_typeof(e)?angular.toJson(e,!0):e)});return r},humanize:l.humanizeFragment,passwordRegex:E.validation.password.pattern,resetPasswords:function(e){var t=y.getString("A user managed via your authorization server cannot change the password of the user.");c.current().then(function(e){e=c.hasExternalOrigin(e);o.password.showPassword&&e&&A.add({text:t,type:"warning"})}),o.password.showPassword=!o.password.showPassword,e.passwordStrength=o.password.strength,e.password=null,o.confirmPassword=""},tfaAvailable:!1,delegateTo:function(){c.current().then(function(e){o.user.delegatedBy=e.id}),s()},undelegate:function(){o.user.delegatedBy=null,s()},setOwner:function(e){o.user.owner=e,d.isParentDropDownOpen=!1,d.ownerHiddenForm.$setDirty()},userCanChangePasswordAndEmail:!1,requirementsFulfilled:!0,onRequirementsFulfilledChange:function(e){e=o.requirementsFulfilled=e;e||o.forms.userForm.password.$setValidity(i.PATTERN_PASSWORD.type,!0),o.forms.userForm.password.$setValidity(i.PASSWORD_STRENGTH.type,e)}}),_.assign(d,{onToggleDropdown:function(e){e&&(d.ownerDropDownInitialized=!0)},twoFactorAuthenticationCheckboxDisabled:function(){return o.topLevelTfaEnforced||o.disabledEdit||"TOTP"===d.tfaStrategy||!o.smsMicroserviceAvailable||!o.notCurrentUser&&"SMS"===d.tfaStrategy},enforceTfaCheckboxDisbaled:function(){return o.topLevelTfaEnforced||o.disabledEdit||!o.notCurrentUser||n()},messagingWarningVisible:function(){return!o.smsMicroserviceAvailable&&"SMS"===d.tfaStrategy},shouldEnableRevokeTOTPSecretButton:n}),w.getStrongPasswordSettings().then(t),o.$watch("user",function(e,t){var s,n;e&&e!==t&&(n=!(s=e).id,o.password.strength=s.passwordStrength,o.changePasswordBtn=!o.password.showPassword,o.emailWarning=!s.email,o.smsWarningPopover=a,n&&(o.userPasswordAction="sendPasswordByEmail"),delete o.confirmPassword,o.notCurrentUser=null,t=/.*/,(e=s)&&!e.id&&(t=E.validation.user.pattern),o.userNamePattern=t,o.loginAliasPattern=E.validation.loginAlias.pattern,o.hideLanguage||g.get("language").then(function(e){e&&(o.user.language={name:h.getLanguageNativeName(e),code:e}),o.languages=_.map(f.getSupportedLanguages(),function(e){return Object.assign({name:h.getLanguageNativeName(e),code:e},{})})}),P.isActivatedFor("units-conversion")&&(o.unitsConversionActive=!0),r.all({tfaAvailable:c.isTfaAvailable(),smsMicroserviceAvailable:p.isAvailable({contextPath:"messaging"}),twoFactorAuthenticationEnabled:c.isTfaActive(s),tfaStrategy:c.getTfaStrategy(),isCurrentUser:c.checkIfCurrent(s)}).then(function(e){var t=e.tfaAvailable,r=e.smsMicroserviceAvailable,s=e.twoFactorAuthenticationEnabled,a=e.tfaStrategy,e=e.isCurrentUser;o.notCurrentUser=!e,o.tfaAvailable=t,o.smsMicroserviceAvailable=!!r,d.tfaStrategy=a,o.user.twoFactorAuthenticationEnabled=!n&&s,o.userCanChangePasswordAndEmail=n||!c.hasExternalOrigin(o.user)&&e}),o.hideOwner||(o.ownerEditDisabled=!1,c.current().then(function(e){var t=m.hasRole(e,"ROLE_USER_MANAGEMENT_ADMIN"),r=m.hasRole(e,"ROLE_USER_MANAGEMENT_CREATE");!t&&r&&(d.rootOwner=[e],d.currentOwner=e.id,d.defaultOwner=e,n)&&(o.ownerEditDisabled=!0,s.owner=d.currentOwner)})),u())}));function t(e){var t=e.enforceStrength;o.passwordStrengthEnforced=t||e.strengthValidity}function s(){o.delegationHiddenForm.$setDirty()}function n(){return"TOTP"===d.tfaStrategy&&o.user.twoFactorAuthenticationEnabled}o.$watch("user.password",function(){o.forms.userForm&&o.forms.userForm.password&&o.forms.userForm.password.$setValidity(i.SAME_AS_CURRENT_PASSWORD.type,!o.notCurrentUser&&!c.isCurrentPassword(o.forms.userForm.password.$viewValue)||o.notCurrentUser)}),o.$watch("userPasswordAction",function(e,t){e!==t&&(t={setUserPasswordAndForceToReset:{sendPasswordResetEmail:!1,shouldResetPassword:!0,showPassword:!0},setUserPassword:{sendPasswordResetEmail:!1,shouldResetPassword:!1,showPassword:!0},sendPasswordByEmail:{sendPasswordResetEmail:!0,shouldResetPassword:!1,showPassword:!1}}[e])&&(o.user.sendPasswordResetEmail=t.sendPasswordResetEmail,o.user.shouldResetPassword=t.shouldResetPassword,o.password.showPassword=t.showPassword)})}}e.$inject=["c8yBase","c8yUser","c8yUserPreferences","c8yPermissions","c8yLoginOptions","c8yLocales","c8yApplication","LocalesUtil","c8yConfig","c8yBeta","c8yAlert","gettext","gettextCatalog"],angular.module("c8y.ui").directive("c8yEditUser",e).directive("c8yUiEditUser",e)})();
@@ -9,7 +9,7 @@
9
9
  placeholder="{{ placeholder | translate }}"
10
10
  is-open="isOpen"
11
11
  ng-model="value.date"
12
- uib-datepicker-popup
12
+ uib-datepicker-popup="{{ datepickerFormat }}"
13
13
  datepicker-options="datePickerOptions"
14
14
  datepicker-append-to-body="appendToBody"
15
15
  show-button-bar="false"
@@ -29,7 +29,7 @@
29
29
  mousewheel="false"
30
30
  ng-model="value.time"
31
31
  ng-change="onTimeManualChange(value.time)"
32
- show-meridian="false"
32
+ show-meridian="timePickerOptions.showMeridian"
33
33
  show-spinners="timePickerOptions.showSpinners"
34
34
  show-seconds="timePickerOptions.showSeconds"
35
35
  ng-required="required"
@@ -10,7 +10,7 @@
10
10
  placeholder="{{ 'Date from' | translate }}"
11
11
  ng-model="ctrl.dateFrom"
12
12
  data-cy="eventList--date-from"
13
- uib-datepicker-popup
13
+ uib-datepicker-popup="{{ datepickerFormat }}"
14
14
  datepicker-options="ctrl.datePickerOptionsFrom"
15
15
  datepicker-append-to-body="true"
16
16
  show-button-bar="false"
@@ -25,7 +25,7 @@
25
25
  placeholder="{{ 'Date to' | translate }}"
26
26
  ng-model="ctrl.dateTo"
27
27
  data-cy="eventList--date-to"
28
- uib-datepicker-popup
28
+ uib-datepicker-popup="{{ datepickerFormat }}"
29
29
  datepicker-options="ctrl.datePickerOptionsTo"
30
30
  datepicker-append-to-body="true"
31
31
  show-button-bar="false"
package/kpi/index.js CHANGED
@@ -1 +1 @@
1
- angular.module("c8y.parts.kpi",[]).config(["c8yComponentsProvider","gettext",function(e,t){e.add({name:"KPI List",nameDisplay:t("Data points list"),description:t("A list displaying current values for selected measurements"),templateUrl:":::PLUGIN_PATH:::/views/list.html",configTemplateUrl:":::PLUGIN_PATH:::/views/listConfig.html",previewImage:":::PLUGIN_PATH:::/img/data-points-list-widget-pr.png",minCol:4,errorStrategy:"OVERLAY_ERROR",options:{noDeviceTarget:!0}}),e.add({name:"KPI Radial Gauge",nameDisplay:t("Radial Gauge"),description:t("A gauge graph displaying current values for selected measurements"),templateUrl:":::PLUGIN_PATH:::/views/gauge.html",configTemplateUrl:":::PLUGIN_PATH:::/views/gaugeConfig.html",previewImage:":::PLUGIN_PATH:::/img/radial-gauge-widget-pr.png",errorStrategy:"OVERLAY_ERROR",options:{noDeviceTarget:!0,datapointAttributes:["datapoints"]}}),e.add({name:"KPI Graph",nameDisplay:t("Graph"),description:t("A linear graph displaying values for selected measurements and time interval (deprecated)"),templateUrl:":::PLUGIN_PATH:::/views/graph.html",configTemplateUrl:":::PLUGIN_PATH:::/views/graphConfig.html",previewImage:":::PLUGIN_PATH:::/img/graph-widget-pr.png",options:{noNewWidgets:!0,datapointAttributes:["datapoints"]}}),e.add({name:"KPI Pie Chart",nameDisplay:t("Pie Chart"),description:t("A pie chart displaying current values for selected measurements"),templateUrl:":::PLUGIN_PATH:::/views/pieChart.html",configTemplateUrl:":::PLUGIN_PATH:::/views/pieChartConfig.html",previewImage:":::PLUGIN_PATH:::/img/pie-chart-widget-pr.png",errorStrategy:"OVERLAY_ERROR",options:{noDeviceTarget:!0,datapointAttributes:["datapoints"]}})}]);
1
+ angular.module("c8y.parts.kpi",[]).config(["c8yComponentsProvider","gettext",function(e,t){e.add({name:"KPI List",nameDisplay:t("Data points list"),description:t("A list displaying current values for selected measurements"),templateUrl:":::PLUGIN_PATH:::/views/list.html",configTemplateUrl:":::PLUGIN_PATH:::/views/listConfig.html",previewImage:":::PLUGIN_PATH:::/img/data-points-list-widget-pr.png",minCol:4,errorStrategy:"OVERLAY_ERROR",options:{noDeviceTarget:!0}}),e.add({name:"KPI Graph",nameDisplay:t("Graph"),description:t("A linear graph displaying values for selected measurements and time interval (deprecated)"),templateUrl:":::PLUGIN_PATH:::/views/graph.html",configTemplateUrl:":::PLUGIN_PATH:::/views/graphConfig.html",previewImage:":::PLUGIN_PATH:::/img/graph-widget-pr.png",options:{noNewWidgets:!0,datapointAttributes:["datapoints"]}}),e.add({name:"KPI Pie Chart",nameDisplay:t("Pie Chart"),description:t("A pie chart displaying current values for selected measurements"),templateUrl:":::PLUGIN_PATH:::/views/pieChart.html",configTemplateUrl:":::PLUGIN_PATH:::/views/pieChartConfig.html",previewImage:":::PLUGIN_PATH:::/img/pie-chart-widget-pr.png",errorStrategy:"OVERLAY_ERROR",options:{noDeviceTarget:!0,datapointAttributes:["datapoints"]}})}]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c8y/ng1-modules",
3
- "version": "1021.63.2",
3
+ "version": "1021.67.0",
4
4
  "license": "Apache-2.0",
5
5
  "author": "Cumulocity",
6
6
  "description": "AngularJS modules for Cumulocity IoT applications.",
@@ -1 +1 @@
1
- function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ownKeys(e,t){var n,o=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)),o}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach(function(t){_defineProperty(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _defineProperty(t,e,n){return(e=_toPropertyKey(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _toPropertyKey(t){t=_toPrimitive(t,"string");return"symbol"==_typeof(t)?t:t+""}function _toPrimitive(t,e){if("object"!=_typeof(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===e?String:Number)(t);n=n.call(t,e||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(()=>{function t(t,e,n,o,r,i,a,u,s,c,l,m,f,g,p){var d=this,C=l.another(l.paths.Tenants),y=c.stringToDate(i.fromThisMonthStartFilter().dateFrom),l=g("No tenants to display.");function h(){d.refreshLoading=!0,u.isCurrentUserTopTenant().then(function(t){d.isTopTenant=t}).then(b).then(S).then(v).then(j).then(D).then(w).then(function(){d.refreshLoading=!1})}function b(){d.storageLimitFeatureEnabled=i.appOption("storageLimitationFeatureEnabled")}function S(){d.dateFrom=c.stringToDate(n.dateFrom)||y,d.dateTo=c.stringToDate(n.dateTo)}function v(){return a.list(T()).then(P)}function T(){return{dateFrom:c.dateToStringWithTimeZone(d.dateFrom),dateTo:void 0!==d.dateTo?c.dateToStringWithTimeZone(moment(d.dateTo).endOf("day")):void 0}}function P(t){d.statistics=_.map(t,function(t){return _objectSpread(_objectSpread({},t),{},{storageQuota:O((t=>{var e=t.storageLimitPerDevice,t=t.deviceWithChildrenCount;return e&&(e*=t||1),e})(t)),storageSize:O(t.storageSize),peakStorageSize:O(t.peakStorageSize)})})}function O(t){return!_.isUndefined(t)&&Number((t/Math.pow(2,20)).toFixed(2))}function j(){return C.list().then(function(t){return _.filter(t,{id:"c8ySchema!!customProperties"})}).then(function(t){return C.getSchema(t)}).then(function(t){return _.get(t,"properties.customProperties.properties",{})}).then(function(t){return _.map(t,function(t,e){return{title:t.title,key:e,schema:t}})}).then(function(t){d.customProperties=_.sortBy(t,"title")})}function D(){d.columns=_([m.getTenantNameColumn(),m.getTenantIdColumn(),m.getTenantDomainColumn(),m.getApiRequestsColumn(),m.getDeviceApiRequestsColumn(),d.storageLimitFeatureEnabled?m.getStorageQuotaColumn():null,m.getStorageSizeColumn(),m.getPeakStorageSizeColumn(),m.getRootDevicesColumn(),m.getPeakRootDevicesColumn(),m.getDevicesColumn(),m.getPeakDevicesColumn(),m.getDeviceEndpointCountColumn(),m.getSubscribedApplicationsColumn(),m.getCreationTimeColumn(),m.getAlarmsCreatedCountColumn(),m.getAlarmsUpdatedCountColumn(),m.getInventoriesCreatedCountColumn(),m.getInventoriesUpdatedCountColumn(),m.getEventsCreatedCountColumn(),m.getEventsUpdatedCountColumn(),m.getMeasurementsCreatedCountColumn(),m.getOperationsCreatedCountColumn(),m.getOperationsUpdatedCountColumn(),m.getTotalInboundTransferColumn(),m.getCpuUsageColumn(),m.getMemoryUsageColumn(),d.isTopTenant?m.getParentTenantIdColumn():null,_.map(d.customProperties,function(t){return m.getCustomPropertyColumn(t)})]).flattenDeep().compact().orderBy([function(t){return t.priority||0}],["desc"]).value(),d.columnsConfig={}}function w(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:d.columnsConfig;d.columnsConfig=t,d.filteredSortedStatistics=f.filterSort(d.statistics,d.columns,d.columnsConfig)}_.assign(d,{noItemsMessage:l,getSubtitle:function(){var t=_.get(d.statistics,"length"),e=p.getPlural(t,"1 tenant","{{$count}} tenants",{});return _.isNumber(t)?e:""},$onInit:h,onColumnsConfigChanged:function(t){w(t)},getCsvHeaders:function(){return _(d.columns).map(function(t){return _.result(t,"getCsvHeaders")||_.get(t,"header.text")||_.get(t,"header")}).flatten().value()},getCsvData:function(){return _.map(d.filteredSortedStatistics,function(e){return _(d.columns).map(function(t){return t.getCsvValues(e)}).flatten().value()})},detail:function(t){o.path("/tenants/".concat(t.tenantId))},filter:function(){_.isEqual(T().dateFrom,y)&&_.isUndefined(T().dateTo)||o.search(T())},clearFilter:function(){d.onColumnsConfigChanged({}),o.search({})},refresh:function(){h()}})}t.$inject=["$scope","$q","$routeParams","$location","$filter","c8yBase","c8yStatistics","c8yTenant","c8yTitle","c8yUtil","c8yPropertiesLibrary","c8yTenantStatisticsColumns","c8yFilteringSortingCollections","gettext","gettextCatalog"],angular.module("c8y.tenantStatistics").component("c8yTenantStatistics",{templateUrl:":::PLUGIN_PATH:::/tenant-statistics.html",controller:t,controllerAs:"vm"})})();
1
+ function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ownKeys(e,t){var n,o=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)),o}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach(function(t){_defineProperty(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _defineProperty(t,e,n){return(e=_toPropertyKey(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _toPropertyKey(t){t=_toPrimitive(t,"string");return"symbol"==_typeof(t)?t:t+""}function _toPrimitive(t,e){if("object"!=_typeof(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===e?String:Number)(t);n=n.call(t,e||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(()=>{function t(t,e,n,o,r,i,a,u,s,c,l,m,f,g,p,d){var C=this,y=l.another(l.paths.Tenants),h=c.stringToDate(i.fromThisMonthStartFilter().dateFrom),l=g("No tenants to display.");function b(){C.refreshLoading=!0,u.isCurrentUserTopTenant().then(function(t){C.isTopTenant=t}).then(S).then(v).then(T).then(j).then(F).then(w).then(function(){C.refreshLoading=!1})}function S(){C.storageLimitFeatureEnabled=i.appOption("storageLimitationFeatureEnabled")}function v(){C.dateFrom=c.stringToDate(n.dateFrom)||h,C.dateTo=c.stringToDate(n.dateTo)}function T(){return a.list(P()).then(O)}function P(){return{dateFrom:c.dateToStringWithTimeZone(C.dateFrom),dateTo:void 0!==C.dateTo?c.dateToStringWithTimeZone(moment(C.dateTo).endOf("day")):void 0}}function O(t){C.statistics=_.map(t,function(t){return _objectSpread(_objectSpread({},t),{},{storageQuota:D((t=>{var e=t.storageLimitPerDevice,t=t.deviceWithChildrenCount;return e&&(e*=t||1),e})(t)),storageSize:D(t.storageSize),peakStorageSize:D(t.peakStorageSize)})})}function D(t){return!_.isUndefined(t)&&Number((t/Math.pow(2,20)).toFixed(2))}function j(){return y.list().then(function(t){return _.filter(t,{id:"c8ySchema!!customProperties"})}).then(function(t){return y.getSchema(t)}).then(function(t){return _.get(t,"properties.customProperties.properties",{})}).then(function(t){return _.map(t,function(t,e){return{title:t.title,key:e,schema:t}})}).then(function(t){C.customProperties=_.sortBy(t,"title")})}function F(){C.columns=_([m.getTenantNameColumn(),m.getTenantIdColumn(),m.getTenantDomainColumn(),m.getApiRequestsColumn(),m.getDeviceApiRequestsColumn(),C.storageLimitFeatureEnabled?m.getStorageQuotaColumn():null,m.getStorageSizeColumn(),m.getPeakStorageSizeColumn(),m.getRootDevicesColumn(),m.getPeakRootDevicesColumn(),m.getDevicesColumn(),m.getPeakDevicesColumn(),m.getDeviceEndpointCountColumn(),m.getSubscribedApplicationsColumn(),m.getCreationTimeColumn(),m.getAlarmsCreatedCountColumn(),m.getAlarmsUpdatedCountColumn(),m.getInventoriesCreatedCountColumn(),m.getInventoriesUpdatedCountColumn(),m.getEventsCreatedCountColumn(),m.getEventsUpdatedCountColumn(),m.getMeasurementsCreatedCountColumn(),m.getOperationsCreatedCountColumn(),m.getOperationsUpdatedCountColumn(),m.getTotalInboundTransferColumn(),m.getCpuUsageColumn(),m.getMemoryUsageColumn(),C.isTopTenant?m.getParentTenantIdColumn():null,_.map(C.customProperties,function(t){return m.getCustomPropertyColumn(t)})]).flattenDeep().compact().orderBy([function(t){return t.priority||0}],["desc"]).value(),C.columnsConfig={}}function w(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:C.columnsConfig;C.columnsConfig=t,C.filteredSortedStatistics=f.filterSort(C.statistics,C.columns,C.columnsConfig)}_.assign(C,{noItemsMessage:l,getSubtitle:function(){var t=_.get(C.statistics,"length"),e=p.getPlural(t,"1 tenant","{{$count}} tenants",{});return _.isNumber(t)?e:""},$onInit:b,onColumnsConfigChanged:function(t){w(t)},getCsvHeaders:function(){return _(C.columns).map(function(t){return _.result(t,"getCsvHeaders")||_.get(t,"header.text")||_.get(t,"header")}).flatten().value()},getCsvData:function(){return _.map(C.filteredSortedStatistics,function(e){return _(C.columns).map(function(t){return t.getCsvValues(e)}).flatten().value()})},detail:function(t){o.path("/tenants/".concat(t.tenantId))},filter:function(){_.isEqual(P().dateFrom,h)&&_.isUndefined(P().dateTo)||o.search(P())},clearFilter:function(){C.onColumnsConfigChanged({}),o.search({})},refresh:function(){b()}}),t.datepickerFormat=d.getDateFormat({useUppercaseFormat:!1})}t.$inject=["$scope","$q","$routeParams","$location","$filter","c8yBase","c8yStatistics","c8yTenant","c8yTitle","c8yUtil","c8yPropertiesLibrary","c8yTenantStatisticsColumns","c8yFilteringSortingCollections","gettext","gettextCatalog","c8yDateFormatService"],angular.module("c8y.tenantStatistics").component("c8yTenantStatistics",{templateUrl:":::PLUGIN_PATH:::/tenant-statistics.html",controller:t,controllerAs:"vm"})})();
@@ -25,9 +25,8 @@
25
25
  class="form-control text-center"
26
26
  title="{{ 'Date from' | translate }}"
27
27
  placeholder="{{ 'Date from' | translate }}"
28
- type="date"
29
28
  ng-model="vm.dateFrom"
30
- uib-datepicker-popup
29
+ uib-datepicker-popup="{{ datepickerFormat }}"
31
30
  datepicker-options="{ maxDate: vm.dateTo, showWeeks: true }"
32
31
  datepicker-append-to-body="true"
33
32
  show-button-bar="false"
@@ -40,9 +39,8 @@
40
39
  class="form-control text-center"
41
40
  title="{{ 'Date to' | translate }}"
42
41
  placeholder="{{ 'Date to' | translate }}"
43
- type="date"
44
42
  ng-model="vm.dateTo"
45
- uib-datepicker-popup
43
+ uib-datepicker-popup="{{ datepickerFormat }}"
46
44
  datepicker-options="{ minDate: vm.dateFrom, showWeeks: true }"
47
45
  datepicker-append-to-body="true"
48
46
  show-button-bar="false"
@@ -1 +0,0 @@
1
- angular.module("c8y.ui").controller("c8yRadialGaugeCtrl",["$scope","$element","$window","$filter",function(n,i,t,a){var r={container:null,gauge:null,ranges:null,pointer:{knob:null,gradient:null,text:null}},s={width:0,height:0,base:0},o={x:0,y:0},u={limits:{lower:0,upper:0},ranges:[],precision:2},d={width:300,height:300,minPointerRotation:-140,maxPointerRotation:140,greenRangeColor:"#7ED321",yellowRangeColor:"#F5A623",redRangeColor:"#D0021B",lowerLimit:0,upperLimit:100,precision:2,unit:"",pointerGradientColorFar:"#FFFFFF",pointerGradientColorNear:"#5ADCEA",initialValueUpdateTransitionDuration:500,valueUpdateTransitionDuration:2e3,pointerValueTextFontSize:"1.75em",pointerValueTextFillColor:"#FFFFFF",pointerUnitTextFontSize:"1.5em",pointerUnitTextFillColor:"#F8F8F8",scaleTicksCount:10,scaleTickFontSize:"0.85em",gaugeWheelStrokeColor:"#D8D8D8",gaugeWheelFillColor:"#F5F5F5",scaleWheelStrokeColor:"#F1F1F1",scaleWheelFillColor:"#FFFFFF",scaleTickStrokeColor:"#FFFFFF",scaleTickStrokeWidth:5,scaleTickFontColor:"#444444",pointerKnobStrokeColor:"#333333",pointerKnobFillColor:"#333333",gaugeScaleInnerRadiusFactor:.7,gaugeScaleOuterRadiusFactor:1},l={degsToRads:function(t){return t*(Math.PI/180)}},p={valueToRotationRads:d3.scale.linear().domain([d.lowerLimit,d.upperLimit]).range([l.degsToRads(d.minPointerRotation),l.degsToRads(d.maxPointerRotation)]),valueToRotationDegs:d3.scale.linear().domain([d.lowerLimit,d.upperLimit]).range([d.minPointerRotation,d.maxPointerRotation]),pointerGradientProgressToColor:d3.scale.pow().exponent(25).domain([0,360]).range([d.pointerGradientColorFar,d.pointerGradientColorNear]),pointerGradientProgressToOpacity:d3.scale.pow().exponent(25).domain([0,360]).range([0,1])},c={rotate:function(t,e){return["rotate(",[t,e.x,e.y].join(","),")"].join("")},translate:function(t){return["translate(",[t.x,t.y].join(","),")"].join("")}},g=d3.svg.line().x(function(t){return t.x}).y(function(t){return t.y}).interpolate("linear");function m(){s.width=(parseInt(n.width(),10)||i.width()||d.width)-5,s.height=(parseInt(n.height(),10)||i.parent().parent().height()||d.height)-5,s.base=Math.min(s.width,s.height)/2,o.x=s.width/2,o.y=s.height/2,_.forEach([{property:"pointerValueTextFontSize",fn:function(t){return.007678571*t+.2280357},min:.85,max:2.5,precision:2,unit:"em"},{property:"scaleTickFontSize",fn:function(t){return.007107143*t+.00527381},min:.65,max:1.5,precision:2,unit:"em"},{property:"pointerUnitTextFontSize",fn:function(t){return.007107143*t+.00527381},min:.65,max:2,precision:2,unit:"em"}],function(t){var e=t.property,n=t.fn,i=t.min,a=t.max,r=t.precision,t=t.unit,n=n(s.base),n=_.round(n,r),r=_.clamp(n,i,a);_.set(d,e,"".concat(r).concat(t))}),i.empty(),r.container=d3.select(i[0]).append("svg").attr("viewBox",[0,0,s.width,s.height].join(",")),r.gauge=r.container.append("g").attr("class","radial-gauge"),r.gauge.append("circle").attr("cx",o.x).attr("cy",o.y).attr("r",s.base).style("stroke",d.gaugeWheelStrokeColor).style("fill",d.gaugeWheelFillColor),r.ranges=r.gauge.append("g").attr("class","radial-gauge-ranges"),r.ranges.selectAll("path").data(u.ranges).enter().append("path").attr("d",d3.svg.arc().innerRadius(s.base*d.gaugeScaleInnerRadiusFactor).outerRadius(s.base*d.gaugeScaleOuterRadiusFactor).startAngle(function(t){return p.valueToRotationRads(t.min)}).endAngle(function(t){return p.valueToRotationRads(t.max)})).style("fill",function(t){return t.color}).attr("transform",c.translate(o)),r.scale=r.container.append("g").attr("class","radial-gauge-scale"),r.scale.append("circle").attr("cx",o.x).attr("cy",o.y).attr("r",.7*s.base).style("stroke",d.scaleWheelStrokeColor).style("fill",d.scaleWheelFillColor);var t=(u.limits.upper-u.limits.lower)/d.scaleTicksCount,e=((t=d3.range(u.limits.lower,u.limits.upper,t).map(_.identity)).push(u.limits.upper),_.every(t,function(t){return Math.round(t)===t}));r.scale.selectAll("line").data(t).enter().append("line").attr("x1",o.x).attr("y1",o.y-.7*s.base).attr("x2",o.x).attr("y2",o.y-.75*s.base).attr("transform",function(t){return c.rotate(p.valueToRotationDegs(t),o)}).style("stroke",d.scaleTickStrokeColor).style("stroke-width",d.scaleTickStrokeWidth),r.scale.selectAll("text").data(t).enter().append("text").attr("x",o.x).attr("y",o.y-.8*s.base).attr("text-anchor","middle").style("font-size",d.scaleTickFontSize).style("font-weight","bold").attr("fill",d.scaleTickFontColor).attr("transform",function(t){return c.rotate(p.valueToRotationDegs(t),o)}).text(function(t){return a("number")(t,e?0:u.precision)}),r.pointer.knob=r.container.append("g").attr("class","radial-gauge-pointer-knob"),r.pointer.knob.append("circle").attr("cx",o.x).attr("cy",o.y).attr("r",.55*s.base).style("stroke",d.pointerKnobStrokeColor).style("fill",d.pointerKnobFillColor),r.pointer.knob.append("path").attr("d",g([{x:o.x-.55*s.base,y:o.y},{x:o.x+.55*s.base,y:o.y},{x:o.x,y:o.y-.8*s.base}])).attr("fill",d.pointerKnobFillColor),r.pointer.text=r.container.append("text").attr("x",o.x).attr("y",o.y+-.2*s.base).style("font-size",d.pointerValueTextFontSize).attr("fill",d.pointerValueTextFillColor).attr("text-anchor","middle").text(a("number")(u.value,u.precision)||""),r.pointer.textUnit=r.container.append("text").attr("id","text-unit").attr("x",o.x).attr("y",o.y).style("font-size",d.pointerUnitTextFontSize).attr("fill",d.pointerUnitTextFillColor).attr("text-anchor","middle").text(u.unit),r.pointer.dateTimeText=r.container.append("text").attr("id","text-time").attr("x",o.x).attr("y",o.y+.2*s.base).style("font-size",d.pointerUnitTextFontSize).attr("fill",d.pointerUnitTextFillColor).attr("text-anchor","middle").attr("font-style","italic").text(a("absoluteDateTimeShort")(n.time)),T(n.value||u.value||0)}function x(t,e,n){return null!=t?t:null!=e?Number(e):n}function F(t,e,n){t=Number(t),e=Number(e);_.isFinite(t)&&_.isFinite(e)&&u.ranges.push({min:t,max:e,color:n})}function T(t){u.previousValue=u.value,u.value=t,u.previousDateTimeValue=u.dateTimeValue,u.dateTimeValue=moment(n.time).valueOf();var e,t=!!_.isUndefined(u.previousValue);e=t,r.pointer.gradient&&(e=e?d.initialValueUpdateTransitionDuration:d.valueUpdateTransitionDuration,r.pointer.gradient.transition().duration(e).call(f,u.value)),e=t,r.pointer.knob&&(e=e?d.initialValueUpdateTransitionDuration:d.valueUpdateTransitionDuration,r.pointer.knob.transition().duration(e).attrTween("transform",((t,e)=>function(){return d3.interpolateString(c.rotate(p.valueToRotationDegs(t),o),c.rotate(p.valueToRotationDegs(e),o))})(_.isUndefined(u.previousValue)?u.limits.lower:u.previousValue,u.value))),e=t,r.pointer.text&&(e=e?d.initialValueUpdateTransitionDuration:d.valueUpdateTransitionDuration,r.pointer.text.transition().duration(e).tween("text",function(){var e=this,n=d3.interpolate(u.previousValue,u.value);return function(t){e.textContent=a("number")(n(t),u.precision)}})),e=t,r.pointer.dateTimeText&&(e=e?d.initialValueUpdateTransitionDuration:d.valueUpdateTransitionDuration,r.pointer.dateTimeText.transition().duration(e).tween("text",function(){var e=this,n=d3.interpolate(u.previousDateTimeValue,u.dateTimeValue);return function(t){e.textContent=_.isNaN(n(t))?"":a("absoluteDateTimeShort")(n(t))}}))}function f(t,e){e=e;var o=d3.scale.linear().domain([0,360]).range([p.valueToRotationRads(u.limits.lower),p.valueToRotationRads(_.isUndefined(e)?u.limits.lower:e)]),l=d3.svg.arc().innerRadius(s.base*d.gaugeScaleInnerRadiusFactor).outerRadius(s.base*d.gaugeScaleOuterRadiusFactor).startAngle(function(t){return t.startAngle}).endAngle(function(t){return t.endAngle});t.attrTween("d",function(e,t){var n=d3.interpolate(e.startAngle,o(t)),i=d3.interpolate(e.endAngle,o(t+1)),a=d3.interpolate(e.color,p.pointerGradientProgressToColor(t)),r=d3.interpolate(e.opacity,p.pointerGradientProgressToOpacity(t));return function(t){return e.startAngle=n(t),e.endAngle=i(t),e.fill=a(t),e.opacity=r(t),l(e)}})}n.$watch("dp",function(t){var e;t&&(u.dataPoint=t,u.limits.lower=x(n.lowerLimit,u.dataPoint.min,d.lowerLimit),u.limits.upper=x(n.upperLimit,u.dataPoint.max,d.upperLimit),u.unit=n.valueUnit||u.dataPoint.unit||d.unit,p.valueToRotationRads=d3.scale.linear().domain([u.limits.lower,u.limits.upper]).range([l.degsToRads(d.minPointerRotation),l.degsToRads(d.maxPointerRotation)]),p.valueToRotationDegs=d3.scale.linear().domain([u.limits.lower,u.limits.upper]).range([d.minPointerRotation,d.maxPointerRotation]),t=void 0===n.fractionSize?d.precision:n.fractionSize,u.precision=t,u.ranges=n.ranges||[],t=u.dataPoint.yellowRangeMin,e=u.dataPoint.yellowRangeMax,F(t,e,d.yellowRangeColor),t=u.dataPoint.redRangeMin,e=u.dataPoint.redRangeMax,F(t,e,d.redRangeColor),m())},!0),n.$watch("measurement",function(t){t&&(t=t&&t.value,T(n.value||(_.isFinite(t)?t:u.value||0)))},!0),n.$on("dashboardResize",m),n.$on("$destroy",function(){t.removeEventListener("resize",m)}),t.addEventListener("resize",m),m()}]);
@@ -1 +0,0 @@
1
- angular.module("c8y.ui").directive("c8yRadialGauge",function(){return{restrict:"EA",scope:{dp:"=",measurement:"=",time:"=",value:"=?",lowerLimit:"=?",upperLimit:"=?",ranges:"=?",valueUnit:"=?",precision:"=?",width:"&",height:"&",fractionSize:"="},controller:"c8yRadialGaugeCtrl",controllerAs:"ctrl"}});