Creating different Observables for models inside store
Change-Id: Ic2b190cddf04dde25a9ca7ae9445e0e9d8da42f1
diff --git a/src/app/views/dashboard/dashboard.ts b/src/app/views/dashboard/dashboard.ts
index 776acf6..dc4fc1d 100644
--- a/src/app/views/dashboard/dashboard.ts
+++ b/src/app/views/dashboard/dashboard.ts
@@ -17,24 +17,15 @@
this.$state.go('login');
}
else {
- // this.store.query('node')
- // .subscribe((event) => {
- // console.log(`node`, event);
- // this.nodes = event.length;
- // });
+ this.store.query('node')
+ .subscribe((event) => this.nodes = event.length);
this.store.query('slice')
- .subscribe((event) => {
- // console.log('slice', event);
- this.slices = event.length;
- });
- // this.store.query('instance')
- // .subscribe((event) => {
- // console.log('isntance', event);
- // this.instances = event.length;
- // });
+ .subscribe((event) => this.slices = event.length);
+ this.store.query('instance')
+ .subscribe((event) => this.instances = event.length);
this.instances = 0;
- this.nodes = 2;
- this.slices = 3;
+ this.nodes = 0;
+ this.slices = 0;
}
}
}