Changed Fabric Icon to Switch Icons from ONOS GUI
diff --git a/views/ngXosViews/mcordTopology/package.json b/views/ngXosViews/mcordTopology/package.json
index 9130eae..b2606c2 100644
--- a/views/ngXosViews/mcordTopology/package.json
+++ b/views/ngXosViews/mcordTopology/package.json
@@ -9,7 +9,8 @@
"build": "gulp",
"test": "karma start",
"lint": "eslint src/js/",
- "mocks": "easy-mocker -c ./mocks/mcord.conf.json -d ./mocks/data"
+ "mocks": "easy-mocker -c ./mocks/mcord.conf.json -d ./mocks/data",
+ "dev": "NODE_ENV=mock gulp serve"
},
"keywords": [
"XOS",
@@ -22,7 +23,7 @@
"devDependencies": {
"browser-sync": "^2.9.11",
"del": "^2.0.2",
- "easy-mocker": "^1.1.1",
+ "easy-mocker": "^1.2.0",
"eslint": "^1.8.0",
"eslint-plugin-angular": "linkmesrl/eslint-plugin-angular",
"gulp": "^3.9.0",
diff --git a/views/ngXosViews/mcordTopology/src/css/mcord.css b/views/ngXosViews/mcordTopology/src/css/mcord.css
index 567318f..80b7d92 100644
--- a/views/ngXosViews/mcordTopology/src/css/mcord.css
+++ b/views/ngXosViews/mcordTopology/src/css/mcord.css
@@ -21,8 +21,9 @@
}
.fabric {
- stroke: #000;
- fill: #1F77B4;
+ stroke: none;
+ fill: #123456;
+ fill-rule: evenodd;
}
.fabric-container {
@@ -36,11 +37,6 @@
fill: #FF7F0E;
}
-.bbu text {
- font-size: 10px;
- stroke: #000;
-}
-
.rru {
stroke: #000;
fill: #FFBB78;
@@ -56,7 +52,11 @@
stroke: #000;
}
-.MME text, .SGW text, .PGW text {
+.bbu text,
+.MME text,
+.SGW text,
+.PGW text {
font-size: 10px;
- stroke: #000;
+ stroke-width: 0;
+ fill: #000;
}
\ No newline at end of file
diff --git a/views/ngXosViews/mcordTopology/src/index.html b/views/ngXosViews/mcordTopology/src/index.html
index 84baae5..691a869 100644
--- a/views/ngXosViews/mcordTopology/src/index.html
+++ b/views/ngXosViews/mcordTopology/src/index.html
@@ -32,5 +32,5 @@
<script src="/api/ng-hpcapi.js"></script>
<script src="/.tmp/main.js"></script>
<script src="/.tmp/static.data.js"></script>
-<script src="/.tmp/bbu.js"></script>
+<script src="/.tmp/node_drawer.js"></script>
<!-- endinject -->
diff --git a/views/ngXosViews/mcordTopology/src/js/bbu.js b/views/ngXosViews/mcordTopology/src/js/node_drawer.js
similarity index 90%
rename from views/ngXosViews/mcordTopology/src/js/bbu.js
rename to views/ngXosViews/mcordTopology/src/js/node_drawer.js
index 30e9d2f..14bdf99 100644
--- a/views/ngXosViews/mcordTopology/src/js/bbu.js
+++ b/views/ngXosViews/mcordTopology/src/js/node_drawer.js
@@ -1,7 +1,7 @@
'use strict';
angular.module('xos.mcordTopology')
-.service('NodeDrawer', function(){
+.service('NodeDrawer', function(TopologyElements){
const duration = 500;
@@ -99,21 +99,27 @@
};
this.drawFabric = (nodes) => {
- nodes.append('rect')
+ nodes
+ .append('rect')
+ .attr({
+ width: 30,
+ height: 30,
+ x: -15,
+ y: -15
+ });
+
+ nodes
+ .append('path')
.attr({
class: d => d.type,
- width: 0,
- height: 0,
- x: -15,
- y: -15,
- opacity: 0
+ opacity: 0,
+ d: () => TopologyElements.icons.switch,
+ transform: `translate(-22, -22), scale(0.4)`
})
.transition()
.duration(duration)
// .delay((d, i) => i * (duration / 2))
.attr({
- width: 30,
- height: 30,
opacity: 1
});
};
diff --git a/views/ngXosViews/mcordTopology/src/js/static.data.js b/views/ngXosViews/mcordTopology/src/js/static.data.js
index 8dbca46..c38239d 100644
--- a/views/ngXosViews/mcordTopology/src/js/static.data.js
+++ b/views/ngXosViews/mcordTopology/src/js/static.data.js
@@ -53,5 +53,11 @@
source: 'fabric3',
target: 'fabric2'
}
- ]
+ ],
+ icons: {
+ switch: `M10,20a10,10,0,0,1,10-10h70a10,10,0,0,1,10,10v70a10,10,
+ 0,0,1-10,10h-70a10,10,0,0,1-10-10zM60,26l12,0,0-8,18,13-18,13,0
+ -8-12,0zM60,60l12,0,0-8,18,13-18,13,0-8-12,0zM50,40l-12,0,0-8
+ -18,13,18,13,0-8,12,0zM50,74l-12,0,0-8-18,13,18,13,0-8,12,0z`,
+ }
})
\ No newline at end of file