merge
diff --git a/views/ngXosLib/xosHelpers/src/ui_components/dumbComponents/field/field.component.js b/views/ngXosLib/xosHelpers/src/ui_components/dumbComponents/field/field.component.js
index 2c249cc..fa02dbb 100644
--- a/views/ngXosLib/xosHelpers/src/ui_components/dumbComponents/field/field.component.js
+++ b/views/ngXosLib/xosHelpers/src/ui_components/dumbComponents/field/field.component.js
@@ -228,9 +228,6 @@
         if(!$attrs.ngModel){
           throw new Error('[xosField] Please provide an ng-model');
         }
-        if(this.field.type === 'select' && !this.ngModel ){
-          //this.ngModel = this.field.options[0].id;
-        }
         this.getType = XosFormHelpers._getFieldFormat;
         this.formatLabel = LabelFormatter.format;
 
diff --git a/views/ngXosLib/xosHelpers/src/ui_components/dumbComponents/form/form.component.js b/views/ngXosLib/xosHelpers/src/ui_components/dumbComponents/form/form.component.js
index a2ee7d5..ca6d7d8 100644
--- a/views/ngXosLib/xosHelpers/src/ui_components/dumbComponents/form/form.component.js
+++ b/views/ngXosLib/xosHelpers/src/ui_components/dumbComponents/form/form.component.js
@@ -210,10 +210,7 @@
       template: `
         <form name="vm.{{vm.config.formName || 'form'}}" novalidate>
           <div class="form-group" ng-repeat="(name, field) in vm.formField">
-          <!--{{vm.ngModel[name] | json}}-->
             <xos-field name="name" field="field" ng-model="vm.ngModel[name]"></xos-field>
-            <!--<pre>{{vm[vm.config.formName] || 'form'  | json }}</pre>-->
-            <!--{{field}}-->
             <xos-validation field="vm[vm.config.formName || 'form'][name]" form = "vm[vm.config.formName || 'form']"></xos-validation>
             <div class="alert alert-info" ng-show="(field.hint).length >0" role="alert">{{field.hint}}</div>
           </div>
diff --git a/views/ngXosViews/tenant/src/index.html b/views/ngXosViews/tenant/src/index.html
index 16822bf..e1a83d4 100644
--- a/views/ngXosViews/tenant/src/index.html
+++ b/views/ngXosViews/tenant/src/index.html
@@ -8,14 +8,10 @@
 <link rel="stylesheet" href="/css/main.css">
 <link rel="stylesheet" href="/../../../xos/core/static/xosNgLib.css">
 <!-- endinject -->
-<p>
-  hello
-</p>
+
 
 <div ng-app="xos.tenant" id="xosTenant" class="container-fluid">
-  <div ui-sref="createslice"></div>
-  <div ui-view></div>
-  <div></div>
+   <div ui-view></div>
 </div>
 
 <!-- bower:js -->
diff --git a/views/ngXosViews/tenant/src/js/main.js b/views/ngXosViews/tenant/src/js/main.js
index e5f702e..65fc90d 100644
--- a/views/ngXosViews/tenant/src/js/main.js
+++ b/views/ngXosViews/tenant/src/js/main.js
@@ -64,7 +64,6 @@
       })
       .then((users) => {
         this.slices = users;
-        //console.log(this.sites,this.slices);
         this.site_list = this.returnData(this.sites, this.slices);
       })
       .catch((e) => {
@@ -73,8 +72,6 @@
 
 
       this.returnData = (sites, slices) => {
-        //console.log(sites,slices);
-        //console.log(sites.length)
         var i, j=0;
         var site_list=[];
 
@@ -93,11 +90,9 @@
             'instance_total': instance_t,
             'instance_total_ready': instance_t_r
           };
-          //console.log(sites[i].id);
           site_list.push(data_sites);
         }
         return site_list;
-        //this.site_list = site_list;
       }
     }
   };
@@ -151,10 +146,6 @@
     controllerAs: 'cs',
     templateUrl: 'templates/createslice.html',
     controller: function(Slices, SlicesPlus, Sites, Images, $stateParams, $http, $state, $q){
-      //var sites;
-      //console.log(this.users.name);
-
-      //console.log(this.config);
       this.config = {
         exclude: ['site', 'password', 'last_login', 'mount_data_sets', 'default_flavor', 'creator', 'exposed_ports', 'networks', 'omf_friendly', 'omf_friendly', 'no_sync', 'no_policy', 'lazy_blocked', 'write_protect', 'deleted', 'backend_status', 'backend_register', 'policed', 'enacted', 'updated', 'created', 'validators', 'humanReadableName'],
         formName: 'SliceDetails',
@@ -185,9 +176,9 @@
             label: 'Save and add another',
             icon: 'ok', // refers to bootstraps glyphicon
             cb: (model, form) => {
-             saveform(model,form).then(()=> {
-               $state.go('createslice',{site : this.model.site,id : ''});
-             });
+              saveform(model,form).then(()=> {
+                $state.go('createslice',{site : this.model.site,id : ''});
+              });
             },
             class: 'primary'
           }
@@ -314,7 +305,6 @@
 
         }
       };
-      //console.log(this.config.exclude);
       var data;
       Images.query().$promise
           .then((users) => {
@@ -336,7 +326,6 @@
           retObj.push(optVal);
 
         }
-        //console.log(retObj);
         return retObj;
       };
 
@@ -347,8 +336,6 @@
         delete this.config.fields['site'];
         this.config.exclude.push('site');
 
-        //console.log(this.config.exclude);
-
         Slices.get({id: $stateParams.id}).$promise
           .then((users) => {
             this.users = users;
@@ -368,8 +355,6 @@
         $http.get('/xoslib/tenantview/').
         success((data) => {
           this.userList = data;
-          console.log(this.userList);
-          //this.model={}
           this.model['creator'] = this.userList.current_user_id;
 
         });
@@ -382,7 +367,6 @@
         Sites.query().$promise
       .then((users) => {
         this.users_site = users;
-        //console.log(users);
         this.optionVal = this.setData(this.users_site, {field1: 'id', field2: 'name'});
         this.config.fields['site'].options = this.optionVal;
         //= this.optionVal;
@@ -398,37 +382,37 @@
       { // receive the model
         var deferred = $q.defer();
         delete model.networks;
-              if (form.$valid )
-              {
-                if(model.id){
-                  var pr = Slices.update(model).$promise;
-                }
-                else{
-                  var pr = Slices.save(model).$promise;
-                }
-                pr.then((users) => {
-                  this.model = users;
-                  //data = users;
-                  //this.model = this.users;
-                  this.config.feedback.show = true;
-                  deferred.resolve(this.model);
-                })
-                .catch((e) => {
-                  this.config.feedback.show = true;
-                  this.config.feedback.type='danger';
-                  if(e.data && e.data.detail )
-                  {
-                    this.config.feedback.message = e.data.detail;
-                  }
-                  else {
-                    this.config.feedback.message=e.statusText;
-                  }
-                  deferred.reject(e);
-                });
-              }
-
-              return  deferred.promise;
+        if (form.$valid )
+        {
+          if(model.id){
+            var pr = Slices.update(model).$promise;
+          }
+          else{
+            var pr = Slices.save(model).$promise;
+          }
+          pr.then((users) => {
+            this.model = users;
+            //data = users;
+            //this.model = this.users;
+            this.config.feedback.show = true;
+            deferred.resolve(this.model);
+          })
+          .catch((e) => {
+            this.config.feedback.show = true;
+            this.config.feedback.type='danger';
+            if(e.data && e.data.detail )
+            {
+              this.config.feedback.message = e.data.detail;
             }
+            else {
+              this.config.feedback.message=e.statusText;
+            }
+            deferred.reject(e);
+          });
+        }
+
+        return  deferred.promise;
+      }
     }
   };
 });
\ No newline at end of file
diff --git a/xos/core/xoslib/dashboards/xosTenant.html b/xos/core/xoslib/dashboards/xosTenant.html
index 1283a67..b083bde 100644
--- a/xos/core/xoslib/dashboards/xosTenant.html
+++ b/xos/core/xoslib/dashboards/xosTenant.html
@@ -4,14 +4,11 @@
 <!-- inject:css -->
 <link rel="stylesheet" href="/static/css/xosTenant.css">
 <!-- endinject -->
-<p>
-  hello
-</p>
+<<<<<<< HEAD
+
 
 <div ng-app="xos.tenant" id="xosTenant" class="container-fluid">
-  <div ui-sref="createslice"></div>
-  <div ui-view></div>
-  <div></div>
+   <div ui-view></div>
 </div>
 
 
diff --git a/xos/core/xoslib/static/js/vendor/ngXosHelpers.js b/xos/core/xoslib/static/js/vendor/ngXosHelpers.js
index 3842d35..bc83b29 100644
--- a/xos/core/xoslib/static/js/vendor/ngXosHelpers.js
+++ b/xos/core/xoslib/static/js/vendor/ngXosHelpers.js
@@ -1346,7 +1346,7 @@
         config: '=',
         ngModel: '='
       },
-      template: '\n        <form name="vm.{{vm.config.formName || \'form\'}}" novalidate>\n          <div class="form-group" ng-repeat="(name, field) in vm.formField">\n          <!--{{vm.ngModel[name] | json}}-->\n            <xos-field name="name" field="field" ng-model="vm.ngModel[name]"></xos-field>\n            <!--<pre>{{vm[vm.config.formName] || \'form\'  | json }}</pre>-->\n            <!--{{field}}-->\n            <xos-validation field="vm[vm.config.formName || \'form\'][name]" form = "vm[vm.config.formName || \'form\']"></xos-validation>\n            <div class="alert alert-info" ng-show="(field.hint).length >0" role="alert">{{field.hint}}</div>\n          </div>\n          <div class="form-group" ng-if="vm.config.actions">\n          <xos-alert config="vm.config.feedback" show="vm.config.feedback.show">{{vm.config.feedback.message}}</xos-alert>\n\n            <button role="button" href=""\n              ng-repeat="action in vm.config.actions"\n              ng-click="action.cb(vm.ngModel, vm[vm.config.formName || \'form\'])"\n              class="btn btn-{{action.class}}"\n              title="{{action.label}}">\n              <i class="glyphicon glyphicon-{{action.icon}}"></i>\n              {{action.label}}\n            </button>\n          </div>\n        </form>\n      ',
+      template: '\n        <form name="vm.{{vm.config.formName || \'form\'}}" novalidate>\n          <div class="form-group" ng-repeat="(name, field) in vm.formField">\n            <xos-field name="name" field="field" ng-model="vm.ngModel[name]"></xos-field>\n            <xos-validation field="vm[vm.config.formName || \'form\'][name]" form = "vm[vm.config.formName || \'form\']"></xos-validation>\n            <div class="alert alert-info" ng-show="(field.hint).length >0" role="alert">{{field.hint}}</div>\n          </div>\n          <div class="form-group" ng-if="vm.config.actions">\n          <xos-alert config="vm.config.feedback" show="vm.config.feedback.show">{{vm.config.feedback.message}}</xos-alert>\n\n            <button role="button" href=""\n              ng-repeat="action in vm.config.actions"\n              ng-click="action.cb(vm.ngModel, vm[vm.config.formName || \'form\'])"\n              class="btn btn-{{action.class}}"\n              title="{{action.label}}">\n              <i class="glyphicon glyphicon-{{action.icon}}"></i>\n              {{action.label}}\n            </button>\n          </div>\n        </form>\n      ',
       bindToController: true,
       controllerAs: 'vm',
       controller: ["$scope", "$log", "_", "XosFormHelpers", function controller($scope, $log, _, XosFormHelpers) {
@@ -1571,9 +1571,6 @@
         if (!$attrs.ngModel) {
           throw new Error('[xosField] Please provide an ng-model');
         }
-        if (this.field.type === 'select' && !this.ngModel) {
-          //this.ngModel = this.field.options[0].id;
-        }
         this.getType = XosFormHelpers._getFieldFormat;
         this.formatLabel = LabelFormatter.format;
 
diff --git a/xos/core/xoslib/static/js/xosTenant.js b/xos/core/xoslib/static/js/xosTenant.js
index 919e6f8..be4338c 100644
--- a/xos/core/xoslib/static/js/xosTenant.js
+++ b/xos/core/xoslib/static/js/xosTenant.js
@@ -1 +1 @@
-"use strict";angular.module("xos.tenant",["ngResource","ngCookies","ui.router","xos.helpers"]).config(["$stateProvider",function(e){e.state("user-list",{url:"/",template:"<users-list></users-list>"}).state("site",{url:"/site/:id",template:"<site-detail></site-detail>"}).state("createslice",{url:"/site/:site/slice/:id?",template:"<create-slice></create-slice>"})}]).config(["$httpProvider",function(e){e.interceptors.push("NoHyperlinks")}]).directive("usersList",function(){return{restrict:"E",scope:{},bindToController:!0,controllerAs:"vm",templateUrl:"templates/users-list.tpl.html",controller:["Sites","SlicesPlus",function(e,t){var i=this;this.tableConfig={columns:[{label:"Site1",prop:"name",link:function(e){return"/#/site/"+e.id}},{label:"Allocated",prop:"instance_total"},{label:"Ready",prop:"instance_total_ready"}]},e.query().$promise.then(function(e){return i.sites=e,t.query().$promise}).then(function(e){i.slices=e,i.site_list=i.returnData(i.sites,i.slices)})["catch"](function(e){throw new Error(e)}),this.returnData=function(e,t){var i,s=0,l=[];for(i=0;i<e.length;i++){var n=0,a=0;for(s=0;s<t.length;s++)null!=e[i].id&&null!=t[s].site&&e[i].id===t[s].site&&(n+=t[s].instance_total,a+=t[s].instance_total_ready);var r={id:e[i].id,name:e[i].name,instance_total:n,instance_total_ready:a};l.push(r)}return l}}]}}).directive("siteDetail",function(){return{restrict:"E",scope:{},bindToController:!0,controllerAs:"sl",templateUrl:"templates/slicelist.html",controller:["SlicesPlus","$stateParams",function(e,t){var i=this;this.siteId=t.id,this.tableConfig={columns:[{label:"Slice List",prop:"name",link:function(e){return"/#/site/"+e.site+"/slice/"+e.id}},{label:"Allocated",prop:"instance_total"},{label:"Ready",prop:"instance_total_ready"}]},e.query({site:t.id}).$promise.then(function(e){i.sliceList=e})["catch"](function(e){throw new Error(e)})}]}}).directive("createSlice",function(){return{restrict:"E",scope:{},bindToController:!0,controllerAs:"cs",templateUrl:"templates/createslice.html",controller:["Slices","SlicesPlus","Sites","Images","$stateParams","$http","$state","$q",function(e,t,i,s,l,n,a,r){var o=this;this.config={exclude:["site","password","last_login","mount_data_sets","default_flavor","creator","exposed_ports","networks","omf_friendly","omf_friendly","no_sync","no_policy","lazy_blocked","write_protect","deleted","backend_status","backend_register","policed","enacted","updated","created","validators","humanReadableName"],formName:"SliceDetails",feedback:{show:!1,message:"Form submitted successfully !!!",type:"success"},actions:[{label:"Save",icon:"ok",cb:function(e,t){d(e,t).then(function(){a.go("site",{id:o.model.site})})},"class":"success"},{label:"Save and continue editing",icon:"ok",cb:function(e,t){d(e,t)},"class":"primary"},{label:"Save and add another",icon:"ok",cb:function(e,t){d(e,t).then(function(){a.go("createslice",{site:o.model.site,id:""})})},"class":"primary"}],fields:{site:{label:"Site",type:"select",validators:{required:!0},hint:"The Site this Slice belongs to",options:[]},name:{label:"Name",type:"string",hint:"The Name of the Slice",validators:{required:!0}},serviceClass:{label:"ServiceClass",type:"select",validators:{required:!0},hint:"The Site this Slice belongs to",options:[{id:1,label:"Best effort"}]},enabled:{label:"Enabled",type:"boolean",hint:"Status for this Slice"},description:{label:"Description",type:"string",hint:"High level description of the slice and expected activities",validators:{required:!1,minlength:10}},service:{label:"Service",type:"select",validators:{required:!1},options:[{id:0,label:"--------"}]},slice_url:{label:"Slice url",type:"string",validators:{required:!1,minlength:10}},max_instances:{label:"Max Instances",type:"number",validators:{required:!1,min:0}},default_isolation:{label:"Default Isolation",type:"select",validators:{required:!1},options:[{id:"vm",label:"Virtual Machine"},{id:"container",label:"Container"},{id:"container_vm",label:"Container in VM"}]},default_image:{label:"Default image",type:"select",validators:{required:!1},options:[]},network:{label:"Network",type:"select",validators:{required:!1},options:[{id:"default",label:"Default"},{id:"host",label:"Host"},{id:"bridged",label:"Bridged"},{id:"noauto",label:"No Automatic Networks"}]}}};var c;s.query().$promise.then(function(e){o.users=e,c=o.users,o.optionValImg=o.setData(c,{field1:"id",field2:"name"}),o.config.fields.default_image.options=o.optionValImg})["catch"](function(e){throw new Error(e)}),this.setData=function(e,t){var i,s=[];for(i=0;i<e.length;i++){var l={id:e[i][t.field1],label:e[i][t.field2]};s.push(l)}return s},l.id?(delete this.config.fields.site,this.config.exclude.push("site"),e.get({id:l.id}).$promise.then(function(e){o.users=e,c=e,o.model=c})["catch"](function(e){throw new Error(e)})):(this.model={},n.get("/xoslib/tenantview/").success(function(e){o.userList=e,console.log(o.userList),o.model.creator=o.userList.current_user_id}),i.query().$promise.then(function(e){o.users_site=e,o.optionVal=o.setData(o.users_site,{field1:"id",field2:"name"}),o.config.fields.site.options=o.optionVal})["catch"](function(e){throw new Error(e)}));var d=function(t,i){var s=r.defer();if(delete t.networks,i.$valid){if(t.id)var l=e.update(t).$promise;else var l=e.save(t).$promise;l.then(function(e){o.model=e,o.config.feedback.show=!0,s.resolve(o.model)})["catch"](function(e){o.config.feedback.show=!0,o.config.feedback.type="danger",e.data&&e.data.detail?o.config.feedback.message=e.data.detail:o.config.feedback.message=e.statusText,s.reject(e)})}return s.promise}}]}}),angular.module("xos.tenant").run(["$templateCache",function(e){e.put("templates/createslice.html",'<!--<xos-table config="cs.tableConfig" data="cs.sites"></xos-table>-->\r\n<h2>Slice Details</h2>\r\n<hr></hr>\r\n<xos-form ng-model="cs.model" config="cs.config" ></xos-form>\r\n\r\n<!--<pre>-->\r\n<!--&lt;!&ndash;{{cs.users | json}}&ndash;&gt;-->\r\n\r\n<!--{{cs.users.name | json}}-->\r\n\r\n<!--</pre>-->'),e.put("templates/slicelist.html",'<!--<span ng-bind="siteNameSe"></span>-->\r\n<!--<xos-field></xos-field>-->\r\n<a class="addlink btn btn-info" ui-sref="createslice({site: sl.siteId})"><i class="glyphicon glyphicon-plus-sign"></i> Create Slice</a>\r\n<xos-table config="sl.tableConfig" data="sl.sliceList"></xos-table>\r\n<!--<div ui-view="sliceDetails"></div>-->\r\n<!--<pre>{{sl.users[0].site}}</pre>-->\r\n'),e.put("templates/users-list.tpl.html",'<xos-table config="vm.tableConfig" data="vm.site_list"></xos-table>')}]),angular.module("xos.tenant").run(["$location",function(e){e.path("/")}]);
\ No newline at end of file
+"use strict";angular.module("xos.tenant",["ngResource","ngCookies","ui.router","xos.helpers"]).config(["$stateProvider",function(e){e.state("user-list",{url:"/",template:"<users-list></users-list>"}).state("site",{url:"/site/:id",template:"<site-detail></site-detail>"}).state("createslice",{url:"/site/:site/slice/:id?",template:"<create-slice></create-slice>"})}]).config(["$httpProvider",function(e){e.interceptors.push("NoHyperlinks")}]).directive("usersList",function(){return{restrict:"E",scope:{},bindToController:!0,controllerAs:"vm",templateUrl:"templates/users-list.tpl.html",controller:["Sites","SlicesPlus",function(e,t){var i=this;this.tableConfig={columns:[{label:"Site1",prop:"name",link:function(e){return"/#/site/"+e.id}},{label:"Allocated",prop:"instance_total"},{label:"Ready",prop:"instance_total_ready"}]},e.query().$promise.then(function(e){return i.sites=e,t.query().$promise}).then(function(e){i.slices=e,i.site_list=i.returnData(i.sites,i.slices)})["catch"](function(e){throw new Error(e)}),this.returnData=function(e,t){var i,s=0,l=[];for(i=0;i<e.length;i++){var n=0,a=0;for(s=0;s<t.length;s++)null!=e[i].id&&null!=t[s].site&&e[i].id===t[s].site&&(n+=t[s].instance_total,a+=t[s].instance_total_ready);var r={id:e[i].id,name:e[i].name,instance_total:n,instance_total_ready:a};l.push(r)}return l}}]}}).directive("siteDetail",function(){return{restrict:"E",scope:{},bindToController:!0,controllerAs:"sl",templateUrl:"templates/slicelist.html",controller:["SlicesPlus","$stateParams",function(e,t){var i=this;this.siteId=t.id,this.tableConfig={columns:[{label:"Slice List",prop:"name",link:function(e){return"/#/site/"+e.site+"/slice/"+e.id}},{label:"Allocated",prop:"instance_total"},{label:"Ready",prop:"instance_total_ready"}]},e.query({site:t.id}).$promise.then(function(e){i.sliceList=e})["catch"](function(e){throw new Error(e)})}]}}).directive("createSlice",function(){return{restrict:"E",scope:{},bindToController:!0,controllerAs:"cs",templateUrl:"templates/createslice.html",controller:["Slices","SlicesPlus","Sites","Images","$stateParams","$http","$state","$q",function(e,t,i,s,l,n,a,r){var o=this;this.config={exclude:["site","password","last_login","mount_data_sets","default_flavor","creator","exposed_ports","networks","omf_friendly","omf_friendly","no_sync","no_policy","lazy_blocked","write_protect","deleted","backend_status","backend_register","policed","enacted","updated","created","validators","humanReadableName"],formName:"SliceDetails",feedback:{show:!1,message:"Form submitted successfully !!!",type:"success"},actions:[{label:"Save",icon:"ok",cb:function(e,t){d(e,t).then(function(){a.go("site",{id:o.model.site})})},"class":"success"},{label:"Save and continue editing",icon:"ok",cb:function(e,t){d(e,t)},"class":"primary"},{label:"Save and add another",icon:"ok",cb:function(e,t){d(e,t).then(function(){a.go("createslice",{site:o.model.site,id:""})})},"class":"primary"}],fields:{site:{label:"Site",type:"select",validators:{required:!0},hint:"The Site this Slice belongs to",options:[]},name:{label:"Name",type:"string",hint:"The Name of the Slice",validators:{required:!0}},serviceClass:{label:"ServiceClass",type:"select",validators:{required:!0},hint:"The Site this Slice belongs to",options:[{id:1,label:"Best effort"}]},enabled:{label:"Enabled",type:"boolean",hint:"Status for this Slice"},description:{label:"Description",type:"string",hint:"High level description of the slice and expected activities",validators:{required:!1,minlength:10}},service:{label:"Service",type:"select",validators:{required:!1},options:[{id:0,label:"--------"}]},slice_url:{label:"Slice url",type:"string",validators:{required:!1,minlength:10}},max_instances:{label:"Max Instances",type:"number",validators:{required:!1,min:0}},default_isolation:{label:"Default Isolation",type:"select",validators:{required:!1},options:[{id:"vm",label:"Virtual Machine"},{id:"container",label:"Container"},{id:"container_vm",label:"Container in VM"}]},default_image:{label:"Default image",type:"select",validators:{required:!1},options:[]},network:{label:"Network",type:"select",validators:{required:!1},options:[{id:"default",label:"Default"},{id:"host",label:"Host"},{id:"bridged",label:"Bridged"},{id:"noauto",label:"No Automatic Networks"}]}}};var c;s.query().$promise.then(function(e){o.users=e,c=o.users,o.optionValImg=o.setData(c,{field1:"id",field2:"name"}),o.config.fields.default_image.options=o.optionValImg})["catch"](function(e){throw new Error(e)}),this.setData=function(e,t){var i,s=[];for(i=0;i<e.length;i++){var l={id:e[i][t.field1],label:e[i][t.field2]};s.push(l)}return s},l.id?(delete this.config.fields.site,this.config.exclude.push("site"),e.get({id:l.id}).$promise.then(function(e){o.users=e,c=e,o.model=c})["catch"](function(e){throw new Error(e)})):(this.model={},n.get("/xoslib/tenantview/").success(function(e){o.userList=e,o.model.creator=o.userList.current_user_id}),i.query().$promise.then(function(e){o.users_site=e,o.optionVal=o.setData(o.users_site,{field1:"id",field2:"name"}),o.config.fields.site.options=o.optionVal})["catch"](function(e){throw new Error(e)}));var d=function(t,i){var s=r.defer();if(delete t.networks,i.$valid){if(t.id)var l=e.update(t).$promise;else var l=e.save(t).$promise;l.then(function(e){o.model=e,o.config.feedback.show=!0,s.resolve(o.model)})["catch"](function(e){o.config.feedback.show=!0,o.config.feedback.type="danger",e.data&&e.data.detail?o.config.feedback.message=e.data.detail:o.config.feedback.message=e.statusText,s.reject(e)})}return s.promise}}]}}),angular.module("xos.tenant").run(["$templateCache",function(e){e.put("templates/createslice.html",'<!--<xos-table config="cs.tableConfig" data="cs.sites"></xos-table>-->\r\n<h2>Slice Details</h2>\r\n<hr></hr>\r\n<xos-form ng-model="cs.model" config="cs.config" ></xos-form>\r\n\r\n<!--<pre>-->\r\n<!--&lt;!&ndash;{{cs.users | json}}&ndash;&gt;-->\r\n\r\n<!--{{cs.users.name | json}}-->\r\n\r\n<!--</pre>-->'),e.put("templates/slicelist.html",'<!--<span ng-bind="siteNameSe"></span>-->\r\n<!--<xos-field></xos-field>-->\r\n<a class="addlink btn btn-info" ui-sref="createslice({site: sl.siteId})"><i class="glyphicon glyphicon-plus-sign"></i> Create Slice</a>\r\n<xos-table config="sl.tableConfig" data="sl.sliceList"></xos-table>\r\n<!--<div ui-view="sliceDetails"></div>-->\r\n<!--<pre>{{sl.users[0].site}}</pre>-->\r\n'),e.put("templates/users-list.tpl.html",'<xos-table config="vm.tableConfig" data="vm.site_list"></xos-table>')}]),angular.module("xos.tenant").run(["$location",function(e){e.path("/")}]);