diff options
| author | ARC <arjunrc@gmail.com> | 2015-05-09 19:18:30 -0400 |
|---|---|---|
| committer | ARC <arjunrc@gmail.com> | 2015-05-09 19:18:30 -0400 |
| commit | fdb1d93c54e4c67639185f2c859b1fec6a5fb904 (patch) | |
| tree | 3e4154164a3fc8f349503748b30fd99cd4946607 /www/js/DataModel.js | |
| parent | bfe426a83bfcd32bac22bc06cccb15f15a9f9450 (diff) | |
Added support to limit maximum monitors in Montage View and also added a portal alias - those who many not be using one can keep this empty
Diffstat (limited to 'www/js/DataModel.js')
| -rw-r--r-- | www/js/DataModel.js | 37 |
1 files changed, 35 insertions, 2 deletions
diff --git a/www/js/DataModel.js b/www/js/DataModel.js index aab1e643..a4f471ef 100644 --- a/www/js/DataModel.js +++ b/www/js/DataModel.js @@ -13,9 +13,11 @@ angular.module('zmApp.controllers').service('ZMDataModel', ['$http', '$q', '$ion var loginData = { 'username': '', 'password': '', - 'url': '', // This is ZM portal API (Don't add /zm) + 'url': '', // This is the ZM portal path 'apiurl': '', // This is the API path - 'simulationMode': false // if true, data will be simulated + 'simulationMode': false, // if true, data will be simulated + 'maxMontage':"10", //total # of monitors to display in montage + 'alias':"" }; // This is really a test mode. This is how I am validating @@ -137,6 +139,18 @@ angular.module('zmApp.controllers').service('ZMDataModel', ['$http', '$q', '$ion } + if (window.localStorage.getItem("maxMontage") != undefined) { + loginData.maxMontage = + window.localStorage.getItem("maxMontage"); + + } + + if (window.localStorage.getItem("alias") != undefined) { + loginData.alias = + window.localStorage.getItem("alias"); + + } + monitorsLoaded = 0; console.log("Getting out of ZMDataModel init"); @@ -167,6 +181,25 @@ angular.module('zmApp.controllers').service('ZMDataModel', ['$http', '$q', '$ion window.localStorage.setItem("url", loginData.url); window.localStorage.setItem("apiurl", loginData.apiurl); window.localStorage.setItem("simulationMode", loginData.simulationMode); + window.localStorage.setItem("alias",loginData.alias); + + + + if (!loginData.maxMontage) + { + console.log ("INVALID MONTAGE NUM"); + loginData.maxMontage="10"; + } + + if (parseInt(loginData.maxMontage)<=0) + { + console.log ("*** TOO LOW ***"); + loginData.maxMontage=1; + } + + + window.localStorage.setItem("maxMontage", loginData.maxMontage); + console.log("********** SIMULATION IS " + loginData.simulationMode); }, |
