Added mock environment
diff --git a/views/ngXosViews/developer/env/single-site.js b/views/ngXosViews/developer/env/mock.js
similarity index 100%
rename from views/ngXosViews/developer/env/single-site.js
rename to views/ngXosViews/developer/env/mock.js
diff --git a/views/ngXosViews/developer/mocks/single-site.json b/views/ngXosViews/developer/mocks/config.json
similarity index 100%
rename from views/ngXosViews/developer/mocks/single-site.json
rename to views/ngXosViews/developer/mocks/config.json
diff --git a/views/ngXosViews/developer/mocks/multi-site/instances.json b/views/ngXosViews/developer/mocks/multi-site/instances.json
new file mode 100644
index 0000000..6e1fad7
--- /dev/null
+++ b/views/ngXosViews/developer/mocks/multi-site/instances.json
@@ -0,0 +1,77 @@
+[
+ {
+ "humanReadableName":"Instance 1",
+ "id":1,
+ "slice":"1"
+ },
+ {
+ "humanReadableName":"Instance 2",
+ "id":2,
+ "slice":"1"
+ },
+ {
+ "humanReadableName":"Instance 3",
+ "id":3,
+ "slice":"1"
+ },
+ {
+ "humanReadableName":"Instance 4",
+ "id":4,
+ "slice":"1"
+ },
+ {
+ "humanReadableName":"Instance 5",
+ "id":5,
+ "slice":"1"
+ },
+ {
+ "humanReadableName":"Instance 6",
+ "id":6,
+ "slice":"1"
+ },
+ {
+ "humanReadableName":"Instance 7",
+ "id":7,
+ "slice":"1"
+ },
+ {
+ "humanReadableName":"Instance 8",
+ "id":8,
+ "slice":"1"
+ },
+ {
+ "humanReadableName":"Instance 9",
+ "id":9,
+ "slice":"1"
+ },
+ {
+ "humanReadableName":"Instance 10",
+ "id":10,
+ "slice":"2"
+ },
+ {
+ "humanReadableName":"Instance 11",
+ "id":11,
+ "slice":"2"
+ },
+ {
+ "humanReadableName":"Instance 12",
+ "id":12,
+ "slice":"2"
+ },
+ {
+ "humanReadableName":"Instance 13",
+ "id":13,
+ "slice":"2"
+ },
+ {
+ "humanReadableName":"Instance 14",
+ "id":14,
+ "slice":"2"
+ },
+ {
+ "humanReadableName":"Instance 15",
+ "id":15,
+ "slice":"2"
+ }
+]
\ No newline at end of file
diff --git a/views/ngXosViews/developer/mocks/multi-site/slicesplus.json b/views/ngXosViews/developer/mocks/multi-site/slicesplus.json
new file mode 100644
index 0000000..88e0f0c
--- /dev/null
+++ b/views/ngXosViews/developer/mocks/multi-site/slicesplus.json
@@ -0,0 +1,48 @@
+[
+ {
+ "id":1,
+ "name":"mysite_management1",
+ "site":1,
+ "max_instances":10,
+ "networks":[1, 2],
+ "current_user_roles":[
+
+ ],
+ "instance_distribution":{
+ "mysite": 4,
+ "anothersite": 5
+ },
+ "instance_distribution_ready":{
+ "mysite": 3,
+ "anothersite": 1
+ },
+ "instance_total":9,
+ "instance_total_ready":4,
+ "instance_status":{
+
+ }
+ },
+ {
+ "id":2,
+ "name":"mysite_management2",
+ "site":1,
+ "max_instances":10,
+ "networks":[2, 3, 4],
+ "current_user_roles":[
+
+ ],
+ "instance_distribution":{
+ "mysite": 3,
+ "anothersite": 3
+ },
+ "instance_distribution_ready":{
+ "mysite": 2,
+ "anothersite": 3
+ },
+ "instance_total":6,
+ "instance_total_ready":5,
+ "instance_status":{
+
+ }
+ }
+]
\ No newline at end of file
diff --git a/views/ngXosViews/developer/mocks/single-site/slicesplus.json b/views/ngXosViews/developer/mocks/single-site/slicesplus.json
index 7ebf963..0346421 100644
--- a/views/ngXosViews/developer/mocks/single-site/slicesplus.json
+++ b/views/ngXosViews/developer/mocks/single-site/slicesplus.json
@@ -9,7 +9,7 @@
],
"instance_distribution":{
- "mysite": 1
+ "mysite": 9
},
"instance_distribution_ready":{
@@ -30,7 +30,7 @@
],
"instance_distribution":{
- "mysite": 2
+ "mysite": 6
},
"instance_distribution_ready":{
diff --git a/views/ngXosViews/developer/package.json b/views/ngXosViews/developer/package.json
index 928f41b..f28682f 100644
--- a/views/ngXosViews/developer/package.json
+++ b/views/ngXosViews/developer/package.json
@@ -10,7 +10,8 @@
"test": "karma start",
"test:ci": "karma start --single-run",
"lint": "eslint src/js/",
- "single-site": "easy-mocker -c ./mocks/single-site.json -d ./mocks/single-site"
+ "single-site": "easy-mocker -c ./mocks/config.json -d ./mocks/single-site",
+ "multi-site": "easy-mocker -c ./mocks/config.json -d ./mocks/multi-site"
},
"keywords": [
"XOS",
diff --git a/views/ngXosViews/developer/src/js/main.js b/views/ngXosViews/developer/src/js/main.js
index 944e74b..c4ddcd8 100644
--- a/views/ngXosViews/developer/src/js/main.js
+++ b/views/ngXosViews/developer/src/js/main.js
@@ -63,10 +63,14 @@
formatter: item => `${item.instance_total_ready} / ${item.instance_total}`
},
{
- label: 'Sites',
+ label: 'Total Instances per Sites',
type: 'object',
prop: 'instance_distribution'
- // formatter: item => item.instance_distribution
+ },
+ {
+ label: 'Active Instances per Sites',
+ type: 'object',
+ prop: 'instance_distribution_ready'
},
{
label: 'Networks',