Added single-site mock
diff --git a/views/ngXosViews/developer/env/single-site.js b/views/ngXosViews/developer/env/single-site.js
new file mode 100644
index 0000000..777c149
--- /dev/null
+++ b/views/ngXosViews/developer/env/single-site.js
@@ -0,0 +1,11 @@
+// This is a default configuration for your development environment.
+// You can duplicate this configuration for any of your Backend Environments.
+// Different configurations are loaded setting a NODE_ENV variable that contain the config file name.
+// `NODE_ENV=local npm start`
+//
+// If xoscsrftoken or xossessionid are not specified the browser value are used
+// (works only for local environment as both application are served on the same domain)
+
+module.exports = {
+ host: 'http://127.0.0.1:4000/'
+};
diff --git a/views/ngXosViews/developer/mocks/single-site.json b/views/ngXosViews/developer/mocks/single-site.json
new file mode 100644
index 0000000..827ddb5
--- /dev/null
+++ b/views/ngXosViews/developer/mocks/single-site.json
@@ -0,0 +1,14 @@
+{
+ "endpoints": [
+ {
+ "url": "slicesplus",
+ "base": "api/utility/",
+ "methods": ["GET"]
+ },
+ {
+ "url": "instances",
+ "base": "api/core/",
+ "methods": ["GET"]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/views/ngXosViews/developer/mocks/single-site/instances.json b/views/ngXosViews/developer/mocks/single-site/instances.json
new file mode 100644
index 0000000..6e1fad7
--- /dev/null
+++ b/views/ngXosViews/developer/mocks/single-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/single-site/slicesplus.json b/views/ngXosViews/developer/mocks/single-site/slicesplus.json
new file mode 100644
index 0000000..7ebf963
--- /dev/null
+++ b/views/ngXosViews/developer/mocks/single-site/slicesplus.json
@@ -0,0 +1,44 @@
+[
+ {
+ "id":1,
+ "name":"mysite_management1",
+ "site":1,
+ "max_instances":10,
+ "networks":[1, 2],
+ "current_user_roles":[
+
+ ],
+ "instance_distribution":{
+ "mysite": 1
+ },
+ "instance_distribution_ready":{
+
+ },
+ "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": 2
+ },
+ "instance_distribution_ready":{
+
+ },
+ "instance_total":6,
+ "instance_total_ready":5,
+ "instance_status":{
+
+ }
+ }
+]
\ No newline at end of file
diff --git a/views/ngXosViews/developer/package.json b/views/ngXosViews/developer/package.json
index 9a6eff2..928f41b 100644
--- a/views/ngXosViews/developer/package.json
+++ b/views/ngXosViews/developer/package.json
@@ -9,7 +9,8 @@
"build": "gulp",
"test": "karma start",
"test:ci": "karma start --single-run",
- "lint": "eslint src/js/"
+ "lint": "eslint src/js/",
+ "single-site": "easy-mocker -c ./mocks/single-site.json -d ./mocks/single-site"
},
"keywords": [
"XOS",
@@ -25,7 +26,7 @@
"css-mqpacker": "^4.0.0",
"csswring": "^4.2.1",
"del": "^2.0.2",
- "easy-mocker": "^1.2.0",
+ "easy-mocker": "^1.3.0",
"eslint": "^1.8.0",
"eslint-plugin-angular": "linkmesrl/eslint-plugin-angular",
"gulp": "^3.9.0",