@c8y/ng1-modules 1016.159.0 → 1016.161.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.
@@ -13,8 +13,6 @@
13
13
  "lwm2mValidationRules/lwm2mValidationRules.component.js",
14
14
  "lwm2mValidationRules/lwm2mValidationRule.component.js",
15
15
  "postOperations/lwm2mPostOperations.component.js",
16
- "postOperations/lwm2mPostOperationsUi.provider.js",
17
- "bootstrap/bootstrap-config.module.js",
18
- "bootstrap/bootstrap-config.component.js"
16
+ "postOperations/lwm2mPostOperationsUi.provider.js"
19
17
  ]
20
18
  }
@@ -1 +1 @@
1
- "use strict";!function(){e.$inject=["gettext","c8yDeviceProtocolUiProvider","c8yViewsProvider"];var o="c8yLwm2m";function e(y,e,t){i.$inject=["c8yBase","c8yInventory","c8yTenant","c8yObjectMappings","c8yPermissions","$http","$q","$upload","gettextCatalog"],r.$inject=["$routeParams"];var n={service:o,id:"lwm2m",name:y("LWM2M")},h={path:"/deviceprotocols/".concat(n.id,"/:id"),template:'<c8y-lwm2m-detail id="vm.id"></c8y-lwm2m-detail>',controllerAs:"vm",controller:r};return{initUi:function(){e.register(n),t.when(h.path,h)},$get:i};function r(e){_.assign(this,e)}function i(r,n,e,i,t,o,a,c,s){var u,l=r.url("service/lwm2m-agent/"),m="".concat(l,"objectResourceMappings");return{flow:function(){return["c8yLwm2mUploadStep","c8yLwm2mFinalStep"]},list:function(){return o.get(m,{silentError:!0}).then(r.getResData)},detail:function(e){var t=r.getId(e);return n.detail(t).then(r.getResData)},detailPath:function(e){var t=p(e);return h.path.replace(/:id$/,t)},upload:function(e){return c.upload({url:"".concat(m,"/ddf"),method:"POST",headers:{Accept:"application/json"},file:e,fileName:e.name.replace(/\s+/g,"_")})},remove:function(e){var t=p(e);return n.remove(t)},getName:function(e){var t=i.getName(e),n=i.getObjectId(e);return"".concat(n," ").concat(t)},updateMapping:function(e,t){var n="".concat(m,"/").concat(e,"/add");return o.put(n,t)},getPostRegistrationOptions:function(){var e={url:"".concat(l,"postRegistrationOptions"),method:"GET",silentError:!0};return o(e).then(r.getResData)},setPostRegistrationOptions:function(e){var t={url:"".concat(l,"postRegistrationOptions"),method:"PUT",data:{commands:e}};return o(t)},helpTexts:{minPeriod:y("The minimum period attribute indicates the minimum time in seconds the LWM2M client MUST wait between two notifications."),maxPeriod:y("The maximum period attribute indicates the maximum time in seconds the LWM2M client MAY wait between two notifications."),greaterThan:y("This greater than attribute defines a threshold high value."),lessThan:y("This less than attribute defines a threshold low value."),step:y("This step attribute defines a minimum change value between two notifications.")},isServiceSubscribed:g,showIf:function e(){e._cached||(e._cached=g());return e._cached},listRowInfoComponent:"c8yDeviceProtocolRowCountResources",getCustomActions:function(){u||(u=o.get("".concat(l,"mappingActions/resourceactions")).then(r.getResData).then(d));return u},Validation:{RuleType:{LT:"lt",GT:"gt",EQ:"eq",NEQ:"neq",GTE:"gte",LTE:"lte",AND:"and",OR:"or"},ValueType:{NUMBER:"number",DATE:"date",STRING:"string",REGEX:"regex",OBJECTLINK:"objectLink"},ResourceDataType:{INTEGER:"INTEGER",FLOAT:"FLOAT",STRING:"STRING",BOOLEAN:"BOOLEAN",TIME:"TIME",OBJECTLINK:"OBJECTLINK"},RuleName:{GT:"Greater than",LT:"Lower than",GTE:"Greater or equals than",LTE:"Lower or equals than",EQ:"Equals",NEQ:"Equals not"}},isDeviceType:function(e){return"c8y_lwm2m"===e.type||_.includes(e.c8y_DeviceTypes,"c8y_lwm2m")},bootstrapSchema:function(){return{type:"object",properties:{endpoint:{type:"string",readonly:!0,title:s.getString("Endpoint")},bootstrapId:{type:["null","string"],title:s.getString("Bootstrap PSK ID")},bootstrapKey:{type:["null","string"],title:s.getString("Bootstrap pre-shared key")},serverUri:{type:["null","string"],title:s.getString("Server URI")},securityMode:{type:"string",enum:["PSK","RPK","X509","NO_SEC"],title:s.getString("Security mode")},publicKeyOrId:{type:["null","string"],title:s.getString("LWM2M PSK ID")},serverPublicKey:{type:["null","string"],title:s.getString("Server public key")},secretKey:{type:["null","string"],title:s.getString("LWM2M pre-shared key")},securityInstanceOffset:{type:"number",title:s.getString("Security instance offset")},generateBootstrapServerConfig:{type:"boolean",title:s.getString("Generate boostrap server config"),"x-schema-form":{type:"select",titleMap:[{value:!0,name:s.getString("Yes")},{value:!1,name:s.getString("No")}]}},bootstrapShortServerId:{type:"number",title:s.getString("Bootstrap short server ID")},lwm2mShortServerId:{type:"number",title:s.getString("LWM2M short server ID")},registrationLifeTime:{type:"number",title:s.getString("Registration lifetime")},defaultMinimumPeriod:{type:"number",title:s.getString("Default minimum period")},defaultMaximumPeriod:{type:"number",title:s.getString("Default maximum period")},bindingMode:{type:"string",title:s.getString("Binding mode"),"x-schema-form":{type:"select",titleMap:[{value:"U",name:s.getString("UDP")},{value:"UQ",name:s.getString("UDP with queue mode")}]}}}}},bootstrapSchemaChange:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=angular.copy(e),r="PSK"!==t.securityMode;return["bootstrapId","bootstrapKey","publicKeyOrId","serverPublicKey","secretKey"].forEach(function(e){n.properties[e].readonly=r}),n},bootstrapPermissions:function(){return a.all({read:t.hasAnyRole(["ROLE_INVENTORY_READ"]),write:t.hasAnyRole(["ROLE_INVENTORY_ADMIN"])})},bootstrapParams:function(e,t){var n={url:function(e){return"".concat(l,"device/").concat(e,"/bootstrapParams")}(e),method:t?"PUT":"GET"};t&&(n.data=t);return o(n).then(r.getResData)}};function g(){return e.isSubscribed({name:"lwm2m-agent",type:"MICROSERVICE"})}function p(e){return _.get(e,"id")}function d(e){return _.reduce(e,function(e,t){var n=t.name,r=t.args,i=_.get(r,"length")?r.map(function(e){return"".concat(n,":").concat(e)}):[n];return e.concat(i)},[])}}}angular.module("c8y.lwm2m").provider(o,e)}();
1
+ "use strict";!function(){t.$inject=["gettext","c8yDeviceProtocolUiProvider","c8yViewsProvider"];var r="c8yLwm2m";function t(d,t,e){a.$inject=["c8yBase","c8yInventory","c8yTenant","c8yObjectMappings","$http","$upload"],i.$inject=["$routeParams"];var n={service:r,id:"lwm2m",name:d("LWM2M")},h={path:"/deviceprotocols/".concat(n.id,"/:id"),template:'<c8y-lwm2m-detail id="vm.id"></c8y-lwm2m-detail>',controllerAs:"vm",controller:i};return{initUi:function(){t.register(n),e.when(h.path,h)},$get:a};function i(t){_.assign(this,t)}function a(n,i,t,a,r,e){var o,c=n.url("service/lwm2m-agent/"),s="".concat(c,"objectResourceMappings");return{flow:function(){return["c8yLwm2mUploadStep","c8yLwm2mFinalStep"]},list:function(){return r.get(s,{silentError:!0}).then(n.getResData)},detail:function(t){var e=n.getId(t);return i.detail(e).then(n.getResData)},detailPath:function(t){var e=l(t);return h.path.replace(/:id$/,e)},upload:function(t){return e.upload({url:"".concat(s,"/ddf"),method:"POST",headers:{Accept:"application/json"},file:t,fileName:t.name.replace(/\s+/g,"_")})},remove:function(t){var e=l(t);return i.remove(e)},getName:function(t){var e=a.getName(t),n=a.getObjectId(t);return"".concat(n," ").concat(e)},updateMapping:function(t,e){var n="".concat(s,"/").concat(t,"/add");return r.put(n,e)},getPostRegistrationOptions:function(){var t={url:"".concat(c,"postRegistrationOptions"),method:"GET",silentError:!0};return r(t).then(n.getResData)},setPostRegistrationOptions:function(t){var e={url:"".concat(c,"postRegistrationOptions"),method:"PUT",data:{commands:t}};return r(e)},helpTexts:{minPeriod:d("The minimum period attribute indicates the minimum time in seconds the LWM2M client MUST wait between two notifications."),maxPeriod:d("The maximum period attribute indicates the maximum time in seconds the LWM2M client MAY wait between two notifications."),greaterThan:d("This greater than attribute defines a threshold high value."),lessThan:d("This less than attribute defines a threshold low value."),step:d("This step attribute defines a minimum change value between two notifications.")},isServiceSubscribed:u,showIf:function t(){t._cached||(t._cached=u());return t._cached},listRowInfoComponent:"c8yDeviceProtocolRowCountResources",getCustomActions:function(){o||(o=r.get("".concat(c,"mappingActions/resourceactions")).then(n.getResData).then(m));return o},Validation:{RuleType:{LT:"lt",GT:"gt",EQ:"eq",NEQ:"neq",GTE:"gte",LTE:"lte",AND:"and",OR:"or"},ValueType:{NUMBER:"number",DATE:"date",STRING:"string",REGEX:"regex",OBJECTLINK:"objectLink"},ResourceDataType:{INTEGER:"INTEGER",FLOAT:"FLOAT",STRING:"STRING",BOOLEAN:"BOOLEAN",TIME:"TIME",OBJECTLINK:"OBJECTLINK"},RuleName:{GT:"Greater than",LT:"Lower than",GTE:"Greater or equals than",LTE:"Lower or equals than",EQ:"Equals",NEQ:"Equals not"}}};function u(){return t.isSubscribed({name:"lwm2m-agent",type:"MICROSERVICE"})}function l(t){return _.get(t,"id")}function m(t){return _.reduce(t,function(t,e){var n=e.name,i=e.args,a=_.get(i,"length")?i.map(function(t){return"".concat(n,":").concat(t)}):[n];return t.concat(a)},[])}}}angular.module("c8y.lwm2m").provider(r,t)}();
@@ -1 +1 @@
1
- "use strict";!function(){function i(i,o,t){i.initUi(),o.initUi(),t.initUi()}i.$inject=["c8yLwm2mProvider","c8yLwm2mPostOperationsUiProvider","c8yLwm2mBootstrapUiProvider"],angular.module("c8y.lwm2m",["c8y.lwm2m.bootstrap","c8y.deviceProtocols"]).config(i)}();
1
+ "use strict";!function(){function i(i,c){i.initUi(),c.initUi()}i.$inject=["c8yLwm2mProvider","c8yLwm2mPostOperationsUiProvider"],angular.module("c8y.lwm2m",["c8y.deviceProtocols"]).config(i)}();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c8y/ng1-modules",
3
- "version": "1016.159.0",
3
+ "version": "1016.161.0",
4
4
  "license": "Apache-2.0",
5
5
  "author": "Cumulocity",
6
6
  "description": "AngularJS modules for Cumulocity IoT applications.",
@@ -8,7 +8,7 @@
8
8
  "@claviska/jquery-minicolors": "2.3.6",
9
9
  "ace-builds": "1.4.5",
10
10
  "angular": "1.6.9",
11
- "angular-animate": "1.6.9",
11
+ "angular-animate": "1.8.3",
12
12
  "angular-cron-jobs": "1.4.0",
13
13
  "angular-dynamic-locale": "0.1.31",
14
14
  "angular-file-upload": "https://github.com/danialfarid/ng-file-upload/archive/1.6.12.tar.gz",
@@ -1 +0,0 @@
1
- "use strict";!function(){function t(t,o,n,e){var s=this,i=e.bootstrapSchema();function c(t){s.config=t,s.form.$setPristine()}function a(){n.success(o("Bootstrap parameters updated"))}_.assign(s,{config:{},$onInit:function(){t.$watch(function(){return _.get(s.config,"securityMode")},function(){s.schema=e.bootstrapSchemaChange(s.schema,s.config)})},$onChanges:function(t){t.id&&s.id&&e.bootstrapParams(s.id).then(c)},save:function(){e.bootstrapParams(s.id,s.config).then(c).then(a)},schema:i}),e.bootstrapPermissions().then(function(t){s.permissions=t})}t.$inject=["$scope","gettext","c8yAlert","c8yLwm2m"],angular.module("c8y.lwm2m.bootstrap").component("c8yLwm2mBootstrapConfig",{templateUrl:":::PLUGIN_PATH:::/bootstrap/bootstrap-config.html",controllerAs:"vm",controller:t,bindings:{id:"<deviceId"}})}();
@@ -1,30 +0,0 @@
1
- <form name="vm.form" novalidate>
2
- <div class="card content-fullpage">
3
- <div class="d-flex d-col fit-h">
4
- <div class="card-header separator">
5
- <div class="card-title" translate>LWM2M bootstrap parameters</div>
6
- </div>
7
- <div class="inner-scroll">
8
- <div class="card-block">
9
- <c8y-schema-form
10
- schema="vm.schema"
11
- model="vm.config"
12
- class="schema-form-grid card--grid grid__col--6-6--md"
13
- options="{formDefaults: {readonly: !vm.permissions.write}}"
14
- ></c8y-schema-form>
15
- </div>
16
- </div>
17
- <div class="card-footer separator" ng-hide="!vm.permissions.write">
18
- <button
19
- title="{{ 'Save' | translate }}"
20
- class="btn btn-primary"
21
- type="button"
22
- ng-click="vm.save()"
23
- ng-disabled="!vm.form.$dirty"
24
- >
25
- {{ 'Save' | translate }}
26
- </button>
27
- </div>
28
- </div>
29
- </div>
30
- </form>
@@ -1 +0,0 @@
1
- "use strict";!function(){function e(e,t){var o={template:'<c8y-lwm2m-bootstrap-config device-id="id"></c8y-lwm2m-bootstrap-config>',name:e("LWM2M bootstrap parameters"),icon:"c8y-device-protocols",controller:i,showIf:c};return{initUi:function(){t.when("/device/:deviceId",o)},$get:_.noop,showIf:c}}function i(e,t){e.id=t.deviceId}function c(e,t,o){return t.detailCached(e.deviceId).then(function(e){var t=e.data;return o.isDeviceType(t)&&o.bootstrapPermissions()}).then(function(e){return e.read})}c.$inject=["$routeParams","c8yDevices","c8yLwm2m"],i.$inject=["$scope","$routeParams"],e.$inject=["gettext","c8yViewsProvider"],angular.module("c8y.lwm2m.bootstrap",[]).provider("c8yLwm2mBootstrapUi",e)}();