Added Icons to mcord-slicing view
Change-Id: I560d980bcc730f836f5a50d5453539fde28d7c97
diff --git a/views/ngXosViews/mcord-slicing/mocks/topology.json b/views/ngXosViews/mcord-slicing/mocks/topology.json
index 48137bb..fda4566 100644
--- a/views/ngXosViews/mcord-slicing/mocks/topology.json
+++ b/views/ngXosViews/mcord-slicing/mocks/topology.json
@@ -20,7 +20,7 @@
{"id": 210, "name": "profile-1", "type": "profile", "model_id": 1, "plane": "data", "model": {"start": "2016-01-01T08:00:00.000Z", "end": "2016-12-01T08:00:00.000Z"}},
{"id": 220, "name": "profile-2", "type": "profile", "model_id": 1, "plane": "data", "model": {"start": "2016-01-01T08:00:00.000Z", "end": "2016-12-01T08:00:00.000Z"}},
- {"id": 211, "name": "ue-1", "type": "ue", "model_id": 1, "plane": "data", "model": {"id": 123}},
+ {"id": 211, "name": "Michelle", "type": "ue", "model_id": 1, "plane": "data", "model": {"id": 123}},
{"id": 212, "name": "ue-2", "type": "ue", "model_id": 1, "plane": "data", "model": {"id": 456}},
{"id": 221, "name": "ue-3", "type": "ue", "model_id": 1, "plane": "data", "model": {"id": 789}},
diff --git a/views/ngXosViews/mcord-slicing/src/css/main.css b/views/ngXosViews/mcord-slicing/src/css/main.css
index f35a9c9..b36c572 100644
--- a/views/ngXosViews/mcord-slicing/src/css/main.css
+++ b/views/ngXosViews/mcord-slicing/src/css/main.css
@@ -7,63 +7,62 @@
slicing-topo {
display: block; }
-#xosMcord-slicing .node {
- stroke: #337ab7;
- fill: white; }
-
-#xosMcord-slicing .node,
-#xosMcord-slicing .node + text {
- cursor: pointer; }
-
-#xosMcord-slicing text {
- pointer-events: none;
- -webkit-user-select: none;
- /* Chrome all / Safari all */
- -moz-user-select: none;
- /* Firefox all */
- -ms-user-select: none;
- /* IE 10+ */
- user-select: none; }
-
-#xosMcord-slicing .node.control {
- stroke-dasharray: 5;
- stroke: #d9534f; }
-
-#xosMcord-slicing .node.button {
- stroke: #5bc0de;
- fill: #daf1f8; }
-
-#xosMcord-slicing .node.selected {
- stroke-width: 5px;
- stroke-dasharray: 5; }
-
-#xosMcord-slicing .link {
- stroke: #286090;
- stroke-width: 2px;
- cursor: pointer; }
-
-#xosMcord-slicing .link.control {
- stroke-dasharray: 5;
- stroke: #d9534f; }
-
-#xosMcord-slicing .link.selected {
- stroke-width: 5px;
- stroke-dasharray: 5; }
-
-#xosMcord-slicing .dragline {
- stroke-dasharray: 5;
- stroke: #286090;
- stroke-width: 2px; }
-
-#xosMcord-slicing .dragline.hidden {
- stroke-width: 0; }
-
-#xosMcord-slicing div.element-form {
- position: absolute;
- border: 1px solid #5bc0de;
- padding: 10px;
- background: #fff; }
-
-#xosMcord-slicing .form-line {
- stroke: #31b0d5;
- stroke-width: 1px; }
+#xosMcord-slicing {
+ /* Icons */
+ /*drag line*/
+ /*form styling*/ }
+ #xosMcord-slicing .node {
+ stroke: #337ab7;
+ fill: white; }
+ #xosMcord-slicing .node,
+ #xosMcord-slicing .node + text {
+ cursor: pointer; }
+ #xosMcord-slicing text {
+ pointer-events: none;
+ -webkit-user-select: none;
+ /* Chrome all / Safari all */
+ -moz-user-select: none;
+ /* Firefox all */
+ -ms-user-select: none;
+ /* IE 10+ */
+ user-select: none; }
+ #xosMcord-slicing .node.control {
+ stroke-dasharray: 5;
+ stroke: #d9534f; }
+ #xosMcord-slicing .node.button {
+ stroke-dasharray: 5;
+ stroke: #5bc0de;
+ fill: #daf1f8; }
+ #xosMcord-slicing .node.selected {
+ stroke-width: 5px;
+ stroke-dasharray: 5; }
+ #xosMcord-slicing .node ~ .icon {
+ stroke: #337ab7;
+ fill: #337ab7; }
+ #xosMcord-slicing .node.control ~ .icon {
+ stroke: #d9534f;
+ fill: #d9534f; }
+ #xosMcord-slicing .link {
+ stroke: #286090;
+ stroke-width: 2px;
+ cursor: pointer; }
+ #xosMcord-slicing .link.control {
+ stroke-dasharray: 5;
+ stroke: #d9534f; }
+ #xosMcord-slicing .link.selected {
+ stroke-width: 5px;
+ stroke-dasharray: 5; }
+ #xosMcord-slicing .dragline {
+ stroke-dasharray: 5;
+ stroke: #286090;
+ stroke-width: 2px; }
+ #xosMcord-slicing .dragline.hidden {
+ stroke-width: 0; }
+ #xosMcord-slicing div.element-form {
+ position: absolute;
+ border: 1px solid #5bc0de;
+ padding: 10px;
+ background: #fff; }
+ #xosMcord-slicing .form-line {
+ stroke: #31b0d5;
+ stroke-width: 1px; }
diff --git a/views/ngXosViews/mcord-slicing/src/js/aa b/views/ngXosViews/mcord-slicing/src/js/aa
deleted file mode 100644
index 0d4d9ae..0000000
--- a/views/ngXosViews/mcord-slicing/src/js/aa
+++ /dev/null
@@ -1 +0,0 @@
-that was the approach since it is completely independent from CORD or XOS, but if you prefere we can follow the same release scheme of CORD and from master pull the latest
\ No newline at end of file
diff --git a/views/ngXosViews/mcord-slicing/src/js/graph.service.js b/views/ngXosViews/mcord-slicing/src/js/graph.service.js
index 223be9f..b4127b8 100644
--- a/views/ngXosViews/mcord-slicing/src/js/graph.service.js
+++ b/views/ngXosViews/mcord-slicing/src/js/graph.service.js
@@ -287,5 +287,105 @@
'sgw',
'pgw',
'upstream'
- ]);
+ ])
+ .constant('mCordSlicingIcons', {
+ mobile: `M26.1,0c0.5,0.2,1.1,0.4,1.6,0.7C28.7,1.4,29,2.4,29,3.5c0,0.2,0,0.4,0,0.6c0,14,0,28.1,0,42.1c0,1-0.2,1.8-0.9,2.6
+ c-0.4,0.5-0.9,0.8-1.5,1c-0.2,0.1-0.3,0.1-0.5,0.2c-7.7,0-15.5,0-23.2,0c-0.5-0.2-1.1-0.4-1.5-0.7c-1-0.7-1.4-1.7-1.4-2.9
+ c0-3.8,0-7.6,0-11.4C0,24.5,0,14.1,0,3.8c0-1,0.2-1.8,0.9-2.6c0.4-0.5,0.9-0.8,1.5-1C2.6,0.1,2.7,0.1,2.9,0C10.6,0,18.4,0,26.1,0z
+ M26.7,43.7c0-12.8,0-25.6,0-38.3c-8.1,0-16.2,0-24.3,0c0,12.8,0,25.6,0,38.3C10.5,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,26.9,21.8,27.9z
+ M3.5,34.4c0.9-0.6,1.7-1.2,2.6-1.8c0.5,0.5,1.1,1,1.6,1.5c-0.5,0.9-1,1.8-1.6,2.7C5.1,36.1,4.3,35.3,3.5,34.4z
+ M0.8,29.7c1.1-0.3,2.1-0.5,3.1-0.8c0.3,0.7,0.6,1.3,1,2c-0.8,0.6-1.7,1.2-2.6,1.9C1.7,31.7,1.2,30.7,0.8,29.7z
+ M3.2,24.7c0.1,0.7,0.1,1.4,0.2,2.1c-1,0.3-2,0.5-3.1,0.8c-0.1-1-0.2-1.9-0.2-2.9C1.1,24.7,2.2,24.7,3.2,24.7z`
+ });
})();
diff --git a/views/ngXosViews/mcord-slicing/src/js/slicing-topo.directive.js b/views/ngXosViews/mcord-slicing/src/js/slicing-topo.directive.js
index b91c8f4..4586796 100644
--- a/views/ngXosViews/mcord-slicing/src/js/slicing-topo.directive.js
+++ b/views/ngXosViews/mcord-slicing/src/js/slicing-topo.directive.js
@@ -9,7 +9,7 @@
bindToController: true,
controllerAs: 'vm',
templateUrl: 'templates/slicing-topo.tpl.html',
- controller: function($element, SliceGraph, McordSlicingTopo, _, NodePositioner, FormHandler){
+ controller: function($element, SliceGraph, McordSlicingTopo, _, NodePositioner, FormHandler, mCordSlicingIcons){
let svg;
let nodes, links;
@@ -77,6 +77,15 @@
};
const tick = () => {
+
+ // svg.selectAll('.node')
+ // .attr({
+ // y: (n) => {
+ // console.log(n.y);
+ // return n.y;
+ // }
+ // });
+
svg.selectAll('.link')
.attr('x1', d => d.source.x)
.attr('y1', d => d.source.y)
@@ -372,16 +381,73 @@
nodes.append('text')
.attr({
- 'text-anchor': 'middle',
- 'alignment-baseline': 'middle'
+ 'text-anchor': 'left',
+ 'alignment-baseline': 'middle',
+ x: -20
})
- // .text(d => `${d.id} ${d.name}`);
.text(d => `${d.name}`);
nodes.on('click', (n) => {
expandNode(n);
});
+ // draw icons
+ const ues = nodes.filter(n => n.type === 'ue');
+ ues.append('path')
+ .attr({
+ d: mCordSlicingIcons.mobile,
+ class: 'icon',
+ transform: `translate(-40, -12.5), scale(0.5)`
+ });
+
+ const profiles = nodes.filter(n => n.type === 'profile');
+ profiles.append('path')
+ .attr({
+ d: mCordSlicingIcons.profile,
+ class: 'icon',
+ transform: `translate(-40, -12.5), scale(0.5)`
+ });
+
+ const rru = nodes.filter(n => n.type === 'ran-ru');
+ rru.append('path')
+ .attr({
+ d: mCordSlicingIcons.rru,
+ class: 'icon',
+ transform: `translate(-40, -12.5), scale(0.5)`
+ });
+
+ const rcu = nodes.filter(n => n.type === 'ran-cu');
+ rcu.append('path')
+ .attr({
+ d: mCordSlicingIcons.rcu,
+ class: 'icon',
+ transform: `translate(-40, -12.5), scale(0.5)`
+ });
+
+ const sgw = nodes.filter(n => n.type === 'sgw');
+ sgw.append('path')
+ .attr({
+ d: mCordSlicingIcons.sgw,
+ class: 'icon',
+ transform: `translate(-40, -12.5), scale(0.5)`
+ });
+
+ const pgw = nodes.filter(n => n.type === 'pgw');
+ pgw.append('path')
+ .attr({
+ d: mCordSlicingIcons.pgw,
+ class: 'icon',
+ transform: `translate(-40, -12.5), scale(0.5)`
+ });
+
+ const mme = nodes.filter(n => n.type === 'mme');
+ mme.append('path')
+ .attr({
+ d: mCordSlicingIcons.mme,
+ class: 'icon',
+ transform: `translate(-40, -12.5), scale(0.5)`
+ });
+
nodes
.on('mousedown', (n) => {
// save a reference to dragStart
diff --git a/views/ngXosViews/mcord-slicing/src/sass/main.scss b/views/ngXosViews/mcord-slicing/src/sass/main.scss
index 7224300..347433f 100644
--- a/views/ngXosViews/mcord-slicing/src/sass/main.scss
+++ b/views/ngXosViews/mcord-slicing/src/sass/main.scss
@@ -36,7 +36,7 @@
}
.node.button {
- //stroke-dasharray: 5;
+ stroke-dasharray: 5;
stroke: $brand-info;
fill: lighten($brand-info, 30)
}
@@ -46,6 +46,17 @@
stroke-dasharray: 5;
}
+ /* Icons */
+ .node ~ .icon {
+ stroke: $brand-primary;
+ fill: $brand-primary;
+ }
+
+ .node.control ~ .icon {
+ stroke: $brand-danger;
+ fill: $brand-danger;
+ }
+
.link {
stroke: darken($brand-primary, 10);
stroke-width: 2px;
@@ -62,7 +73,7 @@
stroke-dasharray: 5;
}
- // drag line
+ /*drag line*/
.dragline {
stroke-dasharray: 5;
stroke: darken($brand-primary, 10);
@@ -73,7 +84,7 @@
stroke-width: 0;
}
- // form styling
+ /*form styling*/
div.element-form {
position: absolute;
border: 1px solid $brand-info;
diff --git a/xos/core/xoslib/static/css/xosMcord-slicing.css b/xos/core/xoslib/static/css/xosMcord-slicing.css
index dafb31c..f47e896 100644
--- a/xos/core/xoslib/static/css/xosMcord-slicing.css
+++ b/xos/core/xoslib/static/css/xosMcord-slicing.css
@@ -1 +1 @@
-#xosMcord-slicing,#xosMcord-slicing>[ui-view],slicing-topo{width:100%;height:100%}slicing-topo{display:block}#xosMcord-slicing .node{stroke:#337ab7;fill:white}#xosMcord-slicing .node,#xosMcord-slicing .node+text{cursor:pointer}#xosMcord-slicing text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#xosMcord-slicing .node.control{stroke-dasharray:5;stroke:#d9534f}#xosMcord-slicing .node.button{stroke:#5bc0de;fill:#daf1f8}#xosMcord-slicing .node.selected{stroke-width:5px;stroke-dasharray:5}#xosMcord-slicing .link{stroke:#286090;stroke-width:2px;cursor:pointer}#xosMcord-slicing .link.control{stroke-dasharray:5;stroke:#d9534f}#xosMcord-slicing .link.selected{stroke-width:5px;stroke-dasharray:5}#xosMcord-slicing .dragline{stroke-dasharray:5;stroke:#286090;stroke-width:2px}#xosMcord-slicing .dragline.hidden{stroke-width:0}#xosMcord-slicing div.element-form{position:absolute;border:1px solid #5bc0de;padding:10px;background:#fff}#xosMcord-slicing .form-line{stroke:#31b0d5;stroke-width:1px}
\ No newline at end of file
+#xosMcord-slicing,#xosMcord-slicing>[ui-view],slicing-topo{width:100%;height:100%}slicing-topo{display:block}#xosMcord-slicing .node{stroke:#337ab7;fill:white}#xosMcord-slicing .node,#xosMcord-slicing .node+text{cursor:pointer}#xosMcord-slicing text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#xosMcord-slicing .node.control{stroke-dasharray:5;stroke:#d9534f}#xosMcord-slicing .node.button{stroke-dasharray:5;stroke:#5bc0de;fill:#daf1f8}#xosMcord-slicing .node.selected{stroke-width:5px;stroke-dasharray:5}#xosMcord-slicing .node~.icon{stroke:#337ab7;fill:#337ab7}#xosMcord-slicing .node.control~.icon{stroke:#d9534f;fill:#d9534f}#xosMcord-slicing .link{stroke:#286090;stroke-width:2px;cursor:pointer}#xosMcord-slicing .link.control{stroke-dasharray:5;stroke:#d9534f}#xosMcord-slicing .link.selected{stroke-width:5px;stroke-dasharray:5}#xosMcord-slicing .dragline{stroke-dasharray:5;stroke:#286090;stroke-width:2px}#xosMcord-slicing .dragline.hidden{stroke-width:0}#xosMcord-slicing div.element-form{position:absolute;border:1px solid #5bc0de;padding:10px;background:#fff}#xosMcord-slicing .form-line{stroke:#31b0d5;stroke-width:1px}
\ No newline at end of file
diff --git a/xos/core/xoslib/static/js/xosMcord-slicing.js b/xos/core/xoslib/static/js/xosMcord-slicing.js
index c86714f..c0f454b 100644
--- a/xos/core/xoslib/static/js/xosMcord-slicing.js
+++ b/xos/core/xoslib/static/js/xosMcord-slicing.js
@@ -1 +1 @@
-"use strict";angular.module("xos.mcord-slicing",["ngResource","ngCookies","ui.router","xos.helpers"]).config(["$stateProvider",function(e){e.state("slicing-topo",{url:"/",template:"<slicing-topo></slicing-topo>"}).state("node-links",{url:"/data",template:"<node-links></node-links>"})}]).config(["$httpProvider",function(e){e.interceptors.push("NoHyperlinks")}]).service("McordSlicingTopo",["$http","$q",function(e,t){this.query=function(){var n=t.defer();return e.get("api/service/mcord_slicing_ui/topology/").then(function(e){var t=void 0;t=e.data.hasOwnProperty("nodes")?e.data:{nodes:e.data[0],links:e.data[1]},n.resolve(t)})["catch"](function(e){n.reject(e)}),{$promise:n.promise}}}]).directive("nodeLinks",function(){return{restrict:"E",scope:{},bindToController:!0,controllerAs:"vm",templateUrl:"templates/node-links.tpl.html",controller:["McordSlicingTopo",function(e){var t=this;this.tableConfig={columns:[{label:"Id",prop:"id"},{label:"Name",prop:"name"},{label:"Type",prop:"type"},{label:"Plane",prop:"plane"},{label:"Model Id",prop:"model_id"}]},e.query().$promise.then(function(e){t.users=e.nodes})["catch"](function(e){throw new Error(e)})}]}}),angular.module("xos.mcord-slicing").run(["$templateCache",function(e){e.put("templates/node-links.tpl.html",'<div class="row">\n <div class="col-sm-12">\n <xos-table config="vm.tableConfig" data="vm.users"></xos-table>\n </div>\n <div class="col-sm-12"></div>\n</div>'),e.put("templates/slicing-topo.tpl.html","")}]);var _slicedToArray=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(c){r=!0,i=c}finally{try{!o&&s["return"]&&s["return"]()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();!function(){angular.module("xos.mcord-slicing").directive("slicingTopo",function(){return{restrict:"E",scope:{},bindToController:!0,controllerAs:"vm",templateUrl:"templates/slicing-topo.tpl.html",controller:["$element","SliceGraph","McordSlicingTopo","_","NodePositioner","FormHandler",function(e,t,n,o,r,i){var a=this,s=void 0,c=void 0,d=void 0,l=void 0,u=void 0,p=void 0,f=void 0,v=void 0,m=void 0,g=void 0,h=void 0,y=void 0,x=d3.transition().duration(500);this.activeSlices=[];var b=function(){v=null,m=null,f.classed("hidden",!0)};n.query().$promise.then(function(n){r.storeEl(e[0]),w(e[0]),t.buildGraph(n),k=t.positionGraph(e[0]),S=t.getGraphLinks(k),H()})["catch"](function(e){throw new Error(e)});var w=function(e){a.el=e,d3.select(e).select("svg").remove(),s=d3.select(e).append("svg").style("width",e.clientWidth+"px").style("height",e.clientHeight+"px"),u=s.append("g").attr({"class":"link-group"}),l=s.append("g").attr({"class":"node-group"}),p=d3.select(e).append("div").attr({"class":"form-container"}),f=s.append("svg:path").attr("class","dragline hidden").attr("d","M0,0L0,0")},P=function(){s.selectAll(".link").attr("x1",function(e){return e.source.x}).attr("y1",function(e){return e.source.y}).attr("x2",function(e){return e.target.x}).attr("y2",function(e){return e.target.y})},k=[],S=[],F=function(e){var n=t.getSliceDetail(e),o=_slicedToArray(n,2),r=o[0],i=o[1];k=k.concat(r),S=S.concat(i),H()},I=function(e){t.removeActiveSlice(e),h&&h.sliceId===e&&(h=null,y=null),k=o.filter(k,function(t){return t.sliceId!==e||"control"!==t.plane&&"button"!==t.type||(i.removeFormByParentNode(t,u,p),!1)}),k=o.map(k,function(t){return t.sliceId===e&&delete t.sliceId,t}),S=o.filter(S,function(e){return o.findIndex(k,{id:e.data.source})!==-1&&o.findIndex(k,{id:e.data.target})!==-1}),H()},N=function(e){console.log(S),o.remove(S,function(t){return t.data.id===e}),console.log(S),H()},A=function(e){console.log("exp",e),b();var t=["ran-ru","ran-cu","pgw","sgw"];t.indexOf(e.type)>-1&&"data"===e.plane&&!e.sliceId?F(e):"button"===e.type?I(e.sliceId):!e.formAttached&&e.model?(e.formAttached=!0,i.drawForm(e,u,p)):e.formAttached&&(e.formAttached=!1,i.removeFormByParentNode(e,u,p))},E=function(){if(h){if(y=t.getNodeSuccessors(h),0===y.length)return;h.selected=!1;var e=o.findIndex(k,{id:y[0].id});h=k[e],h.selected=!0;var n=t.getNodeSuccessors(h);y=n.lenght>0?t.getNodePredecessors(n[0]):null}else h=k[0],h.selected=!0;H()},D=function(){if(h){if(y=t.getNodePredecessors(h),0===y.length)return;h.selected=!1;var e=o.findIndex(k,{id:y[0].id});e<0&&(e=k.length-1),h=k[e],h.selected=!0}else h=k[0],h.selected=!0;H()},C=function(e,t){return e.y<t.y?1:e.y>t.y?-1:0},$=function(e){return o.filter(k,function(t){return"pgw"===e.type&&"button"===t.type||("button"===e.type&&"pgw"===t.type||("sgw"===e.type&&"mme"===t.type||("mme"===e.type&&"sgw"===t.type||t.type===e.type)))}).sort(C)},G=function(){if(h){h.selected=!1;var e=$(h),t=o.findIndex(e,{id:h.id})+1;t===e.length&&(t=0);var n=o.findIndex(k,{id:e[t].id});h=k[n],h.selected=!0}else h=k[0],h.selected=!0;H()},O=function(){if(h){h.selected=!1;var e=$(h),t=o.findIndex(e,{id:h.id})-1;t<0&&(t=e.length-1);var n=o.findIndex(k,{id:e[t].id});h=k[n],h.selected=!0}else h=k[0],h.selected=!0;H()},H=function L(){d3.layout.force().nodes(k).links(S).charge(-1060).gravity(.1).linkDistance(200).size([a.el.clientWidth,a.el.clientHeight]).on("tick",P).start();d=u.selectAll(".link-container").data(S,function(e){return e.data.id}).enter().insert("g").attr({"class":"link-container",opacity:0}),d.transition(x).attr({opacity:1}),d.insert("line").attr("class",function(e){return"link "+e.data.plane}).on("click",function(e){g=e,d3.selectAll(".link").classed("selected",!1),d3.select(this).classed("selected",!0)}),c=l.selectAll(".node").data(k,function(e){return e.id}).attr({"class":function(e){return"node "+e.plane+" "+e.type+" "+(e.selected?"selected":"")}}),c.enter().append("g").attr({"class":"node-container",transform:function(e){return e.transform},opacity:0}),c.transition(x).attr({opacity:1}),c.append("rect").attr({"class":function(e){return"node "+e.plane+" "+e.type+" "+(e.selected?"selected":"")},width:100,height:50,x:-50,y:-25}),c.append("text").attr({"text-anchor":"middle","alignment-baseline":"middle"}).text(function(e){return""+e.name}),c.on("click",function(e){A(e)}),c.on("mousedown",function(e){v=e,f.classed("hidden",!1).attr("d","M"+v.x+","+v.y+"L"+v.x+","+v.y)}).on("mouseover",function(e){v&&(m=e)}),s.on("mousemove",function(){v&&f.attr("d","M"+v.x+","+v.y+"L"+d3.mouse(this)[0]+","+d3.mouse(this)[1])}).on("mouseup",function(){if(!v||!m)return void b();var e=t.getNodeDataPlaneSuccessors(v)[0].type;return m.type!==e?void b():(S.push({source:v,target:m,data:{id:v.id+"."+m.id,source:v.id,target:m.id}}),L(),void b())}),s.selectAll(".node-container").data(k,function(e){return e.id}).exit().transition(x).attr({opacity:0}).remove(),s.selectAll(".link-container").data(S,function(e){return e.data.id}).exit().transition(x).attr({opacity:0}).remove()};d3.select("body").on("keydown",function(){"Backspace"===d3.event.code&&g&&N(g.data.id),"Enter"===d3.event.code&&h&&(d3.event.preventDefault(),A(h)),"Escape"===d3.event.code&&h&&(h.selected=!1,h=null,y=null,H()),"ArrowRight"===d3.event.code&&(d3.event.preventDefault(),E()),"ArrowLeft"===d3.event.code&&(d3.event.preventDefault(),D()),"ArrowUp"===d3.event.code&&(d3.event.preventDefault(),G()),"ArrowDown"===d3.event.code&&(d3.event.preventDefault(),O())})}]}})}(),function(){angular.module("xos.mcord-slicing").service("SliceGraph",["_","NodePositioner",function(e,t){var n=this,o=new graphlib.Graph;this.buildGraph=function(t){e.forEach(t.nodes,function(e){return o.setNode(e.id,e)}),e.forEach(t.links,function(e){return o.setEdge(e.source,e.target,e)})},this.getLinks=function(){return o.edges().map(function(e){return{source:o.node(e.v),target:o.node(e.w),data:o.edge(e)}})},this.getGraph=function(){return o},this.getNodeSuccessors=function(t){return e.map(o.successors(t.id),function(e){return o.node(e)})},this.getNodePredecessors=function(t){return e.map(o.predecessors(t.id),function(e){return o.node(e)})},this.getNodeDataPlaneSuccessors=function(t){return e.filter(n.getNodeSuccessors(t),function(e){return"data"===e.plane})},this.getUpstreamSinks=function(t){var n=e.reduce(o.sinks(),function(e,t,n){var r=o.node(t);return"upstream"===r.type&&e.push(r),e},[]);return e.map(n,function(e,o){return e.position={top:0,bottom:t.clientHeight,total:n.length,index:o+1},e})},this.positionGraph=function(o){var r=n.getUpstreamSinks(o),i=[];return e.forEach(r,function(e,t){i=i.concat(n.findPredecessor(e))}),r=r.concat(i),r=e.map(r,function(e){return t.getDataPlaneNodePos(e,o)})},this.findPredecessor=function(r){var i=o.predecessors(r.id);i=i.map(function(e,n){e=o.node(e);var a=(r.position.bottom-r.position.top)/r.position.total,s=t.getVpos(r);return e.position={top:s-a/2,bottom:s+a/2,total:i.length,index:n+1},e});var a=e.reduce(i,function(e,t){return e.concat(n.findPredecessor(t))},[]);return i.concat(a)},this.getGraphLinks=function(t){var n=[];return e.forEach(t,function(t){var r=o.inEdges(t.id);e.forEach(r,function(e){n.push({source:o.node(e.v),target:o.node(e.w),data:o.edge(e)})})}),n},this.getDataPlaneForSlice=function(e,t){var n=o.node(o.successors(e.id)[0]),r=o.node(o.successors(n.id)[0]),i=o.node(o.successors(r.id)[0]);return e.sliceId=t,n.sliceId=t,r.sliceId=t,i.sliceId=t,[e,n,r,i]},this.getControlPlaneForSlice=function(n,r){return e.reduce(n,function(e,n){var i=o.node(o.successors(n.id)[1]);if(i=t.getControlPlaneNodePos(i,n),i.sliceId=r,"sgw"===i.type){var a=o.node(o.successors(i.id)[1]);a=t.getControlPlaneNodePos(a,i),a.sliceId=r,e.push(a)}return e.concat(i)},[])},this.activeSlices=[],this.getSliceDetail=function(r){if(r.sliceId&&n.activeSlices.indexOf(r.sliceId)>-1)return[[],[]];var i=e.min(n.activeSlices)?e.min(n.activeSlices)+1:1;n.activeSlices.push(i);var a=function(e){for(var t=!0;t;){var n=e;if(t=!1,"ran-ru"===n.type)return n;var r=o.predecessors(n.id);e=o.node(r[0]),t=!0,r=void 0}}(r),s=n.getDataPlaneForSlice(a,i),c=n.getControlPlaneForSlice(s,i),d=n.getGraphLinks(c),l={name:"Close",id:"close-button-"+i,type:"button",sliceId:i};return l=t.getControlPlaneNodePos(l,c[3]),c.push(l),[c,d]},this.removeActiveSlice=function(e){n.activeSlices.splice(n.activeSlices.indexOf(e),1)}}]).service("NodePositioner",["_","sliceElOrder",function(e,t){var n=this,o=void 0;this.storeEl=function(e){o=e},this.getHpos=function(e,n){var o=t.indexOf(e.type)+1;"mme"===e.type&&(o=t.indexOf("sgw")+1),"button"===e.type&&(o=t.indexOf("pgw")+1);var r=n.clientWidth/(t.length+1)*o;return r},this.getVpos=function(e){var t=e.position.bottom-e.position.top,n=t/(e.position.total+1),o=n*e.position.index+e.position.top;return o},this.getDataPlaneNodePos=function(e){var t=n.getHpos(e,o),r=n.getVpos(e);return e.x=t,e.y=r,e.transform="translate("+t+", "+r+")",e.fixed=!0,e},this.getControlPlaneNodePos=function(e,t){var r=n.getHpos(e,o),i=t.y-75;return e.x=r,e.y=i,e.transform="translate("+r+", "+i+")",e.fixed=!0,e}}]).value("sliceElOrder",["ue","profile","ran-ru","ran-cu","sgw","pgw","upstream"])}(),function(){angular.module("xos.mcord-slicing").service("FormHandler",["LabelFormatter","XosFormHelpers",function(e,t){var n=this,o=this,r=d3.transition().duration(500);this.drawForm=function(e,t,i){var a=t.append("line").attr({"class":"form-line",id:"form-line-"+e.type+"-"+e.id,x1:e.x+10,y1:e.y,x2:e.x+10,y2:e.y+40,opacity:0});a.transition(r).attr({opacity:1});var s=i.append("div").attr({"class":"element-form",id:"form-"+e.type+"-"+e.id}).style({opacity:0}),c=s.append("form");n.addFormfields(e,c);var d=c.append("div").attr({"class":"row"});d.append("div").attr({"class":"col-xs-6"}).append("a").attr({"class":"btn btn-danger","data-parent-node-type":e.type,"data-parent-node-id":e.id}).text("Close").on("click",function(){o.removeForm(d3.select(this).attr("data-parent-node-type"),d3.select(this).attr("data-parent-node-id"),t,i)}),d.append("div").attr({"class":"col-xs-6"}).append("button").attr({type:"button","class":"btn btn-success"}).text("Save").on("click",function(){$("#form-"+e.type+"-"+e.id+" input").each(function(){var e=$(this),t=e.val(),n=e.attr("name");console.log(n,t)})}),s.transition(r).style({opacity:1,top:e.y+95+"px",left:e.x+"px"})},this.removeForm=function(e,t,o,r){n.removeFormByParentNode({type:e,id:t},o,r)},this.removeFormByParentNode=function(e,t,n){n.selectAll("#form-"+e.type+"-"+e.id).transition(r).style({opacity:0}).remove(),t.selectAll("#form-line-"+e.type+"-"+e.id).transition(r).attr({opacity:0}).remove()},this.getFieldValue=function(e,t){return"date"===t&&(e=new Date(e),e=e.getFullYear()+"-"+("0"+e.getMonth()+1).slice(-2)+"-"+("0"+e.getDate()).slice(-2)),e||""},this.addFormField=function(o,r,i){var a=t._getFieldFormat(r);i.append("div").attr({"class":"row"}).append("div").attr({"class":"col-xs-12"}).append("label").text(o?e.format(o):"test").append("input").attr({type:a,name:o,value:n.getFieldValue(r,a),"class":"form-control"})},this.addFormfields=function(e,t){if(n.addFormField("name",e.name,t),!e.model)return n.addFormField(null,null,t);var o=Object.keys(e.model);_.forEach(o,function(o){n.addFormField(o,e.model[o],t)})}}])}(),angular.module("xos.mcord-slicing").run(["$location",function(e){e.path("/")}]);
+"use strict";angular.module("xos.mcord-slicing",["ngResource","ngCookies","ui.router","xos.helpers"]).config(["$stateProvider",function(e){e.state("slicing-topo",{url:"/",template:"<slicing-topo></slicing-topo>"}).state("node-links",{url:"/data",template:"<node-links></node-links>"})}]).config(["$httpProvider",function(e){e.interceptors.push("NoHyperlinks")}]).service("McordSlicingTopo",["$http","$q",function(e,t){this.query=function(){var c=t.defer();return e.get("api/service/mcord_slicing_ui/topology/").then(function(e){var t=void 0;t=e.data.hasOwnProperty("nodes")?e.data:{nodes:e.data[0],links:e.data[1]},c.resolve(t)})["catch"](function(e){c.reject(e)}),{$promise:c.promise}}}]).directive("nodeLinks",function(){return{restrict:"E",scope:{},bindToController:!0,controllerAs:"vm",templateUrl:"templates/node-links.tpl.html",controller:["McordSlicingTopo",function(e){var t=this;this.tableConfig={columns:[{label:"Id",prop:"id"},{label:"Name",prop:"name"},{label:"Type",prop:"type"},{label:"Plane",prop:"plane"},{label:"Model Id",prop:"model_id"}]},e.query().$promise.then(function(e){t.users=e.nodes})["catch"](function(e){throw new Error(e)})}]}}),angular.module("xos.mcord-slicing").run(["$templateCache",function(e){e.put("templates/node-links.tpl.html",'<div class="row">\n <div class="col-sm-12">\n <xos-table config="vm.tableConfig" data="vm.users"></xos-table>\n </div>\n <div class="col-sm-12"></div>\n</div>'),e.put("templates/slicing-topo.tpl.html","")}]);var _slicedToArray=function(){function e(e,t){var c=[],n=!0,r=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(n=(i=a.next()).done)&&(c.push(i.value),!t||c.length!==t);n=!0);}catch(s){r=!0,o=s}finally{try{!n&&a["return"]&&a["return"]()}finally{if(r)throw o}}return c}return function(t,c){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();!function(){angular.module("xos.mcord-slicing").directive("slicingTopo",function(){return{restrict:"E",scope:{},bindToController:!0,controllerAs:"vm",templateUrl:"templates/slicing-topo.tpl.html",controller:["$element","SliceGraph","McordSlicingTopo","_","NodePositioner","FormHandler","mCordSlicingIcons",function(e,t,c,n,r,o,i){var a=this,s=void 0,l=void 0,d=void 0,u=void 0,p=void 0,f=void 0,v=void 0,m=void 0,g=void 0,h=void 0,y=void 0,C=void 0,x=d3.transition().duration(500);this.activeSlices=[];var M=function(){m=null,g=null,v.classed("hidden",!0)};c.query().$promise.then(function(c){r.storeEl(e[0]),w(e[0]),t.buildGraph(c),z=t.positionGraph(e[0]),P=t.getGraphLinks(z),G()})["catch"](function(e){throw new Error(e)});var w=function(e){a.el=e,d3.select(e).select("svg").remove(),s=d3.select(e).append("svg").style("width",e.clientWidth+"px").style("height",e.clientHeight+"px"),p=s.append("g").attr({"class":"link-group"}),u=s.append("g").attr({"class":"node-group"}),f=d3.select(e).append("div").attr({"class":"form-container"}),v=s.append("svg:path").attr("class","dragline hidden").attr("d","M0,0L0,0")},b=function(){s.selectAll(".link").attr("x1",function(e){return e.source.x}).attr("y1",function(e){return e.source.y}).attr("x2",function(e){return e.target.x}).attr("y2",function(e){return e.target.y})},z=[],P=[],k=function(e){var c=t.getSliceDetail(e),n=_slicedToArray(c,2),r=n[0],o=n[1];z=z.concat(r),P=P.concat(o),G()},S=function(e){t.removeActiveSlice(e),y&&y.sliceId===e&&(y=null,C=null),z=n.filter(z,function(t){return t.sliceId!==e||"control"!==t.plane&&"button"!==t.type||(o.removeFormByParentNode(t,p,f),!1)}),z=n.map(z,function(t){return t.sliceId===e&&delete t.sliceId,t}),P=n.filter(P,function(e){return n.findIndex(z,{id:e.data.source})!==-1&&n.findIndex(z,{id:e.data.target})!==-1}),G()},F=function(e){console.log(P),n.remove(P,function(t){return t.data.id===e}),console.log(P),G()},I=function(e){console.log("exp",e),M();var t=["ran-ru","ran-cu","pgw","sgw"];t.indexOf(e.type)>-1&&"data"===e.plane&&!e.sliceId?k(e):"button"===e.type?S(e.sliceId):!e.formAttached&&e.model?(e.formAttached=!0,o.drawForm(e,p,f)):e.formAttached&&(e.formAttached=!1,o.removeFormByParentNode(e,p,f))},N=function(){if(y){if(C=t.getNodeSuccessors(y),0===C.length)return;y.selected=!1;var e=n.findIndex(z,{id:C[0].id});y=z[e],y.selected=!0;var c=t.getNodeSuccessors(y);C=c.lenght>0?t.getNodePredecessors(c[0]):null}else y=z[0],y.selected=!0;G()},A=function(){if(y){if(C=t.getNodePredecessors(y),0===C.length)return;y.selected=!1;var e=n.findIndex(z,{id:C[0].id});e<0&&(e=z.length-1),y=z[e],y.selected=!0}else y=z[0],y.selected=!0;G()},E=function(e,t){return e.y<t.y?1:e.y>t.y?-1:0},D=function(e){return n.filter(z,function(t){return"pgw"===e.type&&"button"===t.type||("button"===e.type&&"pgw"===t.type||("sgw"===e.type&&"mme"===t.type||("mme"===e.type&&"sgw"===t.type||t.type===e.type)))}).sort(E)},H=function(){if(y){y.selected=!1;var e=D(y),t=n.findIndex(e,{id:y.id})+1;t===e.length&&(t=0);var c=n.findIndex(z,{id:e[t].id});y=z[c],y.selected=!0}else y=z[0],y.selected=!0;G()},$=function(){if(y){y.selected=!1;var e=D(y),t=n.findIndex(e,{id:y.id})-1;t<0&&(t=e.length-1);var c=n.findIndex(z,{id:e[t].id});y=z[c],y.selected=!0}else y=z[0],y.selected=!0;G()},G=function O(){d3.layout.force().nodes(z).links(P).charge(-1060).gravity(.1).linkDistance(200).size([a.el.clientWidth,a.el.clientHeight]).on("tick",b).start();d=p.selectAll(".link-container").data(P,function(e){return e.data.id}).enter().insert("g").attr({"class":"link-container",opacity:0}),d.transition(x).attr({opacity:1}),d.insert("line").attr("class",function(e){return"link "+e.data.plane}).on("click",function(e){h=e,d3.selectAll(".link").classed("selected",!1),d3.select(this).classed("selected",!0)}),l=u.selectAll(".node").data(z,function(e){return e.id}).attr({"class":function(e){return"node "+e.plane+" "+e.type+" "+(e.selected?"selected":"")}}),l.enter().append("g").attr({"class":"node-container",transform:function(e){return e.transform},opacity:0}),l.transition(x).attr({opacity:1}),l.append("rect").attr({"class":function(e){return"node "+e.plane+" "+e.type+" "+(e.selected?"selected":"")},width:100,height:50,x:-50,y:-25}),l.append("text").attr({"text-anchor":"left","alignment-baseline":"middle",x:-20}).text(function(e){return""+e.name}),l.on("click",function(e){I(e)});var e=l.filter(function(e){return"ue"===e.type});e.append("path").attr({d:i.mobile,"class":"icon",transform:"translate(-40, -12.5), scale(0.5)"});var c=l.filter(function(e){return"profile"===e.type});c.append("path").attr({d:i.profile,"class":"icon",transform:"translate(-40, -12.5), scale(0.5)"});var n=l.filter(function(e){return"ran-ru"===e.type});n.append("path").attr({d:i.rru,"class":"icon",transform:"translate(-40, -12.5), scale(0.5)"});var r=l.filter(function(e){return"ran-cu"===e.type});r.append("path").attr({d:i.rcu,"class":"icon",transform:"translate(-40, -12.5), scale(0.5)"});var o=l.filter(function(e){return"sgw"===e.type});o.append("path").attr({d:i.sgw,"class":"icon",transform:"translate(-40, -12.5), scale(0.5)"});var f=l.filter(function(e){return"pgw"===e.type});f.append("path").attr({d:i.pgw,"class":"icon",transform:"translate(-40, -12.5), scale(0.5)"});var y=l.filter(function(e){return"mme"===e.type});y.append("path").attr({d:i.mme,"class":"icon",transform:"translate(-40, -12.5), scale(0.5)"}),l.on("mousedown",function(e){m=e,v.classed("hidden",!1).attr("d","M"+m.x+","+m.y+"L"+m.x+","+m.y)}).on("mouseover",function(e){m&&(g=e)}),s.on("mousemove",function(){m&&v.attr("d","M"+m.x+","+m.y+"L"+d3.mouse(this)[0]+","+d3.mouse(this)[1])}).on("mouseup",function(){if(!m||!g)return void M();var e=t.getNodeDataPlaneSuccessors(m)[0].type;return g.type!==e?void M():(P.push({source:m,target:g,data:{id:m.id+"."+g.id,source:m.id,target:g.id}}),O(),void M())}),s.selectAll(".node-container").data(z,function(e){return e.id}).exit().transition(x).attr({opacity:0}).remove(),s.selectAll(".link-container").data(P,function(e){return e.data.id}).exit().transition(x).attr({opacity:0}).remove()};d3.select("body").on("keydown",function(){"Backspace"===d3.event.code&&h&&F(h.data.id),"Enter"===d3.event.code&&y&&(d3.event.preventDefault(),I(y)),"Escape"===d3.event.code&&y&&(y.selected=!1,y=null,C=null,G()),"ArrowRight"===d3.event.code&&(d3.event.preventDefault(),N()),"ArrowLeft"===d3.event.code&&(d3.event.preventDefault(),A()),"ArrowUp"===d3.event.code&&(d3.event.preventDefault(),H()),"ArrowDown"===d3.event.code&&(d3.event.preventDefault(),$())})}]}})}(),function(){angular.module("xos.mcord-slicing").service("SliceGraph",["_","NodePositioner",function(e,t){var c=this,n=new graphlib.Graph;this.buildGraph=function(t){e.forEach(t.nodes,function(e){return n.setNode(e.id,e)}),e.forEach(t.links,function(e){return n.setEdge(e.source,e.target,e)})},this.getLinks=function(){return n.edges().map(function(e){return{source:n.node(e.v),target:n.node(e.w),data:n.edge(e)}})},this.getGraph=function(){return n},this.getNodeSuccessors=function(t){return e.map(n.successors(t.id),function(e){return n.node(e)})},this.getNodePredecessors=function(t){return e.map(n.predecessors(t.id),function(e){return n.node(e)})},this.getNodeDataPlaneSuccessors=function(t){return e.filter(c.getNodeSuccessors(t),function(e){return"data"===e.plane})},this.getUpstreamSinks=function(t){var c=e.reduce(n.sinks(),function(e,t,c){var r=n.node(t);return"upstream"===r.type&&e.push(r),e},[]);return e.map(c,function(e,n){return e.position={top:0,bottom:t.clientHeight,total:c.length,index:n+1},e})},this.positionGraph=function(n){var r=c.getUpstreamSinks(n),o=[];return e.forEach(r,function(e,t){o=o.concat(c.findPredecessor(e))}),r=r.concat(o),r=e.map(r,function(e){return t.getDataPlaneNodePos(e,n)})},this.findPredecessor=function(r){var o=n.predecessors(r.id);o=o.map(function(e,c){e=n.node(e);var i=(r.position.bottom-r.position.top)/r.position.total,a=t.getVpos(r);return e.position={top:a-i/2,bottom:a+i/2,total:o.length,index:c+1},e});var i=e.reduce(o,function(e,t){return e.concat(c.findPredecessor(t))},[]);return o.concat(i)},this.getGraphLinks=function(t){var c=[];return e.forEach(t,function(t){var r=n.inEdges(t.id);e.forEach(r,function(e){c.push({source:n.node(e.v),target:n.node(e.w),data:n.edge(e)})})}),c},this.getDataPlaneForSlice=function(e,t){var c=n.node(n.successors(e.id)[0]),r=n.node(n.successors(c.id)[0]),o=n.node(n.successors(r.id)[0]);return e.sliceId=t,c.sliceId=t,r.sliceId=t,o.sliceId=t,[e,c,r,o]},this.getControlPlaneForSlice=function(c,r){return e.reduce(c,function(e,c){var o=n.node(n.successors(c.id)[1]);if(o=t.getControlPlaneNodePos(o,c),o.sliceId=r,"sgw"===o.type){var i=n.node(n.successors(o.id)[1]);i=t.getControlPlaneNodePos(i,o),i.sliceId=r,e.push(i)}return e.concat(o)},[])},this.activeSlices=[],this.getSliceDetail=function(r){if(r.sliceId&&c.activeSlices.indexOf(r.sliceId)>-1)return[[],[]];var o=e.min(c.activeSlices)?e.min(c.activeSlices)+1:1;c.activeSlices.push(o);var i=function(e){for(var t=!0;t;){var c=e;if(t=!1,"ran-ru"===c.type)return c;var r=n.predecessors(c.id);e=n.node(r[0]),t=!0,r=void 0}}(r),a=c.getDataPlaneForSlice(i,o),s=c.getControlPlaneForSlice(a,o),l=c.getGraphLinks(s),d={name:"Close",id:"close-button-"+o,type:"button",sliceId:o};return d=t.getControlPlaneNodePos(d,s[3]),s.push(d),[s,l]},this.removeActiveSlice=function(e){c.activeSlices.splice(c.activeSlices.indexOf(e),1)}}]).service("NodePositioner",["_","sliceElOrder",function(e,t){var c=this,n=void 0;this.storeEl=function(e){n=e},this.getHpos=function(e,c){var n=t.indexOf(e.type)+1;"mme"===e.type&&(n=t.indexOf("sgw")+1),"button"===e.type&&(n=t.indexOf("pgw")+1);var r=c.clientWidth/(t.length+1)*n;return r},this.getVpos=function(e){var t=e.position.bottom-e.position.top,c=t/(e.position.total+1),n=c*e.position.index+e.position.top;return n},this.getDataPlaneNodePos=function(e){var t=c.getHpos(e,n),r=c.getVpos(e);return e.x=t,e.y=r,e.transform="translate("+t+", "+r+")",e.fixed=!0,e},this.getControlPlaneNodePos=function(e,t){var r=c.getHpos(e,n),o=t.y-75;return e.x=r,e.y=o,e.transform="translate("+r+", "+o+")",e.fixed=!0,e}}]).value("sliceElOrder",["ue","profile","ran-ru","ran-cu","sgw","pgw","upstream"]).constant("mCordSlicingIcons",{mobile:"M26.1,0c0.5,0.2,1.1,0.4,1.6,0.7C28.7,1.4,29,2.4,29,3.5c0,0.2,0,0.4,0,0.6c0,14,0,28.1,0,42.1c0,1-0.2,1.8-0.9,2.6\n c-0.4,0.5-0.9,0.8-1.5,1c-0.2,0.1-0.3,0.1-0.5,0.2c-7.7,0-15.5,0-23.2,0c-0.5-0.2-1.1-0.4-1.5-0.7c-1-0.7-1.4-1.7-1.4-2.9\n c0-3.8,0-7.6,0-11.4C0,24.5,0,14.1,0,3.8c0-1,0.2-1.8,0.9-2.6c0.4-0.5,0.9-0.8,1.5-1C2.6,0.1,2.7,0.1,2.9,0C10.6,0,18.4,0,26.1,0z\n M26.7,43.7c0-12.8,0-25.6,0-38.3c-8.1,0-16.2,0-24.3,0c0,12.8,0,25.6,0,38.3C10.5,43.7,18.6,43.7,26.7,43.7z M16.2,46.6\n c0-0.9-0.8-1.7-1.7-1.7c-0.9,0-1.7,0.8-1.7,1.7c0,0.9,0.8,1.7,1.7,1.7C15.5,48.3,16.2,47.5,16.2,46.6z M14.5,3.3c0.8,0,1.5,0,2.3,0\n c0.4,0,0.8,0,1.2,0c0.3,0,0.4-0.1,0.5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-2.9C1.1,24.7,2.2,24.7,3.2,24.7z"})}(),function(){angular.module("xos.mcord-slicing").service("FormHandler",["LabelFormatter","XosFormHelpers",function(e,t){var c=this,n=this,r=d3.transition().duration(500);this.drawForm=function(e,t,o){var i=t.append("line").attr({"class":"form-line",id:"form-line-"+e.type+"-"+e.id,x1:e.x+10,y1:e.y,x2:e.x+10,y2:e.y+40,opacity:0});i.transition(r).attr({opacity:1});var a=o.append("div").attr({"class":"element-form",id:"form-"+e.type+"-"+e.id}).style({opacity:0}),s=a.append("form");c.addFormfields(e,s);var l=s.append("div").attr({"class":"row"});l.append("div").attr({"class":"col-xs-6"}).append("a").attr({"class":"btn btn-danger","data-parent-node-type":e.type,"data-parent-node-id":e.id}).text("Close").on("click",function(){n.removeForm(d3.select(this).attr("data-parent-node-type"),d3.select(this).attr("data-parent-node-id"),t,o)}),l.append("div").attr({"class":"col-xs-6"}).append("button").attr({type:"button","class":"btn btn-success"}).text("Save").on("click",function(){$("#form-"+e.type+"-"+e.id+" input").each(function(){var e=$(this),t=e.val(),c=e.attr("name");console.log(c,t)})}),a.transition(r).style({opacity:1,top:e.y+95+"px",left:e.x+"px"})},this.removeForm=function(e,t,n,r){c.removeFormByParentNode({type:e,id:t},n,r)},this.removeFormByParentNode=function(e,t,c){c.selectAll("#form-"+e.type+"-"+e.id).transition(r).style({opacity:0}).remove(),t.selectAll("#form-line-"+e.type+"-"+e.id).transition(r).attr({opacity:0}).remove()},this.getFieldValue=function(e,t){return"date"===t&&(e=new Date(e),e=e.getFullYear()+"-"+("0"+e.getMonth()+1).slice(-2)+"-"+("0"+e.getDate()).slice(-2)),e||""},this.addFormField=function(n,r,o){var i=t._getFieldFormat(r);o.append("div").attr({"class":"row"}).append("div").attr({"class":"col-xs-12"}).append("label").text(n?e.format(n):"test").append("input").attr({type:i,name:n,value:c.getFieldValue(r,i),"class":"form-control"})},this.addFormfields=function(e,t){if(c.addFormField("name",e.name,t),!e.model)return c.addFormField(null,null,t);var n=Object.keys(e.model);_.forEach(n,function(n){c.addFormField(n,e.model[n],t)})}}])}(),angular.module("xos.mcord-slicing").run(["$location",function(e){e.path("/")}]);
\ No newline at end of file