Fixed id mapping and setted up test env
diff --git a/gui/ngXosViews/serviceTopology/env/srikanth.js b/gui/ngXosViews/serviceTopology/env/srikanth.js
new file mode 100644
index 0000000..4ef1095
--- /dev/null
+++ b/gui/ngXosViews/serviceTopology/env/srikanth.js
@@ -0,0 +1,13 @@
+// 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://130.127.133.41:9999',
+ xoscsrftoken: 't2CRWsHu6ZgrhtLruizJlaJBLf84ZA2z',
+ xossessionid: 'kaohrwaypzq60n769e45bdmdyjxjpxrn'
+};
diff --git a/gui/ngXosViews/serviceTopology/karma.conf.js b/gui/ngXosViews/serviceTopology/karma.conf.js
index 83d3f63..5e312fa 100644
--- a/gui/ngXosViews/serviceTopology/karma.conf.js
+++ b/gui/ngXosViews/serviceTopology/karma.conf.js
@@ -26,8 +26,10 @@
// list of files / patterns to load in the browser
files: bowerComponents.concat([
- '../../static/js/xosApi.js',
- '../../static/js/vendor/ngXosHelpers.js',
+ '../../../xos/core/xoslib/static/js/vendor/ngXosVendor.js',
+ '../../../xos/core/xoslib/static/js/vendor/ngXosHelpers.js',
+ '../../../xos/core/xoslib/static/js/xosApi.js',
+ 'src/js/main.js',
'src/js/**/*.js',
'spec/**/*.mock.js',
'spec/**/*.test.js',
diff --git a/gui/ngXosViews/serviceTopology/package.json b/gui/ngXosViews/serviceTopology/package.json
index d7f3ca3..f77d454 100644
--- a/gui/ngXosViews/serviceTopology/package.json
+++ b/gui/ngXosViews/serviceTopology/package.json
@@ -21,25 +21,37 @@
"devDependencies": {
"browser-sync": "^2.9.11",
"del": "^2.0.2",
+ "eslint": "^1.8.0",
+ "eslint-plugin-angular": "linkmesrl/eslint-plugin-angular",
"gulp": "^3.9.0",
"gulp-angular-filesort": "^1.1.1",
"gulp-angular-templatecache": "^1.8.0",
"gulp-babel": "^5.3.0",
"gulp-concat": "^2.6.0",
+ "gulp-eslint": "^1.0.0",
"gulp-inject": "^3.0.0",
"gulp-minify-html": "^1.0.4",
+ "gulp-ng-annotate": "^1.1.0",
"gulp-rename": "^1.2.2",
"gulp-replace": "^0.5.4",
"gulp-uglify": "^1.4.2",
"http-proxy": "^1.12.0",
+ "jasmine-core": "^2.4.1",
+ "karma-jasmine": "^0.3.6",
+ "lodash": "^3.10.1",
"proxy-middleware": "^0.15.0",
"run-sequence": "^1.1.4",
"wiredep": "^3.0.0-beta",
"wrench": "^1.5.8",
- "gulp-ng-annotate": "^1.1.0",
- "lodash": "^3.10.1",
- "eslint": "^1.8.0",
- "eslint-plugin-angular": "linkmesrl/eslint-plugin-angular",
- "gulp-eslint": "^1.0.0"
+ "phantomjs": "^1.9.19",
+ "ink-docstrap": "^0.5.2",
+ "jasmine-core": "~2.3.4",
+ "karma": "^0.13.14",
+ "karma-babel-preprocessor": "~5.2.2",
+ "karma-coverage": "^0.5.3",
+ "karma-jasmine": "~0.3.6",
+ "karma-mocha-reporter": "~1.1.1",
+ "karma-ng-html2js-preprocessor": "^0.2.0",
+ "karma-phantomjs-launcher": "~0.2.1"
}
}
diff --git a/gui/ngXosViews/serviceTopology/src/js/services.js b/gui/ngXosViews/serviceTopology/src/js/services.js
index 21ca9aa..a39a1a6 100644
--- a/gui/ngXosViews/serviceTopology/src/js/services.js
+++ b/gui/ngXosViews/serviceTopology/src/js/services.js
@@ -35,9 +35,12 @@
const buildLevel = (tenants, services, rootService, parentName = null) => {
+ console.log(rootService);
+
const tree = {
name: rootService.humanReadableName,
parent: parentName,
+ service: rootService,
children: []
};
diff --git a/gui/ngXosViews/serviceTopology/src/js/topologyCanvas.js b/gui/ngXosViews/serviceTopology/src/js/topologyCanvas.js
index f7a70e5..0df7bd6 100644
--- a/gui/ngXosViews/serviceTopology/src/js/topologyCanvas.js
+++ b/gui/ngXosViews/serviceTopology/src/js/topologyCanvas.js
@@ -84,7 +84,6 @@
nodes.forEach(function(d) {
// position the child node horizontally
d.y = d.depth * (($window.innerWidth - (serviceTopologyConfig.widthMargin * 2)) / maxDepth);
- console.log(d.x);
});
// Update the nodes…
@@ -206,7 +205,7 @@
name: d.name
};
- Slice.query({service: d.id}).$promise
+ Slice.query({service: d.service.id}).$promise
.then(slices => {
_this.slices = slices;
@@ -237,7 +236,6 @@
})
.text(() => {
if(slices[0]){
- console.log(slices[0].humanReadableName);
return slices[0].humanReadableName;
}