diff --git a/views/ngXosViews/globalXos/src/js/main.js b/views/ngXosViews/globalXos/src/js/main.js
index 31effcc..16beca1 100644
--- a/views/ngXosViews/globalXos/src/js/main.js
+++ b/views/ngXosViews/globalXos/src/js/main.js
@@ -30,7 +30,7 @@
       const self = this;
       $q.all([
         Controllers.query({backend_type: 'CORD'}).$promise,
-        Slices.query().$promise // NOTE why this is queryFromAll??
+        Slices.query().$promise
       ])
       .then(res => {
         [this.xoss, this.gSlices] = res;
@@ -42,15 +42,218 @@
         }
       };
 
+      const getGlobalInstances = (item) => {
+        $uibModal.open({
+          animation: true,
+          size: 'lg',
+          templateUrl: 'listInstances.html',
+          controllerAs: 'vm',
+          resolve: {
+            slice: function () {
+              return {
+                name: item.name,
+                xos: {
+                  name: 'G-XOS'
+                }
+              };
+            }
+          },
+          controller: function($uibModalInstance, slice, LocalInstances, LocalSlices) {
+            this.slice = slice;
+
+            this.config = {
+              columns: [
+                {
+                  label: 'Name',
+                  prop: 'name',
+                }
+              ],
+              actions: [
+                {
+                  label: 'Add Instance',
+                  icon: 'remove',
+                  color: 'red',
+                  cb: (item) => {
+                    console.log(item);
+                    LocalInstances.deleteFromLocal(item)
+                    .then(() => {
+                      _.remove(this.instances, i => i.id === item.id);
+                    });
+                  }
+                }
+              ]
+            };
+
+            LocalSlices.queryFromAll(self.xoss).$promise
+            .then(slices => {
+              // keep only the slice that match the name
+              this.slicesId = slices
+                .filter(s => s.name.indexOf(this.slice.name) > -1)
+                .reduce((o, s) => {
+                  o[s.xos.id] = s.id;
+                  return o;
+                }, {});
+              return LocalInstances.queryFromAll(self.xoss).$promise;
+            })
+            .then(instances => {
+              this.instances = instances.filter(i => this.slicesId[i.xos.id] === i.slice);
+            })
+            .catch(e => {
+              this.instances = [];
+            });
+
+            this.close = () => {
+              $uibModalInstance.dismiss('cancel');
+            }
+          }
+        })
+      };
+
+      const createGlobalInstance = (item) => {
+        $uibModal.open({
+          animation: true,
+          size: 'lg',
+          templateUrl: 'addInstance.html',
+          controller: function($scope, $q, $uibModalInstance, slice, LocalInstances, LocalAuth){
+            this.slice = slice;
+
+            this.model = {
+              // isolation: 'vm'
+            };
+
+            let xos;
+
+            Controllers.query({backend_type: 'CORD'}).$promise
+            .then((xos) => {
+              this.xoss = xos;
+              this.config.fields['xos'].options = _.map(xos, item => {
+                return {id: item.id, label: item.name}
+              });
+            });
+
+            $scope.$watch(() => this.model.xos, () => {
+              if(!this.model.xos){
+                return;
+              }
+              xos = _.find(this.xoss, {id: this.model.xos});
+              LocalInstances.getLocalInfo(xos)
+              .then((res) => {
+                [
+                  this.config.fields['deployment'].options,
+                  this.config.fields['image'].options,
+                  this.config.fields['flavor'].options,
+                  this.config.fields['node'].options
+                ] = res;
+                return $q.all([
+                  LocalSlices.getLocalByName(xos, this.slice.name),
+                  LocalAuth.getUserByName(xos, xos.admin_user)
+                ]);
+              })
+              .then((res) => {
+                console.log('aaaa: ', res);
+                [this.localSlice, this.user] = res;
+              });
+            });
+
+
+            this.config = {
+              formName: 'instanceForm',
+              order: ['xos', 'name'],
+              excludedFields: ['xos', 'slice'],
+              actions: [
+                {
+                  label: 'Save',
+                  icon: 'ok',
+                  cb: (instance) => {
+                    instance.xos = xos;
+                    instance.slice = this.localSlice.id;
+                    instance.creator = this.user.id;
+                    LocalInstances.createOnLocal(instance)
+                    .then(res => {
+                      slice.instance_total = slice.instance_total + 1;
+                      $uibModalInstance.close();
+                    });
+                  },
+                  class: 'success'
+                },
+                {
+                  label: 'Cancel',
+                  icon: 'remove',
+                  cb: () => {
+                    $uibModalInstance.dismiss('cancel');
+                  },
+                  class: 'warning'
+                }
+              ],
+              fields: {
+                xos: {
+                  type: 'select',
+                  validators: {
+                    required: true
+                  }
+                },
+                name: {
+                  type: 'text',
+                  validators: {
+                    required: true
+                  }
+                },
+                deployment: {
+                  type: 'select',
+                  validators: {
+                    required: true
+                  }
+                },
+                node: {
+                  type: 'select',
+                  validators: {
+                    required: true
+                  }
+                },
+                image: {
+                  type: 'select',
+                  validators: {
+                    required: true,
+                  }
+                },
+                flavor: {
+                  type: 'select',
+                  validators: {
+                    required: true,
+                  }
+                },
+                isolation: {
+                  type: 'select',
+                  options: [
+                    {id: 'vm', label: 'VM'},
+                    {id: 'container', label: 'Container'},
+                    {id: 'container_vm', label: 'Container in VM'}
+                  ],
+                  validators: {
+                    required: true,
+                  }
+                },
+              }
+            };
+          },
+          controllerAs: 'vm',
+          resolve: {
+            slice: function () {
+              return item;
+            }
+          }
+        });
+      };
+
       const baseSliceCols = [
         {
           label: 'Name',
           prop: 'name',
         },
-        {
-          label: 'Mount Data Sets',
-          prop: 'mount_data_sets'
-        }
+        // {
+        //   label: 'Mount Data Sets',
+        //   prop: 'mount_data_sets'
+        // }
       ];
 
       const lXosSliceCols = [
@@ -77,58 +280,12 @@
           {
             label: 'Get Instances',
             icon: 'search',
-            cb: (item) => {
-              $uibModal.open({
-                animation: true,
-                size: 'lg',
-                templateUrl: 'listInstances.html',
-                controllerAs: 'vm',
-                resolve: {
-                  slice: function () {
-                    return {
-                      name: item.name,
-                      xos: {
-                        name: 'G-XOS'
-                      }
-                    };
-                  }
-                },
-                controller: function($uibModalInstance, slice, LocalInstances, LocalSlices) {
-                  this.slice = slice;
-
-                  this.config = {
-                    columns: [
-                      {
-                        label: 'Name',
-                        prop: 'name',
-                      }
-                    ]
-                  };
-
-                  LocalSlices.queryFromAll(self.xoss).$promise
-                  .then(slices => {
-                    // keep only the slice that match the name
-                    this.slicesId = slices
-                      .filter(s => s.name.indexOf(this.slice.name) > -1)
-                      .reduce((o, s) => {
-                        o[s.xos.id] = s.id;
-                        return o;
-                      }, {});
-                    return LocalInstances.queryFromAll(self.xoss).$promise;
-                  })
-                  .then(instances => {
-                    this.instances = instances.filter(i => this.slicesId[i.xos.id] === i.slice);
-                  })
-                  .catch(e => {
-                    this.instances = [];
-                  });
-
-                  this.close = () => {
-                    $uibModalInstance.dismiss('cancel');
-                  }
-                }
-              })
-            }
+            cb: getGlobalInstances
+          },
+          {
+            label: 'Add Instances',
+            icon: 'plus',
+            cb: createGlobalInstance
           },
         ]
       };
@@ -195,7 +352,7 @@
                   this.slice = slice;
 
                   this.model = {};
-
+                  console.log(slice);
                   LocalInstances.getLocalInfo(slice.xos)
                   .then((res) => {
                     [
@@ -216,7 +373,7 @@
                         cb: (instance) => {
                           instance.xos = slice.xos;
                           instance.slice = slice.id;
-                          instance.creator = instance.xos.user.id;
+                          instance.creator = this.user.id;
                           LocalInstances.createOnLocal(instance)
                           .then(res => {
                             slice.instance_total = slice.instance_total + 1;
diff --git a/views/ngXosViews/globalXos/src/js/rest.js b/views/ngXosViews/globalXos/src/js/rest.js
index 012daa8..2ad47bc 100644
--- a/views/ngXosViews/globalXos/src/js/rest.js
+++ b/views/ngXosViews/globalXos/src/js/rest.js
@@ -94,15 +94,58 @@
       });
 
       return d.promise;
+    };
+
+    this.getUserByName = (xos, username) => {
+      const d = $q.defer();
+      console.log(username);
+      $http.get(`${xos.auth_url}api/core/users/`, {
+        params: {
+          username: username
+        },
+        headers: {
+          Authorization: `Basic ${btoa(xos.admin_user + ':' + xos.admin_password)}`
+        }
+      })
+      .then((res) => {
+        d.resolve(res.data[0]);
+      })
+      .catch(e => {
+        d.reject(e);
+      });
+
+      return d.promise;
     }
   })
-  .service('LocalSlices', function(GXOS){
+  .service('LocalSlices', function($q, $http, GXOS){
     const baseUrl = `api/utility/slicesplus/`;
 
     // TODO build a global resource
     this.queryFromAll = (targets) => {
       return GXOS.buildQueryEndpoint(baseUrl, targets)();
     };
+
+    this.getLocalByName = (xos, sliceName) => {
+      const d = $q.defer();
+
+      $http.get(`${xos.auth_url}${baseUrl}`, {
+        // params: params,
+        headers: {
+          Authorization: `Basic ${btoa(xos.admin_user + ':' + xos.admin_password)}`
+        }
+      })
+      .then((res) => {
+        const slice = _.filter(res.data, (s) => {
+          return s.name.indexOf(sliceName) > -1;
+        });
+        d.resolve(slice[0]);
+      })
+      .catch(e => {
+        d.reject(e);
+      });
+
+      return d.promise;
+    };
   })
   .service('LocalUsers', function(GXOS){
     const baseUrl = `api/core/users/`;
@@ -155,6 +198,24 @@
       return d.promise;
     };
 
+    this.deleteFromLocal = (instance) => {
+      console.log('deleteFromLocal');
+      const d = $q.defer();
+      $http.delete(`${instance.xos.auth_url}${baseUrl}${instance.id}/`, {
+        headers: {
+          Authorization: `Basic ${btoa(instance.xos.admin_user + ':' + instance.xos.admin_password)}`
+        }
+      })
+        .then((inst) => {
+          d.resolve(inst.data);
+        })
+        .catch(e => {
+          d.reject(e);
+        });
+
+      return d.promise;
+    };
+
     this.getLocalInfo = (xos) => {
       const d = $q.defer();
       $q.all([
diff --git a/xos/core/xoslib/static/js/xosGlobalXos.js b/xos/core/xoslib/static/js/xosGlobalXos.js
index e699684..e665832 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:"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
+"use strict";var _slicedToArray=function(){function e(e,n){var o=[],t=!0,i=!1,a=void 0;try{for(var s,r=e[Symbol.iterator]();!(t=(s=r.next()).done)&&(o.push(s.value),!n||o.length!==n);t=!0);}catch(l){i=!0,a=l}finally{try{!t&&r["return"]&&r["return"]()}finally{if(i)throw a}}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,a,s,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=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,t,i){var a=this;this.slice=n,this.config={columns:[{label:"Name",prop:"name"}],actions:[{label:"Add Instance",icon:"remove",color:"red",cb:function(e){console.log(e),t.deleteFromLocal(e).then(function(){o.remove(a.instances,function(n){return n.id===e.id})})}}]},i.queryFromAll(d.xoss).$promise.then(function(e){return a.slicesId=e.filter(function(e){return e.name.indexOf(a.slice.name)>-1}).reduce(function(e,n){return e[n.xos.id]=n.id,e},{}),t.queryFromAll(d.xoss).$promise}).then(function(e){a.instances=e.filter(function(e){return a.slicesId[e.xos.id]===e.slice})})["catch"](function(e){a.instances=[]}),this.close=function(){e.dismiss("cancel")}}]})},f=function(e){l.open({animation:!0,size:"lg",templateUrl:"addInstance.html",controller:["$scope","$q","$uibModalInstance","slice","LocalInstances","LocalAuth",function(e,n,i,a,r,l){var c=this;this.slice=a,this.model={};var u=void 0;t.query({backend_type:"CORD"}).$promise.then(function(e){c.xoss=e,c.config.fields.xos.options=o.map(e,function(e){return{id:e.id,label:e.name}})}),e.$watch(function(){return c.model.xos},function(){c.model.xos&&(u=o.find(c.xoss,{id:c.model.xos}),r.getLocalInfo(u).then(function(e){var o=_slicedToArray(e,4);return c.config.fields.deployment.options=o[0],c.config.fields.image.options=o[1],c.config.fields.flavor.options=o[2],c.config.fields.node.options=o[3],n.all([s.getLocalByName(u,c.slice.name),l.getUserByName(u,u.admin_user)])}).then(function(e){console.log("aaaa: ",e);var n=_slicedToArray(e,2);c.localSlice=n[0],c.user=n[1]}))}),this.config={formName:"instanceForm",order:["xos","name"],excludedFields:["xos","slice"],actions:[{label:"Save",icon:"ok",cb:function(e){e.xos=u,e.slice=c.localSlice.id,e.creator=c.user.id,r.createOnLocal(e).then(function(e){a.instance_total=a.instance_total+1,i.close()})},"class":"success"},{label:"Cancel",icon:"remove",cb:function(){i.dismiss("cancel")},"class":"warning"}],fields:{xos:{type:"select",validators:{required:!0}},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}}})},h=[{label:"Name",prop:"name"}],v=[{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:h,filter:"field",order:!0,actions:[{label:"Get Instances",icon:"search",cb:m},{label:"Add Instances",icon:"plus",cb:f}]},this.sliceTableCfg={columns:h.concat(v),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={},console.log(n),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(i){i.xos=n.xos,i.slice=n.id,i.creator=t.user.id,o.createOnLocal(i).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)),a.login().then(function(){return n.all([s.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(a){var s=arguments.length<=1||void 0===arguments[1]?t:arguments[1];return function(){var t=e.defer(),r=[],l=[];return o.forEach(s,function(e,o){var t=n(""+e.auth_url+a,{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,s),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 a=e.defer(),s=[];return o.forEach(t,function(e,o){var t=n.post(""+e.auth_url+i,{username:e.admin_user,password:e.admin_password});s.push(t)}),e.all(s).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)}),a.resolve()})["catch"](function(e){a.reject(e)}),a.promise},this.getUserByName=function(o,t){var i=e.defer();return console.log(t),n.get(o.auth_url+"api/core/users/",{params:{username:t},headers:{Authorization:"Basic "+btoa(o.admin_user+":"+o.admin_password)}}).then(function(e){i.resolve(e.data[0])})["catch"](function(e){i.reject(e)}),i.promise}}]).service("LocalSlices",["$q","$http","GXOS",function(e,n,o){var t="api/utility/slicesplus/";this.queryFromAll=function(e){return o.buildQueryEndpoint(t,e)()},this.getLocalByName=function(o,i){var a=e.defer();return n.get(""+o.auth_url+t,{headers:{Authorization:"Basic "+btoa(o.admin_user+":"+o.admin_password)}}).then(function(e){var n=_.filter(e.data,function(e){return e.name.indexOf(i)>-1});a.resolve(n[0])})["catch"](function(e){a.reject(e)}),a.promise}}]).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,a,s){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.deleteFromLocal=function(o){console.log("deleteFromLocal");var t=e.defer();return n["delete"](""+o.xos.auth_url+r+o.id+"/",{headers:{Authorization:"Basic "+btoa(o.xos.admin_user+":"+o.xos.admin_password)}}).then(function(e){t.resolve(e.data)})["catch"](function(e){t.reject(e)}),t.promise},this.getLocalInfo=function(n){var o=e.defer();return e.all([t.queryFromLocal(n),i.queryFromLocal(n),a.queryFromLocal(n),s.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
