diff --git a/README.md b/README.md index 099845b..4c56abf 100644 --- a/README.md +++ b/README.md @@ -77,8 +77,7 @@ templateOptions: data: { status: true }, - event: 'cloud:connection', - key: 'status' + event: 'cloud:connection' } ``` diff --git a/dist/sanji-core-ui.js b/dist/sanji-core-ui.js index ae01692..ccd2fcf 100644 --- a/dist/sanji-core-ui.js +++ b/dist/sanji-core-ui.js @@ -1,4 +1,4 @@ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("angular"),require("angular-cookies"),require("angular-cron-jobs"),require("angular-file-saver"),require("angular-filter"),require("angular-formly"),require("angular-material"),require("angular-material-data-table"),require("angular-material-icons"),require("angular-material-zippy"),require("angular-messages"),require("angular-moment"),require("angular-sanitize"),require("angular-sanji-window"),require("angular-sparklines"),require("angular-storage"),require("angular-translate"),require("angular-translate-storage-cookie"),require("api-check"),require("jquery"),require("jquery-sparkline"),require("moment"),require("ng-idle"),require("ngletteravatar"),require("oclazyload"),require("offline-js"),require("path-to-regexp"),require("sanji-redux-ui"),require("sanji-socket-ui"),require("sanji-utils-ui"),require("webfontloader"),require("nanoid")):"function"==typeof define&&define.amd?define(["angular","angular-cookies","angular-cron-jobs","angular-file-saver","angular-filter","angular-formly","angular-material","angular-material-data-table","angular-material-icons","angular-material-zippy","angular-messages","angular-moment","angular-sanitize","angular-sanji-window","angular-sparklines","angular-storage","angular-translate","angular-translate-storage-cookie","api-check","jquery","jquery-sparkline","moment","ng-idle","ngletteravatar","oclazyload","offline-js","path-to-regexp","sanji-redux-ui","sanji-socket-ui","sanji-utils-ui","webfontloader","nanoid"],t):"object"==typeof exports?exports.sjCore=t(require("angular"),require("angular-cookies"),require("angular-cron-jobs"),require("angular-file-saver"),require("angular-filter"),require("angular-formly"),require("angular-material"),require("angular-material-data-table"),require("angular-material-icons"),require("angular-material-zippy"),require("angular-messages"),require("angular-moment"),require("angular-sanitize"),require("angular-sanji-window"),require("angular-sparklines"),require("angular-storage"),require("angular-translate"),require("angular-translate-storage-cookie"),require("api-check"),require("jquery"),require("jquery-sparkline"),require("moment"),require("ng-idle"),require("ngletteravatar"),require("oclazyload"),require("offline-js"),require("path-to-regexp"),require("sanji-redux-ui"),require("sanji-socket-ui"),require("sanji-utils-ui"),require("webfontloader"),require("nanoid")):e.sjCore=t(e.angular,e["angular-cookies"],e["angular-cron-jobs"],e["angular-file-saver"],e["angular-filter"],e["angular-formly"],e["angular-material"],e["angular-material-data-table"],e["angular-material-icons"],e["angular-material-zippy"],e["angular-messages"],e["angular-moment"],e["angular-sanitize"],e["angular-sanji-window"],e["angular-sparklines"],e["angular-storage"],e["angular-translate"],e["angular-translate-storage-cookie"],e["api-check"],e.jquery,e["jquery-sparkline"],e.moment,e["ng-idle"],e.ngletteravatar,e.oclazyload,e["offline-js"],e["path-to-regexp"],e["sanji-redux-ui"],e["sanji-socket-ui"],e["sanji-utils-ui"],e.webfontloader,e.nanoid)}(this,function(e,t,n,a,r,i,l,o,s,u,c,d,m,p,_,f,g,O,R,E,L,M,b,h,A,v,T,y,S,F,I,$){return function(e){function t(a){if(n[a])return n[a].exports;var r=n[a]={i:a,l:!1,exports:{}};return e[a].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,a){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:a})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=49)}([function(e,t){/*! angular-breadcrumb - v0.5.0 * http://ncuillery.github.io/angular-breadcrumb * Copyright (c) 2016 Nicolas Cuillery; Licensed MIT */ -!function(e,t,n){"use strict";function a(e,n){return t.equals(e.length,n.length)?e>n:e.length>n.length}function r(e){var t=e.replace(/\n/g," ").match(/^([^(]+?)\s*(\((.*)\))?$/);if(!t||4!==t.length)throw new Error("Invalid state ref '"+e+"'");return{state:t[1],paramExpr:t[3]||null}}function i(e,t,a,r){var i=c[e];i!==n&&i(),i=t.$on(a,r),c[e]=i}function l(){var e={prefixStateName:null,template:"bootstrap3",templateUrl:null,templateLast:"default",templateLastUrl:null,includeAbstract:!1};this.setOptions=function(n){t.extend(e,n)},this.$get=["$state","$stateParams","$rootScope",function(t,l,o){var s=o;i("$Breadcrumb.$viewContentLoaded",o,"$viewContentLoaded",function(e){!e.targetScope.ncyBreadcrumbIgnore&&a(e.targetScope.$id,s.$id)&&(s=e.targetScope)});var u=function(e){var t=e.parent||(/^(.+)\.[^.]+$/.exec(e.name)||[])[1];return"object"==typeof t?t.name:t},c=function(n,a){for(var i,o,u=r(a),c=!1,d=!1,m=0,p=n.length;m
  • {{step.ncyBreadcrumbLabel}}{{step.ncyBreadcrumbLabel}}/
  • ',bootstrap3:''};return{restrict:"AE",replace:!0,scope:{},template:n.getTemplate(r),templateUrl:n.getTemplateUrl(),link:{post:function(r){var l=[],o=function(){p(l),l=[];var a=n.$getLastViewScope();r.steps=n.getStatesChain(),t.forEach(r.steps,function(t){if(t.ncyBreadcrumb&&t.ncyBreadcrumb.label){var n=e(t.ncyBreadcrumb.label);t.ncyBreadcrumbLabel=n(a),m(l,n,a,t)}else t.ncyBreadcrumbLabel=t.name})};i("BreadcrumbDirective.$viewContentLoaded",a,"$viewContentLoaded",function(e){e.targetScope.ncyBreadcrumbIgnore||o()}),o()}}}}function s(e,t,n){var a={default:"{{ncyBreadcrumbLabel}}"};return{restrict:"A",scope:{},template:t.getTemplateLast(a),templateUrl:t.getTemplateLastUrl(),compile:function(a,r){var l=a.attr(r.$attr.ncyBreadcrumbLast);return l&&a.html(l),{post:function(a){var r=[],l=function(){p(r),r=[];var n=t.$getLastViewScope(),i=t.getLastStep();if(i)if(a.ncyBreadcrumbLink=i.ncyBreadcrumbLink,i.ncyBreadcrumb&&i.ncyBreadcrumb.label){var l=e(i.ncyBreadcrumb.label);a.ncyBreadcrumbLabel=l(n),m(r,l,n,a)}else a.ncyBreadcrumbLabel=i.name};i("BreadcrumbLastDirective.$viewContentLoaded",n,"$viewContentLoaded",function(e){e.targetScope.ncyBreadcrumbIgnore||l()}),l()}}}}}function u(e,n,a){return{restrict:"A",scope:{},template:"{{ncyBreadcrumbChain}}",compile:function(r,l){var o=r.attr(l.$attr.ncyBreadcrumbText);o&&r.html(o);var s=r.attr(l.$attr.ncyBreadcrumbTextSeparator)||" / ";return{post:function(r){var l=[],o=function(e,n,a){t.forEach(d(n),function(t){var n=a.$watch(t,function(e,t){e!==t&&u()});e.push(n)})},u=function(){p(l),l=[];var a=n.$getLastViewScope(),i=n.getStatesChain(),u=[];t.forEach(i,function(t){if(t.ncyBreadcrumb&&t.ncyBreadcrumb.label){var n=e(t.ncyBreadcrumb.label);u.push(n(a)),o(l,n,a)}else u.push(t.name)}),r.ncyBreadcrumbChain=u.join(s)};i("BreadcrumbTextDirective.$viewContentLoaded",a,"$viewContentLoaded",function(e){e.targetScope.ncyBreadcrumbIgnore||u()}),u()}}}}}var c={},d=function(e){if(e.expressions)return e.expressions;var n=[];return t.forEach(e.parts,function(e){t.isFunction(e)&&n.push(e.exp)}),n},m=function(e,n,a,r){t.forEach(d(n),function(t){var i=a.$watch(t,function(){r.ncyBreadcrumbLabel=n(a)});e.push(i)})},p=function(e){t.forEach(e,function(e){e()})};o.$inject=["$interpolate","$breadcrumb","$rootScope"],s.$inject=["$interpolate","$breadcrumb","$rootScope"],u.$inject=["$interpolate","$breadcrumb","$rootScope"],t.module("ncy-angular-breadcrumb",["ui.router.state"]).provider("$breadcrumb",l).directive("ncyBreadcrumb",o).directive("ncyBreadcrumbLast",s).directive("ncyBreadcrumbText",u)}(window,window.angular)},function(e,t){},function(e,t,n){"use strict";function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n\n

    \n \n \n \n ',controller:function(){function e(t){"ngInject";a(this,e),this.sjio=t}return e.$inject=["sjio"],r(e,[{key:"$onInit",value:function(){var e=this,t=this.sjio.getSocket();this.unSocketHandler=t.on("sj:webapp:message",function(t){t.data&&t.data.event===e.event&&(e.data=t.data[e.key])})}},{key:"$onDestroy",value:function(){this.unSocketHandler()}}]),e}()};t.default=i},function(e,t,n){"use strict";function a(e){return/^[+-]?\d+(\.\d+)?$/.test(e)}function r(e){return/^([0-9A-F]{2}[:]){5}([0-9A-F]{2})$/.test(e)}function i(e){return/^([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$/.test(e)}function l(e){return/^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$/.test(e)}function o(e){return/^[A-Za-z0-9_-]{3,255}$/.test(e)}function s(e){return/^[-+]?([1-8]?\d(\.\d+)?|90(\.0+)?)$/.test(e)}function u(e){return/^[-+]?(180(\.0+)?|((1[0-7]\d)|([1-9]?\d))(\.\d+)?)$/.test(e)}function c(e){return/^(?=.*\d)(?=.*[a-zA-Z]).{6,100}$/.test(e)}function d(e){return"0.0.0.0"!==e&&(!!/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/.test(e)&&!/2(?:2[4-9]|3\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d?|0)){3}/.test(e))}function m(e,t){var n=void 0,a=t.length;for(n=0;n',controller:["$scope",function(e){"ngInject";e.setData=function(t){e.model[e.options.key]=t.data}}]},{name:"cloud_connection",template:'',defaultOptions:{templateOptions:{event:(0,f.default)(10)}}},{name:"datetimepicker",template:'
    \n \n \n \n \n \n \n \n \n \n
    ',controller:["$scope",function(e){"ngInject";function t(t){e.options.templateOptions.date=t,e.options.templateOptions.hour=t.getHours(),e.options.templateOptions.minute=t.getMinutes()}if(e.model[e.options.key])t(e.model[e.options.key]);else{var n=new Date;e.model[e.options.key]=n,t(n)}e.$watchGroup(["options.templateOptions.date","options.templateOptions.hour","options.templateOptions.minute"],function(e,t,n){var a=e[0];a&&(a.setHours(e[1]),a.setMinutes(e[2]),a.getTime()!==n.model[n.options.key].getTime()&&(n.model[n.options.key]=a))}),e.$watch(function(){return e.model[e.options.key]},function(e,n){e&&n&&("string"==typeof e&&(e=new Date(e)),e.getTime()!==n.getTime()&&t(new Date(e)))})}],defaultOptions:{templateOptions:{datePlaceholder:"FORM_PLACEHOLDER_SELECT_DATE",hourLabel:"FORM_LABEL_HOUR",minLabel:"FORM_LABEL_MINUTE"}}},{name:"textarea",template:'',defaultOptions:{templateOptions:{label:"FORM_LABEL_TEXTAREA"}}},{name:"switch",template:'\n \n ',defaultOptions:{templateOptions:{label:"FORM_LABEL_SWITCH"}}},{name:"url",template:'',defaultOptions:{templateOptions:{label:"FORM_LABEL_URL"},validation:{messages:{url:'"FORM_URL_ERROR_MSG"'}}}},{name:"range",template:'',defaultOptions:{templateOptions:{label:"FORM_LABEL_RANGE"}}},{name:"input",template:'',defaultOptions:{templateOptions:{label:""}}},{name:"file",template:'
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    ',controller:["$scope",function(e){"ngInject";e.fileSelect=function(t,n){if(t)if(void 0===e.formOptions.files)e.formOptions.files=[],e.formOptions.files.push({key:n,file:t});else{var a=e.formOptions.files.findIndex(function(e){return e.key===n});-1===a?e.formOptions.files.push({key:n,file:t}):e.formOptions.files[a].file=t}}}],defaultOptions:{templateOptions:{label:"FORM_LABEL_FILE"}}},{name:"date",template:'',defaultOptions:{templateOptions:{label:"FORM_LABEL_DATE"}}},{name:"datetime",template:'',defaultOptions:{templateOptions:{label:"FORM_LABEL_DATE_TIME"}}},{name:"email",template:'',defaultOptions:{templateOptions:{label:"FORM_LABEL_EMAIL"},validation:{messages:{email:'"FORM_EMAIL_ERROR_MSG"'}}}},{name:"number",template:'',defaultOptions:{templateOptions:{label:"FORM_LABEL_NUMBER",min:-65535,max:65535}}},{name:"radio",template:'\n \n \n \n ',defaultOptions:{templateOptions:{options:[{label:"FORM_LABEL_RADIO_OPTION",value:""}]}}},{name:"datepicker",template:''},{name:"select",template:'\n \n ',defaultOptions:{templateOptions:{options:[{label:"FORM_LABEL_SELECT_OPTION",value:""}]}}},{name:"checkbox",template:'\n \n ',defaultOptions:{templateOptions:{label:"FORM_LABEL_CHECKBOX"}}},{name:"ip",defaultOptions:{templateOptions:{label:"FORM_LABEL_IP",placeholder:"127.0.0.1"},validators:{ip:{expression:function(e,t){var n=t||e;return!n||d(n)},message:'"FORM_IP_ERROR_MSG"'}}}},{name:"domain",defaultOptions:{templateOptions:{label:"FORM_LABEL_HOST",placeholder:"127.0.0.1"},validators:{domain:{expression:function(e,t){var n=t||e;return!n||d(n)||l(n)},message:'"FORM_HOST_ERROR_MSG"'}}}},{name:"latitude",defaultOptions:{templateOptions:{label:"FORM_LABEL_LATITUDE"},validators:{latitude:{expression:function(e,t){var n=t||e;return!n||s(n)},message:'"FORM_LATITUDE_ERROR_MSG"'}}}},{name:"longitude",defaultOptions:{templateOptions:{label:"FORM_LABEL_LONGITUDE"},validators:{longitude:{expression:function(e,t){var n=t||e;return!n||u(n)},message:'"FORM_LONITUDE_ERROR_MSG"'}}}},{name:"password",template:'',defaultOptions:{templateOptions:{label:"FORM_LABEL_PASSWORD"},validators:{password:{expression:function(e,t){var n=t||e;return!n||c(n)},message:'"FORM_PASSWORD_ERROR_MSG"'}}}},{name:"aliasName",defaultOptions:{templateOptions:{label:"FORM_LABEL_NAME"},validators:{aliasName:{expression:function(e,t){var n=t||e;return!n||o(n)},message:'"FORM_ALIASNAME_ERROR_MSG"'}}}},{name:"hostname",defaultOptions:{templateOptions:{label:"FORM_LABEL_HOSTNAME"},validators:{hostname:{expression:function(e,t){var n=t||e;return!n||l(n)},message:'"FORM_HOSTNAME_ERROR_MSG"'}}}},{name:"port",defaultOptions:{templateOptions:{label:"FORM_LABEL_PORT"},validators:{port:{expression:function(e,t){var n=t||e;return!n||i(n)},message:'"FORM_PORT_ERROR_MSG"'}}}},{name:"mac",defaultOptions:{templateOptions:{label:"FORM_LABEL_MAC"},validators:{mac:{expression:function(e,t){var n=t||e;return!n||r(n)},message:'"FORM_MAC_ERROR_MSG"'}}}},{name:"float",template:'',defaultOptions:{templateOptions:{label:"FORM_LABEL_FLOAT",min:-65535,max:65535},validators:{float:{expression:function(e,t){var n=t||e;return!n||a(n)},message:'"FORM_FLOAT_ERROR_MSG"'}}}},{name:"matchField",defaultOptions:function(e){return{validators:{fieldMatch:{expression:function(t,n,a){return(n||t)===a.model[e.data.fieldToMatch]},message:e.data.matchFieldMessage||'"Must match!"'}}}}}],O=[{name:"mdLabel",types:["input","number","date","datetime","email","password","range","url","float","textarea"],template:'\n '},{name:"mdSelect",types:["select"],template:'\n \n \n \n \n
    \n
    \n {{message(fc.$viewValue, fc.$modelValue, this) | translate:options}}\n
    \n
    \n
    '},{name:"mdInputContainer",types:["input","number","date","datetime","email","password","file","url","float","textarea"],template:'\n \n
    \n
    \n {{message(fc.$viewValue, fc.$modelValue, this) | translate:options}}\n
    \n
    \n
    '}];t.default=function(e){e.config(["formlyConfigProvider",function(e){e.disableWarnings=!0,e.extras.removeChromeAutoComplete=!0,e.extras.explicitAsync=!0,e.extras.ngModelAttrsManipulatorPreferBound=!0}]),e.run(["formlyConfig","formlyValidationMessages","$filter",function(e,t,n){m(e,g),p(e,O),t.addStringMessage("required",n("translate")("FORM_REQUIRED_ERROR_MSG")),t.addTemplateOptionValueMessage("min","min",n("translate")("FORM_MIN_ERROR_MSG2"),"",n("translate")("FORM_MIN_ERROR_MSG")),t.addTemplateOptionValueMessage("max","max",n("translate")("FORM_MAX_ERROR_MSG2"),"",n("translate")("FORM_MAX_ERROR_MSG")),t.addTemplateOptionValueMessage("minlength","minlength","",n("translate")("FORM_MINLEN_ERROR_MSG2"),n("translate")("FORM_MINLEN_ERROR_MSG")),t.addTemplateOptionValueMessage("maxlength","maxlength","",n("translate")("FORM_MAXLEN_ERROR_MSG2"),n("translate")("FORM_MAXLEN_ERROR_MSG")),t.addTemplateOptionValueMessage("pattern","patternValidationMessage","","",n("translate")("FORM_PATTERN_ERROR_MSG"))}])}},function(e,t,n){"use strict";function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n\n Select Tags\n \n ',controller:function(){function e(t,n){"ngInject";a(this,e),this.$mdDialog=t,this.rest=n}return e.$inject=["$mdDialog","rest"],r(e,[{key:"showTagList",value:function(e){var t=this,n={basePath:this.basePath||null,headers:{"mx-api-token":this.apiToken||null}};this.rest.get("/mxc/equipments",n).then(function(n){t.$mdDialog.show({templateUrl:"sanji-tag-selector-list.tpl.html",controller:l.default,controllerAs:"$ctrl",bindToController:!0,targetEvent:e,locals:{devices:n.data,data:t.data||[]},clickOutsideToClose:!0}).then(function(e){t.onUpdate({$event:{data:e}})})})}}]),e}()};t.default=o},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(47),i=a(r),l=n(48),o=a(l);t.default=["$translateProvider",function(e){"ngInject";e.translations("en",i.default),e.translations("zh-tw",o.default)}]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=["$mdThemingProvider",function(e){"ngInject";e.definePalette("moxa-material",{50:"#E6F3F3",100:"#B3DBDB",200:"#80C3C3",300:"#55AFAF",400:"#2A9B9B",500:"#008787",600:"#007676",700:"#006565",800:"#006565",900:"#006565",A100:"#006565",A200:"#006565",A400:"#006565",A700:"#006565",contrastDefaultColor:"light",contrastDarkColors:["50","100","200","300","400","A100"],contrastLightColors:void 0}),e.theme("moxa").primaryPalette("moxa-material"),e.setDefaultTheme("moxa")}]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=["toastr",function(e){"ngInject";e.options.timeOut=6e3,e.options.positionClass="toast-bottom-right",e.options.progressBar=!0}]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=["$httpProvider","$compileProvider","$logProvider","routerHelperProvider","exceptionHandlerProvider","storeProvider",function(e,t,n,a,r,i){"ngInject";var l={appErrorPrefix:"[webapp Error] ",appTitle:"webapp"};e.useApplyAsync(!0),t.debugInfoEnabled(!1),n.debugEnabled(!1),r.configure(l.appErrorPrefix),a.configure({docTitle:l.appTitle+": ",defaultRoute:"/"}),i.setStore("sessionStorage")}]},function(e,t){var n,a=window.angular;try{n=a.module(["ng"])}catch(e){n=a.module("ng",[])}var r='\n
    \n
    \n

    \n \n

    \n

    404

    \n

    \n

    \n

    \n
      \n
    • 1.
    • 2.
    • \n
    \n
    \n
    \n',i=a.element(window.document).injector();i?i.get("$templateCache").put("404.html",r):n.run(["$templateCache",function(e){e.put("404.html",r)}]),e.exports=r},function(e,t){var n,a=window.angular;try{n=a.module(["ng"])}catch(e){n=a.module("ng",[])}var r='\n\n',i="breadcrumbs.tpl.html",l=a.element(window.document).injector();l?l.get("$templateCache").put(i,r):n.run(["$templateCache",function(e){e.put(i,r)}]),e.exports=r},function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=n},function(e,t){e.exports=a},function(e,t){e.exports=r},function(e,t){e.exports=i},function(e,t){e.exports=l},function(e,t){e.exports=o},function(e,t){e.exports=s},function(e,t){e.exports=u},function(e,t){e.exports=c},function(e,t){e.exports=d},function(e,t){e.exports=m},function(e,t){e.exports=p},function(e,t){e.exports=_},function(e,t){e.exports=f},function(e,t){e.exports=g},function(e,t){e.exports=O},function(e,t){e.exports=R},function(e,t){e.exports=E},function(e,t){e.exports=L},function(e,t){e.exports=M},function(e,t){e.exports=b},function(e,t){e.exports=h},function(e,t){e.exports=A},function(e,t){e.exports=v},function(e,t){e.exports=T},function(e,t){e.exports=y},function(e,t){e.exports=S},function(e,t){e.exports=F},function(e,t){e.exports=I},function(e,t){e.exports={"404_NOT_FOUND":"Not found","404_MESSAGE_1":"Sorry, but the page you were trying to view does not exist.","404_MESSAGE_2":"It looks like this was the result of either:","404_MESSAGE_3":"a mistyped address","404_MESSAGE_4":"an out-of-date link",FORM_PLACEHOLDER_SELECT_DATE:"Select Date",FORM_SELECT_BUTTON:"Select",FORM_LABEL_SWITCH:"Enable",FORM_LABEL_URL:"URL",FORM_LABEL_RANGE:"Range",FORM_LABEL_FILE:"File",FORM_LABEL_DATE:"Date",FORM_LABEL_DATE_TIME:"Date Time",FORM_LABEL_EMAIL:"Email",FORM_LABEL_NUMBER:"Number",FORM_LABEL_RADIO_OPTION:"Radio Option",FORM_LABEL_SELECT_OPTION:"Please Select",FORM_LABEL_CHECKBOX:"Checkbox Label",FORM_LABEL_FLOAT:"Float",FORM_LABEL_IP:"IP",FORM_LABEL_LATITUDE:"Latitude",FORM_LABEL_LONGITUDE:"Longitude",FORM_LABEL_PASSWORD:"Password",FORM_LABEL_NAME:"Name",FORM_LABEL_HOSTNAME:"Hostname",FORM_LABEL_PORT:"Port",FORM_LABEL_MAC:"MAC",FORM_LABEL_HOUR:"Hour",FORM_LABEL_MINUTE:"Minute",FORM_LABEL_TEXTAREA:"Textarea",FORM_LABEL_HOST:"Host",FORM_HOST_ERROR_MSG:"Invalid host format",FORM_FLOAT_ERROR_MSG:"Invalid float format",FORM_MAC_ERROR_MSG:"Invalid MAC format",FORM_PORT_ERROR_MSG:"Invalid port format",FORM_ALIASNAME_ERROR_MSG:"Allowed chars include A-Z,a-z,0-9,_,- and length must between 3 and 255.",FORM_HOSTNAME_ERROR_MSG:"Invalid hotname format",FORM_NAME_ERROR_MSG:"Invalid name format",FORM_PASSWORD_ERROR_MSG:"Allowed chars include A-Z,a-z,0-9 and length must between 6 and 100.",FORM_LONGITUDE_ERROR_MSG:"Invalid longitude format",FORM_LATITUDE_ERROR_MSG:"Invalid latitude format",FORM_IP_ERROR_MSG:"Invalid IP format",FORM_EMAIL_ERROR_MSG:"Invalid email format",FORM_URL_ERROR_MSG:"Invalid URL format",FORM_REQUIRED_ERROR_MSG:"This field is required",FORM_MINLEN_ERROR_MSG:"Too short",FORM_MINLEN_ERROR_MSG2:"is the minimum length",FORM_MAXLEN_ERROR_MSG:"Too long",FORM_MAXLEN_ERROR_MSG2:"is the maximum length",FORM_MIN_ERROR_MSG:"Too samll",FORM_MIN_ERROR_MSG2:"The min value allowed is",FORM_MAX_ERROR_MSG:"Too big",FORM_MAX_ERROR_MSG2:"The max value allowed is",FORM_PATTERN_ERROR_MSG:"Invalid input format",FORM_LABEL_CLOUD_CONNECTION_STATUS:"Connection Status"}},function(e,t){e.exports={"404_NOT_FOUND":"找不到","404_MESSAGE_1":"對不起,你嘗試要瀏覽的頁面不存在","404_MESSAGE_2":"無法瀏覽可能的原因如下:","404_MESSAGE_3":"網址打錯","404_MESSAGE_4":"過時的連結",FORM_PLACEHOLDER_SELECT_DATE:"選擇日期",FORM_SELECT_BUTTON:"選擇",FORM_LABEL_SWITCH:"啟用",FORM_LABEL_URL:"URL",FORM_LABEL_RANGE:"範圍",FORM_LABEL_FILE:"檔案",FORM_LABEL_DATE:"日期",FORM_LABEL_DATE_TIME:"日期時間",FORM_LABEL_EMAIL:"電子信箱",FORM_LABEL_NUMBER:"整數",FORM_LABEL_RADIO_OPTION:"單選選項",FORM_LABEL_SELECT_OPTION:"請選擇",FORM_LABEL_CHECKBOX:"檢查方塊名稱",FORM_LABEL_FLOAT:"浮點數",FORM_LABEL_IP:"網路位址",FORM_LABEL_LATITUDE:"緯度",FORM_LABEL_LONGITUDE:"經度",FORM_LABEL_PASSWORD:"密碼",FORM_LABEL_NAME:"名稱",FORM_LABEL_HOSTNAME:"主機名稱",FORM_LABEL_PORT:"埠號",FORM_LABEL_MAC:"MAC",FORM_LABEL_HOUR:"小時",FORM_LABEL_MINUTE:"分鐘",FORM_LABEL_TEXTAREA:"文字區塊",FORM_LABEL_HOST:"主機域名",FORM_HOST_ERROR_MSG:"主機域名格式錯誤",FORM_FLOAT_ERROR_MSG:"浮點數格式錯誤",FORM_MAC_ERROR_MSG:"MAC 格式錯誤",FORM_PORT_ERROR_MSG:"埠格式錯誤",FORM_ALIASNAME_ERROR_MSG:"字元只允許包含 A-Z,a-z,0-9,_,- 並且長度在3-255之間",FORM_HOSTNAME_ERROR_MSG:"主機名稱格式錯誤",FORM_NAME_ERROR_MSG:"名稱格式錯誤",FORM_PASSWORD_ERROR_MSG:"字元只允許 A-Z,a-z,0-9 並且長度在6-100之間",FORM_LONGITUDE_ERROR_MSG:"經度格式錯誤",FORM_LATITUDE_ERROR_MSG:"緯度格式錯誤",FORM_IP_ERROR_MSG:"IP 格式錯誤",FORM_EMAIL_ERROR_MSG:"電子郵件格式錯誤",FORM_URL_ERROR_MSG:"URL 格式錯誤",FORM_REQUIRED_ERROR_MSG:"欄位不能為空",FORM_MIN_ERROR_MSG:"輸入值太小",FORM_MIN_ERROR_MSG2:"最小值是",FORM_MAX_ERROR_MSG:"輸入值太大",FORM_MAX_ERROR_MSG2:"最大值是",FORM_MINLEN_ERROR_MSG:"長度太短",FORM_MINLEN_ERROR_MSG2:"是最短長度",FORM_MAXLEN_ERROR_MSG:"長度太長",FORM_MAXLEN_ERROR_MSG2:"是最長長度",FORM_PATTERN_ERROR_MSG:"輸入格式錯誤",FORM_LABEL_CLOUD_CONNECTION_STATUS:"連線狀態"}},function(e,t){e.exports={TAG_SELECTOR_DIALOG_TABLE_NAME:"Name",TAG_SELECTOR_DIALOG_TABLE_LOG_ON_CHANGE:"Log On Change",TAG_SELECTOR_DIALOG_TABLE_DESCRIPTION:"Description",TAG_SELECTOR_DIALOG_TAG_LIST:"Tag List",TAG_SELECTOR_DIALOG_UPLOAD_EDIT_DIALOG_TITLE:"Edit upload tag setting",TAG_SELECTOR_DIALOG_ITEM_SELECTED:" items are selected",TAG_SELECTOR_DIALOG_FORM_EQUIPMENT:"Select a device",TAG_SELECTOR_DIALOG_FORM_SAVE:"Save",TAG_SELECTOR_DIALOG_FORM_EQUIPMENT_TYPE:"Type"}},function(e,t){e.exports={TAG_SELECTOR_DIALOG_TABLE_NAME:"名稱",TAG_SELECTOR_DIALOG_TABLE_LOG_ON_CHANGE:"異動後記錄",TAG_SELECTOR_DIALOG_TABLE_DESCRIPTION:"描述",TAG_SELECTOR_DIALOG_TAG_LIST:"標籤清單",TAG_SELECTOR_DIALOG_UPLOAD_EDIT_DIALOG_TITLE:"編輯上傳標籤",TAG_SELECTOR_DIALOG_ITEM_SELECTED:"項目被選取",TAG_SELECTOR_DIALOG_FORM_EQUIPMENT:"選取一個裝置",TAG_SELECTOR_DIALOG_FORM_SAVE:"儲存",TAG_SELECTOR_DIALOG_FORM_EQUIPMENT_TYPE:"型態"}},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.sjCore=void 0,n(39),n(33),n(34);var r=n(44),i=a(r),l=n(40),o=a(l),s=n(32),u=a(s),c=n(35),d=a(c),m=n(14),p=a(m),_=n(26),f=a(_),g=n(15),O=a(g),R=n(20),E=a(R),L=n(24),M=a(L),b=n(22),h=a(b),A=n(19),v=a(A),T=n(29),y=a(T),S=n(30),F=a(S);n(31);var I=n(21),$=a(I),x=n(27),G=a(x),B=n(28),C=a(B),k=n(17),N=a(k),q=n(38),D=a(q),w=n(43),j=n(41),P=n(42);n(37),n(25),n(18),n(16),n(0);var U=n(36),H=a(U),z=n(23);n(1),n(13),n(12);var V=n(9),X=a(V),Z=n(5),W=a(Z),Q=n(11),K=a(Q),Y=n(10),J=a(Y),ee=n(6),te=a(ee),ne=n(3),ae=a(ne),re=n(4),ie=a(re),le=n(8),oe=a(le),se=n(7),ue=a(se),ce=n(2),de=a(ce);i.default.load({google:{families:["Roboto"]}}),Offline.options={checkOnLoad:!0,reconnect:{initialDelay:3,delay:3},requests:!1};var me=p.default.module("sanji.core",[f.default,O.default,E.default,M.default,h.default,$.default,"angularMoment","angular.filter","ncy-angular-breadcrumb",H.default,N.default,C.default,v.default,y.default,F.default,G.default,D.default,"ngLetterAvatar","angular-cron-jobs",j.sjRedux,w.sjUtils,z.mdZippyModule]);me.constant("pathToRegexp",o.default),me.constant("apiCheck",u.default),me.constant("moment",d.default),me.config(X.default),me.config(W.default),me.config(K.default),me.config(J.default),me.config(["$breadcrumbProvider",function(e){"ngInject";e.setOptions({templateUrl:"breadcrumbs.tpl.html"})}]),me.config(oe.default),me.filter("trustAsResourceUrl",["$sce",function(e){return function(t){return e.trustAsResourceUrl(t)}}]),me.value("EventEmitter",function(e){return{$event:e}}),me.service("downloadHelper",ie.default),me.component("tagSelector",ue.default),me.component("cloudConnectStatus",de.default),me.run(te.default),me.run(["$state","$rootScope",function(e,t){"ngInject";e.defaultErrorHandler(function(){}),t.$on(P.SOCKET_INIT_CONNECT_EVENT,function(e,t){t&&t.on("disconnect",function(){Offline.check()})})}]),(0,ae.default)(me),u.default.globalConfig.disabled=!0;var pe=me.name;t.sjCore=pe},function(e,t,n){"use strict";function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n\n
    \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n \n
    {{tag.name}}\n \n {{tag.description}}
    \n
    \n\n \n \n\n
    \n \n \n \n \n
    \n \n \n',i="sanji-tag-selector-list.tpl.html",l=a.element(window.document).injector();l?l.get("$templateCache").put(i,r):n.run(["$templateCache",function(e){e.put(i,r)}]),e.exports=r},function(e,t){e.exports=$}])}); \ No newline at end of file +!function(e,t,n){"use strict";function a(e,n){return t.equals(e.length,n.length)?e>n:e.length>n.length}function r(e){var t=e.replace(/\n/g," ").match(/^([^(]+?)\s*(\((.*)\))?$/);if(!t||4!==t.length)throw new Error("Invalid state ref '"+e+"'");return{state:t[1],paramExpr:t[3]||null}}function i(e,t,a,r){var i=c[e];i!==n&&i(),i=t.$on(a,r),c[e]=i}function l(){var e={prefixStateName:null,template:"bootstrap3",templateUrl:null,templateLast:"default",templateLastUrl:null,includeAbstract:!1};this.setOptions=function(n){t.extend(e,n)},this.$get=["$state","$stateParams","$rootScope",function(t,l,o){var s=o;i("$Breadcrumb.$viewContentLoaded",o,"$viewContentLoaded",function(e){!e.targetScope.ncyBreadcrumbIgnore&&a(e.targetScope.$id,s.$id)&&(s=e.targetScope)});var u=function(e){var t=e.parent||(/^(.+)\.[^.]+$/.exec(e.name)||[])[1];return"object"==typeof t?t.name:t},c=function(n,a){for(var i,o,u=r(a),c=!1,d=!1,m=0,p=n.length;m
  • {{step.ncyBreadcrumbLabel}}{{step.ncyBreadcrumbLabel}}/
  • ',bootstrap3:''};return{restrict:"AE",replace:!0,scope:{},template:n.getTemplate(r),templateUrl:n.getTemplateUrl(),link:{post:function(r){var l=[],o=function(){p(l),l=[];var a=n.$getLastViewScope();r.steps=n.getStatesChain(),t.forEach(r.steps,function(t){if(t.ncyBreadcrumb&&t.ncyBreadcrumb.label){var n=e(t.ncyBreadcrumb.label);t.ncyBreadcrumbLabel=n(a),m(l,n,a,t)}else t.ncyBreadcrumbLabel=t.name})};i("BreadcrumbDirective.$viewContentLoaded",a,"$viewContentLoaded",function(e){e.targetScope.ncyBreadcrumbIgnore||o()}),o()}}}}function s(e,t,n){var a={default:"{{ncyBreadcrumbLabel}}"};return{restrict:"A",scope:{},template:t.getTemplateLast(a),templateUrl:t.getTemplateLastUrl(),compile:function(a,r){var l=a.attr(r.$attr.ncyBreadcrumbLast);return l&&a.html(l),{post:function(a){var r=[],l=function(){p(r),r=[];var n=t.$getLastViewScope(),i=t.getLastStep();if(i)if(a.ncyBreadcrumbLink=i.ncyBreadcrumbLink,i.ncyBreadcrumb&&i.ncyBreadcrumb.label){var l=e(i.ncyBreadcrumb.label);a.ncyBreadcrumbLabel=l(n),m(r,l,n,a)}else a.ncyBreadcrumbLabel=i.name};i("BreadcrumbLastDirective.$viewContentLoaded",n,"$viewContentLoaded",function(e){e.targetScope.ncyBreadcrumbIgnore||l()}),l()}}}}}function u(e,n,a){return{restrict:"A",scope:{},template:"{{ncyBreadcrumbChain}}",compile:function(r,l){var o=r.attr(l.$attr.ncyBreadcrumbText);o&&r.html(o);var s=r.attr(l.$attr.ncyBreadcrumbTextSeparator)||" / ";return{post:function(r){var l=[],o=function(e,n,a){t.forEach(d(n),function(t){var n=a.$watch(t,function(e,t){e!==t&&u()});e.push(n)})},u=function(){p(l),l=[];var a=n.$getLastViewScope(),i=n.getStatesChain(),u=[];t.forEach(i,function(t){if(t.ncyBreadcrumb&&t.ncyBreadcrumb.label){var n=e(t.ncyBreadcrumb.label);u.push(n(a)),o(l,n,a)}else u.push(t.name)}),r.ncyBreadcrumbChain=u.join(s)};i("BreadcrumbTextDirective.$viewContentLoaded",a,"$viewContentLoaded",function(e){e.targetScope.ncyBreadcrumbIgnore||u()}),u()}}}}}var c={},d=function(e){if(e.expressions)return e.expressions;var n=[];return t.forEach(e.parts,function(e){t.isFunction(e)&&n.push(e.exp)}),n},m=function(e,n,a,r){t.forEach(d(n),function(t){var i=a.$watch(t,function(){r.ncyBreadcrumbLabel=n(a)});e.push(i)})},p=function(e){t.forEach(e,function(e){e()})};o.$inject=["$interpolate","$breadcrumb","$rootScope"],s.$inject=["$interpolate","$breadcrumb","$rootScope"],u.$inject=["$interpolate","$breadcrumb","$rootScope"],t.module("ncy-angular-breadcrumb",["ui.router.state"]).provider("$breadcrumb",l).directive("ncyBreadcrumb",o).directive("ncyBreadcrumbLast",s).directive("ncyBreadcrumbText",u)}(window,window.angular)},function(e,t){},function(e,t,n){"use strict";function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n\n

    \n \n \n \n ',controller:function(){function e(t){"ngInject";a(this,e),this.sjio=t}return e.$inject=["sjio"],r(e,[{key:"$onInit",value:function(){var e=this,t=this.sjio.getSocket();this.unSocketHandler=t.on("sj:webapp:message",function(t){t.data&&t.event===e.event&&(e.data=t.data[e.key])})}},{key:"$onDestroy",value:function(){this.unSocketHandler()}}]),e}()};t.default=i},function(e,t,n){"use strict";function a(e){return/^[+-]?\d+(\.\d+)?$/.test(e)}function r(e){return/^([0-9A-F]{2}[:]){5}([0-9A-F]{2})$/.test(e)}function i(e){return/^([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$/.test(e)}function l(e){return/^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$/.test(e)}function o(e){return/^[A-Za-z0-9_-]{3,255}$/.test(e)}function s(e){return/^[-+]?([1-8]?\d(\.\d+)?|90(\.0+)?)$/.test(e)}function u(e){return/^[-+]?(180(\.0+)?|((1[0-7]\d)|([1-9]?\d))(\.\d+)?)$/.test(e)}function c(e){return/^(?=.*\d)(?=.*[a-zA-Z]).{6,100}$/.test(e)}function d(e){return"0.0.0.0"!==e&&(!!/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/.test(e)&&!/2(?:2[4-9]|3\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d?|0)){3}/.test(e))}function m(e,t){var n=void 0,a=t.length;for(n=0;n',controller:["$scope",function(e){"ngInject";e.setData=function(t){e.model[e.options.key]=t.data}}]},{name:"cloud_connection",template:'',defaultOptions:{templateOptions:{event:(0,f.default)(10)}}},{name:"datetimepicker",template:'
    \n \n \n \n \n \n \n \n \n \n
    ',controller:["$scope",function(e){"ngInject";function t(t){e.options.templateOptions.date=t,e.options.templateOptions.hour=t.getHours(),e.options.templateOptions.minute=t.getMinutes()}if(e.model[e.options.key])t(e.model[e.options.key]);else{var n=new Date;e.model[e.options.key]=n,t(n)}e.$watchGroup(["options.templateOptions.date","options.templateOptions.hour","options.templateOptions.minute"],function(e,t,n){var a=e[0];a&&(a.setHours(e[1]),a.setMinutes(e[2]),a.getTime()!==n.model[n.options.key].getTime()&&(n.model[n.options.key]=a))}),e.$watch(function(){return e.model[e.options.key]},function(e,n){e&&n&&("string"==typeof e&&(e=new Date(e)),e.getTime()!==n.getTime()&&t(new Date(e)))})}],defaultOptions:{templateOptions:{datePlaceholder:"FORM_PLACEHOLDER_SELECT_DATE",hourLabel:"FORM_LABEL_HOUR",minLabel:"FORM_LABEL_MINUTE"}}},{name:"textarea",template:'',defaultOptions:{templateOptions:{label:"FORM_LABEL_TEXTAREA"}}},{name:"switch",template:'\n \n ',defaultOptions:{templateOptions:{label:"FORM_LABEL_SWITCH"}}},{name:"url",template:'',defaultOptions:{templateOptions:{label:"FORM_LABEL_URL"},validation:{messages:{url:'"FORM_URL_ERROR_MSG"'}}}},{name:"range",template:'',defaultOptions:{templateOptions:{label:"FORM_LABEL_RANGE"}}},{name:"input",template:'',defaultOptions:{templateOptions:{label:""}}},{name:"file",template:'
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    ',controller:["$scope",function(e){"ngInject";e.fileSelect=function(t,n){if(t)if(void 0===e.formOptions.files)e.formOptions.files=[],e.formOptions.files.push({key:n,file:t});else{var a=e.formOptions.files.findIndex(function(e){return e.key===n});-1===a?e.formOptions.files.push({key:n,file:t}):e.formOptions.files[a].file=t}}}],defaultOptions:{templateOptions:{label:"FORM_LABEL_FILE"}}},{name:"date",template:'',defaultOptions:{templateOptions:{label:"FORM_LABEL_DATE"}}},{name:"datetime",template:'',defaultOptions:{templateOptions:{label:"FORM_LABEL_DATE_TIME"}}},{name:"email",template:'',defaultOptions:{templateOptions:{label:"FORM_LABEL_EMAIL"},validation:{messages:{email:'"FORM_EMAIL_ERROR_MSG"'}}}},{name:"number",template:'',defaultOptions:{templateOptions:{label:"FORM_LABEL_NUMBER",min:-65535,max:65535}}},{name:"radio",template:'\n \n \n \n ',defaultOptions:{templateOptions:{options:[{label:"FORM_LABEL_RADIO_OPTION",value:""}]}}},{name:"datepicker",template:''},{name:"select",template:'\n \n ',defaultOptions:{templateOptions:{options:[{label:"FORM_LABEL_SELECT_OPTION",value:""}]}}},{name:"checkbox",template:'\n \n ',defaultOptions:{templateOptions:{label:"FORM_LABEL_CHECKBOX"}}},{name:"ip",defaultOptions:{templateOptions:{label:"FORM_LABEL_IP",placeholder:"127.0.0.1"},validators:{ip:{expression:function(e,t){var n=t||e;return!n||d(n)},message:'"FORM_IP_ERROR_MSG"'}}}},{name:"domain",defaultOptions:{templateOptions:{label:"FORM_LABEL_HOST",placeholder:"127.0.0.1"},validators:{domain:{expression:function(e,t){var n=t||e;return!n||d(n)||l(n)},message:'"FORM_HOST_ERROR_MSG"'}}}},{name:"latitude",defaultOptions:{templateOptions:{label:"FORM_LABEL_LATITUDE"},validators:{latitude:{expression:function(e,t){var n=t||e;return!n||s(n)},message:'"FORM_LATITUDE_ERROR_MSG"'}}}},{name:"longitude",defaultOptions:{templateOptions:{label:"FORM_LABEL_LONGITUDE"},validators:{longitude:{expression:function(e,t){var n=t||e;return!n||u(n)},message:'"FORM_LONITUDE_ERROR_MSG"'}}}},{name:"password",template:'',defaultOptions:{templateOptions:{label:"FORM_LABEL_PASSWORD"},validators:{password:{expression:function(e,t){var n=t||e;return!n||c(n)},message:'"FORM_PASSWORD_ERROR_MSG"'}}}},{name:"aliasName",defaultOptions:{templateOptions:{label:"FORM_LABEL_NAME"},validators:{aliasName:{expression:function(e,t){var n=t||e;return!n||o(n)},message:'"FORM_ALIASNAME_ERROR_MSG"'}}}},{name:"hostname",defaultOptions:{templateOptions:{label:"FORM_LABEL_HOSTNAME"},validators:{hostname:{expression:function(e,t){var n=t||e;return!n||l(n)},message:'"FORM_HOSTNAME_ERROR_MSG"'}}}},{name:"port",defaultOptions:{templateOptions:{label:"FORM_LABEL_PORT"},validators:{port:{expression:function(e,t){var n=t||e;return!n||i(n)},message:'"FORM_PORT_ERROR_MSG"'}}}},{name:"mac",defaultOptions:{templateOptions:{label:"FORM_LABEL_MAC"},validators:{mac:{expression:function(e,t){var n=t||e;return!n||r(n)},message:'"FORM_MAC_ERROR_MSG"'}}}},{name:"float",template:'',defaultOptions:{templateOptions:{label:"FORM_LABEL_FLOAT",min:-65535,max:65535},validators:{float:{expression:function(e,t){var n=t||e;return!n||a(n)},message:'"FORM_FLOAT_ERROR_MSG"'}}}},{name:"matchField",defaultOptions:function(e){return{validators:{fieldMatch:{expression:function(t,n,a){return(n||t)===a.model[e.data.fieldToMatch]},message:e.data.matchFieldMessage||'"Must match!"'}}}}}],O=[{name:"mdLabel",types:["input","number","date","datetime","email","password","range","url","float","textarea"],template:'\n '},{name:"mdSelect",types:["select"],template:'\n \n \n \n \n
    \n
    \n {{message(fc.$viewValue, fc.$modelValue, this) | translate:options}}\n
    \n
    \n
    '},{name:"mdInputContainer",types:["input","number","date","datetime","email","password","file","url","float","textarea"],template:'\n \n
    \n
    \n {{message(fc.$viewValue, fc.$modelValue, this) | translate:options}}\n
    \n
    \n
    '}];t.default=function(e){e.config(["formlyConfigProvider",function(e){e.disableWarnings=!0,e.extras.removeChromeAutoComplete=!0,e.extras.explicitAsync=!0,e.extras.ngModelAttrsManipulatorPreferBound=!0}]),e.run(["formlyConfig","formlyValidationMessages","$filter",function(e,t,n){m(e,g),p(e,O),t.addStringMessage("required",n("translate")("FORM_REQUIRED_ERROR_MSG")),t.addTemplateOptionValueMessage("min","min",n("translate")("FORM_MIN_ERROR_MSG2"),"",n("translate")("FORM_MIN_ERROR_MSG")),t.addTemplateOptionValueMessage("max","max",n("translate")("FORM_MAX_ERROR_MSG2"),"",n("translate")("FORM_MAX_ERROR_MSG")),t.addTemplateOptionValueMessage("minlength","minlength","",n("translate")("FORM_MINLEN_ERROR_MSG2"),n("translate")("FORM_MINLEN_ERROR_MSG")),t.addTemplateOptionValueMessage("maxlength","maxlength","",n("translate")("FORM_MAXLEN_ERROR_MSG2"),n("translate")("FORM_MAXLEN_ERROR_MSG")),t.addTemplateOptionValueMessage("pattern","patternValidationMessage","","",n("translate")("FORM_PATTERN_ERROR_MSG"))}])}},function(e,t,n){"use strict";function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n\n Select Tags\n \n ',controller:function(){function e(t,n){"ngInject";a(this,e),this.$mdDialog=t,this.rest=n}return e.$inject=["$mdDialog","rest"],r(e,[{key:"showTagList",value:function(e){var t=this,n={basePath:this.basePath||null,headers:{"mx-api-token":this.apiToken||null}};this.rest.get("/mxc/equipments",n).then(function(n){t.$mdDialog.show({templateUrl:"sanji-tag-selector-list.tpl.html",controller:l.default,controllerAs:"$ctrl",bindToController:!0,targetEvent:e,locals:{devices:n.data,data:t.data||[]},clickOutsideToClose:!0}).then(function(e){t.onUpdate({$event:{data:e}})})})}}]),e}()};t.default=o},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(47),i=a(r),l=n(48),o=a(l);t.default=["$translateProvider",function(e){"ngInject";e.translations("en",i.default),e.translations("zh-tw",o.default)}]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=["$mdThemingProvider",function(e){"ngInject";e.definePalette("moxa-material",{50:"#E6F3F3",100:"#B3DBDB",200:"#80C3C3",300:"#55AFAF",400:"#2A9B9B",500:"#008787",600:"#007676",700:"#006565",800:"#006565",900:"#006565",A100:"#006565",A200:"#006565",A400:"#006565",A700:"#006565",contrastDefaultColor:"light",contrastDarkColors:["50","100","200","300","400","A100"],contrastLightColors:void 0}),e.theme("moxa").primaryPalette("moxa-material"),e.setDefaultTheme("moxa")}]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=["toastr",function(e){"ngInject";e.options.timeOut=6e3,e.options.positionClass="toast-bottom-right",e.options.progressBar=!0}]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=["$httpProvider","$compileProvider","$logProvider","routerHelperProvider","exceptionHandlerProvider","storeProvider",function(e,t,n,a,r,i){"ngInject";var l={appErrorPrefix:"[webapp Error] ",appTitle:"webapp"};e.useApplyAsync(!0),t.debugInfoEnabled(!1),n.debugEnabled(!1),r.configure(l.appErrorPrefix),a.configure({docTitle:l.appTitle+": ",defaultRoute:"/"}),i.setStore("sessionStorage")}]},function(e,t){var n,a=window.angular;try{n=a.module(["ng"])}catch(e){n=a.module("ng",[])}var r='\n
    \n
    \n

    \n \n

    \n

    404

    \n

    \n

    \n

    \n
      \n
    • 1.
    • 2.
    • \n
    \n
    \n
    \n',i=a.element(window.document).injector();i?i.get("$templateCache").put("404.html",r):n.run(["$templateCache",function(e){e.put("404.html",r)}]),e.exports=r},function(e,t){var n,a=window.angular;try{n=a.module(["ng"])}catch(e){n=a.module("ng",[])}var r='\n\n',i="breadcrumbs.tpl.html",l=a.element(window.document).injector();l?l.get("$templateCache").put(i,r):n.run(["$templateCache",function(e){e.put(i,r)}]),e.exports=r},function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=n},function(e,t){e.exports=a},function(e,t){e.exports=r},function(e,t){e.exports=i},function(e,t){e.exports=l},function(e,t){e.exports=o},function(e,t){e.exports=s},function(e,t){e.exports=u},function(e,t){e.exports=c},function(e,t){e.exports=d},function(e,t){e.exports=m},function(e,t){e.exports=p},function(e,t){e.exports=_},function(e,t){e.exports=f},function(e,t){e.exports=g},function(e,t){e.exports=O},function(e,t){e.exports=R},function(e,t){e.exports=E},function(e,t){e.exports=L},function(e,t){e.exports=M},function(e,t){e.exports=b},function(e,t){e.exports=h},function(e,t){e.exports=A},function(e,t){e.exports=v},function(e,t){e.exports=T},function(e,t){e.exports=y},function(e,t){e.exports=S},function(e,t){e.exports=F},function(e,t){e.exports=I},function(e,t){e.exports={"404_NOT_FOUND":"Not found","404_MESSAGE_1":"Sorry, but the page you were trying to view does not exist.","404_MESSAGE_2":"It looks like this was the result of either:","404_MESSAGE_3":"a mistyped address","404_MESSAGE_4":"an out-of-date link",FORM_PLACEHOLDER_SELECT_DATE:"Select Date",FORM_SELECT_BUTTON:"Select",FORM_LABEL_SWITCH:"Enable",FORM_LABEL_URL:"URL",FORM_LABEL_RANGE:"Range",FORM_LABEL_FILE:"File",FORM_LABEL_DATE:"Date",FORM_LABEL_DATE_TIME:"Date Time",FORM_LABEL_EMAIL:"Email",FORM_LABEL_NUMBER:"Number",FORM_LABEL_RADIO_OPTION:"Radio Option",FORM_LABEL_SELECT_OPTION:"Please Select",FORM_LABEL_CHECKBOX:"Checkbox Label",FORM_LABEL_FLOAT:"Float",FORM_LABEL_IP:"IP",FORM_LABEL_LATITUDE:"Latitude",FORM_LABEL_LONGITUDE:"Longitude",FORM_LABEL_PASSWORD:"Password",FORM_LABEL_NAME:"Name",FORM_LABEL_HOSTNAME:"Hostname",FORM_LABEL_PORT:"Port",FORM_LABEL_MAC:"MAC",FORM_LABEL_HOUR:"Hour",FORM_LABEL_MINUTE:"Minute",FORM_LABEL_TEXTAREA:"Textarea",FORM_LABEL_HOST:"Host",FORM_HOST_ERROR_MSG:"Invalid host format",FORM_FLOAT_ERROR_MSG:"Invalid float format",FORM_MAC_ERROR_MSG:"Invalid MAC format",FORM_PORT_ERROR_MSG:"Invalid port format",FORM_ALIASNAME_ERROR_MSG:"Allowed chars include A-Z,a-z,0-9,_,- and length must between 3 and 255.",FORM_HOSTNAME_ERROR_MSG:"Invalid hotname format",FORM_NAME_ERROR_MSG:"Invalid name format",FORM_PASSWORD_ERROR_MSG:"Allowed chars include A-Z,a-z,0-9 and length must between 6 and 100.",FORM_LONGITUDE_ERROR_MSG:"Invalid longitude format",FORM_LATITUDE_ERROR_MSG:"Invalid latitude format",FORM_IP_ERROR_MSG:"Invalid IP format",FORM_EMAIL_ERROR_MSG:"Invalid email format",FORM_URL_ERROR_MSG:"Invalid URL format",FORM_REQUIRED_ERROR_MSG:"This field is required",FORM_MINLEN_ERROR_MSG:"Too short",FORM_MINLEN_ERROR_MSG2:"is the minimum length",FORM_MAXLEN_ERROR_MSG:"Too long",FORM_MAXLEN_ERROR_MSG2:"is the maximum length",FORM_MIN_ERROR_MSG:"Too samll",FORM_MIN_ERROR_MSG2:"The min value allowed is",FORM_MAX_ERROR_MSG:"Too big",FORM_MAX_ERROR_MSG2:"The max value allowed is",FORM_PATTERN_ERROR_MSG:"Invalid input format",FORM_LABEL_CLOUD_CONNECTION_STATUS:"Connection Status"}},function(e,t){e.exports={"404_NOT_FOUND":"找不到","404_MESSAGE_1":"對不起,你嘗試要瀏覽的頁面不存在","404_MESSAGE_2":"無法瀏覽可能的原因如下:","404_MESSAGE_3":"網址打錯","404_MESSAGE_4":"過時的連結",FORM_PLACEHOLDER_SELECT_DATE:"選擇日期",FORM_SELECT_BUTTON:"選擇",FORM_LABEL_SWITCH:"啟用",FORM_LABEL_URL:"URL",FORM_LABEL_RANGE:"範圍",FORM_LABEL_FILE:"檔案",FORM_LABEL_DATE:"日期",FORM_LABEL_DATE_TIME:"日期時間",FORM_LABEL_EMAIL:"電子信箱",FORM_LABEL_NUMBER:"整數",FORM_LABEL_RADIO_OPTION:"單選選項",FORM_LABEL_SELECT_OPTION:"請選擇",FORM_LABEL_CHECKBOX:"檢查方塊名稱",FORM_LABEL_FLOAT:"浮點數",FORM_LABEL_IP:"網路位址",FORM_LABEL_LATITUDE:"緯度",FORM_LABEL_LONGITUDE:"經度",FORM_LABEL_PASSWORD:"密碼",FORM_LABEL_NAME:"名稱",FORM_LABEL_HOSTNAME:"主機名稱",FORM_LABEL_PORT:"埠號",FORM_LABEL_MAC:"MAC",FORM_LABEL_HOUR:"小時",FORM_LABEL_MINUTE:"分鐘",FORM_LABEL_TEXTAREA:"文字區塊",FORM_LABEL_HOST:"主機域名",FORM_HOST_ERROR_MSG:"主機域名格式錯誤",FORM_FLOAT_ERROR_MSG:"浮點數格式錯誤",FORM_MAC_ERROR_MSG:"MAC 格式錯誤",FORM_PORT_ERROR_MSG:"埠格式錯誤",FORM_ALIASNAME_ERROR_MSG:"字元只允許包含 A-Z,a-z,0-9,_,- 並且長度在3-255之間",FORM_HOSTNAME_ERROR_MSG:"主機名稱格式錯誤",FORM_NAME_ERROR_MSG:"名稱格式錯誤",FORM_PASSWORD_ERROR_MSG:"字元只允許 A-Z,a-z,0-9 並且長度在6-100之間",FORM_LONGITUDE_ERROR_MSG:"經度格式錯誤",FORM_LATITUDE_ERROR_MSG:"緯度格式錯誤",FORM_IP_ERROR_MSG:"IP 格式錯誤",FORM_EMAIL_ERROR_MSG:"電子郵件格式錯誤",FORM_URL_ERROR_MSG:"URL 格式錯誤",FORM_REQUIRED_ERROR_MSG:"欄位不能為空",FORM_MIN_ERROR_MSG:"輸入值太小",FORM_MIN_ERROR_MSG2:"最小值是",FORM_MAX_ERROR_MSG:"輸入值太大",FORM_MAX_ERROR_MSG2:"最大值是",FORM_MINLEN_ERROR_MSG:"長度太短",FORM_MINLEN_ERROR_MSG2:"是最短長度",FORM_MAXLEN_ERROR_MSG:"長度太長",FORM_MAXLEN_ERROR_MSG2:"是最長長度",FORM_PATTERN_ERROR_MSG:"輸入格式錯誤",FORM_LABEL_CLOUD_CONNECTION_STATUS:"連線狀態"}},function(e,t){e.exports={TAG_SELECTOR_DIALOG_TABLE_NAME:"Name",TAG_SELECTOR_DIALOG_TABLE_LOG_ON_CHANGE:"Log On Change",TAG_SELECTOR_DIALOG_TABLE_DESCRIPTION:"Description",TAG_SELECTOR_DIALOG_TAG_LIST:"Tag List",TAG_SELECTOR_DIALOG_UPLOAD_EDIT_DIALOG_TITLE:"Edit upload tag setting",TAG_SELECTOR_DIALOG_ITEM_SELECTED:" items are selected",TAG_SELECTOR_DIALOG_FORM_EQUIPMENT:"Select a device",TAG_SELECTOR_DIALOG_FORM_SAVE:"Save",TAG_SELECTOR_DIALOG_FORM_EQUIPMENT_TYPE:"Type"}},function(e,t){e.exports={TAG_SELECTOR_DIALOG_TABLE_NAME:"名稱",TAG_SELECTOR_DIALOG_TABLE_LOG_ON_CHANGE:"異動後記錄",TAG_SELECTOR_DIALOG_TABLE_DESCRIPTION:"描述",TAG_SELECTOR_DIALOG_TAG_LIST:"標籤清單",TAG_SELECTOR_DIALOG_UPLOAD_EDIT_DIALOG_TITLE:"編輯上傳標籤",TAG_SELECTOR_DIALOG_ITEM_SELECTED:"項目被選取",TAG_SELECTOR_DIALOG_FORM_EQUIPMENT:"選取一個裝置",TAG_SELECTOR_DIALOG_FORM_SAVE:"儲存",TAG_SELECTOR_DIALOG_FORM_EQUIPMENT_TYPE:"型態"}},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.sjCore=void 0,n(39),n(33),n(34);var r=n(44),i=a(r),l=n(40),o=a(l),s=n(32),u=a(s),c=n(35),d=a(c),m=n(14),p=a(m),_=n(26),f=a(_),g=n(15),O=a(g),R=n(20),E=a(R),L=n(24),M=a(L),b=n(22),h=a(b),A=n(19),v=a(A),T=n(29),y=a(T),S=n(30),F=a(S);n(31);var I=n(21),$=a(I),x=n(27),G=a(x),B=n(28),C=a(B),k=n(17),N=a(k),q=n(38),D=a(q),w=n(43),j=n(41),P=n(42);n(37),n(25),n(18),n(16),n(0);var U=n(36),H=a(U),z=n(23);n(1),n(13),n(12);var V=n(9),X=a(V),Z=n(5),W=a(Z),Q=n(11),K=a(Q),Y=n(10),J=a(Y),ee=n(6),te=a(ee),ne=n(3),ae=a(ne),re=n(4),ie=a(re),le=n(8),oe=a(le),se=n(7),ue=a(se),ce=n(2),de=a(ce);i.default.load({google:{families:["Roboto"]}}),Offline.options={checkOnLoad:!0,reconnect:{initialDelay:3,delay:3},requests:!1};var me=p.default.module("sanji.core",[f.default,O.default,E.default,M.default,h.default,$.default,"angularMoment","angular.filter","ncy-angular-breadcrumb",H.default,N.default,C.default,v.default,y.default,F.default,G.default,D.default,"ngLetterAvatar","angular-cron-jobs",j.sjRedux,w.sjUtils,z.mdZippyModule]);me.constant("pathToRegexp",o.default),me.constant("apiCheck",u.default),me.constant("moment",d.default),me.config(X.default),me.config(W.default),me.config(K.default),me.config(J.default),me.config(["$breadcrumbProvider",function(e){"ngInject";e.setOptions({templateUrl:"breadcrumbs.tpl.html"})}]),me.config(oe.default),me.filter("trustAsResourceUrl",["$sce",function(e){return function(t){return e.trustAsResourceUrl(t)}}]),me.value("EventEmitter",function(e){return{$event:e}}),me.service("downloadHelper",ie.default),me.component("tagSelector",ue.default),me.component("cloudConnectStatus",de.default),me.run(te.default),me.run(["$state","$rootScope",function(e,t){"ngInject";e.defaultErrorHandler(function(){}),t.$on(P.SOCKET_INIT_CONNECT_EVENT,function(e,t){t&&t.on("disconnect",function(){Offline.check()})})}]),(0,ae.default)(me),u.default.globalConfig.disabled=!0;var pe=me.name;t.sjCore=pe},function(e,t,n){"use strict";function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n\n
    \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n \n
    {{tag.name}}\n \n {{tag.description}}
    \n
    \n\n \n \n\n
    \n \n \n \n \n
    \n \n \n',i="sanji-tag-selector-list.tpl.html",l=a.element(window.document).injector();l?l.get("$templateCache").put(i,r):n.run(["$templateCache",function(e){e.put(i,r)}]),e.exports=r},function(e,t){e.exports=$}])}); \ No newline at end of file diff --git a/package.json b/package.json index dd2203b..4b2ef82 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "sanji-core-ui", "author": "Zack Yang (https://github.com/zack9433)", "description": "sanji-core-ui", - "version": "3.4.3", + "version": "3.4.4", "main": "dist/sanji-core-ui.js", "config": { "commitizen": { diff --git a/src/component/cloud-connect-status/cloud-connect-status.component.js b/src/component/cloud-connect-status/cloud-connect-status.component.js index b84e9cb..4f1404d 100644 --- a/src/component/cloud-connect-status/cloud-connect-status.component.js +++ b/src/component/cloud-connect-status/cloud-connect-status.component.js @@ -20,7 +20,7 @@ const ConnectStatusComponent = { $onInit() { const mySocket = this.sjio.getSocket(); this.unSocketHandler = mySocket.on('sj:webapp:message', res => { - if (res.data && res.data.event === this.event) { + if (res.data && res.event === this.event) { this.data = res.data[this.key]; } });