}\r
\r
body {\r
- width: 1330px;\r
+ /*width: 1330px;*/\r
overflow: scroll;\r
margin-right: 0px;\r
}\r
div{border-radius: 5px;}\r
body\r
{\r
- background-color: rgb(57,57,57);\r
+ /*background-color: rgb(65, 64, 66);*/\r
color: black;\r
font-size: 18px;\r
font-family: verdana,Geneva,Arial,sans-serif;\r
},\r
error: function(data) {\r
console.log(data);\r
- alert('Get IntentInfo Error!');\r
+ console.log('Get IntentInfo Error!');\r
+ // alert('Get IntentInfo Error!');\r
}\r
});\r
return userData;\r
console.log(opNemo);\r
}\r
}\r
-\r
- jQuery(function($){\r
- // var user_data = userinfo['users']['user'][0];\r
- // // console.log(JSON.stringify(user_data));\r
- // analyjson_topo(user_data);\r
- // parseNemoLan(user_data);\r
- // //set keyWords style\r
- // $("#nemo_str_show p").each(function(){\r
- // var $res=$(this);\r
- // keyWords.forEach(function(item,index,array){\r
- // // console.log(item);\r
- // $res.html($res.html().replace(item,"<span class='keyWords'>"+item+"</span>"));\r
- // });\r
- // // console.log($res.html());\r
- // });\r
-\r
- });\r
-
\ No newline at end of file
+++ /dev/null
-/*!
- * jQuery Cookie Plugin v1.4.1
- * https://github.com/carhartl/jquery-cookie
- *
- * Copyright 2006, 2014 Klaus Hartl
- * Released under the MIT license
- */
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- // AMD (Register as an anonymous module)
- define(['jquery'], factory);
- } else if (typeof exports === 'object') {
- // Node/CommonJS
- module.exports = factory(require('jquery'));
- } else {
- // Browser globals
- factory(jQuery);
- }
-}(function ($) {
-
- var pluses = /\+/g;
-
- function encode(s) {
- return config.raw ? s : encodeURIComponent(s);
- }
-
- function decode(s) {
- return config.raw ? s : decodeURIComponent(s);
- }
-
- function stringifyCookieValue(value) {
- return encode(config.json ? JSON.stringify(value) : String(value));
- }
-
- function parseCookieValue(s) {
- if (s.indexOf('"') === 0) {
- // This is a quoted cookie as according to RFC2068, unescape...
- s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
- }
-
- try {
- // Replace server-side written pluses with spaces.
- // If we can't decode the cookie, ignore it, it's unusable.
- // If we can't parse the cookie, ignore it, it's unusable.
- s = decodeURIComponent(s.replace(pluses, ' '));
- return config.json ? JSON.parse(s) : s;
- } catch(e) {}
- }
-
- function read(s, converter) {
- var value = config.raw ? s : parseCookieValue(s);
- return $.isFunction(converter) ? converter(value) : value;
- }
-
- var config = $.cookie = function (key, value, options) {
-
- // Write
-
- if (arguments.length > 1 && !$.isFunction(value)) {
- options = $.extend({}, config.defaults, options);
-
- if (typeof options.expires === 'number') {
- var days = options.expires, t = options.expires = new Date();
- t.setMilliseconds(t.getMilliseconds() + days * 864e+5);
- }
-
- return (document.cookie = [
- encode(key), '=', stringifyCookieValue(value),
- options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
- options.path ? '; path=' + options.path : '',
- options.domain ? '; domain=' + options.domain : '',
- options.secure ? '; secure' : ''
- ].join(''));
- }
-
- // Read
-
- var result = key ? undefined : {},
- // To prevent the for loop in the first place assign an empty array
- // in case there are no cookies at all. Also prevents odd result when
- // calling $.cookie().
- cookies = document.cookie ? document.cookie.split('; ') : [],
- i = 0,
- l = cookies.length;
-
- for (; i < l; i++) {
- var parts = cookies[i].split('='),
- name = decode(parts.shift()),
- cookie = parts.join('=');
-
- if (key === name) {
- // If second argument (value) is a function it's a converter...
- result = read(cookie, value);
- break;
- }
-
- // Prevent storing a cookie that we couldn't decode.
- if (!key && (cookie = read(cookie)) !== undefined) {
- result[name] = cookie;
- }
- }
-
- return result;
- };
-
- config.defaults = {};
-
- $.removeCookie = function (key, options) {
- // Must not alter options, thus extending a fresh object...
- $.cookie(key, '', $.extend({}, options, { expires: -1 }));
- return !$.cookie(key);
- };
-
-}));
alert("No Physical Data");
},
error:function(data){
- alert("Get Physical Data Error!");
+ console.log("Get Physical Data Error!");
+ // alert("Get Physical Data Error!");
}
});
return PhyData;
+++ /dev/null
-\r
-jQuery(document).ready(function ($) {\r
- $("#ser_init,#SI_Save,#SI_Delete,#node_save,#connection_save,#flow_save,#NE_Delete,#sp_save,#policy_delete").click(function () {\r
- $("#tabs ul li:nth-child(1) a").trigger("click");\r
- var nemo_show = $("#nemo_str_show").get(0);\r
- nemo_show.scrollTop = nemo_show.scrollHeight;\r
- });\r
- \r
-});
\ No newline at end of file
+++ /dev/null
-<svg id="service_svg2" width="800" height="560" viewBox="100 40 900 780">\r
- <path id="c2" node_start="interior" node_end="dmz1_n2" type="connection" d="M762.1320343559642 662.1320343559643 L337.86796564403573 237.86796564403573" stroke="black" stroke-width="1" fill="black"></path>\r
- <path id="dmz1_c1" node_start="dmz1_n1" node_end="dmz1_n2" type="connection" d="M337.86796564403573 662.1320343559643 L337.86796564403573 237.86796564403573" stroke="black" stroke-width="1" fill="black"></path>\r
- <path id="c1" node_start="internet" node_end="dmz1_n1" type="connection" d="M762.1320343559643 237.8679656440358 L337.86796564403573 662.1320343559643" stroke="black" stroke-width="1" fill="black"></path>\r
-\r
- <defs>\r
- <marker id="idArrow2" viewBox="0 0 20 20" refX="0" refY="10" markerUnits="strokeWidth" markerWidth="6" markerHeight="15" orient="auto"><path d="M 0 0 L 20 10 L0 20 z" fill="purple" stroke="black"></path> </marker> <marker id="idtext2" viewBox="0 0 120 50" refX="0" refY="0" markerUnits="strokeWidth" markerWidth="20" markerHeight="20" orient="auto"><text style="font-family:sans-serif; font-size:14pt;" x="20" y="20">text</text></marker>\r
- </defs>\r
- <g id="dmz1_n2" type="l2-group" sub="vm2,server1" ip-prefix="192.168.12.0/24">\r
- <circle id="dmz1_n2_group" cx="337.86796564403573" cy="237.86796564403573" r="90" stroke="black" stroke-width="3" fill="white"></circle>\r
- <rect id="vm2" x="282.86796564403573" y="212.86796564403573" width="110" height="34" stroke="black" stroke-width="1" fill="white"></rect>\r
- <rect id="server1" x="282.86796564403573" y="255.86796564403573" width="110" height="34" stroke="black" stroke-width="1" fill="white"></rect>\r
- <text id="dmz1_n2_title1" x="337.86796564403573" y="189.86796564403573" fill="black" text-anchor="middle" stroke="black" stroke-width="0.8">l2-group</text>\r
- <text id="dmz1_n2_title2" x="337.86796564403573" y="206.86796564403573" fill="black" text-anchor="middle">dmz1_n2</text>\r
- <text id="vm2_text" x="337.86796564403573" y="232.86796564403573" fill="black" text-anchor="middle">vm2</text>\r
- <text id="server1_text" x="337.86796564403573" y="277.86796564403573" fill="black" text-anchor="middle">server1</text>\r
- </g>\r
- <g id="dmz1_n1" type="chain-group" sub="dmz1_fw1" flow="0">\r
- <circle id="dmz1_n1_group" cx="337.86796564403573" cy="662.1320343559643" r="90" stroke="black" stroke-width="3" fill="white"></circle>\r
- <rect id="dmz1_fw1" x="280.86796564403573" y="637.1320343559643" width="114" height="50" stroke="black" stroke-width="1" fill="white"></rect>\r
- <text id="dmz1_n1_title1" x="337.86796564403573" y="614.1320343559643" fill="black" text-anchor="middle" stroke="black" stroke-width="0.8">chain-group</text>\r
- <text id="dmz1_n1_title2" x="337.86796564403573" y="632.1320343559643" fill="black" text-anchor="middle">dmz1_n1</text>\r
- <text id="dmz1_fw1_text" x="337.86796564403573" y="662.1320343559643" fill="black" text-anchor="middle">dmz1_fw1</text>\r
- </g>\r
- <g id="interior" type="ext-group" sub="interior" ip-prefix="192.168.13.0/24">\r
- <circle id="interior_group" cx="762.1320343559642" cy="662.1320343559643" r="90" stroke="black" stroke-width="3" fill="white"></circle>\r
- <text id="interior_title1" x="762.1320343559642" y="654.1320343559643" fill="black" text-anchor="middle" stroke="black" stroke-width="0.8">ext-group</text>\r
- <text id="interior_title2" x="762.1320343559642" y="672.1320343559643" fill=" " text-anchor="middle">interior</text>\r
- </g>\r
- <g id="internet" type="ext-group" sub="internet" ip-prefix="172.168.1.0/24">\r
- <circle id="internet_group" cx="762.1320343559643" cy="237.8679656440358" r="90" stroke="black" stroke-width="3" fill="white"></circle>\r
- <text id="internet_title1" x="762.1320343559643" y="229.8679656440358" fill="black" text-anchor="middle" stroke="black" stroke-width="0.8">ext-group</text>\r
- <text id="internet_title2" x="762.1320343559643" y="247.8679656440358" fill=" " text-anchor="middle">internet</text>\r
- </g>\r
-</svg>\r
-\r
-<svg id="service_svg2" width="800" height="560" viewBox="100 40 900 780">\r
- <path id="c2" node_start="interior" node_end="dmz1.n2" type="connection" d="M762.1320343559642 662.1320343559643 Lundefined undefined" stroke="black" stroke-width="1" fill="black"></path>\r
- <path id="dmz1_c1" node_start="dmz1_n1" node_end="dmz1.n2" type="connection" d="M337.86796564403573 662.1320343559643 Lundefined undefined" stroke="black" stroke-width="1" fill="black"></path>\r
- <path id="c1" node_start="internet" node_end="dmz1_n1" type="connection" d="M762.1320343559643 237.8679656440358 L337.86796564403573 662.1320343559643" stroke="black" stroke-width="1" fill="black"></path>\r
- <defs>\r
- <marker id="idArrow2" viewBox="0 0 20 20" refX="0" refY="10" markerUnits="strokeWidth" markerWidth="6" markerHeight="15" orient="auto"><path d="M 0 0 L 20 10 L0 20 z" fill="purple" stroke="black"></path> </marker> \r
- <marker id="idtext2" viewBox="0 0 120 50" refX="0" refY="0" markerUnits="strokeWidth" markerWidth="20" markerHeight="20" orient="auto"><text style="font-family:sans-serif; font-size:14pt;" x="20" y="20">text</text></marker>\r
- </defs>\r
- <g id="dmz1.n2" type="l2-group" sub="dmz1.n2" ip-prefix="192.168.12.0/24">\r
- <circle id="dmz1.n2_group" cx="337.86796564403573" cy="237.86796564403573" r="90" stroke="black" stroke-width="3" fill="white"></circle>\r
- <rect id="vm2" x="282.86796564403573" y="212.86796564403573" width="110" height="34" stroke="black" stroke-width="1" fill="white"></rect>\r
- <rect id="server1" x="282.86796564403573" y="255.86796564403573" width="110" height="34" stroke="black" stroke-width="1" fill="white"></rect>\r
- <text id="dmz1.n2_title1" x="337.86796564403573" y="189.86796564403573" fill="black" text-anchor="middle" stroke="black" stroke-width="0.8">dmz1.n2</text>\r
- <text id="dmz1.n2_title2" x="337.86796564403573" y="206.86796564403573" fill="black" text-anchor="middle">l2-group</text>\r
- <text id="vm2_text" x="337.86796564403573" y="232.86796564403573" fill="black" text-anchor="middle">vm2</text>\r
- <text id="server1_text" x="337.86796564403573" y="277.86796564403573" fill="black" text-anchor="middle">server1</text>\r
- </g>\r
- <g id="dmz1_n1" type="chain-group" sub="dmz1_n1" flow="0">\r
- <circle id="dmz1_n1_group" cx="337.86796564403573" cy="662.1320343559643" r="90" stroke="black" stroke-width="3" fill="white"></circle>\r
- <rect id="dmz1.fw1" x="280.86796564403573" y="637.1320343559643" width="114" height="50" stroke="black" stroke-width="1" fill="white"></rect>\r
- <text id="dmz1_n1_title1" x="337.86796564403573" y="614.1320343559643" fill="black" text-anchor="middle" stroke="black" stroke-width="0.8">dmz1_n1</text>\r
- <text id="dmz1_n1_title2" x="337.86796564403573" y="632.1320343559643" fill="black" text-anchor="middle">chain-group</text>\r
- <text id="dmz1.fw1_text" x="337.86796564403573" y="662.1320343559643" fill="black" text-anchor="middle">dmz1.fw1</text>\r
- </g>\r
- <g id="interior" type="ext-group" sub="interior" ip-prefix="192.168.13.0/24">\r
- <circle id="interior_group" cx="762.1320343559642" cy="662.1320343559643" r="90" stroke="black" stroke-width="3" fill="white"></circle>\r
- <text id="interior_title1" x="762.1320343559642" y="654.1320343559643" fill="black" text-anchor="middle" stroke="black" stroke-width="0.8">interior</text>\r
- <text id="interior_title2" x="762.1320343559642" y="672.1320343559643" fill=" " text-anchor="middle">ext-group</text>\r
- </g>\r
- <g id="internet" type="ext-group" sub="internet" ip-prefix="172.168.1.0/24">\r
- <circle id="internet_group" cx="762.1320343559643" cy="237.8679656440358" r="90" stroke="black" stroke-width="3" fill="white"></circle>\r
- <text id="internet_title1" x="762.1320343559643" y="229.8679656440358" fill="black" text-anchor="middle" stroke="black" stroke-width="0.8">internet</text>\r
- <text id="internet_title2" x="762.1320343559643" y="247.8679656440358" fill=" " text-anchor="middle">ext-group</text>\r
- </g>\r
-</svg>
\ No newline at end of file
alert("No intent-vn Mapping Data");\r
},\r
error: function(data) {\r
- alert("Get intent-vn Mapping Data Error!");\r
+ console.log("Get intent-vn Mapping Data Error!");\r
+ // alert("Get intent-vn Mapping Data Error!");\r
}\r
});\r
return MappingData;\r
alert("No vn-pn Mapping Data");\r
},\r
error: function(data) {\r
- alert("Get vn-pn Mapping Data Error!");\r
+ console.log("Get vn-pn Mapping Data Error!");\r
+ // alert("Get vn-pn Mapping Data Error!");\r
}\r
});\r
return MappingData;\r
}\r
return null;\r
}\r
- }\r
- // var userid='14ce424a-3e50-4a2a-ad5c-b29845158c8b';\r
- //var virtualData = getVirtualInfoById(userId,virtualJson);\r
- //var linkArray=CreateVirtualNodeTable('virNodeTab',virtualData);\r
-\r
-//getPaths(linkArray,getPnMappingResultById(userid,PnMappingJson),userinfo);
\ No newline at end of file
+ }
\ No newline at end of file
\r
\r
$(".tabs ul li[aria-controls='PhyNet']").click(function(){\r
+ if(!physicalData) return;\r
createPhysicalTopo();\r
analy_topo(physicalData);\r
// create_physical_topo();\r
$(".tabs ul li[aria-controls='PhyNet']").click();\r
\r
$(".tabs ul li[aria-controls='intent_info']").click(function(){\r
- //alert('intent_topo');\r
var userId=$("#selectUser option:selected").val();\r
console.log(userId);\r
\r
// userId='af4fc2be-e3f4-4388-a8ef-3aabae872f2b';\r
//Bod\r
// var userId='14ce424a-3e50-4a2a-ad5c-b29845158c8b'\r
- // if(userId=='0') userId='14ce424a-3e50-4a2a-ad5c-b29845158c8b';\r
+\r
$('#service_svg2').empty();\r
$("#nemo_str_show").empty();\r
- console.log(userId);\r
if(!IntentInfos) return;\r
- var user_data = getIntentInfoById(userId,userinfo);\r
+ var user_data = getIntentInfoById(userId);\r
if(!user_data) return;\r
\r
analyjson_topo(user_data);\r
});\r
\r
$(".tabs ul li[aria-controls='VirNet']").click(function(){\r
- // var virtualData=getVirtualJson();\r
var userId=$("#selectUser option:selected").val();\r
jQuery('#vir_graph').empty();\r
jQuery("#virNodeTab").find('tr').remove();\r
//Bod\r
//userId='14ce424a-3e50-4a2a-ad5c-b29845158c8b'\r
\r
- // if(userId=='0') userId='14ce424a-3e50-4a2a-ad5c-b29845158c8b';\r
- // virtualData=virtualJson;\r
-\r
if(!IntentInfos||!MappingResults||!VirtualDatas) return;\r
if(!getVirtualInfoById(userId)||!getIntentInfoById(userId)||!getMappingResultById(userId)) return;\r
create_virtual_topo(getVirtualInfoById(userId),getIntentInfoById(userId),getMappingResultById(userId));\r
creataVirtualTables.createVirtualNodeTable('virNodeTab',getVirtualInfoById(userId));\r
creataVirtualTables.createVirtualLinkTable('virLinkTab',getVirtualInfoById(userId));\r
});\r
- // $(".tabs ul li[aria-controls='Mapping']").click();\r
+\r
$(".tabs ul li[aria-controls='Mapping']").click(function(){\r
var userId=$("#selectUser option:selected").val();\r
- // userId='14ce424a-3e50-4a2a-ad5c-b29845158c8b';\r
jQuery("#mapVirNodeTab").find('tr').remove();\r
jQuery("#mapVirLinkTab").find('tr').remove();\r
if(!physicalData||!PnMappingResults||!VirtualDatas) return;\r
});\r
\r
$('#selectUser input[type=button]').click(function(){\r
- // $(".tabs ul li[aria-controls='intent_info']").trigger('click');\r
$('a[href="#intent_info"]').click();\r
- var userId=$("#selectUser option:selected").val();\r
- \r
- // SFC\r
- //userId='af4fc2be-e3f4-4388-a8ef-3aabae872f2b';\r
- //Bod\r
- //userId='14ce424a-3e50-4a2a-ad5c-b29845158c8b'\r
-\r
- if(!IntentInfos) return;\r
- var user_data = getIntentInfoById(userId);\r
- if(!user_data) return;\r
- \r
- analyjson_topo(user_data);\r
- parseNemoLan(user_data);\r
- \r
- //set keyWords style\r
- $("#nemo_str_show p").each(function(){\r
- var $res=$(this);\r
- keyWords.forEach(function(item,index,array){\r
- // console.log(item);\r
- $res.html($res.html().replace(item,"<span class='keyWords'>"+item+"</span>"));\r
- });\r
- });\r
\r
});\r
\r
}());\r
\r
$('#user_logout').click(function(){\r
- // console.log(1);\r
- // alert(1);\r
setCookie('nemo_userpwd','',-1);\r
$("#pageContent").empty();\r
$("#pageContent").load('src/app/nemo/register.html');\r
- // alert(2);\r
}); \r
\r
\r
<meta charset="UTF-8">\r
<title>nemo-register</title>\r
<link rel="stylesheet" href="src/app/nemo/css/register.css">\r
- <script src="lib/jquery-2.1.4.min.js"></script>\r
<script src="src/app/nemo/js/Nemo_Main.js"></script>\r
<script>\r
function setCookie(name,value,Days) \r