Fixed global controller type

Change-Id: If75fe2f48240b2b702f806b32352e3404f0756a3
diff --git a/views/ngXosViews/globalXos/src/js/main.js b/views/ngXosViews/globalXos/src/js/main.js
index b512ad4..31effcc 100644
--- a/views/ngXosViews/globalXos/src/js/main.js
+++ b/views/ngXosViews/globalXos/src/js/main.js
@@ -29,7 +29,7 @@
     controller: function($window, $q, _, Controllers, LXOS, LocalAuth, LocalSlices, LocalUsers, $uibModal, Slices){
       const self = this;
       $q.all([
-        Controllers.query({backend_type: 'XOS'}).$promise,
+        Controllers.query({backend_type: 'CORD'}).$promise,
         Slices.query().$promise // NOTE why this is queryFromAll??
       ])
       .then(res => {
diff --git a/xos/core/xoslib/static/js/xosGlobalXos.js b/xos/core/xoslib/static/js/xosGlobalXos.js
index 4a10629..e699684 100644
--- a/xos/core/xoslib/static/js/xosGlobalXos.js
+++ b/xos/core/xoslib/static/js/xosGlobalXos.js
@@ -1 +1 @@
-"use strict";var _slicedToArray=function(){function e(e,n){var o=[],t=!0,i=!1,s=void 0;try{for(var a,r=e[Symbol.iterator]();!(t=(a=r.next()).done)&&(o.push(a.value),!n||o.length!==n);t=!0);}catch(l){i=!0,s=l}finally{try{!t&&r["return"]&&r["return"]()}finally{if(i)throw s}}return o}return function(n,o){if(Array.isArray(n))return n;if(Symbol.iterator in Object(n))return e(n,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();angular.module("xos.globalXos",["ngResource","ngCookies","ui.router","xos.helpers","ui.bootstrap.modal","ui.bootstrap.tpls"]).config(["$stateProvider",function(e){e.state("xos-list",{url:"/",template:"<xos-list></xos-list>"})}]).config(["$httpProvider",function(e){e.interceptors.push("NoHyperlinks")}]).value("LXOS",[]).directive("xosList",function(){return{restrict:"E",scope:{},bindToController:!0,controllerAs:"vm",templateUrl:"templates/xos-list.tpl.html",controller:["$window","$q","_","Controllers","LXOS","LocalAuth","LocalSlices","LocalUsers","$uibModal","Slices",function(e,n,o,t,i,s,a,r,l,c){var u=this,d=this;n.all([t.query({backend_type:"XOS"}).$promise,c.query().$promise]).then(function(e){var n=_slicedToArray(e,2);u.xoss=n[0],u.gSlices=n[1]}),this.openLocally=function(n){return function(o){e.open(o.xos.auth_url+"admin/core/"+n+"/"+o.id,"_blank")}};var m=[{label:"Name",prop:"name"},{label:"Mount Data Sets",prop:"mount_data_sets"}],f=[{label:"Max Instances",prop:"max_instances"},{label:"Instances",prop:"instance_total"},{label:"L-XOS",type:"custom",formatter:function(e){return e.xos.name}}];this.gSliceTableCgf={columns:m,filter:"field",order:!0,actions:[{label:"Get Instances",icon:"search",cb:function(e){l.open({animation:!0,size:"lg",templateUrl:"listInstances.html",controllerAs:"vm",resolve:{slice:function(){return{name:e.name,xos:{name:"G-XOS"}}}},controller:["$uibModalInstance","slice","LocalInstances","LocalSlices",function(e,n,o,t){var i=this;this.slice=n,this.config={columns:[{label:"Name",prop:"name"}]},t.queryFromAll(d.xoss).$promise.then(function(e){return i.slicesId=e.filter(function(e){return e.name.indexOf(i.slice.name)>-1}).reduce(function(e,n){return e[n.xos.id]=n.id,e},{}),o.queryFromAll(d.xoss).$promise}).then(function(e){i.instances=e.filter(function(e){return i.slicesId[e.xos.id]===e.slice})})["catch"](function(e){i.instances=[]}),this.close=function(){e.dismiss("cancel")}}]})}}]},this.sliceTableCfg={columns:m.concat(f),actions:[{label:"open locally",icon:"open",cb:this.openLocally("slice")},{label:"Get Instances",icon:"search",cb:function(e){l.open({animation:!0,size:"lg",templateUrl:"listInstances.html",controllerAs:"vm",resolve:{slice:function(){return e}},controller:["$uibModalInstance","slice","LocalInstances",function(e,n,o){var t=this;this.slice=n,this.config={columns:[{label:"Name",prop:"name"},{label:"deployment",prop:"deployment"}]},o.getFromLocal(n.xos).then(function(e){t.instances=e.filter(function(e){return e.slice===n.id})}),this.close=function(){e.dismiss("cancel")}}]})}},{label:"Add Instance",icon:"plus",cb:function(e){l.open({animation:!0,size:"lg",templateUrl:"addInstance.html",controller:["$uibModalInstance","slice","LocalInstances",function(e,n,o){var t=this;this.slice=n,this.model={},o.getLocalInfo(n.xos).then(function(e){var n=_slicedToArray(e,4);t.config.fields.deployment.options=n[0],t.config.fields.image.options=n[1],t.config.fields.flavor.options=n[2],t.config.fields.node.options=n[3]}),this.config={formName:"instanceForm",excludedFields:["xos","slice"],actions:[{label:"Save",icon:"ok",cb:function(t){t.xos=n.xos,t.slice=n.id,t.creator=t.xos.user.id,o.createOnLocal(t).then(function(o){n.instance_total=n.instance_total+1,e.close()})},"class":"success"},{label:"Cancel",icon:"remove",cb:function(){e.dismiss("cancel")},"class":"warning"}],fields:{name:{type:"text",validators:{required:!0}},deployment:{type:"select",validators:{required:!0}},node:{type:"select",validators:{required:!0}},image:{type:"select",validators:{required:!0}},flavor:{type:"select",validators:{required:!0}},isolation:{type:"select",options:[{id:"vm",label:"VM"},{id:"container",label:"Container"},{id:"container_vm",label:"Container in VM"}],validators:{required:!0}}}}}],controllerAs:"vm",resolve:{slice:function(){return e}}})}}],filter:"field",order:!0},this.usersTableCfg={columns:[{label:"Name",type:"custom",formatter:function(e){return e.firstname+" "+e.lastname}},{label:"E-Mail",prop:"email"},{label:"User Name",prop:"username"},{label:"Time Zone",prop:"timezone"},{label:"L-XOS",type:"custom",formatter:function(e){return e.xos.name}}],actions:[{label:"open locally",icon:"open",cb:this.openLocally("user")}],filter:"field",order:!0},this.toggleXos=function(e){o.findIndex(i,{id:e.id})>-1?(e.active=!1,o.remove(i,{id:e.id})):(e.active=!0,i.push(e)),s.login().then(function(){return n.all([a.queryFromAll().$promise,r.queryFromAll().$promise])}).then(function(e){var n=_slicedToArray(e,2);u.localSlices=n[0],u.localUsers=n[1]})["catch"](function(e){console.log(e)})}}]}}),angular.module("xos.globalXos").run(["$templateCache",function(e){e.put("templates/xos-list.tpl.html",'<div class="container">\n  <div class="row">\n    <h2>Select XOS to synch:</h2>\n  </div>\n  <div class="row">\n    <div class="col-xs-12">\n      <h2>G-XOS Slices:</h2>\n    </div>\n    <div class="col-xs-12">\n      <xos-table\n              config="vm.gSliceTableCgf"\n              data="vm.gSlices">\n      </xos-table>\n    </div>\n  </div>\n  <div class="row">\n    <div class="col-xs-12">\n      <h2>Get L-XOS details:</h2>\n    </div>\n    <div\n      ng-repeat="xos in vm.xoss"\n      class="col-sm-2">\n      <div\n        class="well"\n        ng-class="{active: xos.active}"\n        ng-click="vm.toggleXos(xos)">\n          {{xos.humanReadableName || xos.name}}\n      </div>\n    </div>\n  </div>\n  <div class="row" ng-if="vm.localSlices.length > 0">\n    <div class="col-xs-12">\n      <h2>L-XOS Slices:</h2>\n    </div>\n    <div class="col-xs-12">\n      <xos-table\n        config="vm.sliceTableCfg"\n        data="vm.localSlices">\n      </xos-table>\n    </div>\n  </div>\n  <div class="row" ng-if="vm.localSlices.length > 0">\n    <div class="col-xs-12">\n      <h2>L-XOS Users:</h2>\n    </div>\n    <div class="col-xs-12">\n      <xos-table\n        config="vm.usersTableCfg"\n        data="vm.localUsers">\n      </xos-table>\n    </div>\n  </div>\n</div>\n<script type="text/ng-template" id="addInstance.html">\n  <div class="modal-header">\n      <h3 class="modal-title" id="modal-title">Add Instance to {{vm.slice.name}} on {{vm.slice.xos.name}}</h3>\n  </div>\n  <div class="modal-body" id="modal-body">\n    <xos-form ng-model="vm.model" config="vm.config"></xos-form>\n  </div>\n</script>\n<script type="text/ng-template" id="listInstances.html">\n  <div class="modal-header">\n    <h3 class="modal-title" id="modal-title">Get Instances from {{vm.slice.name}} on {{vm.slice.xos.name}}</h3>\n  </div>\n  <div class="modal-body" id="modal-body">\n    <xos-table data="vm.instances" config="vm.config"></xos-table>\n  </div>\n  <div class="modal-footer">\n    <a ng-click="vm.close()" class="btn btn-warning">Close</a>\n  </div>\n</script>')}]),function(){angular.module("xos.globalXos").service("Controllers",["$resource",function(e){return e("/api/core/controllers/:id",{id:"@id"})}]).service("GXOS",["$q","$resource","_","LXOS",function(e,n,o,t){var i=this;this.attachXosToItem=function(e){var n=arguments.length<=1||void 0===arguments[1]?t:arguments[1];return o.map(e,function(e,t){var i=n[t];return o.map(e,function(e){return e.xos=i,e})})},this.buildQueryEndpoint=function(s){var a=arguments.length<=1||void 0===arguments[1]?t:arguments[1];return function(){var t=e.defer(),r=[],l=[];return o.forEach(a,function(e,o){var t=n(""+e.auth_url+s,{id:"@id"},{query:{isArray:!0,headers:{Authorization:"Basic "+btoa(e.admin_user+":"+e.admin_password)}}});r.push(t),l.push(r[o].query().$promise)}),e.all(l).then(function(e){e=i.attachXosToItem(e,a),t.resolve(o.flatten(e))})["catch"](t.reject),{$promise:t.promise}}},this.buildLocalResource=function(e,o){var t={Authorization:"Basic "+btoa(o.admin_user+":"+o.admin_password)},i=n(""+o.auth_url+e,{id:"@id"},{query:{isArray:!0,headers:t}});return i}}]).service("LocalAuth",["$q","$http","_","LXOS",function(e,n,o,t){var i="api/utility/login/";this.login=function(){var s=e.defer(),a=[];return o.forEach(t,function(e,o){var t=n.post(""+e.auth_url+i,{username:e.admin_user,password:e.admin_password});a.push(t)}),e.all(a).then(function(e){o.forEach(e,function(e,n){t[n].xoscsrftoken=e.data.xoscsrftoken,t[n].xossessionid=e.data.xossessionid,t[n].user=JSON.parse(e.data.user)}),s.resolve()})["catch"](function(e){s.reject(e)}),s.promise}}]).service("LocalSlices",["GXOS",function(e){var n="api/utility/slicesplus/";this.queryFromAll=function(o){return e.buildQueryEndpoint(n,o)()}}]).service("LocalUsers",["GXOS",function(e){var n="api/core/users/";this.queryFromAll=e.buildQueryEndpoint(n)}]).service("LocalInstances",["$q","$http","GXOS","LocalDeployments","LocalImages","LocalFlavor","LocalNode",function(e,n,o,t,i,s,a){var r="api/core/instances/";this.queryFromAll=function(e){return o.buildQueryEndpoint(r,e)()},this.createOnLocal=function(o){var t=e.defer(),i=o.xos;return delete o.xos,n.post(""+i.auth_url+r,o,{headers:{Authorization:"Basic "+btoa(i.admin_user+":"+i.admin_password)}}).then(function(e){t.resolve(e)})["catch"](function(e){t.reject(e)}),t.promise},this.getFromLocal=function(o,t){var i=e.defer();return n.get(""+o.auth_url+r,{params:t,headers:{Authorization:"Basic "+btoa(o.admin_user+":"+o.admin_password)}}).then(function(e){i.resolve(e.data)})["catch"](function(e){i.reject(e)}),i.promise},this.getLocalInfo=function(n){var o=e.defer();return e.all([t.queryFromLocal(n),i.queryFromLocal(n),s.queryFromLocal(n),a.queryFromLocal(n)]).then(function(e){e=_.map(e,function(e){return _.map(e,function(e){return{id:e.id,label:e.name}})}),o.resolve(e)})["catch"](o.reject),o.promise}}]).service("LocalDeployments",["$q","$http",function(e,n){var o="api/core/deployments/";this.queryFromLocal=function(t){var i=e.defer();return n.get(""+t.auth_url+o,{headers:{Authorization:"Basic "+btoa(t.admin_user+":"+t.admin_password)}}).then(function(e){i.resolve(e.data)})["catch"](function(e){i.reject(e)}),i.promise}}]).service("LocalImages",["$q","$http",function(e,n){var o="api/core/images/";this.queryFromLocal=function(t){var i=e.defer();return n.get(""+t.auth_url+o,{headers:{Authorization:"Basic "+btoa(t.admin_user+":"+t.admin_password)}}).then(function(e){i.resolve(e.data)})["catch"](function(e){i.reject(e)}),i.promise}}]).service("LocalFlavor",["$q","$http",function(e,n){var o="api/core/flavors/";this.queryFromLocal=function(t){var i=e.defer();return n.get(""+t.auth_url+o,{headers:{Authorization:"Basic "+btoa(t.admin_user+":"+t.admin_password)}}).then(function(e){i.resolve(e.data)})["catch"](function(e){i.reject(e)}),i.promise}}]).service("LocalNode",["$q","$http",function(e,n){var o="api/core/nodes/";this.queryFromLocal=function(t){var i=e.defer();return n.get(""+t.auth_url+o,{headers:{Authorization:"Basic "+btoa(t.admin_user+":"+t.admin_password)}}).then(function(e){i.resolve(e.data)})["catch"](function(e){i.reject(e)}),i.promise}}])}(),angular.module("xos.globalXos").run(["$location",function(e){e.path("/")}]);
\ No newline at end of file
+"use strict";var _slicedToArray=function(){function e(e,n){var o=[],t=!0,i=!1,s=void 0;try{for(var a,r=e[Symbol.iterator]();!(t=(a=r.next()).done)&&(o.push(a.value),!n||o.length!==n);t=!0);}catch(l){i=!0,s=l}finally{try{!t&&r["return"]&&r["return"]()}finally{if(i)throw s}}return o}return function(n,o){if(Array.isArray(n))return n;if(Symbol.iterator in Object(n))return e(n,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();angular.module("xos.globalXos",["ngResource","ngCookies","ui.router","xos.helpers","ui.bootstrap.modal","ui.bootstrap.tpls"]).config(["$stateProvider",function(e){e.state("xos-list",{url:"/",template:"<xos-list></xos-list>"})}]).config(["$httpProvider",function(e){e.interceptors.push("NoHyperlinks")}]).value("LXOS",[]).directive("xosList",function(){return{restrict:"E",scope:{},bindToController:!0,controllerAs:"vm",templateUrl:"templates/xos-list.tpl.html",controller:["$window","$q","_","Controllers","LXOS","LocalAuth","LocalSlices","LocalUsers","$uibModal","Slices",function(e,n,o,t,i,s,a,r,l,c){var u=this,d=this;n.all([t.query({backend_type:"CORD"}).$promise,c.query().$promise]).then(function(e){var n=_slicedToArray(e,2);u.xoss=n[0],u.gSlices=n[1]}),this.openLocally=function(n){return function(o){e.open(o.xos.auth_url+"admin/core/"+n+"/"+o.id,"_blank")}};var m=[{label:"Name",prop:"name"},{label:"Mount Data Sets",prop:"mount_data_sets"}],f=[{label:"Max Instances",prop:"max_instances"},{label:"Instances",prop:"instance_total"},{label:"L-XOS",type:"custom",formatter:function(e){return e.xos.name}}];this.gSliceTableCgf={columns:m,filter:"field",order:!0,actions:[{label:"Get Instances",icon:"search",cb:function(e){l.open({animation:!0,size:"lg",templateUrl:"listInstances.html",controllerAs:"vm",resolve:{slice:function(){return{name:e.name,xos:{name:"G-XOS"}}}},controller:["$uibModalInstance","slice","LocalInstances","LocalSlices",function(e,n,o,t){var i=this;this.slice=n,this.config={columns:[{label:"Name",prop:"name"}]},t.queryFromAll(d.xoss).$promise.then(function(e){return i.slicesId=e.filter(function(e){return e.name.indexOf(i.slice.name)>-1}).reduce(function(e,n){return e[n.xos.id]=n.id,e},{}),o.queryFromAll(d.xoss).$promise}).then(function(e){i.instances=e.filter(function(e){return i.slicesId[e.xos.id]===e.slice})})["catch"](function(e){i.instances=[]}),this.close=function(){e.dismiss("cancel")}}]})}}]},this.sliceTableCfg={columns:m.concat(f),actions:[{label:"open locally",icon:"open",cb:this.openLocally("slice")},{label:"Get Instances",icon:"search",cb:function(e){l.open({animation:!0,size:"lg",templateUrl:"listInstances.html",controllerAs:"vm",resolve:{slice:function(){return e}},controller:["$uibModalInstance","slice","LocalInstances",function(e,n,o){var t=this;this.slice=n,this.config={columns:[{label:"Name",prop:"name"},{label:"deployment",prop:"deployment"}]},o.getFromLocal(n.xos).then(function(e){t.instances=e.filter(function(e){return e.slice===n.id})}),this.close=function(){e.dismiss("cancel")}}]})}},{label:"Add Instance",icon:"plus",cb:function(e){l.open({animation:!0,size:"lg",templateUrl:"addInstance.html",controller:["$uibModalInstance","slice","LocalInstances",function(e,n,o){var t=this;this.slice=n,this.model={},o.getLocalInfo(n.xos).then(function(e){var n=_slicedToArray(e,4);t.config.fields.deployment.options=n[0],t.config.fields.image.options=n[1],t.config.fields.flavor.options=n[2],t.config.fields.node.options=n[3]}),this.config={formName:"instanceForm",excludedFields:["xos","slice"],actions:[{label:"Save",icon:"ok",cb:function(t){t.xos=n.xos,t.slice=n.id,t.creator=t.xos.user.id,o.createOnLocal(t).then(function(o){n.instance_total=n.instance_total+1,e.close()})},"class":"success"},{label:"Cancel",icon:"remove",cb:function(){e.dismiss("cancel")},"class":"warning"}],fields:{name:{type:"text",validators:{required:!0}},deployment:{type:"select",validators:{required:!0}},node:{type:"select",validators:{required:!0}},image:{type:"select",validators:{required:!0}},flavor:{type:"select",validators:{required:!0}},isolation:{type:"select",options:[{id:"vm",label:"VM"},{id:"container",label:"Container"},{id:"container_vm",label:"Container in VM"}],validators:{required:!0}}}}}],controllerAs:"vm",resolve:{slice:function(){return e}}})}}],filter:"field",order:!0},this.usersTableCfg={columns:[{label:"Name",type:"custom",formatter:function(e){return e.firstname+" "+e.lastname}},{label:"E-Mail",prop:"email"},{label:"User Name",prop:"username"},{label:"Time Zone",prop:"timezone"},{label:"L-XOS",type:"custom",formatter:function(e){return e.xos.name}}],actions:[{label:"open locally",icon:"open",cb:this.openLocally("user")}],filter:"field",order:!0},this.toggleXos=function(e){o.findIndex(i,{id:e.id})>-1?(e.active=!1,o.remove(i,{id:e.id})):(e.active=!0,i.push(e)),s.login().then(function(){return n.all([a.queryFromAll().$promise,r.queryFromAll().$promise])}).then(function(e){var n=_slicedToArray(e,2);u.localSlices=n[0],u.localUsers=n[1]})["catch"](function(e){console.log(e)})}}]}}),angular.module("xos.globalXos").run(["$templateCache",function(e){e.put("templates/xos-list.tpl.html",'<div class="container">\n  <div class="row">\n    <h2>Select XOS to synch:</h2>\n  </div>\n  <div class="row">\n    <div class="col-xs-12">\n      <h2>G-XOS Slices:</h2>\n    </div>\n    <div class="col-xs-12">\n      <xos-table\n              config="vm.gSliceTableCgf"\n              data="vm.gSlices">\n      </xos-table>\n    </div>\n  </div>\n  <div class="row">\n    <div class="col-xs-12">\n      <h2>Get L-XOS details:</h2>\n    </div>\n    <div\n      ng-repeat="xos in vm.xoss"\n      class="col-sm-2">\n      <div\n        class="well"\n        ng-class="{active: xos.active}"\n        ng-click="vm.toggleXos(xos)">\n          {{xos.humanReadableName || xos.name}}\n      </div>\n    </div>\n  </div>\n  <div class="row" ng-if="vm.localSlices.length > 0">\n    <div class="col-xs-12">\n      <h2>L-XOS Slices:</h2>\n    </div>\n    <div class="col-xs-12">\n      <xos-table\n        config="vm.sliceTableCfg"\n        data="vm.localSlices">\n      </xos-table>\n    </div>\n  </div>\n  <div class="row" ng-if="vm.localSlices.length > 0">\n    <div class="col-xs-12">\n      <h2>L-XOS Users:</h2>\n    </div>\n    <div class="col-xs-12">\n      <xos-table\n        config="vm.usersTableCfg"\n        data="vm.localUsers">\n      </xos-table>\n    </div>\n  </div>\n</div>\n<script type="text/ng-template" id="addInstance.html">\n  <div class="modal-header">\n      <h3 class="modal-title" id="modal-title">Add Instance to {{vm.slice.name}} on {{vm.slice.xos.name}}</h3>\n  </div>\n  <div class="modal-body" id="modal-body">\n    <xos-form ng-model="vm.model" config="vm.config"></xos-form>\n  </div>\n</script>\n<script type="text/ng-template" id="listInstances.html">\n  <div class="modal-header">\n    <h3 class="modal-title" id="modal-title">Get Instances from {{vm.slice.name}} on {{vm.slice.xos.name}}</h3>\n  </div>\n  <div class="modal-body" id="modal-body">\n    <xos-table data="vm.instances" config="vm.config"></xos-table>\n  </div>\n  <div class="modal-footer">\n    <a ng-click="vm.close()" class="btn btn-warning">Close</a>\n  </div>\n</script>')}]),function(){angular.module("xos.globalXos").service("Controllers",["$resource",function(e){return e("/api/core/controllers/:id",{id:"@id"})}]).service("GXOS",["$q","$resource","_","LXOS",function(e,n,o,t){var i=this;this.attachXosToItem=function(e){var n=arguments.length<=1||void 0===arguments[1]?t:arguments[1];return o.map(e,function(e,t){var i=n[t];return o.map(e,function(e){return e.xos=i,e})})},this.buildQueryEndpoint=function(s){var a=arguments.length<=1||void 0===arguments[1]?t:arguments[1];return function(){var t=e.defer(),r=[],l=[];return o.forEach(a,function(e,o){var t=n(""+e.auth_url+s,{id:"@id"},{query:{isArray:!0,headers:{Authorization:"Basic "+btoa(e.admin_user+":"+e.admin_password)}}});r.push(t),l.push(r[o].query().$promise)}),e.all(l).then(function(e){e=i.attachXosToItem(e,a),t.resolve(o.flatten(e))})["catch"](t.reject),{$promise:t.promise}}},this.buildLocalResource=function(e,o){var t={Authorization:"Basic "+btoa(o.admin_user+":"+o.admin_password)},i=n(""+o.auth_url+e,{id:"@id"},{query:{isArray:!0,headers:t}});return i}}]).service("LocalAuth",["$q","$http","_","LXOS",function(e,n,o,t){var i="api/utility/login/";this.login=function(){var s=e.defer(),a=[];return o.forEach(t,function(e,o){var t=n.post(""+e.auth_url+i,{username:e.admin_user,password:e.admin_password});a.push(t)}),e.all(a).then(function(e){o.forEach(e,function(e,n){t[n].xoscsrftoken=e.data.xoscsrftoken,t[n].xossessionid=e.data.xossessionid,t[n].user=JSON.parse(e.data.user)}),s.resolve()})["catch"](function(e){s.reject(e)}),s.promise}}]).service("LocalSlices",["GXOS",function(e){var n="api/utility/slicesplus/";this.queryFromAll=function(o){return e.buildQueryEndpoint(n,o)()}}]).service("LocalUsers",["GXOS",function(e){var n="api/core/users/";this.queryFromAll=e.buildQueryEndpoint(n)}]).service("LocalInstances",["$q","$http","GXOS","LocalDeployments","LocalImages","LocalFlavor","LocalNode",function(e,n,o,t,i,s,a){var r="api/core/instances/";this.queryFromAll=function(e){return o.buildQueryEndpoint(r,e)()},this.createOnLocal=function(o){var t=e.defer(),i=o.xos;return delete o.xos,n.post(""+i.auth_url+r,o,{headers:{Authorization:"Basic "+btoa(i.admin_user+":"+i.admin_password)}}).then(function(e){t.resolve(e)})["catch"](function(e){t.reject(e)}),t.promise},this.getFromLocal=function(o,t){var i=e.defer();return n.get(""+o.auth_url+r,{params:t,headers:{Authorization:"Basic "+btoa(o.admin_user+":"+o.admin_password)}}).then(function(e){i.resolve(e.data)})["catch"](function(e){i.reject(e)}),i.promise},this.getLocalInfo=function(n){var o=e.defer();return e.all([t.queryFromLocal(n),i.queryFromLocal(n),s.queryFromLocal(n),a.queryFromLocal(n)]).then(function(e){e=_.map(e,function(e){return _.map(e,function(e){return{id:e.id,label:e.name}})}),o.resolve(e)})["catch"](o.reject),o.promise}}]).service("LocalDeployments",["$q","$http",function(e,n){var o="api/core/deployments/";this.queryFromLocal=function(t){var i=e.defer();return n.get(""+t.auth_url+o,{headers:{Authorization:"Basic "+btoa(t.admin_user+":"+t.admin_password)}}).then(function(e){i.resolve(e.data)})["catch"](function(e){i.reject(e)}),i.promise}}]).service("LocalImages",["$q","$http",function(e,n){var o="api/core/images/";this.queryFromLocal=function(t){var i=e.defer();return n.get(""+t.auth_url+o,{headers:{Authorization:"Basic "+btoa(t.admin_user+":"+t.admin_password)}}).then(function(e){i.resolve(e.data)})["catch"](function(e){i.reject(e)}),i.promise}}]).service("LocalFlavor",["$q","$http",function(e,n){var o="api/core/flavors/";this.queryFromLocal=function(t){var i=e.defer();return n.get(""+t.auth_url+o,{headers:{Authorization:"Basic "+btoa(t.admin_user+":"+t.admin_password)}}).then(function(e){i.resolve(e.data)})["catch"](function(e){i.reject(e)}),i.promise}}]).service("LocalNode",["$q","$http",function(e,n){var o="api/core/nodes/";this.queryFromLocal=function(t){var i=e.defer();return n.get(""+t.auth_url+o,{headers:{Authorization:"Basic "+btoa(t.admin_user+":"+t.admin_password)}}).then(function(e){i.resolve(e.data)})["catch"](function(e){i.reject(e)}),i.promise}}])}(),angular.module("xos.globalXos").run(["$location",function(e){e.path("/")}]);
\ No newline at end of file