Reading subscribers and not removing tenants

Change-Id: I942c05d8a511d1f9f67f0b628c62ccd0242ac921
diff --git a/xos/gui/conf/proxy.js b/xos/gui/conf/proxy.js
index c410f04..aeed199 100644
--- a/xos/gui/conf/proxy.js
+++ b/xos/gui/conf/proxy.js
@@ -1,11 +1,13 @@
 const httpProxy = require('http-proxy');
 
+const target = process.env.PROXY || '192.168.46.100';
+
 const apiProxy = httpProxy.createProxyServer({
-  target: 'http://192.168.46.100:9101'
+  target: `http://${target}`
 });
 
 const staticFilesProxy = httpProxy.createProxyServer({
-  target: 'http://192.168.46.100/spa'
+  target: `http://${target}/spa`
 });
 
 apiProxy.on('error', (error, req, res) => {
diff --git a/xos/gui/src/app/components/vtr/vtr-dashboard.ts b/xos/gui/src/app/components/vtr/vtr-dashboard.ts
index 3db80d1..92e6b48 100644
--- a/xos/gui/src/app/components/vtr/vtr-dashboard.ts
+++ b/xos/gui/src/app/components/vtr/vtr-dashboard.ts
@@ -13,6 +13,7 @@
   public truckroll: any;
   public loader: boolean;
   public error: string;
+  private tenants = [];
   private Truckroll;
 
   constructor(
@@ -24,12 +25,19 @@
     this.Truckroll = this.XosVtrTruckroll.getResource();
 
     // load subscribers
-    this.XosModelStore.query('Subscribers')
+    this.XosModelStore.query('CordSubscriberRoot')
       .subscribe(
         res => {
           this.subscribers = res;
         }
       );
+
+    this.XosModelStore.query('Tenant')
+      .subscribe(
+        res => {
+          this.tenants = res;
+        }
+      );
   }
 
   public runTest() {
@@ -43,6 +51,10 @@
     delete this.error;
 
     this.truckroll.target_type_id = this.getSubscriberContentTypeId(this.truckroll.target_id);
+    
+    this.truckroll.subscriber_tenant_id = this.getVsgTenantForSubscriber(this.truckroll.target_id);
+
+    console.log(this.truckroll);
 
     const test = new this.Truckroll(this.truckroll);
     this.loader = true;
@@ -52,6 +64,12 @@
     });
   };
 
+  private getVsgTenantForSubscriber(subscriberId: number): number {
+    const voltTenant = _.find(this.tenants, {subscriber_root_id: subscriberId});
+    const vsgTenant = _.find(this.tenants, {subscriber_tenant: voltTenant.id});
+    return vsgTenant.id;
+  }
+
   private getSubscriberContentTypeId(subscriberId: number) {
     return _.find(this.subscribers, {id: subscriberId}).self_content_type_id;
   }
@@ -77,7 +95,7 @@
             ) {
             this.truckroll = angular.copy(testResult);
             this.loader = false;
-            this.Truckroll.delete({id: id});
+            // this.Truckroll.delete({id: id});
           }
           // else keep polling
           else {
diff --git a/xos/gui/xos-sample-gui-extension.yaml b/xos/gui/xos-sample-gui-extension.yaml
deleted file mode 100644
index 2dcb037..0000000
--- a/xos/gui/xos-sample-gui-extension.yaml
+++ /dev/null
@@ -1,15 +0,0 @@
-tosca_definitions_version: tosca_simple_yaml_1_0
-
-description: Persiste xos-sample-gui-extension
-
-imports:
-   - custom_types/xos.yaml
-
-topology_template:
-  node_templates:
-
-    # UI Extension
-    xos-sample-gui-extension:
-      type: tosca.nodes.XOSGuiExtension
-      properties:
-        files: /spa/extensions/xos-sample-gui-extension/vendor.js, /spa/extensions/xos-sample-gui-extension/app.js