@c8y/ng1-modules 1016.232.0 → 1016.233.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";!function(){function e(s,e,r,n,a,i,t,o,u,
|
|
1
|
+
"use strict";!function(){function e(s,e,r,n,a,i,t,o,c,u,d,l,p){var f,g=e.userId,h={PATTERN:{type:"pattern",text:l.validation.password.message},PASSWORD_MISSMATCH:{type:"password_missmatch",text:u("Password confirmation does not match.")},REQUIRED:{type:"required",text:u("This field is required.")},EMAIL:{type:"email",text:u("Invalid email address.")}};function m(e){!function(e){a.checkIfCurrent(e).then(function(e){s.isCurrent=e})}(e),s.user=e,s._groups={},(e.groups&&e.groups.references||[]).forEach(function(e){var r=e.group.id;s._groups[r]=!0}),s.showPassword=!e.id,s.changePasswordBtn=!s.showPassword,delete s.confirmPassword}function v(e){s.groups=e}function w(){g?a.detail(g).then(function(e){return e.data}).then(m):m({enabled:s.isNew=!0})}s.saving=!1,s.passwordRegex=l.validation.password.pattern,s.cancel=function(){r.path("/deviceusers")},s.save=function(e){if(s.saving=!0,s.userForm.$valid){var r=_.keys(s._groups).filter(function(e){return s._groups[e]}).map(function(e){return parseInt(e,10)});try{var t=a.save(e,s.password.currentPassword).then(function(e){var r=e.data;return g=r.userName,r.id=g,r}).then(function(e){return i.updateGroups(e,r)}).then(p.triggerEvent("dmCredentialManagement",{action:"assignRole",name:"role"})).then(angular.bind({},w)).then(_.partial(o.success,u("Device updated.")));t.finally(function(){s.saving=!1}),t.then(function(){n.history.back()})}catch(e){o.danger(e.message),s.saving=!1}}},s.confirmPassword="",s.password={},s.invalid=angular.bind(t,t.invalid,s,"userForm"),s.changePasswordConfirm=function(e){s.userForm.confirmPassword.$setValidity(h.PASSWORD_MISSMATCH.type,e===s.user.password)},s.$watch("user.userName",function(e){e&&c.changeTitle({title:e},{skipTitleTranslation:!0})}),s.getErrorFeedback=function(e){var t=s.userForm[e]||{},n=[];return _.forEach(t.$error||{},function(e,r){e&&!t.$pristine&&n.push(d.getString(h[r.toUpperCase()].text))}),n.join(" ")},w(),i.list(f).then(v)}e.$inject=["$scope","$routeParams","$location","$window","c8yUser","c8yUserGroup","c8yBase","c8yAlert","c8yTitle","gettext","gettextCatalog","c8yConfig","c8yGainsightService"],angular.module("c8y.parts.deviceUsers").controller("deviceUserDetailCtrl",e)}();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";!function(){function e(n,t,i,r,s,l,
|
|
1
|
+
"use strict";!function(){function e(n,t,i,r,s,a,l,e,o,c,u){var g=this,f=[];function d(e){return n.refreshLoading=!0,r.list(_.assign({onlyDevices:!0},e)).then(h).finally(function(){n.refreshLoading=!1})}function h(e){return n.users&&!n.refreshLoading||(n.users=[],g.users=n.users),e.forEach(function(e){n.users.push(e)}),n.paging=e.paging,n.users.length}function p(e){return r.detail(e).then(l.getResData).then(_.partial(_.assign,e))}_.assign(g,{filtering:{applied:!1,filters:{}},applyFilters:function(){d(g.filtering.filters).then(function(){g.filtering.applied=!0})},clearFilters:function(){g.filtering.filters={},d(g.filtering.filters).then(function(){g.filtering.applied=!1})},isAnyFilterSelected:function(){return 0<_.get(g.filtering.filters,"username","").length}}),_.assign(n,{enabledIcon:function(e){return e.enabled?"check-circle":"minus-circle"},enabledClass:function(e){return e.enabled?"text-success":"text-danger"},enabledTooltip:function(e){return e.enabled?"Enabled":"Disabled"},activate:function(e){e.enabled=!0,r.save(e).then(function(){i.success(o("User enabled."))})},deactivate:function(e){e.enabled=!1,r.save(e).then(function(){i.success(o("User disabled."))})},groups:r.groups,navigateToDetail:function(e){t.path("/deviceusers/".concat(e.id))},onClickDelete:function(e){a({title:o("Delete user"),body:c.getString('You are about to delete user "{{userName}}". Do you want to proceed?',e),status:"danger",labels:{ok:o("Delete")}}).then(angular.bind(r,r.remove,e)).then(angular.bind(l,l.removeFromList,n.users,e)).then(function(){i.success(o("User deleted."))})},refresh:function(){n.refreshLoading=!0,n.paging.refresh().then(h).finally(function(){n.refreshLoading=!1})},loadNext:function(){n.paging.loading=!0,n.paging.next().then(h).finally(function(){n.paging.loading=!1})},mapRolesForUser:_.memoize(function(e){return _.map(e,"group")}),globalRolesAvailable:function(e){return _.get(e,"_owner._globalRoles",f)},onChangeRoles:function(e,n){return s.global.updateGroups(e,_.map(n,"id")).then(u.triggerEvent("dmCredentialManagement",{action:"assignRole",name:"role"})).then(_.partial(p,e))},getSubtitle:function(){return c.getPlural(n.users?n.users.length:0,"1 device credentials","{{$count}} device credentials",{})},getUsers:d}),s.global.list({pageSize:1e3}).then(function(e){f=e,n.globalRoles=f}),d()}e.$inject=["$scope","$location","c8yAlert","c8yUser","c8yRoles","c8yModal","c8yBase","c8yTitle","gettext","gettextCatalog","c8yGainsightService"],angular.module("c8y.parts.deviceUsers").controller("deviceUserListCtrl",e)}();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";angular.module("c8y.deviceDetailIdentity").controller("deviceDetailIdentityCtrl",["$scope","$routeParams","c8yIdentity","c8yModal","c8yAlert","gettext","gettextCatalog",function(t,e,n,a,r,i,d){var
|
|
1
|
+
"use strict";angular.module("c8y.deviceDetailIdentity").controller("deviceDetailIdentityCtrl",["$scope","$routeParams","c8yIdentity","c8yModal","c8yAlert","gettext","gettextCatalog","c8yGainsightService",function(t,e,n,a,r,i,d,l){var o=e.deviceId,c=i("The external ID links the device information and the physical world (for example, serial number, IMEI).\n\nIf for some reason the hardware needs to be replaced, the external ID must also be replaced with the appropriate information.\n\nWith this procedure the new hardware is still linked to the information that was created by its predecessor.");function s(e){t.ids=e}function h(){I(),delete t.newId}function I(){return n.listExternalIds(o).then(s)}t.onClickDelete=function(e){a({title:i("Delete external ID"),body:d.getString('You are about to delete the external ID "{{externalId}}" of the type "{{type}}". Do you want to proceed?',e),labels:{ok:i("Delete")},status:"danger"}).then(_.partial(n.deleteIdentity,e)).then(I).then(_.partial(r.success,i("External ID deleted.")))},t.create=function(e){_.some(t.ids,{externalId:e.externalId,type:e.type})?(r.danger(d.getString('Could not add identity. External ID "{{externalId}}" of the type "{{type}}" already exists.',e)),l.triggerEvent("dmIdentityManagement",{action:"addFailure",name:"externalId"})):n.createIdentity(o,e).then(h).then(_.partial(r.success,i("External ID added."))).then(l.triggerEvent("dmIdentityManagement",{action:"addSuccess",name:"externalId"}))},t.paging={refresh:!0},t.refresh=function(){t.refreshLoading=!0,I().finally(function(){t.refreshLoading=!1})},t.add=function(){t.newId={}},t.cancel=function(){delete t.newId},t.helpText=c,I()}]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@c8y/ng1-modules",
|
|
3
|
-
"version": "1016.
|
|
3
|
+
"version": "1016.233.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.
|
|
11
|
+
"angular-animate": "1.6.9",
|
|
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",
|