mirror of
https://github.com/Telecominfraproject/oopt-gnpy-web-gui.git
synced 2025-10-29 17:22:20 +00:00
Document files added and remove technical_document txt file
This commit is contained in:
224
docs/Activator.html
Normal file
224
docs/Activator.html
Normal file
@@ -0,0 +1,224 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Class: Activator</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Class: Activator</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
|
||||
<header>
|
||||
|
||||
<h2><span class="attribs"><span class="type-signature"></span></span>Activator<span class="signature">(container)</span><span class="type-signature"></span></h2>
|
||||
|
||||
|
||||
</header>
|
||||
|
||||
<article>
|
||||
<div class="container-overview">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="Activator"><span class="type-signature"></span>new Activator<span class="signature">(container)</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>Turn an element into an clickToUse element.
|
||||
When not active, the element has a transparent overlay. When the overlay is
|
||||
clicked, the mode is changed to active.
|
||||
When active, the element is displayed with a blue border around it, and
|
||||
the interactive contents of the element can be used. When clicked outside
|
||||
the element, the elements mode is changed to inactive.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Parameters:</h5>
|
||||
|
||||
|
||||
<table class="params">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>container</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">Element</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="thirdparty_vis.js.html">thirdparty/vis.js</a>, <a href="thirdparty_vis.js.html#line7874">line 7874</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">oopt-gnpy-web-gui-main</a></h2><h3>Modules</h3><ul><li><a href="module-alea.html">alea</a></li><li><a href="module-constraints.html">constraints</a></li><li><a href="module-exampleUtil.html">exampleUtil</a></li><li><a href="module-fiber.html">fiber</a></li><li><a href="module-filesaver.html">filesaver</a></li><li><a href="module-main.html">main</a></li><li><a href="module-mynetwork.html">mynetwork</a></li><li><a href="module-node.html">node</a></li><li><a href="module-patch.html">patch</a></li><li><a href="module-service.html">service</a></li><li><a href="module-validation.html">validation</a></li></ul><h3>Classes</h3><ul><li><a href="Activator.html">Activator</a></li><li><a href="Network.html">Network</a></li></ul><h3>Tutorials</h3><ul><li><a href="tutorial-LICENSE.html">LICENSE</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Wed Jul 06 2022 16:23:21 GMT+0530 (India Standard Time)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
<script src="scripts/linenumber.js"> </script>
|
||||
</body>
|
||||
</html>
|
||||
268
docs/Network.html
Normal file
268
docs/Network.html
Normal file
@@ -0,0 +1,268 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Class: Network</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Class: Network</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
|
||||
<header>
|
||||
|
||||
<h2><span class="attribs"><span class="type-signature"></span></span>Network<span class="signature">(container, data, options)</span><span class="type-signature"></span></h2>
|
||||
|
||||
|
||||
</header>
|
||||
|
||||
<article>
|
||||
<div class="container-overview">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="Network"><span class="type-signature"></span>new Network<span class="signature">(container, data, options)</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>Create a network visualization, displaying nodes and edges.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Parameters:</h5>
|
||||
|
||||
|
||||
<table class="params">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>container</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">Element</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>The DOM element in which the Network will
|
||||
be created. Normally a div element.</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>data</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">object</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>An object containing parameters
|
||||
{Array} nodes
|
||||
{Array} edges</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>options</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">object</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Options</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="thirdparty_vis.js.html">thirdparty/vis.js</a>, <a href="thirdparty_vis.js.html#line44703">line 44703</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">oopt-gnpy-web-gui-main</a></h2><h3>Modules</h3><ul><li><a href="module-alea.html">alea</a></li><li><a href="module-constraints.html">constraints</a></li><li><a href="module-exampleUtil.html">exampleUtil</a></li><li><a href="module-fiber.html">fiber</a></li><li><a href="module-filesaver.html">filesaver</a></li><li><a href="module-main.html">main</a></li><li><a href="module-mynetwork.html">mynetwork</a></li><li><a href="module-node.html">node</a></li><li><a href="module-patch.html">patch</a></li><li><a href="module-service.html">service</a></li><li><a href="module-validation.html">validation</a></li></ul><h3>Classes</h3><ul><li><a href="Activator.html">Activator</a></li><li><a href="Network.html">Network</a></li></ul><h3>Tutorials</h3><ul><li><a href="tutorial-LICENSE.html">LICENSE</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Wed Jul 06 2022 16:23:21 GMT+0530 (India Standard Time)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
<script src="scripts/linenumber.js"> </script>
|
||||
</body>
|
||||
</html>
|
||||
170
docs/alea.js.html
Normal file
170
docs/alea.js.html
Normal file
@@ -0,0 +1,170 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Source: alea.js</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Source: alea.js</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="prettyprint source linenums"><code>
|
||||
/**
|
||||
* alea module
|
||||
* @module alea
|
||||
*/
|
||||
|
||||
/**
|
||||
* alea.js.
|
||||
* Alea library is a pseudo-random number generator (PRNG).
|
||||
*/
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof exports === 'object') {
|
||||
module.exports = factory();
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define(factory);
|
||||
} else {
|
||||
root.Alea = factory();
|
||||
}
|
||||
}(this, function () {
|
||||
|
||||
'use strict';
|
||||
|
||||
// From http://baagoe.com/en/RandomMusings/javascript/
|
||||
|
||||
// importState to sync generator states
|
||||
Alea.importState = function (i) {
|
||||
var random = new Alea();
|
||||
random.importState(i);
|
||||
return random;
|
||||
};
|
||||
|
||||
return Alea;
|
||||
|
||||
function Alea() {
|
||||
return (function (args) {
|
||||
// Johannes Baagøe <baagoe@baagoe.com>, 2010
|
||||
var s0 = 0;
|
||||
var s1 = 0;
|
||||
var s2 = 0;
|
||||
var c = 1;
|
||||
|
||||
if (args.length == 0) {
|
||||
args = [+new Date];
|
||||
}
|
||||
var mash = Mash();
|
||||
s0 = mash(' ');
|
||||
s1 = mash(' ');
|
||||
s2 = mash(' ');
|
||||
|
||||
for (var i = 0; i < args.length; i++) {
|
||||
s0 -= mash(args[i]);
|
||||
if (s0 < 0) {
|
||||
s0 += 1;
|
||||
}
|
||||
s1 -= mash(args[i]);
|
||||
if (s1 < 0) {
|
||||
s1 += 1;
|
||||
}
|
||||
s2 -= mash(args[i]);
|
||||
if (s2 < 0) {
|
||||
s2 += 1;
|
||||
}
|
||||
}
|
||||
mash = null;
|
||||
|
||||
var random = function () {
|
||||
var t = 2091639 * s0 + c * 2.3283064365386963e-10; // 2^-32
|
||||
s0 = s1;
|
||||
s1 = s2;
|
||||
return s2 = t - (c = t | 0);
|
||||
};
|
||||
random.uint32 = function () {
|
||||
return random() * 0x100000000; // 2^32
|
||||
};
|
||||
random.fract53 = function () {
|
||||
return random() +
|
||||
(random() * 0x200000 | 0) * 1.1102230246251565e-16; // 2^-53
|
||||
};
|
||||
random.version = 'Alea 0.9';
|
||||
random.args = args;
|
||||
|
||||
// my own additions to sync state between two generators
|
||||
random.exportState = function () {
|
||||
return [s0, s1, s2, c];
|
||||
};
|
||||
random.importState = function (i) {
|
||||
s0 = +i[0] || 0;
|
||||
s1 = +i[1] || 0;
|
||||
s2 = +i[2] || 0;
|
||||
c = +i[3] || 0;
|
||||
};
|
||||
|
||||
return random;
|
||||
|
||||
}(Array.prototype.slice.call(arguments)));
|
||||
}
|
||||
|
||||
function Mash() {
|
||||
var n = 0xefc8249d;
|
||||
|
||||
var mash = function (data) {
|
||||
data = data.toString();
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
n += data.charCodeAt(i);
|
||||
var h = 0.02519603282416938 * n;
|
||||
n = h >>> 0;
|
||||
h -= n;
|
||||
h *= n;
|
||||
n = h >>> 0;
|
||||
h -= n;
|
||||
n += h * 0x100000000; // 2^32
|
||||
}
|
||||
return (n >>> 0) * 2.3283064365386963e-10; // 2^-32
|
||||
};
|
||||
|
||||
mash.version = 'Mash 0.9';
|
||||
return mash;
|
||||
}
|
||||
}));</code></pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">oopt-gnpy-web-gui-main</a></h2><h3>Modules</h3><ul><li><a href="module-alea.html">alea</a></li><li><a href="module-constraints.html">constraints</a></li><li><a href="module-exampleUtil.html">exampleUtil</a></li><li><a href="module-fiber.html">fiber</a></li><li><a href="module-filesaver.html">filesaver</a></li><li><a href="module-mynetwork.html">mynetwork</a></li><li><a href="module-node.html">node</a></li><li><a href="module-patch.html">patch</a></li><li><a href="module-service.html">service</a></li><li><a href="module-validation.html">validation</a></li></ul><h3>Tutorials</h3><ul><li><a href="tutorial-LICENSE.html">LICENSE</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Wed Jul 06 2022 15:49:42 GMT+0530 (India Standard Time)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
<script src="scripts/linenumber.js"> </script>
|
||||
</body>
|
||||
</html>
|
||||
671
docs/constraints.js.html
Normal file
671
docs/constraints.js.html
Normal file
@@ -0,0 +1,671 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Source: constraints.js</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Source: constraints.js</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="prettyprint source linenums"><code>
|
||||
/**
|
||||
* constraints module
|
||||
* @module constraints
|
||||
*/
|
||||
|
||||
/**
|
||||
* constraints.js
|
||||
* The constraints library a list of rules for components. It is defining the network topology validation.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Check connections rules between nodes.
|
||||
* @param {string} from - Source node.
|
||||
* @param {string} to - Destination node.
|
||||
* @param {string} nodeType - Node type.
|
||||
*/
|
||||
function nodeRule(from, to, nodeType) {
|
||||
var fromConnections = network.getConnectedEdges(from);
|
||||
var toConnections = network.getConnectedEdges(to);
|
||||
var connections = [];
|
||||
connections.push(fromConnections);
|
||||
|
||||
$.each(toConnections, function (index, item) {
|
||||
connections.push(item);
|
||||
});
|
||||
|
||||
var fromDetails = network.body.data.nodes.get(from);
|
||||
var toDetails = network.body.data.nodes.get(to);
|
||||
|
||||
var message = "";
|
||||
var flag = false;
|
||||
var connectedNodes;
|
||||
var fromType;
|
||||
var toType;
|
||||
//to check connection b/w roadm and amplifier
|
||||
if ((fromDetails.node_type == roadmJSON.node_type && toDetails.node_type == nodeType) || (toDetails.node_type == roadmJSON.node_type && fromDetails.node_type == nodeType) || (fromDetails.node_type == transceiverJSON.node_type && toDetails.node_type == nodeType) || (toDetails.node_type == transceiverJSON.node_type && fromDetails.node_type == nodeType)) {
|
||||
$.each(connections, function (index, item) {
|
||||
connectedNodes = network.getConnectedNodes(item);
|
||||
if (connectedNodes) {
|
||||
if ((connectedNodes[0] == fromDetails.id && connectedNodes[1] == toDetails.id) || connectedNodes[1] == fromDetails.id && connectedNodes[0] == toDetails.id) {
|
||||
message = "We cannot add more than one " + singleFiberJSON.component_type + "/" + singlePatchJSON.component_type + " connection between " + fromDetails.label + " and " + toDetails.label;
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// to check connection b/w amplifier and amplifier
|
||||
if (fromDetails.node_type == nodeType && toDetails.node_type == nodeType) {
|
||||
$.each(connections, function (index, item) {
|
||||
connectedNodes = network.getConnectedNodes(item);
|
||||
if (connectedNodes) {
|
||||
if ((connectedNodes[0] == fromDetails.id && connectedNodes[1] == toDetails.id) || connectedNodes[1] == fromDetails.id && connectedNodes[0] == toDetails.id) {
|
||||
message = "We cannot add more than one " + singleFiberJSON.component_type + "/" + singlePatchJSON.component_type + " connection between " + fromDetails.label + " and " + toDetails.label;
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var edgeDetails;
|
||||
var nodetype;
|
||||
if (!flag) {
|
||||
message = "";
|
||||
if (fromDetails.node_type == nodeType) {
|
||||
if (fromConnections.length > 1) {
|
||||
message = fromDetails.label + ' can only support 2 links, one outgoing, and one incoming. ';
|
||||
flag = true;
|
||||
}
|
||||
else {
|
||||
$.each(fromConnections, function (index, item) {
|
||||
edgeDetails = network.body.data.edges.get(item);
|
||||
if (edgeDetails.from == from) {
|
||||
message = 'Links wrongly connected. ';
|
||||
flag = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
if (toDetails.node_type == nodeType) {
|
||||
if (toConnections.length > 1) {
|
||||
|
||||
if (message != "")
|
||||
message += "<br /> <br />" + toDetails.label + ' can only support 2 links, one outgoing, and one incoming';
|
||||
else
|
||||
message += toDetails.label + ' can only support 2 links, one outgoing, and one incoming';
|
||||
flag = true;
|
||||
}
|
||||
else {
|
||||
$.each(toConnections, function (index, item) {
|
||||
edgeDetails = network.body.data.edges.get(item);
|
||||
if (edgeDetails.to == to) {
|
||||
message = 'Links wrongly connected. ';
|
||||
flag = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return { message: message, flag: flag };
|
||||
}
|
||||
|
||||
/** Check the ROADM, transceiver link and type rules. */
|
||||
function checkLink() {
|
||||
|
||||
var roadmList = network.body.data.nodes.get({
|
||||
filter: function (item) {
|
||||
return (item.node_type == roadmJSON.node_type || item.node_type == transceiverJSON.node_type);
|
||||
}
|
||||
});
|
||||
|
||||
var connectedEdges;
|
||||
var fromCount = 0;
|
||||
var toCount = 0;
|
||||
var edgeDetails;
|
||||
var message;
|
||||
var flag = false;
|
||||
var msg = [];
|
||||
var tempEdge = [];
|
||||
$.each(roadmList, function (index, item) {
|
||||
connectedEdges = network.getConnectedEdges(item.id);
|
||||
|
||||
tempEdge = [];
|
||||
$.each(connectedEdges, function (index, item1) {
|
||||
if (network.body.data.edges.get(item1).component_type != serviceJSON.component_type)
|
||||
tempEdge.push(item1);
|
||||
});
|
||||
|
||||
fromCount = 0;
|
||||
toCount = 0;
|
||||
for (i = 0; i < tempEdge.length; i++) {
|
||||
edgeDetails = network.body.data.edges.get(tempEdge[i]);
|
||||
if (edgeDetails.from == item.id)
|
||||
fromCount++;
|
||||
else if (edgeDetails.to == item.id)
|
||||
toCount++;
|
||||
}
|
||||
|
||||
if (fromCount != toCount || (fromCount == 0 && toCount == 0)) {
|
||||
msg.push('<p class="focusNode" title="Click here to focus the node" id=\'span' + item.id.replace(/\s/g, '') + '\' onClick="focusNodeFiber(\'' + item.id + '\',1)"><img width="25" src="./Assets/img/error-listing-icon.svg"> <b>' + item.label + '</b> must have an even number of links with an equal number of incoming and outgoing links.</p>');
|
||||
flag = true;
|
||||
}
|
||||
if (item.node_type == transceiverJSON.node_type) {
|
||||
if (!item.transceiver_type) {
|
||||
msg.push('<p class="focusNode" title="Click here to focus the node" id=\'spanTF' + item.id.replace(/\s/g, '') + '\' onClick="focusNodeFiber(\'' + item.id + '\',1)"><img width="25" src="./Assets/img/error-listing-icon.svg"> <b>' + item.label + '</b> - ' + transceiverJSON.node_type + ' type not entered by the user.</p>');
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
else if (item.node_type == roadmJSON.node_type) {
|
||||
if (!item.roadm_type) {
|
||||
msg.push('<p class="focusNode" title="Click here to focus the node" id=\'spanTF' + item.id.replace(/\s/g, '') + '\' onClick="focusNodeFiber(\'' + item.id + '\',1)"><img width="25" src="./Assets/img/error-listing-icon.svg"> <b>' + item.label + '</b> - ' + roadmJSON.node_type.toUpperCase() + ' type not entered by the user.</p>');
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
//message = msg.join(' ') + " must have an even number of links with an equal number of incoming and outgoing links";
|
||||
message = msg.join(' ');
|
||||
return { message: message, flag: flag };
|
||||
}
|
||||
|
||||
/** check the limits of amplifier, attenuator link rules. */
|
||||
function checkMisLink() {
|
||||
|
||||
var roadmList = network.body.data.nodes.get({
|
||||
filter: function (item) {
|
||||
return (item.node_type == amplifierJSON.node_type || item.node_type == fusedJSON.node_type);
|
||||
}
|
||||
});
|
||||
|
||||
var connectedEdges;
|
||||
var message;
|
||||
var flag = false;
|
||||
var msg = [];
|
||||
var tempEdge = [];
|
||||
var fromCount;
|
||||
var toCount;
|
||||
$.each(roadmList, function (index, item) {
|
||||
connectedEdges = network.getConnectedEdges(item.id);
|
||||
fromCount = 0;
|
||||
toCount = 0;
|
||||
for (i = 0; i < connectedEdges.length; i++) {
|
||||
edgeDetails = network.body.data.edges.get(connectedEdges[i]);
|
||||
if (edgeDetails.from == item.id)
|
||||
fromCount++;
|
||||
else if (edgeDetails.to == item.id)
|
||||
toCount++;
|
||||
}
|
||||
|
||||
//if (fromCount != toCount || (fromCount == 0 && toCount == 0) || fromCount > 1 || toCount > 1 ) {
|
||||
// msg.push('<p class="focusNode" title="Click here to focus the node" id=\'span' + item.id.replace(/\s/g, '') + '\' onClick="focusNode(\'' + item.id + '\')"><img width="25" src="./Assets/img/error-listing-icon.svg"> One or more links to <b>' + item.label + '</b> is missing.</p>');
|
||||
// flag = true;
|
||||
//}
|
||||
if (connectedEdges.length <= 1) {
|
||||
msg.push('<p class="focusNode" title="Click here to focus the node" id=\'span' + item.id.replace(/\s/g, '') + '\' onClick="focusNodeFiber(\'' + item.id + '\',1)"><img width="25" src="./Assets/img/error-listing-icon.svg"> One or more links to <b>' + item.label + '</b> is missing.</p>');
|
||||
flag = true;
|
||||
}
|
||||
else if (connectedEdges.length > 1) {
|
||||
|
||||
if ((connectedEdges.length == 2 && fromCount == 2) || (connectedEdges.length == 2 && toCount == 2)) {
|
||||
msg.push('<p class="focusNode" title="Click here to focus the node" id=\'span' + item.id.replace(/\s/g, '') + '\' onClick="focusNodeFiber(\'' + item.id + '\',1)"><img width="25" src="./Assets/img/error-listing-icon.svg"><b>' + item.label + '</b> cannot support 2 links of the same type, must have one incoming and one outgoing link</p>');
|
||||
flag = true;
|
||||
}
|
||||
else if (fromCount != toCount || connectedEdges.length > 2) {
|
||||
msg.push('<p class="focusNode" title="Click here to focus the node" id=\'span' + item.id.replace(/\s/g, '') + '\' onClick="focusNodeFiber(\'' + item.id + '\',1)"><img width="25" src="./Assets/img/error-listing-icon.svg"><b>' + item.label + '</b> cannot support more than 2 links</p>');
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (item.node_type == amplifierJSON.node_type) {
|
||||
if (item.amp_category == amplifierJSON.amp_category) {
|
||||
if (!item.amp_type) {
|
||||
msg.push('<p class="focusNode" title="Click here to focus the node" id=\'spanTF' + item.id.replace(/\s/g, '') + '\' onClick="focusNodeFiber(\'' + item.id + '\',1)"><img width="25" src="./Assets/img/error-listing-icon.svg"> <b>' + item.label + '</b> - ' + amplifierJSON.amp_category + ' type not entered by the user.</p>');
|
||||
flag = true;
|
||||
}
|
||||
|
||||
}
|
||||
else if (item.amp_category == ramanampJSON.amp_category) {
|
||||
if (!item.amp_type) {
|
||||
msg.push('<p class="focusNode" title="Click here to focus the node" id=\'spanTF' + item.id.replace(/\s/g, '') + '\' onClick="focusNodeFiber(\'' + item.id + '\',1)"><img width="25" src="./Assets/img/error-listing-icon.svg"> <b>' + item.label + '</b> - Raman amplifier type not entered by the user.</p>');
|
||||
flag = true;
|
||||
}
|
||||
if (!item.category) {
|
||||
msg.push('<p class="focusNode" title="Click here to focus the node" id=\'spanTF' + item.id.replace(/\s/g, '') + '\' onClick="focusNodeFiber(\'' + item.id + '\',1)"><img width="25" src="./Assets/img/error-listing-icon.svg"> <b>' + item.label + '</b> - Raman amplifier category not entered by the user.</p>');
|
||||
flag = true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
message = msg.join(' ');
|
||||
return { message: message, flag: flag };
|
||||
}
|
||||
|
||||
/** To check the node type force rules. */
|
||||
function checkTypeForce() {
|
||||
|
||||
var transList = network.body.data.nodes.get({
|
||||
filter: function (item) {
|
||||
return (item.node_type == transceiverJSON.node_type || item.node_type == amplifierJSON.node_type || item.node_type == roadmJSON.node_type);
|
||||
}
|
||||
});
|
||||
|
||||
var message;
|
||||
var msg = [];
|
||||
var flag = false;
|
||||
$.each(transList, function (index, item) {
|
||||
|
||||
if (item.node_type == transceiverJSON.node_type) {
|
||||
if (!item.transceiver_type) {
|
||||
msg.push('<p class="focusNode" title="Click here to focus the node" id=\'spanTF' + item.id.replace(/\s/g, '') + '\' onClick="focusNodeFiber(\'' + item.id + '\',1)"><img width="25" src="./Assets/img/error-listing-icon.svg"> <b>' + item.label + '</b> - ' + transceiverJSON.node_type + ' type not entered by the user.</p>');
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
else if (item.node_type == roadmJSON.node_type) {
|
||||
if (!item.roadm_type) {
|
||||
msg.push('<p class="focusNode" title="Click here to focus the node" id=\'spanTF' + item.id.replace(/\s/g, '') + '\' onClick="focusNodeFiber(\'' + item.id + '\',1)"><img width="25" src="./Assets/img/error-listing-icon.svg"> <b>' + item.label + '</b> - ' + roadmJSON.node_type.toUpperCase() + ' type not entered by the user.</p>');
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
else if (item.node_type == amplifierJSON.node_type) {
|
||||
if (item.amp_category == amplifierJSON.amp_category) {
|
||||
if (!item.amp_type) {
|
||||
msg.push('<p class="focusNode" title="Click here to focus the node" id=\'spanTF' + item.id.replace(/\s/g, '') + '\' onClick="focusNodeFiber(\'' + item.id + '\',1)"><img width="25" src="./Assets/img/error-listing-icon.svg"> <b>' + item.label + '</b> - ' + amplifierJSON.amp_category + ' type not entered by the user.</p>');
|
||||
flag = true;
|
||||
}
|
||||
|
||||
}
|
||||
else if (item.amp_category == ramanampJSON.amp_category) {
|
||||
if (!item.amp_type) {
|
||||
msg.push('<p class="focusNode" title="Click here to focus the node" id=\'spanTF' + item.id.replace(/\s/g, '') + '\' onClick="focusNodeFiber(\'' + item.id + '\',1)"><img width="25" src="./Assets/img/error-listing-icon.svg"> <b>' + item.label + '</b> - Raman amplifier type not entered by the user.</p>');
|
||||
flag = true;
|
||||
}
|
||||
if (!item.category) {
|
||||
msg.push('<p class="focusNode" title="Click here to focus the node" id=\'spanTF' + item.id.replace(/\s/g, '') + '\' onClick="focusNodeFiber(\'' + item.id + '\',1)"><img width="25" src="./Assets/img/error-listing-icon.svg"> <b>' + item.label + '</b> - Raman amplifier category not entered by the user.</p>');
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
message = msg.join(' ');
|
||||
return { message: message, flag: flag };
|
||||
}
|
||||
|
||||
/** check the fiber properties rules. */
|
||||
function checkFiberPro() {
|
||||
|
||||
var fiberList = network.body.data.edges.get({
|
||||
filter: function (item) {
|
||||
return (item.fiber_category == singleFiberJSON.fiber_category);
|
||||
}
|
||||
});
|
||||
|
||||
var message;
|
||||
var msg = [];
|
||||
var flag = false;
|
||||
var spanlen;
|
||||
var span_length;
|
||||
$.each(fiberList, function (index, item) {
|
||||
span_length = item.span_length;
|
||||
spanlen = parseFloat(span_length);
|
||||
if (item.fiber_type == "") {
|
||||
msg.push('<p class="focusNode" title="Click here to focus the fiber" id=\'spanFP' + item.id.replace(/\s/g, '') + '\' onClick="focusNodeFiber(\'' + item.id + '\',2)"><img width="25" src="./Assets/img/error-listing-icon.svg"> <b>' + item.label + '</b> - ' + singleFiberJSON.component_type + ' type not entered by the user.</p>');
|
||||
flag = true;
|
||||
}
|
||||
if (isNaN(span_length) || spanlen <= 0 || span_length == "") {
|
||||
msg.push('<p class="focusNode" title="Click here to focus the fiber" id=\'spanFP' + item.id.replace(/\s/g, '') + '\' onClick="focusNodeFiber(\'' + item.id + '\',2)"><img width="25" src="./Assets/img/error-listing-icon.svg"> <b>' + item.label + '</b> - ' + singleFiberJSON.component_type + ' length not entered by the user.</p>');
|
||||
flag = true;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
message = msg.join(' ');
|
||||
return { message: message, flag: flag };
|
||||
}
|
||||
|
||||
/** Check the node link and type rules on import network JSON file. */
|
||||
function nodeRuleOnImportJSON() {
|
||||
//checkLink
|
||||
var roadmList = network.body.data.nodes.get({
|
||||
filter: function (item) {
|
||||
return (item.node_type == roadmJSON.node_type || item.node_type == transceiverJSON.node_type);
|
||||
}
|
||||
});
|
||||
|
||||
var connectedEdges;
|
||||
var fromCount = 0;
|
||||
var toCount = 0;
|
||||
var edgeDetails;
|
||||
var tempEdge = [];
|
||||
$.each(roadmList, function (index, item) {
|
||||
connectedEdges = network.getConnectedEdges(item.id);
|
||||
tempEdge = [];
|
||||
$.each(connectedEdges, function (index, item1) {
|
||||
if (network.body.data.edges.get(item1).component_type != serviceJSON.component_type)
|
||||
tempEdge.push(item1);
|
||||
});
|
||||
fromCount = 0;
|
||||
toCount = 0;
|
||||
for (i = 0; i < tempEdge.length; i++) {
|
||||
edgeDetails = network.body.data.edges.get(tempEdge[i]);
|
||||
if (edgeDetails.from == item.id)
|
||||
fromCount++;
|
||||
else if (edgeDetails.to == item.id)
|
||||
toCount++;
|
||||
}
|
||||
|
||||
if (fromCount != toCount || (fromCount == 0 && toCount == 0)) {
|
||||
addNodeHighlight(item.id);
|
||||
}
|
||||
else {
|
||||
if (item.node_type == transceiverJSON.node_type && item.transceiver_type == "") {
|
||||
addNodeHighlight(item.id);
|
||||
}
|
||||
else if (item.node_type == roadmJSON.node_type && item.roadm_type == "") {
|
||||
addNodeHighlight(item.id);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
//checkMisLink
|
||||
|
||||
roadmList = network.body.data.nodes.get({
|
||||
filter: function (item) {
|
||||
return (item.node_type == amplifierJSON.node_type || item.node_type == fusedJSON.node_type);
|
||||
}
|
||||
});
|
||||
|
||||
$.each(roadmList, function (index, item) {
|
||||
connectedEdges = network.getConnectedEdges(item.id);
|
||||
|
||||
fromCount = 0;
|
||||
toCount = 0;
|
||||
for (i = 0; i < connectedEdges.length; i++) {
|
||||
edgeDetails = network.body.data.edges.get(connectedEdges[i]);
|
||||
if (edgeDetails.from == item.id)
|
||||
fromCount++;
|
||||
else if (edgeDetails.to == item.id)
|
||||
toCount++;
|
||||
}
|
||||
|
||||
if (fromCount != toCount || (fromCount == 0 && toCount == 0) || fromCount > 1 || toCount > 1) {
|
||||
addNodeHighlight(item.id);
|
||||
}
|
||||
else {
|
||||
if (item.node_type == amplifierJSON.node_type) {
|
||||
if (item.amp_category == ramanampJSON.amp_category && item.amp_type == "" && !(item.category)) {
|
||||
addNodeHighlight(item.id);
|
||||
}
|
||||
else if (item.amp_category == amplifierJSON.amp_category && item.amp_type == "") {
|
||||
addNodeHighlight(item.id);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** Set fiber/patch/service smooth while on import network JSON file. */
|
||||
function edgeStyleOnImportJSON() {
|
||||
var edgeList = network.body.data.edges.get();
|
||||
var cfrom;
|
||||
var cto;
|
||||
var fiberData = [];
|
||||
for (var i = 0; i < edgeList.length; i++) {
|
||||
|
||||
cfrom = edgeList[i].from;
|
||||
cto = edgeList[i].to;
|
||||
|
||||
var connectedFiber = network.getConnectedEdges(cfrom);
|
||||
connectedFiber.push(network.getConnectedEdges(cto));
|
||||
var fromFiberCount = 0;
|
||||
var toFiberCount = 0;
|
||||
var fiberCount = 0;
|
||||
|
||||
$.each(connectedFiber, function (index, item) {
|
||||
var fiberDetails = network.body.data.edges.get(item);
|
||||
if (fiberDetails.fiber_category == dualFiberJSON.fiber_category || fiberDetails.fiber_category == singleFiberJSON.fiber_category || fiberDetails.component_type == serviceJSON.component_type || fiberDetails.component_type == dualPatchJSON.component_type) {
|
||||
var fiberSmooth = singleFiberJSON.options.smooth;
|
||||
if (fiberDetails.from == cfrom && fiberDetails.to == cto) {
|
||||
fiberCount++;
|
||||
|
||||
if (fiberCount == 1) {
|
||||
fiberSmooth = fiberJSON.options.smooth;
|
||||
}
|
||||
else {
|
||||
fromFiberCount++;
|
||||
fiberSmooth.roundness = "0." + fromFiberCount;
|
||||
}
|
||||
network.body.data.edges.update({
|
||||
id: fiberDetails.id, smooth: fiberSmooth
|
||||
|
||||
});
|
||||
}
|
||||
if (fiberDetails.from == cto && fiberDetails.to == cfrom) {
|
||||
fiberCount++;
|
||||
fiberSmooth.roundness = "0." + toFiberCount;
|
||||
if (fiberCount == 1) {
|
||||
fiberSmooth = fiberJSON.options.smooth;
|
||||
}
|
||||
else {
|
||||
toFiberCount++;
|
||||
fiberSmooth.roundness = "0." + toFiberCount;
|
||||
}
|
||||
network.body.data.edges.update({
|
||||
id: fiberDetails.id, smooth: fiberSmooth
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the node connections and fiber/patch/service rules on import network JSON file.
|
||||
* @param {string} cfrom - Source node.
|
||||
* @param {string} cto - Destination node.
|
||||
*/
|
||||
function nodeValidationInEdge(cfrom, cto) {
|
||||
// start remove highlight once roadm have equal in/out conn
|
||||
var roadmList = [];
|
||||
|
||||
if (network.body.data.nodes.get(cfrom).node_type == roadmJSON.node_type)
|
||||
roadmList.push(cfrom);
|
||||
|
||||
if (network.body.data.nodes.get(cto).node_type == roadmJSON.node_type)
|
||||
roadmList.push(cto);
|
||||
|
||||
var connectedEdges;
|
||||
var fromCount = 0;
|
||||
var toCount = 0;
|
||||
var edgeDetails;
|
||||
$.each(roadmList, function (index, item) {
|
||||
connectedEdges = network.getConnectedEdges(item);
|
||||
fromCount = 0;
|
||||
toCount = 0;
|
||||
for (i = 0; i < connectedEdges.length; i++) {
|
||||
edgeDetails = network.body.data.edges.get(connectedEdges[i]);
|
||||
if (edgeDetails.from == item)
|
||||
fromCount++;
|
||||
else if (edgeDetails.to == item)
|
||||
toCount++;
|
||||
}
|
||||
|
||||
if (fromCount != toCount || (fromCount == 0 && toCount == 0)) {
|
||||
addNodeHighlight(item);
|
||||
}
|
||||
else {
|
||||
if (network.body.data.nodes.get(item).roadm_type != "") {
|
||||
removeSpanInError(item, true);
|
||||
removeSpanInError(item);
|
||||
}
|
||||
else {
|
||||
var removeID = "#span" + item.replace(/\s/g, '');
|
||||
$(removeID).remove();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
// end
|
||||
|
||||
//start mislink
|
||||
roadmList = [];
|
||||
if (network.body.data.nodes.get(cfrom).node_type == fusedJSON.node_type || network.body.data.nodes.get(cfrom).node_type == amplifierJSON.node_type)
|
||||
roadmList.push(cfrom);
|
||||
|
||||
if (network.body.data.nodes.get(cto).node_type == fusedJSON.node_type || network.body.data.nodes.get(cto).node_type == amplifierJSON.node_type)
|
||||
roadmList.push(cto);
|
||||
|
||||
|
||||
$.each(roadmList, function (index, item) {
|
||||
connectedEdges = network.getConnectedEdges(item);
|
||||
fromCount = 0;
|
||||
toCount = 0;
|
||||
for (i = 0; i < connectedEdges.length; i++) {
|
||||
edgeDetails = network.body.data.edges.get(connectedEdges[i]);
|
||||
if (edgeDetails.from == item)
|
||||
fromCount++;
|
||||
else if (edgeDetails.to == item)
|
||||
toCount++;
|
||||
}
|
||||
|
||||
if (fromCount != toCount || (fromCount == 0 && toCount == 0) || fromCount > 1 || toCount > 1) {
|
||||
addNodeHighlight(item);
|
||||
}
|
||||
else {
|
||||
|
||||
if (network.body.data.nodes.get(item).node_type == amplifierJSON.node_type) {
|
||||
|
||||
|
||||
if (network.body.data.nodes.get(item).amp_category == amplifierJSON.amp_category) {
|
||||
if (network.body.data.nodes.get(item).amp_type != "") {
|
||||
removeSpanInError(item, true);
|
||||
removeSpanInError(item);
|
||||
}
|
||||
else {
|
||||
var removeID = "#span" + item.replace(/\s/g, '');
|
||||
$(removeID).remove();
|
||||
}
|
||||
}
|
||||
else if (network.body.data.nodes.get(item).amp_category == ramanampJSON.amp_category) {
|
||||
if (network.body.data.nodes.get(item).amp_type != "" && (network.body.data.nodes.get(item).category)) {
|
||||
removeSpanInError(item, true);
|
||||
removeSpanInError(item);
|
||||
}
|
||||
else {
|
||||
var removeID = "#span" + item.replace(/\s/g, '');
|
||||
$(removeID).remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
removeSpanInError(item);
|
||||
}
|
||||
}
|
||||
});
|
||||
//
|
||||
// start remove highlight once transceiver have equal in/out conn
|
||||
var tempEdge = [];
|
||||
roadmList = [];
|
||||
if (network.body.data.nodes.get(cfrom).node_type == transceiverJSON.node_type)
|
||||
roadmList.push(cfrom);
|
||||
|
||||
if (network.body.data.nodes.get(cto).node_type == transceiverJSON.node_type)
|
||||
roadmList.push(cto);
|
||||
|
||||
$.each(roadmList, function (index, item) {
|
||||
connectedEdges = network.getConnectedEdges(item);
|
||||
tempEdge = [];
|
||||
$.each(connectedEdges, function (index, item1) {
|
||||
if (network.body.data.edges.get(item1).component_type != serviceJSON.component_type)
|
||||
tempEdge.push(item1);
|
||||
});
|
||||
fromCount = 0;
|
||||
toCount = 0;
|
||||
for (i = 0; i < tempEdge.length; i++) {
|
||||
edgeDetails = network.body.data.edges.get(tempEdge[i]);
|
||||
if (edgeDetails.from == item)
|
||||
fromCount++;
|
||||
else if (edgeDetails.to == item)
|
||||
toCount++;
|
||||
}
|
||||
|
||||
if (fromCount != toCount || (fromCount == 0 && toCount == 0)) {
|
||||
addNodeHighlight(item);
|
||||
}
|
||||
else {
|
||||
//removeSpanInError(item);
|
||||
if (network.body.data.nodes.get(item).transceiver_type != "") {
|
||||
removeSpanInError(item, true);
|
||||
removeSpanInError(item);
|
||||
}
|
||||
else {
|
||||
var removeID = "#span" + item.replace(/\s/g, '');
|
||||
$(removeID).remove();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
// end
|
||||
|
||||
realUpdate();
|
||||
checkErrorFree();
|
||||
|
||||
//end
|
||||
}
|
||||
</code></pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">oopt-gnpy-web-gui-main</a></h2><h3>Modules</h3><ul><li><a href="module-alea.html">alea</a></li><li><a href="module-constraints.html">constraints</a></li><li><a href="module-exampleUtil.html">exampleUtil</a></li><li><a href="module-fiber.html">fiber</a></li><li><a href="module-filesaver.html">filesaver</a></li><li><a href="module-mynetwork.html">mynetwork</a></li><li><a href="module-node.html">node</a></li><li><a href="module-patch.html">patch</a></li><li><a href="module-service.html">service</a></li><li><a href="module-validation.html">validation</a></li></ul><h3>Tutorials</h3><ul><li><a href="tutorial-LICENSE.html">LICENSE</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Wed Jul 06 2022 15:49:42 GMT+0530 (India Standard Time)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
<script src="scripts/linenumber.js"> </script>
|
||||
</body>
|
||||
</html>
|
||||
203
docs/exampleUtil.js.html
Normal file
203
docs/exampleUtil.js.html
Normal file
@@ -0,0 +1,203 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Source: exampleUtil.js</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Source: exampleUtil.js</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="prettyprint source linenums"><code> /**
|
||||
* exampleUtil module
|
||||
* @module exampleUtil
|
||||
*/
|
||||
|
||||
// These globals will be injected into a page that will use them.
|
||||
/* eslint no-unused-vars: "off" */
|
||||
|
||||
// This is quite old and I don't want to waste too much time here. We probably
|
||||
// should stop using this altogether as the examples should be easy and
|
||||
// straightforward to understand and this only obscures it.
|
||||
/* eslint require-jsdoc: "off" */
|
||||
|
||||
/* global Alea:false seededRandom:true */
|
||||
|
||||
/**
|
||||
* Created by Alex on 5/20/2015.
|
||||
*
|
||||
* @remarks
|
||||
* This depends on Alea from https://unpkg.com/alea@1.0.0/alea.js.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @param path
|
||||
* @param success
|
||||
* @param error
|
||||
*/
|
||||
function loadJSON(path, success, error) {
|
||||
const xhr = new XMLHttpRequest();
|
||||
xhr.onreadystatechange = function () {
|
||||
if (xhr.readyState === 4) {
|
||||
if (xhr.status === 200) {
|
||||
success(JSON.parse(xhr.responseText));
|
||||
} else {
|
||||
error(xhr);
|
||||
}
|
||||
}
|
||||
};
|
||||
xhr.open("GET", path, true);
|
||||
xhr.send();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param nodeCount
|
||||
*/
|
||||
function getScaleFreeNetwork(nodeCount) {
|
||||
const nodes = [];
|
||||
const edges = [];
|
||||
const connectionCount = [];
|
||||
|
||||
// Add child nodes, change styles…
|
||||
// randomly create some nodes and edges
|
||||
for (let i = 0; i < nodeCount; i++) {
|
||||
nodes.push({
|
||||
id: i,
|
||||
label: String(i),
|
||||
});
|
||||
|
||||
connectionCount[i] = 0;
|
||||
|
||||
// create edges in a scale-free-network way
|
||||
if (i == 1) {
|
||||
const from = i;
|
||||
const to = 0;
|
||||
edges.push({
|
||||
from: from,
|
||||
to: to,
|
||||
});
|
||||
connectionCount[from]++;
|
||||
connectionCount[to]++;
|
||||
} else if (i > 1) {
|
||||
const conn = edges.length * 2;
|
||||
const rand = Math.floor(seededRandom() * conn);
|
||||
let cum = 0;
|
||||
let j = 0;
|
||||
while (j < connectionCount.length && cum < rand) {
|
||||
cum += connectionCount[j];
|
||||
j++;
|
||||
}
|
||||
|
||||
const from = i;
|
||||
const to = j;
|
||||
edges.push({
|
||||
from: from,
|
||||
to: to,
|
||||
});
|
||||
connectionCount[from]++;
|
||||
connectionCount[to]++;
|
||||
}
|
||||
}
|
||||
|
||||
return { nodes: nodes, edges: edges };
|
||||
}
|
||||
|
||||
seededRandom = Alea("SEED");
|
||||
|
||||
/**
|
||||
* @param nodeCount
|
||||
*/
|
||||
function getScaleFreeNetworkSeeded(nodeCount) {
|
||||
const nodes = [];
|
||||
const edges = [];
|
||||
const connectionCount = [];
|
||||
let edgesId = 0;
|
||||
|
||||
// randomly create some nodes and edges
|
||||
for (let i = 0; i < nodeCount; i++) {
|
||||
nodes.push({
|
||||
id: i,
|
||||
label: String(i),
|
||||
title: element(i),
|
||||
});
|
||||
|
||||
connectionCount[i] = 0;
|
||||
|
||||
// create edges in a scale-free-network way
|
||||
if (i == 1) {
|
||||
const from = i;
|
||||
const to = 0;
|
||||
edges.push({
|
||||
id: edgesId++,
|
||||
from: from,
|
||||
to: to,
|
||||
});
|
||||
connectionCount[from]++;
|
||||
connectionCount[to]++;
|
||||
} else if (i > 1) {
|
||||
const conn = edges.length * 2;
|
||||
const rand = Math.floor(seededRandom() * conn);
|
||||
let cum = 0;
|
||||
let j = 0;
|
||||
while (j < connectionCount.length && cum < rand) {
|
||||
cum += connectionCount[j];
|
||||
j++;
|
||||
}
|
||||
|
||||
const from = i;
|
||||
const to = j;
|
||||
edges.push({
|
||||
id: edgesId++,
|
||||
from: from,
|
||||
to: to,
|
||||
});
|
||||
connectionCount[from]++;
|
||||
connectionCount[to]++;
|
||||
}
|
||||
}
|
||||
|
||||
return { nodes: nodes, edges: edges };
|
||||
|
||||
}
|
||||
|
||||
</code></pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">oopt-gnpy-web-gui-main</a></h2><h3>Modules</h3><ul><li><a href="module-alea.html">alea</a></li><li><a href="module-constraints.html">constraints</a></li><li><a href="module-exampleUtil.html">exampleUtil</a></li><li><a href="module-fiber.html">fiber</a></li><li><a href="module-filesaver.html">filesaver</a></li><li><a href="module-mynetwork.html">mynetwork</a></li><li><a href="module-node.html">node</a></li><li><a href="module-patch.html">patch</a></li><li><a href="module-service.html">service</a></li><li><a href="module-validation.html">validation</a></li></ul><h3>Tutorials</h3><ul><li><a href="tutorial-LICENSE.html">LICENSE</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Wed Jul 06 2022 15:49:42 GMT+0530 (India Standard Time)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
<script src="scripts/linenumber.js"> </script>
|
||||
</body>
|
||||
</html>
|
||||
1229
docs/fiber.js.html
Normal file
1229
docs/fiber.js.html
Normal file
File diff suppressed because it is too large
Load Diff
226
docs/filesaver.js.html
Normal file
226
docs/filesaver.js.html
Normal file
@@ -0,0 +1,226 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Source: filesaver.js</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Source: filesaver.js</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="prettyprint source linenums"><code> /**
|
||||
* filesaver module
|
||||
* @module filesaver
|
||||
*/
|
||||
|
||||
/*
|
||||
* FileSaver.js
|
||||
* A saveAs() FileSaver implementation.
|
||||
*
|
||||
* By Eli Grey, http://eligrey.com
|
||||
*
|
||||
* License : https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md (MIT)
|
||||
* source : http://purl.eligrey.com/github/FileSaver.js
|
||||
*/
|
||||
|
||||
// The one and only way of getting global scope in all environments
|
||||
// https://stackoverflow.com/q/3277182/1008999
|
||||
var _global = typeof window === 'object' && window.window === window
|
||||
? window : typeof self === 'object' && self.self === self
|
||||
? self : typeof global === 'object' && global.global === global
|
||||
? global
|
||||
: this
|
||||
|
||||
function bom(blob, opts) {
|
||||
if (typeof opts === 'undefined') opts = { autoBom: false }
|
||||
else if (typeof opts !== 'object') {
|
||||
console.warn('Deprecated: Expected third argument to be a object')
|
||||
opts = { autoBom: !opts }
|
||||
}
|
||||
|
||||
// prepend BOM for UTF-8 XML and text/* types (including HTML)
|
||||
// note: your browser will automatically convert UTF-16 U+FEFF to EF BB BF
|
||||
if (opts.autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)) {
|
||||
return new Blob([String.fromCharCode(0xFEFF), blob], { type: blob.type })
|
||||
}
|
||||
return blob
|
||||
}
|
||||
|
||||
function download(url, name, opts) {
|
||||
var xhr = new XMLHttpRequest()
|
||||
xhr.open('GET', url)
|
||||
xhr.responseType = 'blob'
|
||||
xhr.onload = function () {
|
||||
saveAs(xhr.response, name, opts)
|
||||
}
|
||||
xhr.onerror = function () {
|
||||
console.error('could not download file')
|
||||
}
|
||||
xhr.send()
|
||||
}
|
||||
|
||||
function corsEnabled(url) {
|
||||
var xhr = new XMLHttpRequest()
|
||||
// use sync to avoid popup blocker
|
||||
xhr.open('HEAD', url, false)
|
||||
try {
|
||||
xhr.send()
|
||||
} catch (e) { }
|
||||
return xhr.status >= 200 && xhr.status <= 299
|
||||
}
|
||||
|
||||
// `a.click()` doesn't work for all browsers (#465)
|
||||
function click(node) {
|
||||
try {
|
||||
node.dispatchEvent(new MouseEvent('click'))
|
||||
} catch (e) {
|
||||
var evt = document.createEvent('MouseEvents')
|
||||
evt.initMouseEvent('click', true, true, window, 0, 0, 0, 80,
|
||||
20, false, false, false, false, 0, null)
|
||||
node.dispatchEvent(evt)
|
||||
}
|
||||
}
|
||||
|
||||
// Detect WebView inside a native macOS app by ruling out all browsers
|
||||
// We just need to check for 'Safari' because all other browsers (besides Firefox) include that too
|
||||
// https://www.whatismybrowser.com/guides/the-latest-user-agent/macos
|
||||
var isMacOSWebView = _global.navigator && /Macintosh/.test(navigator.userAgent) && /AppleWebKit/.test(navigator.userAgent) && !/Safari/.test(navigator.userAgent)
|
||||
|
||||
var saveAs = _global.saveAs || (
|
||||
// probably in some web worker
|
||||
(typeof window !== 'object' || window !== _global)
|
||||
? function saveAs() { /* noop */ }
|
||||
|
||||
// Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView
|
||||
: ('download' in HTMLAnchorElement.prototype && !isMacOSWebView)
|
||||
? function saveAs(blob, name, opts) {
|
||||
var URL = _global.URL || _global.webkitURL
|
||||
var a = document.createElement('a')
|
||||
name = name || blob.name || 'download'
|
||||
|
||||
a.download = name
|
||||
a.rel = 'noopener' // tabnabbing
|
||||
|
||||
// TODO: detect chrome extensions & packaged apps
|
||||
// a.target = '_blank'
|
||||
|
||||
if (typeof blob === 'string') {
|
||||
// Support regular links
|
||||
a.href = blob
|
||||
if (a.origin !== location.origin) {
|
||||
corsEnabled(a.href)
|
||||
? download(blob, name, opts)
|
||||
: click(a, a.target = '_blank')
|
||||
} else {
|
||||
click(a)
|
||||
}
|
||||
} else {
|
||||
// Support blobs
|
||||
a.href = URL.createObjectURL(blob)
|
||||
setTimeout(function () { URL.revokeObjectURL(a.href) }, 4E4) // 40s
|
||||
setTimeout(function () { click(a) }, 0)
|
||||
}
|
||||
}
|
||||
|
||||
// Use msSaveOrOpenBlob as a second approach
|
||||
: 'msSaveOrOpenBlob' in navigator
|
||||
? function saveAs(blob, name, opts) {
|
||||
name = name || blob.name || 'download'
|
||||
|
||||
if (typeof blob === 'string') {
|
||||
if (corsEnabled(blob)) {
|
||||
download(blob, name, opts)
|
||||
} else {
|
||||
var a = document.createElement('a')
|
||||
a.href = blob
|
||||
a.target = '_blank'
|
||||
setTimeout(function () { click(a) })
|
||||
}
|
||||
} else {
|
||||
navigator.msSaveOrOpenBlob(bom(blob, opts), name)
|
||||
}
|
||||
}
|
||||
|
||||
// Fallback to using FileReader and a popup
|
||||
: function saveAs(blob, name, opts, popup) {
|
||||
// Open a popup immediately do go around popup blocker
|
||||
// Mostly only available on user interaction and the fileReader is async so...
|
||||
popup = popup || open('', '_blank')
|
||||
if (popup) {
|
||||
popup.document.title =
|
||||
popup.document.body.innerText = 'downloading...'
|
||||
}
|
||||
|
||||
if (typeof blob === 'string') return download(blob, name, opts)
|
||||
|
||||
var force = blob.type === 'application/octet-stream'
|
||||
var isSafari = /constructor/i.test(_global.HTMLElement) || _global.safari
|
||||
var isChromeIOS = /CriOS\/[\d]+/.test(navigator.userAgent)
|
||||
|
||||
if ((isChromeIOS || (force && isSafari) || isMacOSWebView) && typeof FileReader !== 'undefined') {
|
||||
// Safari doesn't allow downloading of blob URLs
|
||||
var reader = new FileReader()
|
||||
reader.onloadend = function () {
|
||||
var url = reader.result
|
||||
url = isChromeIOS ? url : url.replace(/^data:[^;]*;/, 'data:attachment/file;')
|
||||
if (popup) popup.location.href = url
|
||||
else location = url
|
||||
popup = null // reverse-tabnabbing #460
|
||||
}
|
||||
reader.readAsDataURL(blob)
|
||||
} else {
|
||||
var URL = _global.URL || _global.webkitURL
|
||||
var url = URL.createObjectURL(blob)
|
||||
if (popup) popup.location = url
|
||||
else location.href = url
|
||||
popup = null // reverse-tabnabbing #460
|
||||
setTimeout(function () { URL.revokeObjectURL(url) }, 4E4) // 40s
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
_global.saveAs = saveAs.saveAs = saveAs
|
||||
|
||||
if (typeof module !== 'undefined') {
|
||||
module.exports = saveAs;
|
||||
}</code></pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">oopt-gnpy-web-gui-main</a></h2><h3>Modules</h3><ul><li><a href="module-alea.html">alea</a></li><li><a href="module-constraints.html">constraints</a></li><li><a href="module-exampleUtil.html">exampleUtil</a></li><li><a href="module-fiber.html">fiber</a></li><li><a href="module-filesaver.html">filesaver</a></li><li><a href="module-mynetwork.html">mynetwork</a></li><li><a href="module-node.html">node</a></li><li><a href="module-patch.html">patch</a></li><li><a href="module-service.html">service</a></li><li><a href="module-validation.html">validation</a></li></ul><h3>Tutorials</h3><ul><li><a href="tutorial-LICENSE.html">LICENSE</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Wed Jul 06 2022 15:49:42 GMT+0530 (India Standard Time)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
<script src="scripts/linenumber.js"> </script>
|
||||
</body>
|
||||
</html>
|
||||
BIN
docs/fonts/OpenSans-Bold-webfont.eot
Normal file
BIN
docs/fonts/OpenSans-Bold-webfont.eot
Normal file
Binary file not shown.
1830
docs/fonts/OpenSans-Bold-webfont.svg
Normal file
1830
docs/fonts/OpenSans-Bold-webfont.svg
Normal file
File diff suppressed because it is too large
Load Diff
|
After Width: | Height: | Size: 116 KiB |
BIN
docs/fonts/OpenSans-Bold-webfont.woff
Normal file
BIN
docs/fonts/OpenSans-Bold-webfont.woff
Normal file
Binary file not shown.
BIN
docs/fonts/OpenSans-BoldItalic-webfont.eot
Normal file
BIN
docs/fonts/OpenSans-BoldItalic-webfont.eot
Normal file
Binary file not shown.
1830
docs/fonts/OpenSans-BoldItalic-webfont.svg
Normal file
1830
docs/fonts/OpenSans-BoldItalic-webfont.svg
Normal file
File diff suppressed because it is too large
Load Diff
|
After Width: | Height: | Size: 118 KiB |
BIN
docs/fonts/OpenSans-BoldItalic-webfont.woff
Normal file
BIN
docs/fonts/OpenSans-BoldItalic-webfont.woff
Normal file
Binary file not shown.
BIN
docs/fonts/OpenSans-Italic-webfont.eot
Normal file
BIN
docs/fonts/OpenSans-Italic-webfont.eot
Normal file
Binary file not shown.
1830
docs/fonts/OpenSans-Italic-webfont.svg
Normal file
1830
docs/fonts/OpenSans-Italic-webfont.svg
Normal file
File diff suppressed because it is too large
Load Diff
|
After Width: | Height: | Size: 120 KiB |
BIN
docs/fonts/OpenSans-Italic-webfont.woff
Normal file
BIN
docs/fonts/OpenSans-Italic-webfont.woff
Normal file
Binary file not shown.
BIN
docs/fonts/OpenSans-Light-webfont.eot
Normal file
BIN
docs/fonts/OpenSans-Light-webfont.eot
Normal file
Binary file not shown.
1831
docs/fonts/OpenSans-Light-webfont.svg
Normal file
1831
docs/fonts/OpenSans-Light-webfont.svg
Normal file
File diff suppressed because it is too large
Load Diff
|
After Width: | Height: | Size: 114 KiB |
BIN
docs/fonts/OpenSans-Light-webfont.woff
Normal file
BIN
docs/fonts/OpenSans-Light-webfont.woff
Normal file
Binary file not shown.
BIN
docs/fonts/OpenSans-LightItalic-webfont.eot
Normal file
BIN
docs/fonts/OpenSans-LightItalic-webfont.eot
Normal file
Binary file not shown.
1835
docs/fonts/OpenSans-LightItalic-webfont.svg
Normal file
1835
docs/fonts/OpenSans-LightItalic-webfont.svg
Normal file
File diff suppressed because it is too large
Load Diff
|
After Width: | Height: | Size: 120 KiB |
BIN
docs/fonts/OpenSans-LightItalic-webfont.woff
Normal file
BIN
docs/fonts/OpenSans-LightItalic-webfont.woff
Normal file
Binary file not shown.
BIN
docs/fonts/OpenSans-Regular-webfont.eot
Normal file
BIN
docs/fonts/OpenSans-Regular-webfont.eot
Normal file
Binary file not shown.
1831
docs/fonts/OpenSans-Regular-webfont.svg
Normal file
1831
docs/fonts/OpenSans-Regular-webfont.svg
Normal file
File diff suppressed because it is too large
Load Diff
|
After Width: | Height: | Size: 117 KiB |
BIN
docs/fonts/OpenSans-Regular-webfont.woff
Normal file
BIN
docs/fonts/OpenSans-Regular-webfont.woff
Normal file
Binary file not shown.
448
docs/global.html
Normal file
448
docs/global.html
Normal file
@@ -0,0 +1,448 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Global</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Global</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
|
||||
<header>
|
||||
|
||||
<h2></h2>
|
||||
|
||||
|
||||
</header>
|
||||
|
||||
<article>
|
||||
<div class="container-overview">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 class="subsection-title">Type Definitions</h3>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="ImageCallback"><span class="type-signature"></span>ImageCallback<span class="signature">(image)</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>This callback is a callback that accepts an Image.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Parameters:</h5>
|
||||
|
||||
|
||||
<table class="params">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>image</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">Image</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="thirdparty_vis.js.html">thirdparty/vis.js</a>, <a href="thirdparty_vis.js.html#line14149">line 14149</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="MeasureText"><span class="type-signature"></span>MeasureText<span class="signature">(text, mod)</span><span class="type-signature"> → {object}</span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>Callback to determine text dimensions, using the parent label settings.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Parameters:</h5>
|
||||
|
||||
|
||||
<table class="params">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>text</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">text</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"></td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>mod</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">text</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="thirdparty_vis.js.html">thirdparty/vis.js</a>, <a href="thirdparty_vis.js.html#line20014">line 20014</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Returns:</h5>
|
||||
|
||||
|
||||
<div class="param-desc">
|
||||
<p>{ width, values} width in pixels and font attributes</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>
|
||||
Type
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<span class="param-type">object</span>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">oopt-gnpy-web-gui-main</a></h2><h3>Modules</h3><ul><li><a href="module-alea.html">alea</a></li><li><a href="module-constraints.html">constraints</a></li><li><a href="module-exampleUtil.html">exampleUtil</a></li><li><a href="module-fiber.html">fiber</a></li><li><a href="module-filesaver.html">filesaver</a></li><li><a href="module-main.html">main</a></li><li><a href="module-mynetwork.html">mynetwork</a></li><li><a href="module-node.html">node</a></li><li><a href="module-patch.html">patch</a></li><li><a href="module-service.html">service</a></li><li><a href="module-validation.html">validation</a></li></ul><h3>Classes</h3><ul><li><a href="Activator.html">Activator</a></li><li><a href="Network.html">Network</a></li></ul><h3>Tutorials</h3><ul><li><a href="tutorial-LICENSE.html">LICENSE</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Wed Jul 06 2022 16:23:21 GMT+0530 (India Standard Time)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
<script src="scripts/linenumber.js"> </script>
|
||||
</body>
|
||||
</html>
|
||||
165
docs/index.html
Normal file
165
docs/index.html
Normal file
@@ -0,0 +1,165 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: oopt-gnpy-web-gui-main</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">oopt-gnpy-web-gui-main</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3> </h3>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
|
||||
<header>
|
||||
|
||||
<!-- <h2>main.js</h2> -->
|
||||
|
||||
|
||||
</header>
|
||||
|
||||
<article>
|
||||
<div class="container-overview">
|
||||
|
||||
|
||||
<div class="description"><p>GNPy is a open source optical network planning tool which can be used to simulate multi-vendor open optical networks. Click below to explore the tool.</p></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- <dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="main.js.html">main.js</a>, <a href="main.js.html#line1">line 1</a>
|
||||
</li></ul></dd> -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-see">See:</dt>
|
||||
<dd class="tag-see">
|
||||
<ul>
|
||||
<li><a href="https://tiptool.vee-services.com/">GNPy Optical network planning tool</a></li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">oopt-gnpy-web-gui-main</a></h2><h3>Modules</h3><ul><li><a href="module-alea.html">alea</a></li><li><a href="module-constraints.html">constraints</a></li><li><a href="module-exampleUtil.html">exampleUtil</a></li><li><a href="module-fiber.html">fiber</a></li><li><a href="module-filesaver.html">filesaver</a></li><li><a href="module-main.html">main</a></li><li><a href="module-mynetwork.html">mynetwork</a></li><li><a href="module-node.html">node</a></li><li><a href="module-patch.html">patch</a></li><li><a href="module-service.html">service</a></li><li><a href="module-validation.html">validation</a></li></ul><h3>Tutorials</h3><ul><li><a href="tutorial-LICENSE.html">LICENSE</a></li><li><a href="tutorial-technical_document.html">technical_document</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Wed Jul 06 2022 19:21:36 GMT+0530 (India Standard Time)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
<script src="scripts/linenumber.js"> </script>
|
||||
</body>
|
||||
</html>
|
||||
580
docs/main.js.html
Normal file
580
docs/main.js.html
Normal file
@@ -0,0 +1,580 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Source: main.js</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Source: main.js</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="prettyprint source linenums"><code>/**
|
||||
* @file GNPy is a open source optical network planning tool which can be used to simulate multi-vendor open optical networks. Click below to explore the tool.
|
||||
* @see <a href="https://tiptool.vee-services.com/">GNPy Optical network planning tool</a>
|
||||
*/
|
||||
|
||||
/**
|
||||
* main.js
|
||||
* The main.js library describes UI actions. like show/hide and update the HTML element with style based on user interaction.
|
||||
* @module main
|
||||
*/
|
||||
|
||||
|
||||
let attenuator = document.querySelector('#attenuator');
|
||||
let roadm = document.querySelector('#roadm');
|
||||
let ILA = document.querySelector('#ILA');
|
||||
let amplifier = document.querySelector('#amplifier');
|
||||
let dualfiber = document.querySelector('#dualfiber');
|
||||
let service = document.querySelector('#service');
|
||||
let transceiver = document.querySelector('#transceiver');
|
||||
let singlefiber = document.querySelector('#singlefiber');
|
||||
let singlepatch = document.querySelector('#singlepatch');
|
||||
let dualpatch = document.querySelector('#dualpatch');
|
||||
let ramanamp = document.querySelector('#ramanamp');
|
||||
let drawerclose = document.getElementById('drawer-close')
|
||||
|
||||
/**
|
||||
* Open drawer based on node/fiber/patch/service.
|
||||
* @param {string} node - The type of component.
|
||||
*/
|
||||
function openDrawer(node) {
|
||||
switch (node) {
|
||||
case 'attenuator':
|
||||
roadm.classList.remove('d-visible');
|
||||
ILA.classList.remove('d-visible');
|
||||
amplifier.classList.remove('d-visible');
|
||||
dualfiber.classList.remove('d-visible');
|
||||
service.classList.remove('d-visible');
|
||||
attenuator.classList.add('d-visible');
|
||||
transceiver.classList.remove('d-visible');
|
||||
singlefiber.classList.remove('d-visible');
|
||||
singlepatch.classList.remove('d-visible');
|
||||
dualpatch.classList.remove('d-visible');
|
||||
ramanamp.classList.remove('d-visible');
|
||||
|
||||
// drawerclose.classList.add("drawerleft")
|
||||
break;
|
||||
case 'roadm':
|
||||
attenuator.classList.remove('d-visible');
|
||||
ILA.classList.remove('d-visible');
|
||||
amplifier.classList.remove('d-visible');
|
||||
dualfiber.classList.remove('d-visible');
|
||||
service.classList.remove('d-visible');
|
||||
transceiver.classList.remove('d-visible');
|
||||
singlefiber.classList.remove('d-visible');
|
||||
singlepatch.classList.remove('d-visible');
|
||||
dualpatch.classList.remove('d-visible');
|
||||
roadm.classList.add('d-visible');
|
||||
ramanamp.classList.remove('d-visible');
|
||||
// drawerclose.classList.add("drawerleft")
|
||||
break;
|
||||
case 'ILA':
|
||||
attenuator.classList.remove('d-visible');
|
||||
ILA.classList.add('d-visible');
|
||||
amplifier.classList.remove('d-visible');
|
||||
dualfiber.classList.remove('d-visible');
|
||||
service.classList.remove('d-visible');
|
||||
roadm.classList.remove('d-visible');
|
||||
transceiver.classList.remove('d-visible');
|
||||
singlefiber.classList.remove('d-visible');
|
||||
singlepatch.classList.remove('d-visible');
|
||||
// drawerclose.classList.add("drawerleft")
|
||||
dualpatch.classList.remove('d-visible');
|
||||
ramanamp.classList.remove('d-visible');
|
||||
break;
|
||||
case 'amplifier':
|
||||
attenuator.classList.remove('d-visible');
|
||||
ILA.classList.remove('d-visible');
|
||||
amplifier.classList.add('d-visible');
|
||||
dualfiber.classList.remove('d-visible');
|
||||
service.classList.remove('d-visible');
|
||||
roadm.classList.remove('d-visible');
|
||||
transceiver.classList.remove('d-visible');
|
||||
singlefiber.classList.remove('d-visible');
|
||||
singlepatch.classList.remove('d-visible');
|
||||
dualpatch.classList.remove('d-visible');
|
||||
// drawerclose.classList.add("drawerleft")
|
||||
ramanamp.classList.remove('d-visible');
|
||||
break;
|
||||
case 'dualfiber':
|
||||
attenuator.classList.remove('d-visible');
|
||||
ILA.classList.remove('d-visible');
|
||||
amplifier.classList.remove('d-visible');
|
||||
dualfiber.classList.add('d-visible');
|
||||
service.classList.remove('d-visible');
|
||||
roadm.classList.remove('d-visible');
|
||||
transceiver.classList.remove('d-visible');
|
||||
singlefiber.classList.remove('d-visible');
|
||||
singlepatch.classList.remove('d-visible');
|
||||
// drawerclose.classList.add("drawerleft")
|
||||
dualpatch.classList.remove('d-visible');
|
||||
ramanamp.classList.remove('d-visible');
|
||||
break;
|
||||
case 'create':
|
||||
attenuator.classList.remove('d-visible');
|
||||
ILA.classList.remove('d-visible');
|
||||
amplifier.classList.remove('d-visible');
|
||||
dualfiber.classList.remove('d-visible');
|
||||
service.classList.remove('d-visible');
|
||||
roadm.classList.remove('d-visible');
|
||||
transceiver.classList.remove('d-visible');
|
||||
singlefiber.classList.remove('d-visible');
|
||||
singlepatch.classList.remove('d-visible');
|
||||
dualpatch.classList.remove('d-visible');
|
||||
// drawerclose.classList.add("drawerleft")
|
||||
ramanamp.classList.remove('d-visible');
|
||||
break;
|
||||
case 'transceiver':
|
||||
attenuator.classList.remove('d-visible');
|
||||
ILA.classList.remove('d-visible');
|
||||
amplifier.classList.remove('d-visible');
|
||||
dualfiber.classList.remove('d-visible');
|
||||
service.classList.remove('d-visible');
|
||||
roadm.classList.remove('d-visible');
|
||||
transceiver.classList.add('d-visible');
|
||||
singlefiber.classList.remove('d-visible');
|
||||
singlepatch.classList.remove('d-visible');
|
||||
// drawerclose.classList.add("drawerleft")
|
||||
dualpatch.classList.remove('d-visible');
|
||||
ramanamp.classList.remove('d-visible');
|
||||
break;
|
||||
case 'singlefiber':
|
||||
attenuator.classList.remove('d-visible');
|
||||
ILA.classList.remove('d-visible');
|
||||
amplifier.classList.remove('d-visible');
|
||||
dualfiber.classList.remove('d-visible');
|
||||
service.classList.remove('d-visible');
|
||||
roadm.classList.remove('d-visible');
|
||||
transceiver.classList.remove('d-visible');
|
||||
singlefiber.classList.add('d-visible');
|
||||
singlepatch.classList.remove('d-visible');
|
||||
// drawerclose.classList.add("drawerleft")
|
||||
dualpatch.classList.remove('d-visible');
|
||||
ramanamp.classList.remove('d-visible');
|
||||
break;
|
||||
case 'dualpatch':
|
||||
attenuator.classList.remove('d-visible');
|
||||
ILA.classList.remove('d-visible');
|
||||
amplifier.classList.remove('d-visible');
|
||||
dualfiber.classList.remove('d-visible');
|
||||
service.classList.remove('d-visible');
|
||||
roadm.classList.remove('d-visible');
|
||||
transceiver.classList.remove('d-visible');
|
||||
singlefiber.classList.remove('d-visible');
|
||||
singlepatch.classList.remove('d-visible');
|
||||
dualpatch.classList.add('d-visible');
|
||||
// drawerclose.classList.add("drawerleft")
|
||||
ramanamp.classList.remove('d-visible');
|
||||
break;
|
||||
case 'singlepatch':
|
||||
attenuator.classList.remove('d-visible');
|
||||
ILA.classList.remove('d-visible');
|
||||
amplifier.classList.remove('d-visible');
|
||||
dualfiber.classList.remove('d-visible');
|
||||
service.classList.remove('d-visible');
|
||||
roadm.classList.remove('d-visible');
|
||||
transceiver.classList.remove('d-visible');
|
||||
singlefiber.classList.remove('d-visible');
|
||||
singlepatch.classList.add('d-visible');
|
||||
dualpatch.classList.remove('d-visible');
|
||||
// drawerclose.classList.add("drawerleft")
|
||||
ramanamp.classList.remove('d-visible');
|
||||
break;
|
||||
case 'service':
|
||||
attenuator.classList.remove('d-visible');
|
||||
ILA.classList.remove('d-visible');
|
||||
amplifier.classList.remove('d-visible');
|
||||
dualfiber.classList.remove('d-visible');
|
||||
service.classList.add('d-visible');
|
||||
roadm.classList.remove('d-visible');
|
||||
transceiver.classList.remove('d-visible');
|
||||
singlefiber.classList.remove('d-visible');
|
||||
singlepatch.classList.remove('d-visible');
|
||||
// drawerclose.classList.add("drawerleft")
|
||||
dualpatch.classList.remove('d-visible');
|
||||
ramanamp.classList.remove('d-visible');
|
||||
break;
|
||||
case 'ramanamp':
|
||||
attenuator.classList.remove('d-visible');
|
||||
ILA.classList.remove('d-visible');
|
||||
amplifier.classList.remove('d-visible');
|
||||
dualfiber.classList.remove('d-visible');
|
||||
service.classList.remove('d-visible');
|
||||
roadm.classList.remove('d-visible');
|
||||
transceiver.classList.remove('d-visible');
|
||||
singlefiber.classList.remove('d-visible');
|
||||
singlepatch.classList.remove('d-visible');
|
||||
// drawerclose.classList.add("drawerleft")
|
||||
dualpatch.classList.remove('d-visible');
|
||||
ramanamp.classList.add('d-visible');
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Close drawer based on node/fiber/patch/service.
|
||||
* @param {string} node - The type of component.
|
||||
*/
|
||||
function closeDrawer(node) {
|
||||
switch (node) {
|
||||
case 'attenuator':
|
||||
attenuator.classList.remove('d-visible');
|
||||
// drawerclose.classList.remove("drawerleft")
|
||||
break;
|
||||
case 'roadm':
|
||||
roadm.classList.remove('d-visible');
|
||||
// drawerclose.classList.remove("drawerleft")
|
||||
break;
|
||||
case 'ILA':
|
||||
ILA.classList.remove('d-visible');
|
||||
// drawerclose.classList.remove("drawerleft")
|
||||
break;
|
||||
case 'amplifier':
|
||||
amplifier.classList.remove('d-visible');
|
||||
// drawerclose.classList.remove("drawerleft")
|
||||
break;
|
||||
case 'create':
|
||||
create.classList.remove('d-visible');
|
||||
// drawerclose.classList.remove("drawerleft")
|
||||
break;
|
||||
case 'singlefiber':
|
||||
singlefiber.classList.remove('d-visible');
|
||||
// drawerclose.classList.remove("drawerleft")
|
||||
break;
|
||||
case 'transceiver':
|
||||
transceiver.classList.remove('d-visible');
|
||||
// drawerclose.classList.remove("drawerleft")
|
||||
break;
|
||||
case 'singlepatch':
|
||||
singlepatch.classList.remove('d-visible');
|
||||
// drawerclose.classList.remove("drawerleft")
|
||||
break;
|
||||
case 'dualpatch':
|
||||
dualpatch.classList.remove('d-visible');
|
||||
// drawerclose.classList.remove("drawerleft")
|
||||
break;
|
||||
case 'dualfiber':
|
||||
dualfiber.classList.remove('d-visible');
|
||||
// drawerclose.classList.remove("drawerleft")
|
||||
break;
|
||||
case 'service':
|
||||
service.classList.remove('d-visible');
|
||||
// drawerclose.classList.remove("drawerleft")
|
||||
case 'ramanamp':
|
||||
ramanamp.classList.remove('d-visible');
|
||||
// drawerclose.classList.remove("drawerleft")
|
||||
}
|
||||
}
|
||||
|
||||
var tabcontent = document.querySelector(".stp-tab");
|
||||
var arrowbtn1 = document.querySelector("#toggle-arrow-1");
|
||||
var arrowbtn2 = document.querySelector("#toggle-arrow-2");
|
||||
var arrowbtn3 = document.querySelector("#toggle-arrow-3");
|
||||
var arrowbtn4 = document.querySelector("#toggle-arrow-4");
|
||||
var sidebartext = document.querySelectorAll(".sidebar-text");
|
||||
var sidebartext1 = document.querySelectorAll(".sidebar-text1");
|
||||
var sidebartext2 = document.querySelectorAll(".sidebar-text2");
|
||||
var sidebartext3 = document.querySelectorAll(".sidebar-text3");
|
||||
|
||||
arrowbtn2.addEventListener("click", function () {
|
||||
tabcontent.classList.toggle('left-59')
|
||||
for (var i = 0; i < sidebartext1.length; i++) {
|
||||
sidebartext1[i].classList.toggle("d-none")
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
|
||||
arrowbtn3.addEventListener("click", function () {
|
||||
tabcontent.classList.toggle('left-59')
|
||||
for (var i = 0; i < sidebartext2.length; i++) {
|
||||
sidebartext2[i].classList.toggle("d-none")
|
||||
}
|
||||
|
||||
})
|
||||
arrowbtn4.addEventListener("click", function () {
|
||||
tabcontent.classList.toggle('left-59')
|
||||
for (var i = 0; i < sidebartext3.length; i++) {
|
||||
sidebartext3[i].classList.toggle("d-none")
|
||||
}
|
||||
})
|
||||
|
||||
/**
|
||||
* Highlight the steper menu by selection.
|
||||
* @param {number} index - The menu index.
|
||||
*/
|
||||
function stepColor(index) {
|
||||
showMenu = 0;
|
||||
modeHighLight();
|
||||
switch (index) {
|
||||
case 1:
|
||||
break;
|
||||
case 2:
|
||||
|
||||
currentStepper = "stepCreateTopology";
|
||||
showMenu = 1;
|
||||
//let prev = document.querySelector("#step2").previousElementSibling;
|
||||
//if (prev.id === "step1") {
|
||||
// let step1 = document.getElementById("step1").childNodes;
|
||||
// step1[1].classList.add("tab-nav-completed");
|
||||
// step1[1].classList.add("text-tab-completed")
|
||||
//}
|
||||
break;
|
||||
case 3:
|
||||
currentStepper = "stepAddService";
|
||||
showMenu = 2;
|
||||
//let prev1 = document.querySelector("#step3").previousElementSibling;
|
||||
//if (prev1.id === "step2") {
|
||||
// let step1 = document.getElementById("step2").childNodes;
|
||||
// step1[1].classList.add("tab-nav-completed");
|
||||
// step1[1].classList.add("text-tab-completed")
|
||||
//}
|
||||
break;
|
||||
case 4:
|
||||
currentStepper = "stepSaveNetwork";
|
||||
//let prev2 = document.querySelector("#step4").previousElementSibling;
|
||||
//if (prev2.id === "step3") {
|
||||
// let step1 = document.getElementById("step3").childNodes;
|
||||
// step1[1].classList.add("tab-nav-completed");
|
||||
// step1[1].classList.add("text-tab-completed")
|
||||
//}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
var btnAddRoadm = "#btnAddRoadm";
|
||||
var btnAddFused = "#btnAddFused";
|
||||
var btnAddILA = "#btnAddILA";
|
||||
var btnAddAmplifier = "#btnAddAmplifier";
|
||||
var btnAddTransceiver = "#btnAddTransceiver";
|
||||
var btnAddDualFiber = "#btnAddDualFiber";
|
||||
var btnAddSingleFiber = "#btnAddSingleFiber";
|
||||
var btnServiceActive = "#btnServiceActive";
|
||||
var btnAddSinglePatch = "#btnAddSinglePatch";
|
||||
var btnAddDualPatch = "#btnAddDualPatch";
|
||||
var btnAddRamAmp = "#btnAddRamAmp";
|
||||
|
||||
/**
|
||||
* Highlight node/fiber/patch/service menu by name.
|
||||
* @param {string} node - The type on component.
|
||||
*/
|
||||
function modeHighLight(node) {
|
||||
disableFiberService();
|
||||
showHideDrawerandMenu();
|
||||
switch (node) {
|
||||
case 'Roadm':
|
||||
$(btnAddRoadm).addClass('highlight');
|
||||
$(btnAddFused).removeClass('highlight');
|
||||
$(btnAddILA).removeClass('highlight');
|
||||
$(btnAddAmplifier).removeClass('highlight');
|
||||
$(btnAddTransceiver).removeClass('highlight');
|
||||
$(btnAddDualFiber).removeClass('highlight');
|
||||
$(btnAddSingleFiber).removeClass('highlight');
|
||||
$(btnAddSinglePatch).removeClass('highlight');
|
||||
$(btnAddDualPatch).removeClass('highlight');
|
||||
$(btnAddRamAmp).removeClass('highlight');
|
||||
break;
|
||||
case 'ILA':
|
||||
$(btnAddRoadm).removeClass('highlight');
|
||||
$(btnAddFused).removeClass('highlight');
|
||||
$(btnAddILA).addClass('highlight');
|
||||
$(btnAddAmplifier).removeClass('highlight');
|
||||
$(btnAddTransceiver).removeClass('highlight');
|
||||
$(btnAddDualFiber).removeClass('highlight');
|
||||
$(btnAddSingleFiber).removeClass('highlight');
|
||||
$(btnAddSinglePatch).removeClass('highlight');
|
||||
$(btnAddDualPatch).removeClass('highlight');
|
||||
$(btnAddRamAmp).removeClass('highlight');
|
||||
break;
|
||||
case 'amplifier':
|
||||
$(btnAddRoadm).removeClass('highlight');
|
||||
$(btnAddFused).removeClass('highlight');
|
||||
$(btnAddILA).removeClass('highlight');
|
||||
$(btnAddAmplifier).addClass('highlight');
|
||||
$(btnAddTransceiver).removeClass('highlight');
|
||||
$(btnAddDualFiber).removeClass('highlight');
|
||||
$(btnAddSingleFiber).removeClass('highlight');
|
||||
$(btnAddSinglePatch).removeClass('highlight');
|
||||
$(btnAddDualPatch).removeClass('highlight');
|
||||
$(btnAddRamAmp).removeClass('highlight');
|
||||
break;
|
||||
case 'fused':
|
||||
$(btnAddRoadm).removeClass('highlight');
|
||||
$(btnAddFused).addClass('highlight');
|
||||
$(btnAddILA).removeClass('highlight');
|
||||
$(btnAddAmplifier).removeClass('highlight');
|
||||
$(btnAddTransceiver).removeClass('highlight');
|
||||
$(btnAddDualFiber).removeClass('highlight');
|
||||
$(btnAddSingleFiber).removeClass('highlight');
|
||||
$(btnAddSinglePatch).removeClass('highlight');
|
||||
$(btnAddDualPatch).removeClass('highlight');
|
||||
$(btnAddRamAmp).removeClass('highlight');
|
||||
break;
|
||||
case 'transceiver':
|
||||
$(btnAddRoadm).removeClass('highlight');
|
||||
$(btnAddFused).removeClass('highlight');
|
||||
$(btnAddILA).removeClass('highlight');
|
||||
$(btnAddAmplifier).removeClass('highlight');
|
||||
$(btnAddTransceiver).addClass('highlight');
|
||||
$(btnAddDualFiber).removeClass('highlight');
|
||||
$(btnAddSingleFiber).removeClass('highlight');
|
||||
$(btnAddSinglePatch).removeClass('highlight');
|
||||
$(btnAddDualPatch).removeClass('highlight');
|
||||
$(btnAddRamAmp).removeClass('highlight');
|
||||
break;
|
||||
case 'dualfiber':
|
||||
$(btnAddRoadm).removeClass('highlight');
|
||||
$(btnAddFused).removeClass('highlight');
|
||||
$(btnAddILA).removeClass('highlight');
|
||||
$(btnAddAmplifier).removeClass('highlight');
|
||||
$(btnAddTransceiver).removeClass('highlight');
|
||||
$(btnAddDualFiber).addClass('highlight');
|
||||
$(btnAddSingleFiber).removeClass('highlight');
|
||||
$(btnAddSinglePatch).removeClass('highlight');
|
||||
$(btnAddDualPatch).removeClass('highlight');
|
||||
$(btnAddRamAmp).removeClass('highlight');
|
||||
break;
|
||||
case 'singlefiber':
|
||||
$(btnAddRoadm).removeClass('highlight');
|
||||
$(btnAddFused).removeClass('highlight');
|
||||
$(btnAddILA).removeClass('highlight');
|
||||
$(btnAddAmplifier).removeClass('highlight');
|
||||
$(btnAddTransceiver).removeClass('highlight');
|
||||
$(btnAddDualFiber).removeClass('highlight');
|
||||
$(btnAddSingleFiber).addClass('highlight');
|
||||
$(btnAddSinglePatch).removeClass('highlight');
|
||||
$(btnAddDualPatch).removeClass('highlight');
|
||||
$(btnAddRamAmp).removeClass('highlight');
|
||||
break;
|
||||
case 'singlepatch':
|
||||
$(btnAddRoadm).removeClass('highlight');
|
||||
$(btnAddFused).removeClass('highlight');
|
||||
$(btnAddILA).removeClass('highlight');
|
||||
$(btnAddAmplifier).removeClass('highlight');
|
||||
$(btnAddTransceiver).removeClass('highlight');
|
||||
$(btnAddDualFiber).removeClass('highlight');
|
||||
$(btnAddSingleFiber).removeClass('highlight');
|
||||
$(btnAddSinglePatch).addClass('highlight');
|
||||
$(btnAddDualPatch).removeClass('highlight');
|
||||
$(btnAddRamAmp).removeClass('highlight');
|
||||
break;
|
||||
case 'dualpatch':
|
||||
$(btnAddRoadm).removeClass('highlight');
|
||||
$(btnAddFused).removeClass('highlight');
|
||||
$(btnAddILA).removeClass('highlight');
|
||||
$(btnAddAmplifier).removeClass('highlight');
|
||||
$(btnAddTransceiver).removeClass('highlight');
|
||||
$(btnAddDualFiber).removeClass('highlight');
|
||||
$(btnAddSingleFiber).removeClass('highlight');
|
||||
$(btnAddSinglePatch).removeClass('highlight');
|
||||
$(btnAddDualPatch).addClass('highlight');
|
||||
$(btnAddRamAmp).removeClass('highlight');
|
||||
break;
|
||||
case 'ramanamp':
|
||||
$(btnAddRoadm).removeClass('highlight');
|
||||
$(btnAddFused).removeClass('highlight');
|
||||
$(btnAddILA).removeClass('highlight');
|
||||
$(btnAddAmplifier).removeClass('highlight');
|
||||
$(btnAddTransceiver).removeClass('highlight');
|
||||
$(btnAddDualFiber).removeClass('highlight');
|
||||
$(btnAddSingleFiber).removeClass('highlight');
|
||||
$(btnAddSinglePatch).removeClass('highlight');
|
||||
$(btnAddDualPatch).removeClass('highlight');
|
||||
$(btnAddRamAmp).addClass('highlight');
|
||||
break;
|
||||
case 'service':
|
||||
$(btnServiceActive).addClass('highlight');
|
||||
break;
|
||||
default:
|
||||
$(btnAddRoadm).removeClass('highlight');
|
||||
$(btnAddFused).removeClass('highlight');
|
||||
$(btnAddILA).removeClass('highlight');
|
||||
$(btnAddAmplifier).removeClass('highlight');
|
||||
$(btnAddTransceiver).removeClass('highlight');
|
||||
$(btnAddDualFiber).removeClass('highlight');
|
||||
$(btnAddSingleFiber).removeClass('highlight');
|
||||
$(btnServiceActive).removeClass('highlight');
|
||||
$(btnAddSinglePatch).removeClass('highlight');
|
||||
$(btnAddDualPatch).removeClass('highlight');
|
||||
$(btnAddRamAmp).removeClass('highlight');
|
||||
try {
|
||||
network.disableEditMode();
|
||||
}
|
||||
catch {}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/** Show/Hide the context menu of node/fiber/patch/service. */
|
||||
function showHideDrawerandMenu() {
|
||||
document.getElementById("roadmMenu").style.display = "none";
|
||||
document.getElementById("attenuatorMenu").style.display = "none";
|
||||
document.getElementById("ILAMenu").style.display = "none";
|
||||
document.getElementById("amplifierMenu").style.display = "none";
|
||||
document.getElementById("transceiverMenu").style.display = "none";
|
||||
document.getElementById("serviceMenu").style.display = "none";
|
||||
document.getElementById("singleFiberMenu").style.display = "none";
|
||||
document.getElementById("dualFiberMenu").style.display = "none";
|
||||
document.getElementById("singlePatchMenu").style.display = "none";
|
||||
document.getElementById("dualPatchMenu").style.display = "none";
|
||||
document.getElementById("ramanAmpMenu").style.display = "none";
|
||||
document.getElementById("templateMenu").style.display = "none";
|
||||
|
||||
closeDrawer('roadm');
|
||||
closeDrawer('attenuator');
|
||||
closeDrawer('ILA');
|
||||
closeDrawer('amplifier');
|
||||
closeDrawer('transceiver');
|
||||
closeDrawer('service');
|
||||
closeDrawer('dualfiber');
|
||||
closeDrawer('singlefiber');
|
||||
closeDrawer('singlepatch');
|
||||
closeDrawer('dualpatch');
|
||||
closeDrawer('ramanamp');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</code></pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">oopt-gnpy-web-gui-main</a></h2><h3>Modules</h3><ul><li><a href="module-alea.html">alea</a></li><li><a href="module-constraints.html">constraints</a></li><li><a href="module-exampleUtil.html">exampleUtil</a></li><li><a href="module-fiber.html">fiber</a></li><li><a href="module-filesaver.html">filesaver</a></li><li><a href="module-main.html">main</a></li><li><a href="module-mynetwork.html">mynetwork</a></li><li><a href="module-node.html">node</a></li><li><a href="module-patch.html">patch</a></li><li><a href="module-service.html">service</a></li><li><a href="module-validation.html">validation</a></li></ul><h3>Tutorials</h3><ul><li><a href="tutorial-LICENSE.html">LICENSE</a></li><li><a href="tutorial-technical_document.html">technical_document</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Wed Jul 06 2022 19:21:36 GMT+0530 (India Standard Time)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
<script src="scripts/linenumber.js"> </script>
|
||||
</body>
|
||||
</html>
|
||||
166
docs/module-alea.html
Normal file
166
docs/module-alea.html
Normal file
@@ -0,0 +1,166 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Module: alea</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Module: alea</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
|
||||
<header>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</header>
|
||||
|
||||
<article>
|
||||
<div class="container-overview">
|
||||
|
||||
|
||||
<div class="description"><p>alea.js
|
||||
Alea library is a pseudo-random number generator (PRNG).</p></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="networkgraph_alea.js.html">networkgraph/alea.js</a>, <a href="networkgraph_alea.js.html#line2">line 2</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">oopt-gnpy-web-gui-main</a></h2><h3>Modules</h3><ul><li><a href="module-alea.html">alea</a></li><li><a href="module-constraints.html">constraints</a></li><li><a href="module-exampleUtil.html">exampleUtil</a></li><li><a href="module-fiber.html">fiber</a></li><li><a href="module-filesaver.html">filesaver</a></li><li><a href="module-main.html">main</a></li><li><a href="module-mynetwork.html">mynetwork</a></li><li><a href="module-node.html">node</a></li><li><a href="module-patch.html">patch</a></li><li><a href="module-service.html">service</a></li><li><a href="module-validation.html">validation</a></li></ul><h3>Tutorials</h3><ul><li><a href="tutorial-LICENSE.html">LICENSE</a></li><li><a href="tutorial-technical_document.html">technical_document</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Wed Jul 06 2022 19:21:36 GMT+0530 (India Standard Time)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
<script src="scripts/linenumber.js"> </script>
|
||||
</body>
|
||||
</html>
|
||||
1041
docs/module-constraints.html
Normal file
1041
docs/module-constraints.html
Normal file
File diff suppressed because it is too large
Load Diff
590
docs/module-exampleUtil.html
Normal file
590
docs/module-exampleUtil.html
Normal file
@@ -0,0 +1,590 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Module: exampleUtil</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Module: exampleUtil</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
|
||||
<header>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</header>
|
||||
|
||||
<article>
|
||||
<div class="container-overview">
|
||||
|
||||
|
||||
<div class="description"><p>exampleUtil.js
|
||||
This library describes how to create some random nodes and fiber/patch/service.</p></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="networkgraph_exampleUtil.js.html">networkgraph/exampleUtil.js</a>, <a href="networkgraph_exampleUtil.js.html#line1">line 1</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 class="subsection-title">Methods</h3>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="~getScaleFreeNetwork"><span class="type-signature">(inner) </span>getScaleFreeNetwork<span class="signature">(nodeCount)</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Parameters:</h5>
|
||||
|
||||
|
||||
<table class="params">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>nodeCount</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="networkgraph_exampleUtil.js.html">networkgraph/exampleUtil.js</a>, <a href="networkgraph_exampleUtil.js.html#line47">line 47</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="~getScaleFreeNetworkSeeded"><span class="type-signature">(inner) </span>getScaleFreeNetworkSeeded<span class="signature">(nodeCount)</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Parameters:</h5>
|
||||
|
||||
|
||||
<table class="params">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>nodeCount</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="networkgraph_exampleUtil.js.html">networkgraph/exampleUtil.js</a>, <a href="networkgraph_exampleUtil.js.html#line101">line 101</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="~loadJSON"><span class="type-signature">(inner) </span>loadJSON<span class="signature">(path, success, error)</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Parameters:</h5>
|
||||
|
||||
|
||||
<table class="params">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>path</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"></td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>success</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"></td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>error</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="networkgraph_exampleUtil.js.html">networkgraph/exampleUtil.js</a>, <a href="networkgraph_exampleUtil.js.html#line29">line 29</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">oopt-gnpy-web-gui-main</a></h2><h3>Modules</h3><ul><li><a href="module-alea.html">alea</a></li><li><a href="module-constraints.html">constraints</a></li><li><a href="module-exampleUtil.html">exampleUtil</a></li><li><a href="module-fiber.html">fiber</a></li><li><a href="module-filesaver.html">filesaver</a></li><li><a href="module-main.html">main</a></li><li><a href="module-mynetwork.html">mynetwork</a></li><li><a href="module-node.html">node</a></li><li><a href="module-patch.html">patch</a></li><li><a href="module-service.html">service</a></li><li><a href="module-validation.html">validation</a></li></ul><h3>Tutorials</h3><ul><li><a href="tutorial-LICENSE.html">LICENSE</a></li><li><a href="tutorial-technical_document.html">technical_document</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Wed Jul 06 2022 19:21:36 GMT+0530 (India Standard Time)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
<script src="scripts/linenumber.js"> </script>
|
||||
</body>
|
||||
</html>
|
||||
1458
docs/module-fiber.html
Normal file
1458
docs/module-fiber.html
Normal file
File diff suppressed because it is too large
Load Diff
166
docs/module-filesaver.html
Normal file
166
docs/module-filesaver.html
Normal file
@@ -0,0 +1,166 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Module: filesaver</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Module: filesaver</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
|
||||
<header>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</header>
|
||||
|
||||
<article>
|
||||
<div class="container-overview">
|
||||
|
||||
|
||||
<div class="description"><p>filesaver.js
|
||||
Filesaver.js is the solution to saving files on the client-side and is perfect for web apps that generate files on the client.</p></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="networkgraph_filesaver.js.html">networkgraph/filesaver.js</a>, <a href="networkgraph_filesaver.js.html#line1">line 1</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">oopt-gnpy-web-gui-main</a></h2><h3>Modules</h3><ul><li><a href="module-alea.html">alea</a></li><li><a href="module-constraints.html">constraints</a></li><li><a href="module-exampleUtil.html">exampleUtil</a></li><li><a href="module-fiber.html">fiber</a></li><li><a href="module-filesaver.html">filesaver</a></li><li><a href="module-main.html">main</a></li><li><a href="module-mynetwork.html">mynetwork</a></li><li><a href="module-node.html">node</a></li><li><a href="module-patch.html">patch</a></li><li><a href="module-service.html">service</a></li><li><a href="module-validation.html">validation</a></li></ul><h3>Tutorials</h3><ul><li><a href="tutorial-LICENSE.html">LICENSE</a></li><li><a href="tutorial-technical_document.html">technical_document</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Wed Jul 06 2022 19:21:36 GMT+0530 (India Standard Time)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
<script src="scripts/linenumber.js"> </script>
|
||||
</body>
|
||||
</html>
|
||||
806
docs/module-main.html
Normal file
806
docs/module-main.html
Normal file
@@ -0,0 +1,806 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Module: main</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Module: main</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
|
||||
<header>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</header>
|
||||
|
||||
<article>
|
||||
<div class="container-overview">
|
||||
|
||||
|
||||
<div class="description"><p>main.js
|
||||
The main.js library describes UI actions. like show/hide and update the HTML element with style based on user interaction.</p></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="main.js.html">main.js</a>, <a href="main.js.html#line6">line 6</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 class="subsection-title">Methods</h3>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="~closeDrawer"><span class="type-signature">(inner) </span>closeDrawer<span class="signature">(node)</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>Close drawer based on node/fiber/patch/service.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Parameters:</h5>
|
||||
|
||||
|
||||
<table class="params">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>node</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">string</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>The type of component.</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="main.js.html">main.js</a>, <a href="main.js.html#line208">line 208</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="~modeHighLight"><span class="type-signature">(inner) </span>modeHighLight<span class="signature">(node)</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>Highlight node/fiber/patch/service menu by name.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Parameters:</h5>
|
||||
|
||||
|
||||
<table class="params">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>node</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">string</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>The type on component.</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="main.js.html">main.js</a>, <a href="main.js.html#line351">line 351</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="~openDrawer"><span class="type-signature">(inner) </span>openDrawer<span class="signature">(node)</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>Open drawer based on node/fiber/patch/service.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Parameters:</h5>
|
||||
|
||||
|
||||
<table class="params">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>node</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">string</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>The type of component.</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="main.js.html">main.js</a>, <a href="main.js.html#line30">line 30</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="~showHideDrawerandMenu"><span class="type-signature">(inner) </span>showHideDrawerandMenu<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>Show/Hide the context menu of node/fiber/patch/service.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="main.js.html">main.js</a>, <a href="main.js.html#line499">line 499</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="~stepColor"><span class="type-signature">(inner) </span>stepColor<span class="signature">(index)</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>Highlight the steper menu by selection.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Parameters:</h5>
|
||||
|
||||
|
||||
<table class="params">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>index</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">number</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>The menu index.</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="main.js.html">main.js</a>, <a href="main.js.html#line296">line 296</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">oopt-gnpy-web-gui-main</a></h2><h3>Modules</h3><ul><li><a href="module-alea.html">alea</a></li><li><a href="module-constraints.html">constraints</a></li><li><a href="module-exampleUtil.html">exampleUtil</a></li><li><a href="module-fiber.html">fiber</a></li><li><a href="module-filesaver.html">filesaver</a></li><li><a href="module-main.html">main</a></li><li><a href="module-mynetwork.html">mynetwork</a></li><li><a href="module-node.html">node</a></li><li><a href="module-patch.html">patch</a></li><li><a href="module-service.html">service</a></li><li><a href="module-validation.html">validation</a></li></ul><h3>Tutorials</h3><ul><li><a href="tutorial-LICENSE.html">LICENSE</a></li><li><a href="tutorial-technical_document.html">technical_document</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Wed Jul 06 2022 19:21:36 GMT+0530 (India Standard Time)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
<script src="scripts/linenumber.js"> </script>
|
||||
</body>
|
||||
</html>
|
||||
7507
docs/module-mynetwork.html
Normal file
7507
docs/module-mynetwork.html
Normal file
File diff suppressed because it is too large
Load Diff
4643
docs/module-node.html
Normal file
4643
docs/module-node.html
Normal file
File diff suppressed because it is too large
Load Diff
1030
docs/module-patch.html
Normal file
1030
docs/module-patch.html
Normal file
File diff suppressed because it is too large
Load Diff
1095
docs/module-service.html
Normal file
1095
docs/module-service.html
Normal file
File diff suppressed because it is too large
Load Diff
483
docs/module-validation.html
Normal file
483
docs/module-validation.html
Normal file
@@ -0,0 +1,483 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Module: validation</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Module: validation</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
|
||||
<header>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</header>
|
||||
|
||||
<article>
|
||||
<div class="container-overview">
|
||||
|
||||
|
||||
<div class="description"><p>validation.js
|
||||
The Validations library currently describes the validation of component name, length, and type</p></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="networkgraph_validation.js.html">networkgraph/validation.js</a>, <a href="networkgraph_validation.js.html#line1">line 1</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 class="subsection-title">Methods</h3>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="~exportFileValidation"><span class="type-signature">(inner) </span>exportFileValidation<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>Validate export file name.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="networkgraph_validation.js.html">networkgraph/validation.js</a>, <a href="networkgraph_validation.js.html#line126">line 126</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="~nameLengthValidation"><span class="type-signature">(inner) </span>nameLengthValidation<span class="signature">(element)</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>Validate the node/fiber/patch/service name and name length.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Parameters:</h5>
|
||||
|
||||
|
||||
<table class="params">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>element</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">HTMLElement</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Input element</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="networkgraph_validation.js.html">networkgraph/validation.js</a>, <a href="networkgraph_validation.js.html#line107">line 107</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="~roadmProVal"><span class="type-signature">(inner) </span>roadmProVal<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>Validate ROADM list, type and Amplifier type.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="networkgraph_validation.js.html">networkgraph/validation.js</a>, <a href="networkgraph_validation.js.html#line136">line 136</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">oopt-gnpy-web-gui-main</a></h2><h3>Modules</h3><ul><li><a href="module-alea.html">alea</a></li><li><a href="module-constraints.html">constraints</a></li><li><a href="module-exampleUtil.html">exampleUtil</a></li><li><a href="module-fiber.html">fiber</a></li><li><a href="module-filesaver.html">filesaver</a></li><li><a href="module-main.html">main</a></li><li><a href="module-mynetwork.html">mynetwork</a></li><li><a href="module-node.html">node</a></li><li><a href="module-patch.html">patch</a></li><li><a href="module-service.html">service</a></li><li><a href="module-validation.html">validation</a></li></ul><h3>Tutorials</h3><ul><li><a href="tutorial-LICENSE.html">LICENSE</a></li><li><a href="tutorial-technical_document.html">technical_document</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Wed Jul 06 2022 19:21:36 GMT+0530 (India Standard Time)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
<script src="scripts/linenumber.js"> </script>
|
||||
</body>
|
||||
</html>
|
||||
3800
docs/mynetwork.js.html
Normal file
3800
docs/mynetwork.js.html
Normal file
File diff suppressed because it is too large
Load Diff
166
docs/networkgraph_alea.js.html
Normal file
166
docs/networkgraph_alea.js.html
Normal file
@@ -0,0 +1,166 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Source: networkgraph/alea.js</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Source: networkgraph/alea.js</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="prettyprint source linenums"><code>
|
||||
/**
|
||||
* alea.js
|
||||
* Alea library is a pseudo-random number generator (PRNG).
|
||||
* @module alea
|
||||
*/
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof exports === 'object') {
|
||||
module.exports = factory();
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define(factory);
|
||||
} else {
|
||||
root.Alea = factory();
|
||||
}
|
||||
}(this, function () {
|
||||
|
||||
'use strict';
|
||||
|
||||
// From http://baagoe.com/en/RandomMusings/javascript/
|
||||
|
||||
// importState to sync generator states
|
||||
Alea.importState = function (i) {
|
||||
var random = new Alea();
|
||||
random.importState(i);
|
||||
return random;
|
||||
};
|
||||
|
||||
return Alea;
|
||||
|
||||
function Alea() {
|
||||
return (function (args) {
|
||||
// Johannes Baagøe <baagoe@baagoe.com>, 2010
|
||||
var s0 = 0;
|
||||
var s1 = 0;
|
||||
var s2 = 0;
|
||||
var c = 1;
|
||||
|
||||
if (args.length == 0) {
|
||||
args = [+new Date];
|
||||
}
|
||||
var mash = Mash();
|
||||
s0 = mash(' ');
|
||||
s1 = mash(' ');
|
||||
s2 = mash(' ');
|
||||
|
||||
for (var i = 0; i < args.length; i++) {
|
||||
s0 -= mash(args[i]);
|
||||
if (s0 < 0) {
|
||||
s0 += 1;
|
||||
}
|
||||
s1 -= mash(args[i]);
|
||||
if (s1 < 0) {
|
||||
s1 += 1;
|
||||
}
|
||||
s2 -= mash(args[i]);
|
||||
if (s2 < 0) {
|
||||
s2 += 1;
|
||||
}
|
||||
}
|
||||
mash = null;
|
||||
|
||||
var random = function () {
|
||||
var t = 2091639 * s0 + c * 2.3283064365386963e-10; // 2^-32
|
||||
s0 = s1;
|
||||
s1 = s2;
|
||||
return s2 = t - (c = t | 0);
|
||||
};
|
||||
random.uint32 = function () {
|
||||
return random() * 0x100000000; // 2^32
|
||||
};
|
||||
random.fract53 = function () {
|
||||
return random() +
|
||||
(random() * 0x200000 | 0) * 1.1102230246251565e-16; // 2^-53
|
||||
};
|
||||
random.version = 'Alea 0.9';
|
||||
random.args = args;
|
||||
|
||||
// my own additions to sync state between two generators
|
||||
random.exportState = function () {
|
||||
return [s0, s1, s2, c];
|
||||
};
|
||||
random.importState = function (i) {
|
||||
s0 = +i[0] || 0;
|
||||
s1 = +i[1] || 0;
|
||||
s2 = +i[2] || 0;
|
||||
c = +i[3] || 0;
|
||||
};
|
||||
|
||||
return random;
|
||||
|
||||
}(Array.prototype.slice.call(arguments)));
|
||||
}
|
||||
|
||||
function Mash() {
|
||||
var n = 0xefc8249d;
|
||||
|
||||
var mash = function (data) {
|
||||
data = data.toString();
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
n += data.charCodeAt(i);
|
||||
var h = 0.02519603282416938 * n;
|
||||
n = h >>> 0;
|
||||
h -= n;
|
||||
h *= n;
|
||||
n = h >>> 0;
|
||||
h -= n;
|
||||
n += h * 0x100000000; // 2^32
|
||||
}
|
||||
return (n >>> 0) * 2.3283064365386963e-10; // 2^-32
|
||||
};
|
||||
|
||||
mash.version = 'Mash 0.9';
|
||||
return mash;
|
||||
}
|
||||
}));</code></pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">oopt-gnpy-web-gui-main</a></h2><h3>Modules</h3><ul><li><a href="module-alea.html">alea</a></li><li><a href="module-constraints.html">constraints</a></li><li><a href="module-exampleUtil.html">exampleUtil</a></li><li><a href="module-fiber.html">fiber</a></li><li><a href="module-filesaver.html">filesaver</a></li><li><a href="module-main.html">main</a></li><li><a href="module-mynetwork.html">mynetwork</a></li><li><a href="module-node.html">node</a></li><li><a href="module-patch.html">patch</a></li><li><a href="module-service.html">service</a></li><li><a href="module-validation.html">validation</a></li></ul><h3>Tutorials</h3><ul><li><a href="tutorial-LICENSE.html">LICENSE</a></li><li><a href="tutorial-technical_document.html">technical_document</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Wed Jul 06 2022 19:21:36 GMT+0530 (India Standard Time)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
<script src="scripts/linenumber.js"> </script>
|
||||
</body>
|
||||
</html>
|
||||
668
docs/networkgraph_constraints.js.html
Normal file
668
docs/networkgraph_constraints.js.html
Normal file
@@ -0,0 +1,668 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Source: networkgraph/constraints.js</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Source: networkgraph/constraints.js</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="prettyprint source linenums"><code>
|
||||
/**
|
||||
* constraints.js
|
||||
* The constraints library is a list of rules for components. It is defining the network topology validation.
|
||||
* @module constraints
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Check connections rules between nodes.
|
||||
* @param {string} from - Source node.
|
||||
* @param {string} to - Destination node.
|
||||
* @param {string} nodeType - Node type.
|
||||
*/
|
||||
function nodeRule(from, to, nodeType) {
|
||||
var fromConnections = network.getConnectedEdges(from);
|
||||
var toConnections = network.getConnectedEdges(to);
|
||||
var connections = [];
|
||||
connections.push(fromConnections);
|
||||
|
||||
$.each(toConnections, function (index, item) {
|
||||
connections.push(item);
|
||||
});
|
||||
|
||||
var fromDetails = network.body.data.nodes.get(from);
|
||||
var toDetails = network.body.data.nodes.get(to);
|
||||
|
||||
var message = "";
|
||||
var flag = false;
|
||||
var connectedNodes;
|
||||
var fromType;
|
||||
var toType;
|
||||
//to check connection b/w roadm and amplifier
|
||||
if ((fromDetails.node_type == roadmJSON.node_type && toDetails.node_type == nodeType) || (toDetails.node_type == roadmJSON.node_type && fromDetails.node_type == nodeType) || (fromDetails.node_type == transceiverJSON.node_type && toDetails.node_type == nodeType) || (toDetails.node_type == transceiverJSON.node_type && fromDetails.node_type == nodeType)) {
|
||||
$.each(connections, function (index, item) {
|
||||
connectedNodes = network.getConnectedNodes(item);
|
||||
if (connectedNodes) {
|
||||
if ((connectedNodes[0] == fromDetails.id && connectedNodes[1] == toDetails.id) || connectedNodes[1] == fromDetails.id && connectedNodes[0] == toDetails.id) {
|
||||
message = "We cannot add more than one " + singleFiberJSON.component_type + "/" + singlePatchJSON.component_type + " connection between " + fromDetails.label + " and " + toDetails.label;
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// to check connection b/w amplifier and amplifier
|
||||
if (fromDetails.node_type == nodeType && toDetails.node_type == nodeType) {
|
||||
$.each(connections, function (index, item) {
|
||||
connectedNodes = network.getConnectedNodes(item);
|
||||
if (connectedNodes) {
|
||||
if ((connectedNodes[0] == fromDetails.id && connectedNodes[1] == toDetails.id) || connectedNodes[1] == fromDetails.id && connectedNodes[0] == toDetails.id) {
|
||||
message = "We cannot add more than one " + singleFiberJSON.component_type + "/" + singlePatchJSON.component_type + " connection between " + fromDetails.label + " and " + toDetails.label;
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var edgeDetails;
|
||||
var nodetype;
|
||||
if (!flag) {
|
||||
message = "";
|
||||
if (fromDetails.node_type == nodeType) {
|
||||
if (fromConnections.length > 1) {
|
||||
message = fromDetails.label + ' can only support 2 links, one outgoing, and one incoming. ';
|
||||
flag = true;
|
||||
}
|
||||
else {
|
||||
$.each(fromConnections, function (index, item) {
|
||||
edgeDetails = network.body.data.edges.get(item);
|
||||
if (edgeDetails.from == from) {
|
||||
message = 'Links wrongly connected. ';
|
||||
flag = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
if (toDetails.node_type == nodeType) {
|
||||
if (toConnections.length > 1) {
|
||||
|
||||
if (message != "")
|
||||
message += "<br /> <br />" + toDetails.label + ' can only support 2 links, one outgoing, and one incoming';
|
||||
else
|
||||
message += toDetails.label + ' can only support 2 links, one outgoing, and one incoming';
|
||||
flag = true;
|
||||
}
|
||||
else {
|
||||
$.each(toConnections, function (index, item) {
|
||||
edgeDetails = network.body.data.edges.get(item);
|
||||
if (edgeDetails.to == to) {
|
||||
message = 'Links wrongly connected. ';
|
||||
flag = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return { message: message, flag: flag };
|
||||
}
|
||||
|
||||
/** Check the ROADM, transceiver link and type rules. */
|
||||
function checkLink() {
|
||||
|
||||
var roadmList = network.body.data.nodes.get({
|
||||
filter: function (item) {
|
||||
return (item.node_type == roadmJSON.node_type || item.node_type == transceiverJSON.node_type);
|
||||
}
|
||||
});
|
||||
|
||||
var connectedEdges;
|
||||
var fromCount = 0;
|
||||
var toCount = 0;
|
||||
var edgeDetails;
|
||||
var message;
|
||||
var flag = false;
|
||||
var msg = [];
|
||||
var tempEdge = [];
|
||||
$.each(roadmList, function (index, item) {
|
||||
connectedEdges = network.getConnectedEdges(item.id);
|
||||
|
||||
tempEdge = [];
|
||||
$.each(connectedEdges, function (index, item1) {
|
||||
if (network.body.data.edges.get(item1).component_type != serviceJSON.component_type)
|
||||
tempEdge.push(item1);
|
||||
});
|
||||
|
||||
fromCount = 0;
|
||||
toCount = 0;
|
||||
for (i = 0; i < tempEdge.length; i++) {
|
||||
edgeDetails = network.body.data.edges.get(tempEdge[i]);
|
||||
if (edgeDetails.from == item.id)
|
||||
fromCount++;
|
||||
else if (edgeDetails.to == item.id)
|
||||
toCount++;
|
||||
}
|
||||
|
||||
if (fromCount != toCount || (fromCount == 0 && toCount == 0)) {
|
||||
msg.push('<p class="focusNode" title="Click here to focus the node" id=\'span' + item.id.replace(/\s/g, '') + '\' onClick="focusNodeFiber(\'' + item.id + '\',1)"><img width="25" src="./Assets/img/error-listing-icon.svg"> <b>' + item.label + '</b> must have an even number of links with an equal number of incoming and outgoing links.</p>');
|
||||
flag = true;
|
||||
}
|
||||
if (item.node_type == transceiverJSON.node_type) {
|
||||
if (!item.transceiver_type) {
|
||||
msg.push('<p class="focusNode" title="Click here to focus the node" id=\'spanTF' + item.id.replace(/\s/g, '') + '\' onClick="focusNodeFiber(\'' + item.id + '\',1)"><img width="25" src="./Assets/img/error-listing-icon.svg"> <b>' + item.label + '</b> - ' + transceiverJSON.node_type + ' type not entered by the user.</p>');
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
else if (item.node_type == roadmJSON.node_type) {
|
||||
if (!item.roadm_type) {
|
||||
msg.push('<p class="focusNode" title="Click here to focus the node" id=\'spanTF' + item.id.replace(/\s/g, '') + '\' onClick="focusNodeFiber(\'' + item.id + '\',1)"><img width="25" src="./Assets/img/error-listing-icon.svg"> <b>' + item.label + '</b> - ' + roadmJSON.node_type.toUpperCase() + ' type not entered by the user.</p>');
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
//message = msg.join(' ') + " must have an even number of links with an equal number of incoming and outgoing links";
|
||||
message = msg.join(' ');
|
||||
return { message: message, flag: flag };
|
||||
}
|
||||
|
||||
/** check the limits of amplifier, attenuator link rules. */
|
||||
function checkMisLink() {
|
||||
|
||||
var roadmList = network.body.data.nodes.get({
|
||||
filter: function (item) {
|
||||
return (item.node_type == amplifierJSON.node_type || item.node_type == fusedJSON.node_type);
|
||||
}
|
||||
});
|
||||
|
||||
var connectedEdges;
|
||||
var message;
|
||||
var flag = false;
|
||||
var msg = [];
|
||||
var tempEdge = [];
|
||||
var fromCount;
|
||||
var toCount;
|
||||
$.each(roadmList, function (index, item) {
|
||||
connectedEdges = network.getConnectedEdges(item.id);
|
||||
fromCount = 0;
|
||||
toCount = 0;
|
||||
for (i = 0; i < connectedEdges.length; i++) {
|
||||
edgeDetails = network.body.data.edges.get(connectedEdges[i]);
|
||||
if (edgeDetails.from == item.id)
|
||||
fromCount++;
|
||||
else if (edgeDetails.to == item.id)
|
||||
toCount++;
|
||||
}
|
||||
|
||||
//if (fromCount != toCount || (fromCount == 0 && toCount == 0) || fromCount > 1 || toCount > 1 ) {
|
||||
// msg.push('<p class="focusNode" title="Click here to focus the node" id=\'span' + item.id.replace(/\s/g, '') + '\' onClick="focusNode(\'' + item.id + '\')"><img width="25" src="./Assets/img/error-listing-icon.svg"> One or more links to <b>' + item.label + '</b> is missing.</p>');
|
||||
// flag = true;
|
||||
//}
|
||||
if (connectedEdges.length <= 1) {
|
||||
msg.push('<p class="focusNode" title="Click here to focus the node" id=\'span' + item.id.replace(/\s/g, '') + '\' onClick="focusNodeFiber(\'' + item.id + '\',1)"><img width="25" src="./Assets/img/error-listing-icon.svg"> One or more links to <b>' + item.label + '</b> is missing.</p>');
|
||||
flag = true;
|
||||
}
|
||||
else if (connectedEdges.length > 1) {
|
||||
|
||||
if ((connectedEdges.length == 2 && fromCount == 2) || (connectedEdges.length == 2 && toCount == 2)) {
|
||||
msg.push('<p class="focusNode" title="Click here to focus the node" id=\'span' + item.id.replace(/\s/g, '') + '\' onClick="focusNodeFiber(\'' + item.id + '\',1)"><img width="25" src="./Assets/img/error-listing-icon.svg"><b>' + item.label + '</b> cannot support 2 links of the same type, must have one incoming and one outgoing link</p>');
|
||||
flag = true;
|
||||
}
|
||||
else if (fromCount != toCount || connectedEdges.length > 2) {
|
||||
msg.push('<p class="focusNode" title="Click here to focus the node" id=\'span' + item.id.replace(/\s/g, '') + '\' onClick="focusNodeFiber(\'' + item.id + '\',1)"><img width="25" src="./Assets/img/error-listing-icon.svg"><b>' + item.label + '</b> cannot support more than 2 links</p>');
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (item.node_type == amplifierJSON.node_type) {
|
||||
if (item.amp_category == amplifierJSON.amp_category) {
|
||||
if (!item.amp_type) {
|
||||
msg.push('<p class="focusNode" title="Click here to focus the node" id=\'spanTF' + item.id.replace(/\s/g, '') + '\' onClick="focusNodeFiber(\'' + item.id + '\',1)"><img width="25" src="./Assets/img/error-listing-icon.svg"> <b>' + item.label + '</b> - ' + amplifierJSON.amp_category + ' type not entered by the user.</p>');
|
||||
flag = true;
|
||||
}
|
||||
|
||||
}
|
||||
else if (item.amp_category == ramanampJSON.amp_category) {
|
||||
if (!item.amp_type) {
|
||||
msg.push('<p class="focusNode" title="Click here to focus the node" id=\'spanTF' + item.id.replace(/\s/g, '') + '\' onClick="focusNodeFiber(\'' + item.id + '\',1)"><img width="25" src="./Assets/img/error-listing-icon.svg"> <b>' + item.label + '</b> - Raman amplifier type not entered by the user.</p>');
|
||||
flag = true;
|
||||
}
|
||||
if (!item.category) {
|
||||
msg.push('<p class="focusNode" title="Click here to focus the node" id=\'spanTF' + item.id.replace(/\s/g, '') + '\' onClick="focusNodeFiber(\'' + item.id + '\',1)"><img width="25" src="./Assets/img/error-listing-icon.svg"> <b>' + item.label + '</b> - Raman amplifier category not entered by the user.</p>');
|
||||
flag = true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
message = msg.join(' ');
|
||||
return { message: message, flag: flag };
|
||||
}
|
||||
|
||||
/** To check the node type force rules. */
|
||||
function checkTypeForce() {
|
||||
|
||||
var transList = network.body.data.nodes.get({
|
||||
filter: function (item) {
|
||||
return (item.node_type == transceiverJSON.node_type || item.node_type == amplifierJSON.node_type || item.node_type == roadmJSON.node_type);
|
||||
}
|
||||
});
|
||||
|
||||
var message;
|
||||
var msg = [];
|
||||
var flag = false;
|
||||
$.each(transList, function (index, item) {
|
||||
|
||||
if (item.node_type == transceiverJSON.node_type) {
|
||||
if (!item.transceiver_type) {
|
||||
msg.push('<p class="focusNode" title="Click here to focus the node" id=\'spanTF' + item.id.replace(/\s/g, '') + '\' onClick="focusNodeFiber(\'' + item.id + '\',1)"><img width="25" src="./Assets/img/error-listing-icon.svg"> <b>' + item.label + '</b> - ' + transceiverJSON.node_type + ' type not entered by the user.</p>');
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
else if (item.node_type == roadmJSON.node_type) {
|
||||
if (!item.roadm_type) {
|
||||
msg.push('<p class="focusNode" title="Click here to focus the node" id=\'spanTF' + item.id.replace(/\s/g, '') + '\' onClick="focusNodeFiber(\'' + item.id + '\',1)"><img width="25" src="./Assets/img/error-listing-icon.svg"> <b>' + item.label + '</b> - ' + roadmJSON.node_type.toUpperCase() + ' type not entered by the user.</p>');
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
else if (item.node_type == amplifierJSON.node_type) {
|
||||
if (item.amp_category == amplifierJSON.amp_category) {
|
||||
if (!item.amp_type) {
|
||||
msg.push('<p class="focusNode" title="Click here to focus the node" id=\'spanTF' + item.id.replace(/\s/g, '') + '\' onClick="focusNodeFiber(\'' + item.id + '\',1)"><img width="25" src="./Assets/img/error-listing-icon.svg"> <b>' + item.label + '</b> - ' + amplifierJSON.amp_category + ' type not entered by the user.</p>');
|
||||
flag = true;
|
||||
}
|
||||
|
||||
}
|
||||
else if (item.amp_category == ramanampJSON.amp_category) {
|
||||
if (!item.amp_type) {
|
||||
msg.push('<p class="focusNode" title="Click here to focus the node" id=\'spanTF' + item.id.replace(/\s/g, '') + '\' onClick="focusNodeFiber(\'' + item.id + '\',1)"><img width="25" src="./Assets/img/error-listing-icon.svg"> <b>' + item.label + '</b> - Raman amplifier type not entered by the user.</p>');
|
||||
flag = true;
|
||||
}
|
||||
if (!item.category) {
|
||||
msg.push('<p class="focusNode" title="Click here to focus the node" id=\'spanTF' + item.id.replace(/\s/g, '') + '\' onClick="focusNodeFiber(\'' + item.id + '\',1)"><img width="25" src="./Assets/img/error-listing-icon.svg"> <b>' + item.label + '</b> - Raman amplifier category not entered by the user.</p>');
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
message = msg.join(' ');
|
||||
return { message: message, flag: flag };
|
||||
}
|
||||
|
||||
/** check the fiber properties rules. */
|
||||
function checkFiberPro() {
|
||||
|
||||
var fiberList = network.body.data.edges.get({
|
||||
filter: function (item) {
|
||||
return (item.fiber_category == singleFiberJSON.fiber_category);
|
||||
}
|
||||
});
|
||||
|
||||
var message;
|
||||
var msg = [];
|
||||
var flag = false;
|
||||
var spanlen;
|
||||
var span_length;
|
||||
$.each(fiberList, function (index, item) {
|
||||
span_length = item.span_length;
|
||||
spanlen = parseFloat(span_length);
|
||||
if (item.fiber_type == "") {
|
||||
msg.push('<p class="focusNode" title="Click here to focus the fiber" id=\'spanFP' + item.id.replace(/\s/g, '') + '\' onClick="focusNodeFiber(\'' + item.id + '\',2)"><img width="25" src="./Assets/img/error-listing-icon.svg"> <b>' + item.label + '</b> - ' + singleFiberJSON.component_type + ' type not entered by the user.</p>');
|
||||
flag = true;
|
||||
}
|
||||
if (isNaN(span_length) || spanlen <= 0 || span_length == "") {
|
||||
msg.push('<p class="focusNode" title="Click here to focus the fiber" id=\'spanFP' + item.id.replace(/\s/g, '') + '\' onClick="focusNodeFiber(\'' + item.id + '\',2)"><img width="25" src="./Assets/img/error-listing-icon.svg"> <b>' + item.label + '</b> - ' + singleFiberJSON.component_type + ' length not entered by the user.</p>');
|
||||
flag = true;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
message = msg.join(' ');
|
||||
return { message: message, flag: flag };
|
||||
}
|
||||
|
||||
/** Check the node link and type rules on import network JSON file. */
|
||||
function nodeRuleOnImportJSON() {
|
||||
//checkLink
|
||||
var roadmList = network.body.data.nodes.get({
|
||||
filter: function (item) {
|
||||
return (item.node_type == roadmJSON.node_type || item.node_type == transceiverJSON.node_type);
|
||||
}
|
||||
});
|
||||
|
||||
var connectedEdges;
|
||||
var fromCount = 0;
|
||||
var toCount = 0;
|
||||
var edgeDetails;
|
||||
var tempEdge = [];
|
||||
$.each(roadmList, function (index, item) {
|
||||
connectedEdges = network.getConnectedEdges(item.id);
|
||||
tempEdge = [];
|
||||
$.each(connectedEdges, function (index, item1) {
|
||||
if (network.body.data.edges.get(item1).component_type != serviceJSON.component_type)
|
||||
tempEdge.push(item1);
|
||||
});
|
||||
fromCount = 0;
|
||||
toCount = 0;
|
||||
for (i = 0; i < tempEdge.length; i++) {
|
||||
edgeDetails = network.body.data.edges.get(tempEdge[i]);
|
||||
if (edgeDetails.from == item.id)
|
||||
fromCount++;
|
||||
else if (edgeDetails.to == item.id)
|
||||
toCount++;
|
||||
}
|
||||
|
||||
if (fromCount != toCount || (fromCount == 0 && toCount == 0)) {
|
||||
addNodeHighlight(item.id);
|
||||
}
|
||||
else {
|
||||
if (item.node_type == transceiverJSON.node_type && item.transceiver_type == "") {
|
||||
addNodeHighlight(item.id);
|
||||
}
|
||||
else if (item.node_type == roadmJSON.node_type && item.roadm_type == "") {
|
||||
addNodeHighlight(item.id);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
//checkMisLink
|
||||
|
||||
roadmList = network.body.data.nodes.get({
|
||||
filter: function (item) {
|
||||
return (item.node_type == amplifierJSON.node_type || item.node_type == fusedJSON.node_type);
|
||||
}
|
||||
});
|
||||
|
||||
$.each(roadmList, function (index, item) {
|
||||
connectedEdges = network.getConnectedEdges(item.id);
|
||||
|
||||
fromCount = 0;
|
||||
toCount = 0;
|
||||
for (i = 0; i < connectedEdges.length; i++) {
|
||||
edgeDetails = network.body.data.edges.get(connectedEdges[i]);
|
||||
if (edgeDetails.from == item.id)
|
||||
fromCount++;
|
||||
else if (edgeDetails.to == item.id)
|
||||
toCount++;
|
||||
}
|
||||
|
||||
if (fromCount != toCount || (fromCount == 0 && toCount == 0) || fromCount > 1 || toCount > 1) {
|
||||
addNodeHighlight(item.id);
|
||||
}
|
||||
else {
|
||||
if (item.node_type == amplifierJSON.node_type) {
|
||||
if (item.amp_category == ramanampJSON.amp_category && item.amp_type == "" && !(item.category)) {
|
||||
addNodeHighlight(item.id);
|
||||
}
|
||||
else if (item.amp_category == amplifierJSON.amp_category && item.amp_type == "") {
|
||||
addNodeHighlight(item.id);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** Set fiber/patch/service smooth while on import network JSON file. */
|
||||
function edgeStyleOnImportJSON() {
|
||||
var edgeList = network.body.data.edges.get();
|
||||
var cfrom;
|
||||
var cto;
|
||||
var fiberData = [];
|
||||
for (var i = 0; i < edgeList.length; i++) {
|
||||
|
||||
cfrom = edgeList[i].from;
|
||||
cto = edgeList[i].to;
|
||||
|
||||
var connectedFiber = network.getConnectedEdges(cfrom);
|
||||
connectedFiber.push(network.getConnectedEdges(cto));
|
||||
var fromFiberCount = 0;
|
||||
var toFiberCount = 0;
|
||||
var fiberCount = 0;
|
||||
|
||||
$.each(connectedFiber, function (index, item) {
|
||||
var fiberDetails = network.body.data.edges.get(item);
|
||||
if (fiberDetails.fiber_category == dualFiberJSON.fiber_category || fiberDetails.fiber_category == singleFiberJSON.fiber_category || fiberDetails.component_type == serviceJSON.component_type || fiberDetails.component_type == dualPatchJSON.component_type) {
|
||||
var fiberSmooth = singleFiberJSON.options.smooth;
|
||||
if (fiberDetails.from == cfrom && fiberDetails.to == cto) {
|
||||
fiberCount++;
|
||||
|
||||
if (fiberCount == 1) {
|
||||
fiberSmooth = fiberJSON.options.smooth;
|
||||
}
|
||||
else {
|
||||
fromFiberCount++;
|
||||
fiberSmooth.roundness = "0." + fromFiberCount;
|
||||
}
|
||||
network.body.data.edges.update({
|
||||
id: fiberDetails.id, smooth: fiberSmooth
|
||||
|
||||
});
|
||||
}
|
||||
if (fiberDetails.from == cto && fiberDetails.to == cfrom) {
|
||||
fiberCount++;
|
||||
fiberSmooth.roundness = "0." + toFiberCount;
|
||||
if (fiberCount == 1) {
|
||||
fiberSmooth = fiberJSON.options.smooth;
|
||||
}
|
||||
else {
|
||||
toFiberCount++;
|
||||
fiberSmooth.roundness = "0." + toFiberCount;
|
||||
}
|
||||
network.body.data.edges.update({
|
||||
id: fiberDetails.id, smooth: fiberSmooth
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the node connections and fiber/patch/service rules on import network JSON file.
|
||||
* @param {string} cfrom - Source node.
|
||||
* @param {string} cto - Destination node.
|
||||
*/
|
||||
function nodeValidationInEdge(cfrom, cto) {
|
||||
// start remove highlight once roadm have equal in/out conn
|
||||
var roadmList = [];
|
||||
|
||||
if (network.body.data.nodes.get(cfrom).node_type == roadmJSON.node_type)
|
||||
roadmList.push(cfrom);
|
||||
|
||||
if (network.body.data.nodes.get(cto).node_type == roadmJSON.node_type)
|
||||
roadmList.push(cto);
|
||||
|
||||
var connectedEdges;
|
||||
var fromCount = 0;
|
||||
var toCount = 0;
|
||||
var edgeDetails;
|
||||
$.each(roadmList, function (index, item) {
|
||||
connectedEdges = network.getConnectedEdges(item);
|
||||
fromCount = 0;
|
||||
toCount = 0;
|
||||
for (i = 0; i < connectedEdges.length; i++) {
|
||||
edgeDetails = network.body.data.edges.get(connectedEdges[i]);
|
||||
if (edgeDetails.from == item)
|
||||
fromCount++;
|
||||
else if (edgeDetails.to == item)
|
||||
toCount++;
|
||||
}
|
||||
|
||||
if (fromCount != toCount || (fromCount == 0 && toCount == 0)) {
|
||||
addNodeHighlight(item);
|
||||
}
|
||||
else {
|
||||
if (network.body.data.nodes.get(item).roadm_type != "") {
|
||||
removeSpanInError(item, true);
|
||||
removeSpanInError(item);
|
||||
}
|
||||
else {
|
||||
var removeID = "#span" + item.replace(/\s/g, '');
|
||||
$(removeID).remove();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
// end
|
||||
|
||||
//start mislink
|
||||
roadmList = [];
|
||||
if (network.body.data.nodes.get(cfrom).node_type == fusedJSON.node_type || network.body.data.nodes.get(cfrom).node_type == amplifierJSON.node_type)
|
||||
roadmList.push(cfrom);
|
||||
|
||||
if (network.body.data.nodes.get(cto).node_type == fusedJSON.node_type || network.body.data.nodes.get(cto).node_type == amplifierJSON.node_type)
|
||||
roadmList.push(cto);
|
||||
|
||||
|
||||
$.each(roadmList, function (index, item) {
|
||||
connectedEdges = network.getConnectedEdges(item);
|
||||
fromCount = 0;
|
||||
toCount = 0;
|
||||
for (i = 0; i < connectedEdges.length; i++) {
|
||||
edgeDetails = network.body.data.edges.get(connectedEdges[i]);
|
||||
if (edgeDetails.from == item)
|
||||
fromCount++;
|
||||
else if (edgeDetails.to == item)
|
||||
toCount++;
|
||||
}
|
||||
|
||||
if (fromCount != toCount || (fromCount == 0 && toCount == 0) || fromCount > 1 || toCount > 1) {
|
||||
addNodeHighlight(item);
|
||||
}
|
||||
else {
|
||||
|
||||
if (network.body.data.nodes.get(item).node_type == amplifierJSON.node_type) {
|
||||
|
||||
|
||||
if (network.body.data.nodes.get(item).amp_category == amplifierJSON.amp_category) {
|
||||
if (network.body.data.nodes.get(item).amp_type != "") {
|
||||
removeSpanInError(item, true);
|
||||
removeSpanInError(item);
|
||||
}
|
||||
else {
|
||||
var removeID = "#span" + item.replace(/\s/g, '');
|
||||
$(removeID).remove();
|
||||
}
|
||||
}
|
||||
else if (network.body.data.nodes.get(item).amp_category == ramanampJSON.amp_category) {
|
||||
if (network.body.data.nodes.get(item).amp_type != "" && (network.body.data.nodes.get(item).category)) {
|
||||
removeSpanInError(item, true);
|
||||
removeSpanInError(item);
|
||||
}
|
||||
else {
|
||||
var removeID = "#span" + item.replace(/\s/g, '');
|
||||
$(removeID).remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
removeSpanInError(item);
|
||||
}
|
||||
}
|
||||
});
|
||||
//
|
||||
// start remove highlight once transceiver have equal in/out conn
|
||||
var tempEdge = [];
|
||||
roadmList = [];
|
||||
if (network.body.data.nodes.get(cfrom).node_type == transceiverJSON.node_type)
|
||||
roadmList.push(cfrom);
|
||||
|
||||
if (network.body.data.nodes.get(cto).node_type == transceiverJSON.node_type)
|
||||
roadmList.push(cto);
|
||||
|
||||
$.each(roadmList, function (index, item) {
|
||||
connectedEdges = network.getConnectedEdges(item);
|
||||
tempEdge = [];
|
||||
$.each(connectedEdges, function (index, item1) {
|
||||
if (network.body.data.edges.get(item1).component_type != serviceJSON.component_type)
|
||||
tempEdge.push(item1);
|
||||
});
|
||||
fromCount = 0;
|
||||
toCount = 0;
|
||||
for (i = 0; i < tempEdge.length; i++) {
|
||||
edgeDetails = network.body.data.edges.get(tempEdge[i]);
|
||||
if (edgeDetails.from == item)
|
||||
fromCount++;
|
||||
else if (edgeDetails.to == item)
|
||||
toCount++;
|
||||
}
|
||||
|
||||
if (fromCount != toCount || (fromCount == 0 && toCount == 0)) {
|
||||
addNodeHighlight(item);
|
||||
}
|
||||
else {
|
||||
//removeSpanInError(item);
|
||||
if (network.body.data.nodes.get(item).transceiver_type != "") {
|
||||
removeSpanInError(item, true);
|
||||
removeSpanInError(item);
|
||||
}
|
||||
else {
|
||||
var removeID = "#span" + item.replace(/\s/g, '');
|
||||
$(removeID).remove();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
// end
|
||||
|
||||
realUpdate();
|
||||
checkErrorFree();
|
||||
|
||||
//end
|
||||
}
|
||||
</code></pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">oopt-gnpy-web-gui-main</a></h2><h3>Modules</h3><ul><li><a href="module-alea.html">alea</a></li><li><a href="module-constraints.html">constraints</a></li><li><a href="module-exampleUtil.html">exampleUtil</a></li><li><a href="module-fiber.html">fiber</a></li><li><a href="module-filesaver.html">filesaver</a></li><li><a href="module-main.html">main</a></li><li><a href="module-mynetwork.html">mynetwork</a></li><li><a href="module-node.html">node</a></li><li><a href="module-patch.html">patch</a></li><li><a href="module-service.html">service</a></li><li><a href="module-validation.html">validation</a></li></ul><h3>Tutorials</h3><ul><li><a href="tutorial-LICENSE.html">LICENSE</a></li><li><a href="tutorial-technical_document.html">technical_document</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Wed Jul 06 2022 19:21:36 GMT+0530 (India Standard Time)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
<script src="scripts/linenumber.js"> </script>
|
||||
</body>
|
||||
</html>
|
||||
204
docs/networkgraph_exampleUtil.js.html
Normal file
204
docs/networkgraph_exampleUtil.js.html
Normal file
@@ -0,0 +1,204 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Source: networkgraph/exampleUtil.js</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Source: networkgraph/exampleUtil.js</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="prettyprint source linenums"><code> /**
|
||||
* exampleUtil.js
|
||||
* This library describes how to create some random nodes and fiber/patch/service.
|
||||
* @module exampleUtil
|
||||
*/
|
||||
|
||||
// These globals will be injected into a page that will use them.
|
||||
/* eslint no-unused-vars: "off" */
|
||||
|
||||
// This is quite old and I don't want to waste too much time here. We probably
|
||||
// should stop using this altogether as the examples should be easy and
|
||||
// straightforward to understand and this only obscures it.
|
||||
/* eslint require-jsdoc: "off" */
|
||||
|
||||
/* global Alea:false seededRandom:true */
|
||||
|
||||
/**
|
||||
* Created by Alex on 5/20/2015.
|
||||
*
|
||||
* @remarks
|
||||
* This depends on Alea from https://unpkg.com/alea@1.0.0/alea.js.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @param path
|
||||
* @param success
|
||||
* @param error
|
||||
*/
|
||||
function loadJSON(path, success, error) {
|
||||
const xhr = new XMLHttpRequest();
|
||||
xhr.onreadystatechange = function () {
|
||||
if (xhr.readyState === 4) {
|
||||
if (xhr.status === 200) {
|
||||
success(JSON.parse(xhr.responseText));
|
||||
} else {
|
||||
error(xhr);
|
||||
}
|
||||
}
|
||||
};
|
||||
xhr.open("GET", path, true);
|
||||
xhr.send();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param nodeCount
|
||||
*/
|
||||
function getScaleFreeNetwork(nodeCount) {
|
||||
const nodes = [];
|
||||
const edges = [];
|
||||
const connectionCount = [];
|
||||
|
||||
// Add child nodes, change styles…
|
||||
// randomly create some nodes and edges
|
||||
for (let i = 0; i < nodeCount; i++) {
|
||||
nodes.push({
|
||||
id: i,
|
||||
label: String(i),
|
||||
});
|
||||
|
||||
connectionCount[i] = 0;
|
||||
|
||||
// create edges in a scale-free-network way
|
||||
if (i == 1) {
|
||||
const from = i;
|
||||
const to = 0;
|
||||
edges.push({
|
||||
from: from,
|
||||
to: to,
|
||||
});
|
||||
connectionCount[from]++;
|
||||
connectionCount[to]++;
|
||||
} else if (i > 1) {
|
||||
const conn = edges.length * 2;
|
||||
const rand = Math.floor(seededRandom() * conn);
|
||||
let cum = 0;
|
||||
let j = 0;
|
||||
while (j < connectionCount.length && cum < rand) {
|
||||
cum += connectionCount[j];
|
||||
j++;
|
||||
}
|
||||
|
||||
const from = i;
|
||||
const to = j;
|
||||
edges.push({
|
||||
from: from,
|
||||
to: to,
|
||||
});
|
||||
connectionCount[from]++;
|
||||
connectionCount[to]++;
|
||||
}
|
||||
}
|
||||
|
||||
return { nodes: nodes, edges: edges };
|
||||
}
|
||||
|
||||
seededRandom = Alea("SEED");
|
||||
|
||||
/**
|
||||
* @param nodeCount
|
||||
*/
|
||||
function getScaleFreeNetworkSeeded(nodeCount) {
|
||||
const nodes = [];
|
||||
const edges = [];
|
||||
const connectionCount = [];
|
||||
let edgesId = 0;
|
||||
|
||||
// randomly create some nodes and edges
|
||||
for (let i = 0; i < nodeCount; i++) {
|
||||
nodes.push({
|
||||
id: i,
|
||||
label: String(i),
|
||||
title: element(i),
|
||||
});
|
||||
|
||||
connectionCount[i] = 0;
|
||||
|
||||
// create edges in a scale-free-network way
|
||||
if (i == 1) {
|
||||
const from = i;
|
||||
const to = 0;
|
||||
edges.push({
|
||||
id: edgesId++,
|
||||
from: from,
|
||||
to: to,
|
||||
});
|
||||
connectionCount[from]++;
|
||||
connectionCount[to]++;
|
||||
} else if (i > 1) {
|
||||
const conn = edges.length * 2;
|
||||
const rand = Math.floor(seededRandom() * conn);
|
||||
let cum = 0;
|
||||
let j = 0;
|
||||
while (j < connectionCount.length && cum < rand) {
|
||||
cum += connectionCount[j];
|
||||
j++;
|
||||
}
|
||||
|
||||
const from = i;
|
||||
const to = j;
|
||||
edges.push({
|
||||
id: edgesId++,
|
||||
from: from,
|
||||
to: to,
|
||||
});
|
||||
connectionCount[from]++;
|
||||
connectionCount[to]++;
|
||||
}
|
||||
}
|
||||
|
||||
return { nodes: nodes, edges: edges };
|
||||
|
||||
}
|
||||
|
||||
</code></pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">oopt-gnpy-web-gui-main</a></h2><h3>Modules</h3><ul><li><a href="module-alea.html">alea</a></li><li><a href="module-constraints.html">constraints</a></li><li><a href="module-exampleUtil.html">exampleUtil</a></li><li><a href="module-fiber.html">fiber</a></li><li><a href="module-filesaver.html">filesaver</a></li><li><a href="module-main.html">main</a></li><li><a href="module-mynetwork.html">mynetwork</a></li><li><a href="module-node.html">node</a></li><li><a href="module-patch.html">patch</a></li><li><a href="module-service.html">service</a></li><li><a href="module-validation.html">validation</a></li></ul><h3>Tutorials</h3><ul><li><a href="tutorial-LICENSE.html">LICENSE</a></li><li><a href="tutorial-technical_document.html">technical_document</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Wed Jul 06 2022 19:21:36 GMT+0530 (India Standard Time)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
<script src="scripts/linenumber.js"> </script>
|
||||
</body>
|
||||
</html>
|
||||
1225
docs/networkgraph_fiber.js.html
Normal file
1225
docs/networkgraph_fiber.js.html
Normal file
File diff suppressed because it is too large
Load Diff
227
docs/networkgraph_filesaver.js.html
Normal file
227
docs/networkgraph_filesaver.js.html
Normal file
@@ -0,0 +1,227 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Source: networkgraph/filesaver.js</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Source: networkgraph/filesaver.js</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="prettyprint source linenums"><code> /**
|
||||
* filesaver.js
|
||||
* Filesaver.js is the solution to saving files on the client-side and is perfect for web apps that generate files on the client.
|
||||
* @module filesaver
|
||||
*/
|
||||
|
||||
/*
|
||||
* FileSaver.js
|
||||
* A saveAs() FileSaver implementation.
|
||||
*
|
||||
* By Eli Grey, http://eligrey.com
|
||||
*
|
||||
* License : https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md (MIT)
|
||||
* source : http://purl.eligrey.com/github/FileSaver.js
|
||||
*/
|
||||
|
||||
// The one and only way of getting global scope in all environments
|
||||
// https://stackoverflow.com/q/3277182/1008999
|
||||
var _global = typeof window === 'object' && window.window === window
|
||||
? window : typeof self === 'object' && self.self === self
|
||||
? self : typeof global === 'object' && global.global === global
|
||||
? global
|
||||
: this
|
||||
|
||||
function bom(blob, opts) {
|
||||
if (typeof opts === 'undefined') opts = { autoBom: false }
|
||||
else if (typeof opts !== 'object') {
|
||||
console.warn('Deprecated: Expected third argument to be a object')
|
||||
opts = { autoBom: !opts }
|
||||
}
|
||||
|
||||
// prepend BOM for UTF-8 XML and text/* types (including HTML)
|
||||
// note: your browser will automatically convert UTF-16 U+FEFF to EF BB BF
|
||||
if (opts.autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)) {
|
||||
return new Blob([String.fromCharCode(0xFEFF), blob], { type: blob.type })
|
||||
}
|
||||
return blob
|
||||
}
|
||||
|
||||
function download(url, name, opts) {
|
||||
var xhr = new XMLHttpRequest()
|
||||
xhr.open('GET', url)
|
||||
xhr.responseType = 'blob'
|
||||
xhr.onload = function () {
|
||||
saveAs(xhr.response, name, opts)
|
||||
}
|
||||
xhr.onerror = function () {
|
||||
console.error('could not download file')
|
||||
}
|
||||
xhr.send()
|
||||
}
|
||||
|
||||
function corsEnabled(url) {
|
||||
var xhr = new XMLHttpRequest()
|
||||
// use sync to avoid popup blocker
|
||||
xhr.open('HEAD', url, false)
|
||||
try {
|
||||
xhr.send()
|
||||
} catch (e) { }
|
||||
return xhr.status >= 200 && xhr.status <= 299
|
||||
}
|
||||
|
||||
// `a.click()` doesn't work for all browsers (#465)
|
||||
function click(node) {
|
||||
try {
|
||||
node.dispatchEvent(new MouseEvent('click'))
|
||||
} catch (e) {
|
||||
var evt = document.createEvent('MouseEvents')
|
||||
evt.initMouseEvent('click', true, true, window, 0, 0, 0, 80,
|
||||
20, false, false, false, false, 0, null)
|
||||
node.dispatchEvent(evt)
|
||||
}
|
||||
}
|
||||
|
||||
// Detect WebView inside a native macOS app by ruling out all browsers
|
||||
// We just need to check for 'Safari' because all other browsers (besides Firefox) include that too
|
||||
// https://www.whatismybrowser.com/guides/the-latest-user-agent/macos
|
||||
var isMacOSWebView = _global.navigator && /Macintosh/.test(navigator.userAgent) && /AppleWebKit/.test(navigator.userAgent) && !/Safari/.test(navigator.userAgent)
|
||||
|
||||
var saveAs = _global.saveAs || (
|
||||
// probably in some web worker
|
||||
(typeof window !== 'object' || window !== _global)
|
||||
? function saveAs() { /* noop */ }
|
||||
|
||||
// Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView
|
||||
: ('download' in HTMLAnchorElement.prototype && !isMacOSWebView)
|
||||
? function saveAs(blob, name, opts) {
|
||||
var URL = _global.URL || _global.webkitURL
|
||||
var a = document.createElement('a')
|
||||
name = name || blob.name || 'download'
|
||||
|
||||
a.download = name
|
||||
a.rel = 'noopener' // tabnabbing
|
||||
|
||||
// TODO: detect chrome extensions & packaged apps
|
||||
// a.target = '_blank'
|
||||
|
||||
if (typeof blob === 'string') {
|
||||
// Support regular links
|
||||
a.href = blob
|
||||
if (a.origin !== location.origin) {
|
||||
corsEnabled(a.href)
|
||||
? download(blob, name, opts)
|
||||
: click(a, a.target = '_blank')
|
||||
} else {
|
||||
click(a)
|
||||
}
|
||||
} else {
|
||||
// Support blobs
|
||||
a.href = URL.createObjectURL(blob)
|
||||
setTimeout(function () { URL.revokeObjectURL(a.href) }, 4E4) // 40s
|
||||
setTimeout(function () { click(a) }, 0)
|
||||
}
|
||||
}
|
||||
|
||||
// Use msSaveOrOpenBlob as a second approach
|
||||
: 'msSaveOrOpenBlob' in navigator
|
||||
? function saveAs(blob, name, opts) {
|
||||
name = name || blob.name || 'download'
|
||||
|
||||
if (typeof blob === 'string') {
|
||||
if (corsEnabled(blob)) {
|
||||
download(blob, name, opts)
|
||||
} else {
|
||||
var a = document.createElement('a')
|
||||
a.href = blob
|
||||
a.target = '_blank'
|
||||
setTimeout(function () { click(a) })
|
||||
}
|
||||
} else {
|
||||
navigator.msSaveOrOpenBlob(bom(blob, opts), name)
|
||||
}
|
||||
}
|
||||
|
||||
// Fallback to using FileReader and a popup
|
||||
: function saveAs(blob, name, opts, popup) {
|
||||
// Open a popup immediately do go around popup blocker
|
||||
// Mostly only available on user interaction and the fileReader is async so...
|
||||
popup = popup || open('', '_blank')
|
||||
if (popup) {
|
||||
popup.document.title =
|
||||
popup.document.body.innerText = 'downloading...'
|
||||
}
|
||||
|
||||
if (typeof blob === 'string') return download(blob, name, opts)
|
||||
|
||||
var force = blob.type === 'application/octet-stream'
|
||||
var isSafari = /constructor/i.test(_global.HTMLElement) || _global.safari
|
||||
var isChromeIOS = /CriOS\/[\d]+/.test(navigator.userAgent)
|
||||
|
||||
if ((isChromeIOS || (force && isSafari) || isMacOSWebView) && typeof FileReader !== 'undefined') {
|
||||
// Safari doesn't allow downloading of blob URLs
|
||||
var reader = new FileReader()
|
||||
reader.onloadend = function () {
|
||||
var url = reader.result
|
||||
url = isChromeIOS ? url : url.replace(/^data:[^;]*;/, 'data:attachment/file;')
|
||||
if (popup) popup.location.href = url
|
||||
else location = url
|
||||
popup = null // reverse-tabnabbing #460
|
||||
}
|
||||
reader.readAsDataURL(blob)
|
||||
} else {
|
||||
var URL = _global.URL || _global.webkitURL
|
||||
var url = URL.createObjectURL(blob)
|
||||
if (popup) popup.location = url
|
||||
else location.href = url
|
||||
popup = null // reverse-tabnabbing #460
|
||||
setTimeout(function () { URL.revokeObjectURL(url) }, 4E4) // 40s
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
_global.saveAs = saveAs.saveAs = saveAs
|
||||
|
||||
if (typeof module !== 'undefined') {
|
||||
module.exports = saveAs;
|
||||
}</code></pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">oopt-gnpy-web-gui-main</a></h2><h3>Modules</h3><ul><li><a href="module-alea.html">alea</a></li><li><a href="module-constraints.html">constraints</a></li><li><a href="module-exampleUtil.html">exampleUtil</a></li><li><a href="module-fiber.html">fiber</a></li><li><a href="module-filesaver.html">filesaver</a></li><li><a href="module-main.html">main</a></li><li><a href="module-mynetwork.html">mynetwork</a></li><li><a href="module-node.html">node</a></li><li><a href="module-patch.html">patch</a></li><li><a href="module-service.html">service</a></li><li><a href="module-validation.html">validation</a></li></ul><h3>Tutorials</h3><ul><li><a href="tutorial-LICENSE.html">LICENSE</a></li><li><a href="tutorial-technical_document.html">technical_document</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Wed Jul 06 2022 19:21:36 GMT+0530 (India Standard Time)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
<script src="scripts/linenumber.js"> </script>
|
||||
</body>
|
||||
</html>
|
||||
3796
docs/networkgraph_mynetwork.js.html
Normal file
3796
docs/networkgraph_mynetwork.js.html
Normal file
File diff suppressed because it is too large
Load Diff
1662
docs/networkgraph_node.js.html
Normal file
1662
docs/networkgraph_node.js.html
Normal file
File diff suppressed because it is too large
Load Diff
334
docs/networkgraph_patch.js.html
Normal file
334
docs/networkgraph_patch.js.html
Normal file
@@ -0,0 +1,334 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Source: networkgraph/patch.js</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Source: networkgraph/patch.js</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="prettyprint source linenums"><code> /**
|
||||
* patch.js
|
||||
* The patch library describes how to add a patch connection between any 2 nodes by dragging from source node to destination and defines the patch manipulation.
|
||||
* @module patch
|
||||
*/
|
||||
|
||||
|
||||
var isDualPatchMode = 0;
|
||||
var isSinglePatchMode = 0;
|
||||
var addPatchData = {
|
||||
from: '',
|
||||
to: ''
|
||||
};
|
||||
function dualPatchMode() {
|
||||
UnSelectAll();
|
||||
isDualPatchMode = 1;
|
||||
isSinglePatchMode = 0;
|
||||
isAddService = 0;
|
||||
isDualFiberMode = 0;
|
||||
isSingleFiberMode = 0;
|
||||
addPatchData = {
|
||||
from: '',
|
||||
to: ''
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable settings for patch and reset other settings.
|
||||
* Set patch 1 = enable, 0 = disable.
|
||||
*/
|
||||
function singlePatchMode() {
|
||||
UnSelectAll();
|
||||
isDualPatchMode = 0;
|
||||
isSinglePatchMode = 1;
|
||||
isAddService = 0;
|
||||
isDualFiberMode = 0;
|
||||
isSingleFiberMode = 0;
|
||||
addPatchData = {
|
||||
from: '',
|
||||
to: ''
|
||||
};
|
||||
}
|
||||
function addDualPatch() {
|
||||
|
||||
var fromDetails = network.body.data.nodes.get(addPatchData.from);
|
||||
var toDetails = network.body.data.nodes.get(addPatchData.to);
|
||||
if ((fromDetails.node_type == transceiverJSON.node_type && toDetails.node_type == roadmJSON.node_type) || (fromDetails.node_type == roadmJSON.node_type && toDetails.node_type == transceiverJSON.node_type)) {
|
||||
|
||||
var labelvalue = dualPatchJSON.component_type + ' ' + network.body.data.nodes.get(addPatchData.from).number + ' - ' + network.body.data.nodes.get(addPatchData.to).number;
|
||||
addPatchComponent(1, addPatchData.from, addPatchData.to, labelvalue, labelvalue, false);
|
||||
}
|
||||
else {
|
||||
showMessage(alertType.Error, "The " + dualPatchJSON.component_type + " should be between " + transceiverJSON.node_type + " and " + roadmJSON.node_type + " sites");
|
||||
}
|
||||
addPatchData = {
|
||||
from: '',
|
||||
to: ''
|
||||
};
|
||||
UnSelectAll();
|
||||
network.addEdgeMode();
|
||||
|
||||
}
|
||||
function addSinglePatch() {
|
||||
|
||||
var labelvalue = getLabel(addPatchData.from, addPatchData.to, singlePatchJSON.component_type);
|
||||
addPatchComponent(1, addPatchData.from, addPatchData.to, labelvalue, labelvalue, false);
|
||||
addPatchData = {
|
||||
from: '',
|
||||
to: ''
|
||||
};
|
||||
UnSelectAll();
|
||||
network.addEdgeMode();
|
||||
}
|
||||
|
||||
/**
|
||||
* Patch creation.
|
||||
* Patch style and configuration data loaded from configurationdata, styledata json.
|
||||
* @param {number} cmode - Service mode 1 for add.
|
||||
* @param {string} cfrom - Source node ID.
|
||||
* @param {string} cto - Destination node ID.
|
||||
* @param {string} clabel - The Label of the service.
|
||||
* @param {string} ctext - The Text of the service.
|
||||
* @param {boolean} isImport - false -> manual add, true -> automattically added while import json.
|
||||
*/
|
||||
function addPatchComponent(cmode, cfrom, cto, clabel, ctext, isImport) {
|
||||
|
||||
if (cmode == 1) {
|
||||
var patchID = token();
|
||||
if (!isImport)
|
||||
clabel = countFiberService(false, false, false, true, cfrom, cto) + '-' + clabel;
|
||||
|
||||
elabel = clabel;
|
||||
|
||||
if (isSinglePatchMode == 1) {
|
||||
var flag = false;
|
||||
var message = [];
|
||||
var response = nodeRule(cfrom, cto, amplifierJSON.node_type);
|
||||
if (response.flag) {
|
||||
flag = true
|
||||
message.push(response.message);
|
||||
}
|
||||
|
||||
response = nodeRule(cfrom, cto, fusedJSON.node_type);
|
||||
if (response.flag) {
|
||||
flag = true;
|
||||
message.push(response.message);
|
||||
}
|
||||
|
||||
if (flag) {
|
||||
showMessage(alertType.Error, message.join('. <br /><br /> '));
|
||||
return;
|
||||
}
|
||||
|
||||
network.body.data.edges.add({
|
||||
id: patchID, from: cfrom, to: cto, label: elabel, text: clabel,
|
||||
dashes: singlePatchJSON.dashes, width: singlePatchJSON.width,
|
||||
component_type: singlePatchJSON.component_type, patch_category: singlePatchJSON.patch_category,
|
||||
color: singlePatchJSON.options.color, background: singlePatchJSON.options.background,
|
||||
arrows: singlePatchJSON.options.arrows,
|
||||
smooth: singlePatchJSON.options.smooth,
|
||||
view: topologyView.Functional_View, hidden: false,
|
||||
});
|
||||
|
||||
nodeValidationInEdge(cfrom, cto);
|
||||
}
|
||||
if (isDualPatchMode == 1) {
|
||||
//we cannot add more than 1 patch
|
||||
isPatchAdded = false;
|
||||
var connectedFiber = network.getConnectedEdges(cfrom);
|
||||
connectedFiber.push(network.getConnectedEdges(cto));
|
||||
$.each(connectedFiber, function (index, item) {
|
||||
var fiberDetails = network.body.data.edges.get(item);
|
||||
if (fiberDetails.component_type == dualPatchJSON.component_type) {
|
||||
if ((fiberDetails.from == cfrom && fiberDetails.to == cto) || (fiberDetails.from == cto && fiberDetails.to == cfrom)) {
|
||||
isPatchAdded = true;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (isPatchAdded && !isImport) {
|
||||
showMessage(alertType.Error, 'We cannot add more than 1 ' + dualPatchJSON.patch_category);
|
||||
return;
|
||||
}
|
||||
//end
|
||||
network.body.data.edges.add({
|
||||
id: patchID, from: cfrom, to: cto, label: elabel, text: ctext,
|
||||
dashes: dualPatchJSON.dashes, width: dualPatchJSON.width,
|
||||
component_type: dualPatchJSON.component_type, patch_category: dualPatchJSON.patch_category,
|
||||
color: dualPatchJSON.options.color, background: dualPatchJSON.options.background,
|
||||
arrows: dualPatchJSON.options.arrows,
|
||||
smooth: dualPatchJSON.options.smooth,
|
||||
view: topologyView.NE_View, hidden: false,
|
||||
});
|
||||
}
|
||||
multipleFiberService(cfrom, cto);
|
||||
var tedge = network.body.data.edges.get(patchID);
|
||||
tedge.isUpdate = false;
|
||||
tempUndo.push(tedge);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Populate patch details by patch ID.
|
||||
* @param {string} patchID - Patch ID.
|
||||
* @param callback - The callback that handles the response.
|
||||
*/
|
||||
function singlePatchEdit(patchID, callback) {
|
||||
document.getElementById("singlePatchMenu").style.display = "none";
|
||||
var edgeDetails = network.body.data.edges.get(patchID);
|
||||
$("#txtSinglePatchName").val(edgeDetails.text);
|
||||
openDrawer('singlepatch');
|
||||
document.getElementById("btnUpdateSinglePatch").onclick = updateSinglePatch.bind(
|
||||
this,
|
||||
patchID,
|
||||
callback
|
||||
);
|
||||
document.getElementById("btnCloseSinglePatch").onclick = clearSinglePatch.bind(
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update patch.
|
||||
* Update patch label, text by patch ID.
|
||||
* @param {string} patchID - patch ID.
|
||||
*/
|
||||
function updateSinglePatch(patchID) {
|
||||
|
||||
var id = patchID;
|
||||
var label = $("#txtSinglePatchName").val().trim();
|
||||
var patchDetails = network.body.data.edges.get(patchID);
|
||||
if (nameLengthValidation("txtSinglePatchName")) {
|
||||
|
||||
var elabel = "";
|
||||
elabel = label;
|
||||
if (patchDetails.component_type == dualPatchJSON.component_type) {
|
||||
network.body.data.edges.update({
|
||||
id: id, label: elabel, text: label
|
||||
});
|
||||
multipleFiberService(patchDetails.from, patchDetails.to);
|
||||
var tdata = network.body.data.edges.get(id);
|
||||
tdata.isUpdate = true;
|
||||
tempUndo.push(tdata);
|
||||
clearSinglePatch();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove patch by patch ID.
|
||||
* @param {string} patchID - patch ID.
|
||||
*/
|
||||
function deletePatch(patchID) {
|
||||
var patchDetails = network.body.data.edges.get(patchID);
|
||||
var patchLabel = patchDetails.label;
|
||||
if (patchDetails.label.trim() == "")
|
||||
patchLabel = patchDetails.text
|
||||
|
||||
if (checkFiberPatchServiceCon(patchDetails.from, patchDetails.to, patchDetails.component_type))
|
||||
return;
|
||||
document.getElementById("singlePatchMenu").style.display = "none";
|
||||
document.getElementById("dualPatchMenu").style.display = "none";
|
||||
var patchd = network.body.data.edges.get(patchID);
|
||||
network.body.data.edges.remove(patchID);
|
||||
multipleFiberService(patchDetails.from, patchDetails.to);
|
||||
nodeValidationInEdge(patchDetails.from, patchDetails.to);
|
||||
patchd.isDelete = true;
|
||||
patchd.isUpdate = false;
|
||||
tempUndo.push(patchd);
|
||||
UnSelectAll();
|
||||
enableEdgeIndicator();
|
||||
}
|
||||
|
||||
/** Clear input/teporary data and other settings. */
|
||||
function clearSinglePatch() {
|
||||
|
||||
$("#txtSinglePatchName").val('');
|
||||
closeDrawer('singlepatch');
|
||||
UnSelectAll();
|
||||
enableEdgeIndicator();
|
||||
}
|
||||
function dualPatchEdit(patchID, callback) {
|
||||
document.getElementById("dualPatchMenu").style.display = "none";
|
||||
var edgeDetails = network.body.data.edges.get(patchID);
|
||||
$("#txtDualPatchName").val(edgeDetails.text);
|
||||
openDrawer('dualpatch');
|
||||
document.getElementById("btnUpdateDualPatch").onclick = updateDualPatch.bind(
|
||||
this,
|
||||
patchID,
|
||||
callback
|
||||
);
|
||||
document.getElementById("btnCloseDualPatch").onclick = clearDualPatch.bind(
|
||||
);
|
||||
}
|
||||
function updateDualPatch(patchID) {
|
||||
|
||||
var id = patchID;
|
||||
var label = $("#txtDualPatchName").val().trim();
|
||||
var patchDetails = network.body.data.edges.get(patchID);
|
||||
|
||||
if (nameLengthValidation("txtDualPatchName")) {
|
||||
|
||||
if (patchDetails.component_type == dualPatchJSON.component_type) {
|
||||
|
||||
var elabel = "";
|
||||
elabel = label;
|
||||
network.body.data.edges.update({
|
||||
id: id, label: elabel, text: label
|
||||
});
|
||||
multipleFiberService(patchDetails.from, patchDetails.to);
|
||||
clearDualPatch();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
function clearDualPatch() {
|
||||
$("#txtDualPatchName").val('');
|
||||
closeDrawer('dualpatch');
|
||||
UnSelectAll();
|
||||
enableEdgeIndicator();
|
||||
}</code></pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">oopt-gnpy-web-gui-main</a></h2><h3>Modules</h3><ul><li><a href="module-alea.html">alea</a></li><li><a href="module-constraints.html">constraints</a></li><li><a href="module-exampleUtil.html">exampleUtil</a></li><li><a href="module-fiber.html">fiber</a></li><li><a href="module-filesaver.html">filesaver</a></li><li><a href="module-main.html">main</a></li><li><a href="module-mynetwork.html">mynetwork</a></li><li><a href="module-node.html">node</a></li><li><a href="module-patch.html">patch</a></li><li><a href="module-service.html">service</a></li><li><a href="module-validation.html">validation</a></li></ul><h3>Tutorials</h3><ul><li><a href="tutorial-LICENSE.html">LICENSE</a></li><li><a href="tutorial-technical_document.html">technical_document</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Wed Jul 06 2022 19:21:36 GMT+0530 (India Standard Time)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
<script src="scripts/linenumber.js"> </script>
|
||||
</body>
|
||||
</html>
|
||||
243
docs/networkgraph_service.js.html
Normal file
243
docs/networkgraph_service.js.html
Normal file
@@ -0,0 +1,243 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Source: networkgraph/service.js</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Source: networkgraph/service.js</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="prettyprint source linenums"><code>/**
|
||||
* service.js
|
||||
* The Service is also the same as the connectivity path between 2 transceiver nodes. This library file defines service manipulation.
|
||||
* @module service
|
||||
*/
|
||||
|
||||
|
||||
var isAddService = 0;
|
||||
var addServiceData = {
|
||||
from: '',
|
||||
to: ''
|
||||
};
|
||||
|
||||
/**
|
||||
* Enable settings for service and reset other settings.
|
||||
* Set service 1 = enable, 0 = disable.
|
||||
*/
|
||||
function addServiceMode() {
|
||||
UnSelectAll();
|
||||
isAddService = 1;
|
||||
isDualFiberMode = 0;
|
||||
isSingleFiberMode = 0;
|
||||
isSinglePatchMode = 0;
|
||||
isDualPatchMode = 0;
|
||||
addServiceData = {
|
||||
from: '',
|
||||
to: ''
|
||||
};
|
||||
}
|
||||
|
||||
/** Check service connections rule before add it. */
|
||||
function addService() {
|
||||
|
||||
var fromDetails = network.body.data.nodes.get(addServiceData.from);
|
||||
var toDetails = network.body.data.nodes.get(addServiceData.to);
|
||||
var transNode = transceiverJSON.node_type.toString().toLowerCase();
|
||||
//service should be add between only two transceiver
|
||||
if (fromDetails.node_type == transceiverJSON.node_type && toDetails.node_type == transceiverJSON.node_type) {
|
||||
//transceiver force checking
|
||||
if (fromDetails.transceiver_type != "" && toDetails.transceiver_type != "") {
|
||||
//same transceiver type checking
|
||||
if (fromDetails.transceiver_type == toDetails.transceiver_type) {
|
||||
var labelvalue = getLabel(addServiceData.from, addServiceData.to, serviceJSON.component_type);
|
||||
//2 transceiver must have fiber/patch connection
|
||||
if (network.getConnectedEdges(addServiceData.from).length > 0 && network.getConnectedEdges(addServiceData.to).length > 0)
|
||||
addServiceComponent(1, addServiceData.from, addServiceData.to, labelvalue, false);
|
||||
else
|
||||
showMessage(alertType.Error, "Source " + roadmJSON.component_type + " : " + fromDetails.label + " ,destination " + roadmJSON.component_type + " : " + toDetails.label + " should have " + dualFiberJSON.component_type + "/" + dualPatchJSON.component_type + " connection");
|
||||
}
|
||||
else
|
||||
showMessage(alertType.Error, serviceJSON.component_type + " can be created only between " + transNode + " of same type");
|
||||
}
|
||||
else
|
||||
showMessage(alertType.Error, serviceJSON.component_type + " can be created only when " + transNode + "s are forced");
|
||||
|
||||
}
|
||||
else {
|
||||
showMessage(alertType.Error, "The " + serviceJSON.component_type + " should be between 2 " + transNode + " sites");
|
||||
}
|
||||
addServiceData = {
|
||||
from: '',
|
||||
to: ''
|
||||
};
|
||||
UnSelectAll();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Service creation.
|
||||
* Service style and configuration data loaded from configurationdata, styledata json.
|
||||
* @param {number} cmode - Service mode 1 for add.
|
||||
* @param {string} cfrom - Source node ID.
|
||||
* @param {string} cto - Destination node ID.
|
||||
* @param {string} clabel - The Label of the service.
|
||||
* @param {boolean} isImport - false -> manual add, true -> automattically added while import json.
|
||||
*/
|
||||
function addServiceComponent(cmode, cfrom, cto, clabel, isImport) {
|
||||
var serviceID = token();
|
||||
if (cmode == 1) {
|
||||
|
||||
var bandwidth = configData[serviceJSON.component_type].default.band_width;
|
||||
if (isImport)
|
||||
bandwidth = tBandwidth;
|
||||
else
|
||||
clabel = countFiberService(false, false, true, false, cfrom, cto) + '-' + clabel;
|
||||
|
||||
elabel = clabel;
|
||||
var fiberSmooth = multipleFiberService1(cfrom, cto);
|
||||
if (!fiberSmooth)
|
||||
fiberSmooth = fiberJSON.options.smooth;
|
||||
network.body.data.edges.add({
|
||||
id: serviceID, from: cfrom, to: cto, label: elabel, text: clabel, dashes: serviceJSON.dashes, width: serviceJSON.width,
|
||||
component_type: serviceJSON.component_type, color: serviceJSON.options.color, background: serviceJSON.options.background,
|
||||
arrows: serviceJSON.options.arrows,
|
||||
smooth: fiberSmooth,
|
||||
band_width: bandwidth
|
||||
});
|
||||
multipleFiberService(cfrom, cto);
|
||||
var tedge = network.body.data.edges.get(serviceID);
|
||||
tedge.isUpdate = false;
|
||||
tempUndo.push(tedge);
|
||||
}
|
||||
UnSelectAll();
|
||||
network.addEdgeMode();
|
||||
}
|
||||
|
||||
/**
|
||||
* Populate service details by service ID.
|
||||
* @param {string} serviceID - Service ID.
|
||||
* @param callback - The callback that handles the response.
|
||||
*/
|
||||
function serviceEdit(serviceID, callback) {
|
||||
document.getElementById("serviceMenu").style.display = "none";
|
||||
var edgeDetails = network.body.data.edges.get(serviceID);
|
||||
$("#txtServiceName").val(edgeDetails.text);
|
||||
var connectedNode = network.getConnectedNodes(serviceID);
|
||||
$("#txtServiceSrc").val(network.body.data.nodes.get(connectedNode[0]).label);
|
||||
$("#txtServiceDest").val(network.body.data.nodes.get(connectedNode[1]).label);
|
||||
$("#txtBandwidth").val(edgeDetails.band_width);
|
||||
openDrawer('service');
|
||||
document.getElementById("btnUpdateService").onclick = updateService.bind(
|
||||
this,
|
||||
serviceID,
|
||||
callback
|
||||
);
|
||||
document.getElementById("btnCloseService").onclick = clearService.bind(
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update service.
|
||||
* Update service label, text, band_width by service ID.
|
||||
* @param {string} serviceID - Service ID.
|
||||
*/
|
||||
function updateService(serviceID) {
|
||||
|
||||
var id = serviceID;
|
||||
var label = $("#txtServiceName").val().trim();
|
||||
var bandwidth = $("#txtBandwidth").val();
|
||||
var serviceDetails = network.body.data.edges.get(serviceID);
|
||||
|
||||
if (nameLengthValidation("txtServiceName")) {
|
||||
|
||||
if (serviceDetails.component_type == serviceJSON.component_type) {
|
||||
|
||||
var elabel = "";
|
||||
elabel = label;
|
||||
network.body.data.edges.update({
|
||||
id: id, label: elabel, text: label, band_width: bandwidth
|
||||
});
|
||||
multipleFiberService(serviceDetails.from, serviceDetails.to);
|
||||
var tdata = network.body.data.edges.get(id);
|
||||
tdata.isUpdate = true;
|
||||
tempUndo.push(tdata);
|
||||
|
||||
clearService();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove service by service ID.
|
||||
* @param {string} serviceID - Service ID.
|
||||
*/
|
||||
function deleteService(serviceID) {
|
||||
var serviceDetails = network.body.data.edges.get(serviceID);
|
||||
document.getElementById("serviceMenu").style.display = "none";
|
||||
var serviced = network.body.data.edges.get(serviceID);
|
||||
network.body.data.edges.remove(serviceID);
|
||||
multipleFiberService(serviceDetails.from, serviceDetails.to);
|
||||
serviced.isDelete = true;
|
||||
serviced.isUpdate = false;
|
||||
tempUndo.push(serviced);
|
||||
UnSelectAll();
|
||||
enableEdgeIndicator();
|
||||
}
|
||||
|
||||
/** Clear input/teporary data and other settings. */
|
||||
function clearService() {
|
||||
|
||||
$("#txtServiceName").val('');
|
||||
$("#txtServiceSrc").val('');
|
||||
$("#txtServiceDest").val('');
|
||||
$("#txtBandwidth").val('');
|
||||
$("#ddlCentralFrq").val('');
|
||||
closeDrawer('service');
|
||||
UnSelectAll();
|
||||
enableEdgeIndicator();
|
||||
}
|
||||
|
||||
</code></pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">oopt-gnpy-web-gui-main</a></h2><h3>Modules</h3><ul><li><a href="module-alea.html">alea</a></li><li><a href="module-constraints.html">constraints</a></li><li><a href="module-exampleUtil.html">exampleUtil</a></li><li><a href="module-fiber.html">fiber</a></li><li><a href="module-filesaver.html">filesaver</a></li><li><a href="module-main.html">main</a></li><li><a href="module-mynetwork.html">mynetwork</a></li><li><a href="module-node.html">node</a></li><li><a href="module-patch.html">patch</a></li><li><a href="module-service.html">service</a></li><li><a href="module-validation.html">validation</a></li></ul><h3>Tutorials</h3><ul><li><a href="tutorial-LICENSE.html">LICENSE</a></li><li><a href="tutorial-technical_document.html">technical_document</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Wed Jul 06 2022 19:21:36 GMT+0530 (India Standard Time)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
<script src="scripts/linenumber.js"> </script>
|
||||
</body>
|
||||
</html>
|
||||
193
docs/networkgraph_validation.js.html
Normal file
193
docs/networkgraph_validation.js.html
Normal file
@@ -0,0 +1,193 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Source: networkgraph/validation.js</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Source: networkgraph/validation.js</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="prettyprint source linenums"><code> /**
|
||||
* validation.js
|
||||
* The Validations library currently describes the validation of component name, length, and type
|
||||
* @module validation
|
||||
*/
|
||||
|
||||
|
||||
$(document).ready(function () {
|
||||
$("#txtSpan_Length").change(function () {
|
||||
var span_length = $("#txtSpan_Length").val().trim();
|
||||
var spanlen = parseFloat(span_length);
|
||||
if (isNaN(span_length) || spanlen <= 0 || span_length == "") {
|
||||
$("#txtSpan_Length").addClass('input_error');
|
||||
return;
|
||||
}
|
||||
else
|
||||
$("#txtSpan_Length").removeClass('input_error');
|
||||
|
||||
if ($('#cbxLength_Based_Loss').is(":checked")) {
|
||||
fiberCalc();
|
||||
|
||||
}
|
||||
});
|
||||
$("#txtLoss_Coefficient").change(function () {
|
||||
if ($('#cbxLength_Based_Loss').is(":checked")) {
|
||||
var span_length = $("#txtLoss_Coefficient").val().trim();
|
||||
var spanlen = parseFloat(span_length);
|
||||
if (isNaN(span_length) || spanlen <= 0 || span_length == "") {
|
||||
return;
|
||||
}
|
||||
fiberCalc();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
function fiberCalc() {
|
||||
var span_length = $("#txtSpan_Length").val().trim();
|
||||
var spanlen = parseFloat(span_length);
|
||||
var loss_coeff = $("#txtLoss_Coefficient").val().trim();
|
||||
var lossCoeff = parseFloat(loss_coeff);
|
||||
if (!isNaN(span_length) || spanlen >= 0 || span_length != "" || !isNaN(loss_coeff) || lossCoeff >= 0 || loss_coeff != "")
|
||||
fiberLengthCal('txtSpan_Length', 'txtLoss_Coefficient', 'txtSpan_Loss');
|
||||
}
|
||||
$("#ddlSingleFiberType").change(function () {
|
||||
if ($(this).val()=="") {
|
||||
$("#ddlSingleFiberType").addClass('input_error');
|
||||
return;
|
||||
}
|
||||
else
|
||||
$("#ddlSingleFiberType").removeClass('input_error');
|
||||
|
||||
});
|
||||
$("#ddlRoadmType").change(function () {
|
||||
if ($(this).val() == "") {
|
||||
$("#ddlRoadmType").addClass('input_error');
|
||||
return;
|
||||
}
|
||||
else
|
||||
$("#ddlRoadmType").removeClass('input_error');
|
||||
|
||||
});
|
||||
$("#ddlAmplifierType").change(function () {
|
||||
if ($(this).val() == "") {
|
||||
$("#ddlAmplifierType").addClass('input_error');
|
||||
return;
|
||||
}
|
||||
else
|
||||
$("#ddlAmplifierType").removeClass('input_error');
|
||||
|
||||
});
|
||||
$("#ddlRamanAmpType").change(function () {
|
||||
if ($(this).val() == "") {
|
||||
$("#ddlRamanAmpType").addClass('input_error');
|
||||
return;
|
||||
}
|
||||
else
|
||||
$("#ddlRamanAmpType").removeClass('input_error');
|
||||
|
||||
});
|
||||
$("#ddlRamanAmpCategory").change(function () {
|
||||
if ($(this).val() == "") {
|
||||
$("#ddlRamanAmpCategory").addClass('input_error');
|
||||
return;
|
||||
}
|
||||
else
|
||||
$("#ddlRamanAmpCategory").removeClass('input_error');
|
||||
|
||||
});
|
||||
$("#ddlTransceiverType").change(function () {
|
||||
if ($(this).val() == "") {
|
||||
$("#ddlTransceiverType").addClass('input_error');
|
||||
return;
|
||||
}
|
||||
else
|
||||
$("#ddlTransceiverType").removeClass('input_error');
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* Validate the node/fiber/patch/service name and name length.
|
||||
* @param {HTMLElement} element - Input element
|
||||
*/
|
||||
function nameLengthValidation(element) {
|
||||
var flag = true;
|
||||
var elementID = "#" + element
|
||||
var maxLength = Number(configData.node.site_length);
|
||||
var msg = "";
|
||||
if ($(elementID).val().trim() == '') {
|
||||
msg = "Please enter the name";
|
||||
flag = false;
|
||||
}
|
||||
else if (Number($(elementID).val().trim().length) > maxLength) {
|
||||
msg = "Name length should be less than or equal to 20";
|
||||
flag = false;
|
||||
}
|
||||
if (!flag)
|
||||
showMessage(alertType.Error, msg);
|
||||
return flag;
|
||||
}
|
||||
|
||||
/** Validate export file name. */
|
||||
function exportFileValidation() {
|
||||
var flag = false;
|
||||
if ($("#txtFileName").val().trim() != '')
|
||||
flag = true;
|
||||
else
|
||||
showMessage(alertType.Error, 'Please enter file name');
|
||||
return flag;
|
||||
}
|
||||
|
||||
/** Validate ROADM list, type and Amplifier type. */
|
||||
function roadmProVal() {
|
||||
var flag = false;
|
||||
if ($("#ddlRoadmList").val().trim() != 0 && $("#ddlROADMType").val().trim() != 0 && $("#ddlRPreAmpType").val().trim() != 0 && $("#ddlRBoosterType").val().trim() != 0)
|
||||
flag = true;
|
||||
else
|
||||
showMessage(alertType.Error, 'Please enter the value');
|
||||
return flag;
|
||||
}</code></pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">oopt-gnpy-web-gui-main</a></h2><h3>Modules</h3><ul><li><a href="module-alea.html">alea</a></li><li><a href="module-constraints.html">constraints</a></li><li><a href="module-exampleUtil.html">exampleUtil</a></li><li><a href="module-fiber.html">fiber</a></li><li><a href="module-filesaver.html">filesaver</a></li><li><a href="module-main.html">main</a></li><li><a href="module-mynetwork.html">mynetwork</a></li><li><a href="module-node.html">node</a></li><li><a href="module-patch.html">patch</a></li><li><a href="module-service.html">service</a></li><li><a href="module-validation.html">validation</a></li></ul><h3>Tutorials</h3><ul><li><a href="tutorial-LICENSE.html">LICENSE</a></li><li><a href="tutorial-technical_document.html">technical_document</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Wed Jul 06 2022 19:21:36 GMT+0530 (India Standard Time)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
<script src="scripts/linenumber.js"> </script>
|
||||
</body>
|
||||
</html>
|
||||
1667
docs/node.js.html
Normal file
1667
docs/node.js.html
Normal file
File diff suppressed because it is too large
Load Diff
337
docs/patch.js.html
Normal file
337
docs/patch.js.html
Normal file
@@ -0,0 +1,337 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Source: patch.js</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Source: patch.js</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="prettyprint source linenums"><code> /**
|
||||
* patch module
|
||||
* @module patch
|
||||
*/
|
||||
|
||||
/**
|
||||
* patch.js
|
||||
* The patch library describes to add a patch connection between any 2 nodes by dragging from source node to destination and defines the patch manipulation.
|
||||
*/
|
||||
|
||||
var isDualPatchMode = 0;
|
||||
var isSinglePatchMode = 0;
|
||||
var addPatchData = {
|
||||
from: '',
|
||||
to: ''
|
||||
};
|
||||
function dualPatchMode() {
|
||||
UnSelectAll();
|
||||
isDualPatchMode = 1;
|
||||
isSinglePatchMode = 0;
|
||||
isAddService = 0;
|
||||
isDualFiberMode = 0;
|
||||
isSingleFiberMode = 0;
|
||||
addPatchData = {
|
||||
from: '',
|
||||
to: ''
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable settings for patch and reset other settings.
|
||||
* Set patch 1 = enable, 0 = disable.
|
||||
*/
|
||||
function singlePatchMode() {
|
||||
UnSelectAll();
|
||||
isDualPatchMode = 0;
|
||||
isSinglePatchMode = 1;
|
||||
isAddService = 0;
|
||||
isDualFiberMode = 0;
|
||||
isSingleFiberMode = 0;
|
||||
addPatchData = {
|
||||
from: '',
|
||||
to: ''
|
||||
};
|
||||
}
|
||||
function addDualPatch() {
|
||||
|
||||
var fromDetails = network.body.data.nodes.get(addPatchData.from);
|
||||
var toDetails = network.body.data.nodes.get(addPatchData.to);
|
||||
if ((fromDetails.node_type == transceiverJSON.node_type && toDetails.node_type == roadmJSON.node_type) || (fromDetails.node_type == roadmJSON.node_type && toDetails.node_type == transceiverJSON.node_type)) {
|
||||
|
||||
var labelvalue = dualPatchJSON.component_type + ' ' + network.body.data.nodes.get(addPatchData.from).number + ' - ' + network.body.data.nodes.get(addPatchData.to).number;
|
||||
addPatchComponent(1, addPatchData.from, addPatchData.to, labelvalue, labelvalue, false);
|
||||
}
|
||||
else {
|
||||
showMessage(alertType.Error, "The " + dualPatchJSON.component_type + " should be between " + transceiverJSON.node_type + " and " + roadmJSON.node_type + " sites");
|
||||
}
|
||||
addPatchData = {
|
||||
from: '',
|
||||
to: ''
|
||||
};
|
||||
UnSelectAll();
|
||||
network.addEdgeMode();
|
||||
|
||||
}
|
||||
function addSinglePatch() {
|
||||
|
||||
var labelvalue = getLabel(addPatchData.from, addPatchData.to, singlePatchJSON.component_type);
|
||||
addPatchComponent(1, addPatchData.from, addPatchData.to, labelvalue, labelvalue, false);
|
||||
addPatchData = {
|
||||
from: '',
|
||||
to: ''
|
||||
};
|
||||
UnSelectAll();
|
||||
network.addEdgeMode();
|
||||
}
|
||||
|
||||
/**
|
||||
* Patch creation.
|
||||
* Patch style and configuration data loaded from configurationdata, styledata json.
|
||||
* @param {number} cmode - Service mode 1 for add.
|
||||
* @param {string} cfrom - Source node ID.
|
||||
* @param {string} cto - Destination node ID.
|
||||
* @param {string} clabel - The Label of the service.
|
||||
* @param {string} ctext - The Text of the service.
|
||||
* @param {boolean} isImport - false -> manual add, true -> automattically added while import json.
|
||||
*/
|
||||
function addPatchComponent(cmode, cfrom, cto, clabel, ctext, isImport) {
|
||||
|
||||
if (cmode == 1) {
|
||||
var patchID = token();
|
||||
if (!isImport)
|
||||
clabel = countFiberService(false, false, false, true, cfrom, cto) + '-' + clabel;
|
||||
|
||||
elabel = clabel;
|
||||
|
||||
if (isSinglePatchMode == 1) {
|
||||
var flag = false;
|
||||
var message = [];
|
||||
var response = nodeRule(cfrom, cto, amplifierJSON.node_type);
|
||||
if (response.flag) {
|
||||
flag = true
|
||||
message.push(response.message);
|
||||
}
|
||||
|
||||
response = nodeRule(cfrom, cto, fusedJSON.node_type);
|
||||
if (response.flag) {
|
||||
flag = true;
|
||||
message.push(response.message);
|
||||
}
|
||||
|
||||
if (flag) {
|
||||
showMessage(alertType.Error, message.join('. <br /><br /> '));
|
||||
return;
|
||||
}
|
||||
|
||||
network.body.data.edges.add({
|
||||
id: patchID, from: cfrom, to: cto, label: elabel, text: clabel,
|
||||
dashes: singlePatchJSON.dashes, width: singlePatchJSON.width,
|
||||
component_type: singlePatchJSON.component_type, patch_category: singlePatchJSON.patch_category,
|
||||
color: singlePatchJSON.options.color, background: singlePatchJSON.options.background,
|
||||
arrows: singlePatchJSON.options.arrows,
|
||||
smooth: singlePatchJSON.options.smooth,
|
||||
view: topologyView.Functional_View, hidden: false,
|
||||
});
|
||||
|
||||
nodeValidationInEdge(cfrom, cto);
|
||||
}
|
||||
if (isDualPatchMode == 1) {
|
||||
//we cannot add more than 1 patch
|
||||
isPatchAdded = false;
|
||||
var connectedFiber = network.getConnectedEdges(cfrom);
|
||||
connectedFiber.push(network.getConnectedEdges(cto));
|
||||
$.each(connectedFiber, function (index, item) {
|
||||
var fiberDetails = network.body.data.edges.get(item);
|
||||
if (fiberDetails.component_type == dualPatchJSON.component_type) {
|
||||
if ((fiberDetails.from == cfrom && fiberDetails.to == cto) || (fiberDetails.from == cto && fiberDetails.to == cfrom)) {
|
||||
isPatchAdded = true;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (isPatchAdded && !isImport) {
|
||||
showMessage(alertType.Error, 'We cannot add more than 1 ' + dualPatchJSON.patch_category);
|
||||
return;
|
||||
}
|
||||
//end
|
||||
network.body.data.edges.add({
|
||||
id: patchID, from: cfrom, to: cto, label: elabel, text: ctext,
|
||||
dashes: dualPatchJSON.dashes, width: dualPatchJSON.width,
|
||||
component_type: dualPatchJSON.component_type, patch_category: dualPatchJSON.patch_category,
|
||||
color: dualPatchJSON.options.color, background: dualPatchJSON.options.background,
|
||||
arrows: dualPatchJSON.options.arrows,
|
||||
smooth: dualPatchJSON.options.smooth,
|
||||
view: topologyView.NE_View, hidden: false,
|
||||
});
|
||||
}
|
||||
multipleFiberService(cfrom, cto);
|
||||
var tedge = network.body.data.edges.get(patchID);
|
||||
tedge.isUpdate = false;
|
||||
tempUndo.push(tedge);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Populate patch details by patch ID.
|
||||
* @param {string} patchID - Patch ID.
|
||||
* @param callback - The callback that handles the response.
|
||||
*/
|
||||
function singlePatchEdit(patchID, callback) {
|
||||
document.getElementById("singlePatchMenu").style.display = "none";
|
||||
var edgeDetails = network.body.data.edges.get(patchID);
|
||||
$("#txtSinglePatchName").val(edgeDetails.text);
|
||||
openDrawer('singlepatch');
|
||||
document.getElementById("btnUpdateSinglePatch").onclick = updateSinglePatch.bind(
|
||||
this,
|
||||
patchID,
|
||||
callback
|
||||
);
|
||||
document.getElementById("btnCloseSinglePatch").onclick = clearSinglePatch.bind(
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update patch.
|
||||
* Update patch label, text by patch ID.
|
||||
* @param {string} patchID - patch ID.
|
||||
*/
|
||||
function updateSinglePatch(patchID) {
|
||||
|
||||
var id = patchID;
|
||||
var label = $("#txtSinglePatchName").val().trim();
|
||||
var patchDetails = network.body.data.edges.get(patchID);
|
||||
if (nameLengthValidation("txtSinglePatchName")) {
|
||||
|
||||
var elabel = "";
|
||||
elabel = label;
|
||||
if (patchDetails.component_type == dualPatchJSON.component_type) {
|
||||
network.body.data.edges.update({
|
||||
id: id, label: elabel, text: label
|
||||
});
|
||||
multipleFiberService(patchDetails.from, patchDetails.to);
|
||||
var tdata = network.body.data.edges.get(id);
|
||||
tdata.isUpdate = true;
|
||||
tempUndo.push(tdata);
|
||||
clearSinglePatch();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove patch by patch ID.
|
||||
* @param {string} patchID - patch ID.
|
||||
*/
|
||||
function deletePatch(patchID) {
|
||||
var patchDetails = network.body.data.edges.get(patchID);
|
||||
var patchLabel = patchDetails.label;
|
||||
if (patchDetails.label.trim() == "")
|
||||
patchLabel = patchDetails.text
|
||||
|
||||
if (checkFiberPatchServiceCon(patchDetails.from, patchDetails.to, patchDetails.component_type))
|
||||
return;
|
||||
document.getElementById("singlePatchMenu").style.display = "none";
|
||||
document.getElementById("dualPatchMenu").style.display = "none";
|
||||
var patchd = network.body.data.edges.get(patchID);
|
||||
network.body.data.edges.remove(patchID);
|
||||
multipleFiberService(patchDetails.from, patchDetails.to);
|
||||
nodeValidationInEdge(patchDetails.from, patchDetails.to);
|
||||
patchd.isDelete = true;
|
||||
patchd.isUpdate = false;
|
||||
tempUndo.push(patchd);
|
||||
UnSelectAll();
|
||||
enableEdgeIndicator();
|
||||
}
|
||||
|
||||
/** Clear input/teporary data and other settings. */
|
||||
function clearSinglePatch() {
|
||||
|
||||
$("#txtSinglePatchName").val('');
|
||||
closeDrawer('singlepatch');
|
||||
UnSelectAll();
|
||||
enableEdgeIndicator();
|
||||
}
|
||||
function dualPatchEdit(patchID, callback) {
|
||||
document.getElementById("dualPatchMenu").style.display = "none";
|
||||
var edgeDetails = network.body.data.edges.get(patchID);
|
||||
$("#txtDualPatchName").val(edgeDetails.text);
|
||||
openDrawer('dualpatch');
|
||||
document.getElementById("btnUpdateDualPatch").onclick = updateDualPatch.bind(
|
||||
this,
|
||||
patchID,
|
||||
callback
|
||||
);
|
||||
document.getElementById("btnCloseDualPatch").onclick = clearDualPatch.bind(
|
||||
);
|
||||
}
|
||||
function updateDualPatch(patchID) {
|
||||
|
||||
var id = patchID;
|
||||
var label = $("#txtDualPatchName").val().trim();
|
||||
var patchDetails = network.body.data.edges.get(patchID);
|
||||
|
||||
if (nameLengthValidation("txtDualPatchName")) {
|
||||
|
||||
if (patchDetails.component_type == dualPatchJSON.component_type) {
|
||||
|
||||
var elabel = "";
|
||||
elabel = label;
|
||||
network.body.data.edges.update({
|
||||
id: id, label: elabel, text: label
|
||||
});
|
||||
multipleFiberService(patchDetails.from, patchDetails.to);
|
||||
clearDualPatch();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
function clearDualPatch() {
|
||||
$("#txtDualPatchName").val('');
|
||||
closeDrawer('dualpatch');
|
||||
UnSelectAll();
|
||||
enableEdgeIndicator();
|
||||
}</code></pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">oopt-gnpy-web-gui-main</a></h2><h3>Modules</h3><ul><li><a href="module-alea.html">alea</a></li><li><a href="module-constraints.html">constraints</a></li><li><a href="module-exampleUtil.html">exampleUtil</a></li><li><a href="module-fiber.html">fiber</a></li><li><a href="module-filesaver.html">filesaver</a></li><li><a href="module-mynetwork.html">mynetwork</a></li><li><a href="module-node.html">node</a></li><li><a href="module-patch.html">patch</a></li><li><a href="module-service.html">service</a></li><li><a href="module-validation.html">validation</a></li></ul><h3>Tutorials</h3><ul><li><a href="tutorial-LICENSE.html">LICENSE</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Wed Jul 06 2022 15:49:42 GMT+0530 (India Standard Time)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
<script src="scripts/linenumber.js"> </script>
|
||||
</body>
|
||||
</html>
|
||||
25
docs/scripts/linenumber.js
Normal file
25
docs/scripts/linenumber.js
Normal file
@@ -0,0 +1,25 @@
|
||||
/*global document */
|
||||
(() => {
|
||||
const source = document.getElementsByClassName('prettyprint source linenums');
|
||||
let i = 0;
|
||||
let lineNumber = 0;
|
||||
let lineId;
|
||||
let lines;
|
||||
let totalLines;
|
||||
let anchorHash;
|
||||
|
||||
if (source && source[0]) {
|
||||
anchorHash = document.location.hash.substring(1);
|
||||
lines = source[0].getElementsByTagName('li');
|
||||
totalLines = lines.length;
|
||||
|
||||
for (; i < totalLines; i++) {
|
||||
lineNumber++;
|
||||
lineId = `line${lineNumber}`;
|
||||
lines[i].id = lineId;
|
||||
if (lineId === anchorHash) {
|
||||
lines[i].className += ' selected';
|
||||
}
|
||||
}
|
||||
}
|
||||
})();
|
||||
202
docs/scripts/prettify/Apache-License-2.0.txt
Normal file
202
docs/scripts/prettify/Apache-License-2.0.txt
Normal file
@@ -0,0 +1,202 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
2
docs/scripts/prettify/lang-css.js
Normal file
2
docs/scripts/prettify/lang-css.js
Normal file
@@ -0,0 +1,2 @@
|
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n"]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com",
|
||||
/^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]);
|
||||
28
docs/scripts/prettify/prettify.js
Normal file
28
docs/scripts/prettify/prettify.js
Normal file
@@ -0,0 +1,28 @@
|
||||
var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;
|
||||
(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a=
|
||||
[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c<i;++c){var j=f[c];if(/\\[bdsw]/i.test(j))a.push(j);else{var j=m(j),d;c+2<i&&"-"===f[c+1]?(d=m(f[c+2]),c+=2):d=j;b.push([j,d]);d<65||j>122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;c<b.length;++c)i=b[c],i[0]<=j[1]+1?j[1]=Math.max(j[1],i[1]):f.push(j=i);b=["["];o&&b.push("^");b.push.apply(b,a);for(c=0;c<
|
||||
f.length;++c)i=f[c],b.push(e(i[0])),i[1]>i[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c<b;++c){var j=f[c];j==="("?++i:"\\"===j.charAt(0)&&(j=+j.substring(1))&&j<=i&&(d[j]=-1)}for(c=1;c<d.length;++c)-1===d[c]&&(d[c]=++t);for(i=c=0;c<b;++c)j=f[c],j==="("?(++i,d[i]===void 0&&(f[c]="(?:")):"\\"===j.charAt(0)&&
|
||||
(j=+j.substring(1))&&j<=i&&(f[c]="\\"+d[i]);for(i=c=0;c<b;++c)"^"===f[c]&&"^"!==f[c+1]&&(f[c]="");if(a.ignoreCase&&s)for(c=0;c<b;++c)j=f[c],a=j.charAt(0),j.length>=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p<d;++p){var g=a[p];if(g.ignoreCase)l=!0;else if(/[a-z]/i.test(g.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){s=!0;l=!1;break}}for(var r=
|
||||
{b:8,t:9,n:10,v:11,f:12,r:13},n=[],p=0,d=a.length;p<d;++p){g=a[p];if(g.global||g.multiline)throw Error(""+g);n.push("(?:"+y(g)+")")}return RegExp(n.join("|"),l?"gi":"g")}function M(a){function m(a){switch(a.nodeType){case 1:if(e.test(a.className))break;for(var g=a.firstChild;g;g=g.nextSibling)m(g);g=a.nodeName;if("BR"===g||"LI"===g)h[s]="\n",t[s<<1]=y++,t[s++<<1|1]=a;break;case 3:case 4:g=a.nodeValue,g.length&&(g=p?g.replace(/\r\n?/g,"\n"):g.replace(/[\t\n\r ]+/g," "),h[s]=g,t[s<<1]=y,y+=g.length,
|
||||
t[s++<<1|1]=a)}}var e=/(?:^|\s)nocode(?:\s|$)/,h=[],y=0,t=[],s=0,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=document.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);m(a);return{a:h.join("").replace(/\n$/,""),c:t}}function B(a,m,e,h){m&&(a={a:m,d:a},e(a),h.push.apply(h,a.e))}function x(a,m){function e(a){for(var l=a.d,p=[l,"pln"],d=0,g=a.a.match(y)||[],r={},n=0,z=g.length;n<z;++n){var f=g[n],b=r[f],o=void 0,c;if(typeof b===
|
||||
"string")c=!1;else{var i=h[f.charAt(0)];if(i)o=f.match(i[1]),b=i[0];else{for(c=0;c<t;++c)if(i=m[c],o=f.match(i[1])){b=i[0];break}o||(b="pln")}if((c=b.length>=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m),
|
||||
l=[],p={},d=0,g=e.length;d<g;++d){var r=e[d],n=r[3];if(n)for(var k=n.length;--k>=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,
|
||||
q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/,
|
||||
q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g,
|
||||
"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a),
|
||||
a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e}
|
||||
for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g<d.length;++g)e(d[g]);m===(m|0)&&d[0].setAttribute("value",
|
||||
m);var r=s.createElement("OL");r.className="linenums";for(var n=Math.max(0,m-1|0)||0,g=0,z=d.length;g<z;++g)l=d[g],l.className="L"+(g+n)%10,l.firstChild||l.appendChild(s.createTextNode("\xa0")),r.appendChild(l);a.appendChild(r)}function k(a,m){for(var e=m.length;--e>=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*</.test(m)?"default-markup":"default-code";return A[a]}function E(a){var m=
|
||||
a.g;try{var e=M(a.h),h=e.a;a.a=h;a.c=e.c;a.d=0;C(m,h)(a);var k=/\bMSIE\b/.test(navigator.userAgent),m=/\n/g,t=a.a,s=t.length,e=0,l=a.c,p=l.length,h=0,d=a.e,g=d.length,a=0;d[g]=s;var r,n;for(n=r=0;n<g;)d[n]!==d[n+2]?(d[r++]=d[n++],d[r++]=d[n++]):n+=2;g=r;for(n=r=0;n<g;){for(var z=d[n],f=d[n+1],b=n+2;b+2<=g&&d[b+1]===f;)b+=2;d[r++]=z;d[r++]=f;n=b}for(d.length=r;h<p;){var o=l[h+2]||s,c=d[a+2]||s,b=Math.min(o,c),i=l[h+1],j;if(i.nodeType!==1&&(j=t.substring(e,b))){k&&(j=j.replace(m,"\r"));i.nodeValue=
|
||||
j;var u=i.ownerDocument,v=u.createElement("SPAN");v.className=d[a+1];var x=i.parentNode;x.replaceChild(v,i);v.appendChild(i);e<o&&(l[h+1]=i=u.createTextNode(t.substring(b,o)),x.insertBefore(i,v.nextSibling))}e=b;e>=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],
|
||||
"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"],
|
||||
H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],
|
||||
J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+
|
||||
I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),
|
||||
["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",
|
||||
/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),
|
||||
["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes",
|
||||
hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p<h.length&&l.now()<e;p++){var n=h[p],k=n.className;if(k.indexOf("prettyprint")>=0){var k=k.match(g),f,b;if(b=
|
||||
!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p<h.length?setTimeout(m,
|
||||
250):a&&a()}for(var e=[document.getElementsByTagName("pre"),document.getElementsByTagName("code"),document.getElementsByTagName("xmp")],h=[],k=0;k<e.length;++k)for(var t=0,s=e[k].length;t<s;++t)h.push(e[k][t]);var e=q,l=Date;l.now||(l={now:function(){return+new Date}});var p=0,d,g=/\blang(?:uage)?-([\w.]+)(?!\S)/;m()};window.PR={createSimpleLexer:x,registerLangHandler:k,sourceDecorator:u,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",
|
||||
PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ"}})();
|
||||
251
docs/service.js.html
Normal file
251
docs/service.js.html
Normal file
@@ -0,0 +1,251 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Source: service.js</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Source: service.js</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="prettyprint source linenums"><code>/**
|
||||
* @file GNPy is a open source optical network planning tool which can be used to simulate multi-vendor open optical networks. Click below to explore the tool.
|
||||
* @see <a href="https://tiptool.vee-services.com/">GNPy Optical network planning tool</a>
|
||||
*/
|
||||
|
||||
/**
|
||||
* service module
|
||||
* @module service
|
||||
*/
|
||||
|
||||
/**
|
||||
* service.js
|
||||
* The Service it is also same as the connectivity path between 2 transceiver nodes. This library file defines the service manipulation.
|
||||
*/
|
||||
|
||||
var isAddService = 0;
|
||||
var addServiceData = {
|
||||
from: '',
|
||||
to: ''
|
||||
};
|
||||
|
||||
/**
|
||||
* Enable settings for service and reset other settings.
|
||||
* Set service 1 = enable, 0 = disable.
|
||||
*/
|
||||
function addServiceMode() {
|
||||
UnSelectAll();
|
||||
isAddService = 1;
|
||||
isDualFiberMode = 0;
|
||||
isSingleFiberMode = 0;
|
||||
isSinglePatchMode = 0;
|
||||
isDualPatchMode = 0;
|
||||
addServiceData = {
|
||||
from: '',
|
||||
to: ''
|
||||
};
|
||||
}
|
||||
|
||||
/** Check service connections rule before add it. */
|
||||
function addService() {
|
||||
|
||||
var fromDetails = network.body.data.nodes.get(addServiceData.from);
|
||||
var toDetails = network.body.data.nodes.get(addServiceData.to);
|
||||
var transNode = transceiverJSON.node_type.toString().toLowerCase();
|
||||
//service should be add between only two transceiver
|
||||
if (fromDetails.node_type == transceiverJSON.node_type && toDetails.node_type == transceiverJSON.node_type) {
|
||||
//transceiver force checking
|
||||
if (fromDetails.transceiver_type != "" && toDetails.transceiver_type != "") {
|
||||
//same transceiver type checking
|
||||
if (fromDetails.transceiver_type == toDetails.transceiver_type) {
|
||||
var labelvalue = getLabel(addServiceData.from, addServiceData.to, serviceJSON.component_type);
|
||||
//2 transceiver must have fiber/patch connection
|
||||
if (network.getConnectedEdges(addServiceData.from).length > 0 && network.getConnectedEdges(addServiceData.to).length > 0)
|
||||
addServiceComponent(1, addServiceData.from, addServiceData.to, labelvalue, false);
|
||||
else
|
||||
showMessage(alertType.Error, "Source " + roadmJSON.component_type + " : " + fromDetails.label + " ,destination " + roadmJSON.component_type + " : " + toDetails.label + " should have " + dualFiberJSON.component_type + "/" + dualPatchJSON.component_type + " connection");
|
||||
}
|
||||
else
|
||||
showMessage(alertType.Error, serviceJSON.component_type + " can be created only between " + transNode + " of same type");
|
||||
}
|
||||
else
|
||||
showMessage(alertType.Error, serviceJSON.component_type + " can be created only when " + transNode + "s are forced");
|
||||
|
||||
}
|
||||
else {
|
||||
showMessage(alertType.Error, "The " + serviceJSON.component_type + " should be between 2 " + transNode + " sites");
|
||||
}
|
||||
addServiceData = {
|
||||
from: '',
|
||||
to: ''
|
||||
};
|
||||
UnSelectAll();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Service creation.
|
||||
* Service style and configuration data loaded from configurationdata, styledata json.
|
||||
* @param {number} cmode - Service mode 1 for add.
|
||||
* @param {string} cfrom - Source node ID.
|
||||
* @param {string} cto - Destination node ID.
|
||||
* @param {string} clabel - The Label of the service.
|
||||
* @param {boolean} isImport - false -> manual add, true -> automattically added while import json.
|
||||
*/
|
||||
function addServiceComponent(cmode, cfrom, cto, clabel, isImport) {
|
||||
var serviceID = token();
|
||||
if (cmode == 1) {
|
||||
|
||||
var bandwidth = configData[serviceJSON.component_type].default.band_width;
|
||||
if (isImport)
|
||||
bandwidth = tBandwidth;
|
||||
else
|
||||
clabel = countFiberService(false, false, true, false, cfrom, cto) + '-' + clabel;
|
||||
|
||||
elabel = clabel;
|
||||
var fiberSmooth = multipleFiberService1(cfrom, cto);
|
||||
if (!fiberSmooth)
|
||||
fiberSmooth = fiberJSON.options.smooth;
|
||||
network.body.data.edges.add({
|
||||
id: serviceID, from: cfrom, to: cto, label: elabel, text: clabel, dashes: serviceJSON.dashes, width: serviceJSON.width,
|
||||
component_type: serviceJSON.component_type, color: serviceJSON.options.color, background: serviceJSON.options.background,
|
||||
arrows: serviceJSON.options.arrows,
|
||||
smooth: fiberSmooth,
|
||||
band_width: bandwidth
|
||||
});
|
||||
multipleFiberService(cfrom, cto);
|
||||
var tedge = network.body.data.edges.get(serviceID);
|
||||
tedge.isUpdate = false;
|
||||
tempUndo.push(tedge);
|
||||
}
|
||||
UnSelectAll();
|
||||
network.addEdgeMode();
|
||||
}
|
||||
|
||||
/**
|
||||
* Populate service details by service ID.
|
||||
* @param {string} serviceID - Service ID.
|
||||
* @param callback - The callback that handles the response.
|
||||
*/
|
||||
function serviceEdit(serviceID, callback) {
|
||||
document.getElementById("serviceMenu").style.display = "none";
|
||||
var edgeDetails = network.body.data.edges.get(serviceID);
|
||||
$("#txtServiceName").val(edgeDetails.text);
|
||||
var connectedNode = network.getConnectedNodes(serviceID);
|
||||
$("#txtServiceSrc").val(network.body.data.nodes.get(connectedNode[0]).label);
|
||||
$("#txtServiceDest").val(network.body.data.nodes.get(connectedNode[1]).label);
|
||||
$("#txtBandwidth").val(edgeDetails.band_width);
|
||||
openDrawer('service');
|
||||
document.getElementById("btnUpdateService").onclick = updateService.bind(
|
||||
this,
|
||||
serviceID,
|
||||
callback
|
||||
);
|
||||
document.getElementById("btnCloseService").onclick = clearService.bind(
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update service.
|
||||
* Update service label, text, band_width by service ID.
|
||||
* @param {string} serviceID - Service ID.
|
||||
*/
|
||||
function updateService(serviceID) {
|
||||
|
||||
var id = serviceID;
|
||||
var label = $("#txtServiceName").val().trim();
|
||||
var bandwidth = $("#txtBandwidth").val();
|
||||
var serviceDetails = network.body.data.edges.get(serviceID);
|
||||
|
||||
if (nameLengthValidation("txtServiceName")) {
|
||||
|
||||
if (serviceDetails.component_type == serviceJSON.component_type) {
|
||||
|
||||
var elabel = "";
|
||||
elabel = label;
|
||||
network.body.data.edges.update({
|
||||
id: id, label: elabel, text: label, band_width: bandwidth
|
||||
});
|
||||
multipleFiberService(serviceDetails.from, serviceDetails.to);
|
||||
var tdata = network.body.data.edges.get(id);
|
||||
tdata.isUpdate = true;
|
||||
tempUndo.push(tdata);
|
||||
|
||||
clearService();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove service by service ID.
|
||||
* @param {string} serviceID - Service ID.
|
||||
*/
|
||||
function deleteService(serviceID) {
|
||||
var serviceDetails = network.body.data.edges.get(serviceID);
|
||||
document.getElementById("serviceMenu").style.display = "none";
|
||||
var serviced = network.body.data.edges.get(serviceID);
|
||||
network.body.data.edges.remove(serviceID);
|
||||
multipleFiberService(serviceDetails.from, serviceDetails.to);
|
||||
serviced.isDelete = true;
|
||||
serviced.isUpdate = false;
|
||||
tempUndo.push(serviced);
|
||||
UnSelectAll();
|
||||
enableEdgeIndicator();
|
||||
}
|
||||
|
||||
/** Clear input/teporary data and other settings. */
|
||||
function clearService() {
|
||||
|
||||
$("#txtServiceName").val('');
|
||||
$("#txtServiceSrc").val('');
|
||||
$("#txtServiceDest").val('');
|
||||
$("#txtBandwidth").val('');
|
||||
$("#ddlCentralFrq").val('');
|
||||
closeDrawer('service');
|
||||
UnSelectAll();
|
||||
enableEdgeIndicator();
|
||||
}
|
||||
|
||||
</code></pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">oopt-gnpy-web-gui-main</a></h2><h3>Modules</h3><ul><li><a href="module-alea.html">alea</a></li><li><a href="module-constraints.html">constraints</a></li><li><a href="module-exampleUtil.html">exampleUtil</a></li><li><a href="module-fiber.html">fiber</a></li><li><a href="module-filesaver.html">filesaver</a></li><li><a href="module-mynetwork.html">mynetwork</a></li><li><a href="module-node.html">node</a></li><li><a href="module-patch.html">patch</a></li><li><a href="module-service.html">service</a></li><li><a href="module-validation.html">validation</a></li></ul><h3>Tutorials</h3><ul><li><a href="tutorial-LICENSE.html">LICENSE</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Wed Jul 06 2022 15:49:42 GMT+0530 (India Standard Time)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
<script src="scripts/linenumber.js"> </script>
|
||||
</body>
|
||||
</html>
|
||||
358
docs/styles/jsdoc-default.css
Normal file
358
docs/styles/jsdoc-default.css
Normal file
@@ -0,0 +1,358 @@
|
||||
@font-face {
|
||||
font-family: 'Open Sans';
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
src: url('../fonts/OpenSans-Regular-webfont.eot');
|
||||
src:
|
||||
local('Open Sans'),
|
||||
local('OpenSans'),
|
||||
url('../fonts/OpenSans-Regular-webfont.eot?#iefix') format('embedded-opentype'),
|
||||
url('../fonts/OpenSans-Regular-webfont.woff') format('woff'),
|
||||
url('../fonts/OpenSans-Regular-webfont.svg#open_sansregular') format('svg');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Open Sans Light';
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
src: url('../fonts/OpenSans-Light-webfont.eot');
|
||||
src:
|
||||
local('Open Sans Light'),
|
||||
local('OpenSans Light'),
|
||||
url('../fonts/OpenSans-Light-webfont.eot?#iefix') format('embedded-opentype'),
|
||||
url('../fonts/OpenSans-Light-webfont.woff') format('woff'),
|
||||
url('../fonts/OpenSans-Light-webfont.svg#open_sanslight') format('svg');
|
||||
}
|
||||
|
||||
html
|
||||
{
|
||||
overflow: auto;
|
||||
background-color: #fff;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
body
|
||||
{
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
line-height: 1.5;
|
||||
color: #4d4e53;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
a, a:visited, a:active {
|
||||
color: #0095dd;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
header
|
||||
{
|
||||
display: block;
|
||||
padding: 0px 4px;
|
||||
}
|
||||
|
||||
tt, code, kbd, samp {
|
||||
font-family: Consolas, Monaco, 'Andale Mono', monospace;
|
||||
}
|
||||
|
||||
.class-description {
|
||||
font-size: 130%;
|
||||
line-height: 140%;
|
||||
margin-bottom: 1em;
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
.class-description:empty {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#main {
|
||||
float: left;
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
article dl {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
article img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
section
|
||||
{
|
||||
display: block;
|
||||
background-color: #fff;
|
||||
padding: 12px 24px;
|
||||
border-bottom: 1px solid #ccc;
|
||||
margin-right: 30px;
|
||||
}
|
||||
|
||||
.variation {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.signature-attributes {
|
||||
font-size: 60%;
|
||||
color: #aaa;
|
||||
font-style: italic;
|
||||
font-weight: lighter;
|
||||
}
|
||||
|
||||
nav
|
||||
{
|
||||
display: block;
|
||||
float: right;
|
||||
margin-top: 28px;
|
||||
width: 30%;
|
||||
box-sizing: border-box;
|
||||
border-left: 1px solid #ccc;
|
||||
padding-left: 16px;
|
||||
}
|
||||
|
||||
nav ul {
|
||||
font-family: 'Lucida Grande', 'Lucida Sans Unicode', arial, sans-serif;
|
||||
font-size: 100%;
|
||||
line-height: 17px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
nav ul a, nav ul a:visited, nav ul a:active {
|
||||
font-family: Consolas, Monaco, 'Andale Mono', monospace;
|
||||
line-height: 18px;
|
||||
color: #4D4E53;
|
||||
}
|
||||
|
||||
nav h3 {
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
nav li {
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
footer {
|
||||
display: block;
|
||||
padding: 6px;
|
||||
margin-top: 12px;
|
||||
font-style: italic;
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4 {
|
||||
font-weight: 200;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
h1
|
||||
{
|
||||
font-family: 'Open Sans Light', sans-serif;
|
||||
font-size: 48px;
|
||||
letter-spacing: -2px;
|
||||
margin: 12px 24px 20px;
|
||||
}
|
||||
|
||||
h2, h3.subsection-title
|
||||
{
|
||||
font-size: 30px;
|
||||
font-weight: 700;
|
||||
letter-spacing: -1px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
h3
|
||||
{
|
||||
font-size: 24px;
|
||||
letter-spacing: -0.5px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
h4
|
||||
{
|
||||
font-size: 18px;
|
||||
letter-spacing: -0.33px;
|
||||
margin-bottom: 12px;
|
||||
color: #4d4e53;
|
||||
}
|
||||
|
||||
h5, .container-overview .subsection-title
|
||||
{
|
||||
font-size: 120%;
|
||||
font-weight: bold;
|
||||
letter-spacing: -0.01em;
|
||||
margin: 8px 0 3px 0;
|
||||
}
|
||||
|
||||
h6
|
||||
{
|
||||
font-size: 100%;
|
||||
letter-spacing: -0.01em;
|
||||
margin: 6px 0 3px 0;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
table
|
||||
{
|
||||
border-spacing: 0;
|
||||
border: 0;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
td, th
|
||||
{
|
||||
border: 1px solid #ddd;
|
||||
margin: 0px;
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
padding: 4px 6px;
|
||||
display: table-cell;
|
||||
}
|
||||
|
||||
thead tr
|
||||
{
|
||||
background-color: #ddd;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
th { border-right: 1px solid #aaa; }
|
||||
tr > th:last-child { border-right: 1px solid #ddd; }
|
||||
|
||||
.ancestors, .attribs { color: #999; }
|
||||
.ancestors a, .attribs a
|
||||
{
|
||||
color: #999 !important;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.clear
|
||||
{
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.important
|
||||
{
|
||||
font-weight: bold;
|
||||
color: #950B02;
|
||||
}
|
||||
|
||||
.yes-def {
|
||||
text-indent: -1000px;
|
||||
}
|
||||
|
||||
.type-signature {
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
.name, .signature {
|
||||
font-family: Consolas, Monaco, 'Andale Mono', monospace;
|
||||
}
|
||||
|
||||
.details { margin-top: 14px; border-left: 2px solid #DDD; }
|
||||
.details dt { width: 120px; float: left; padding-left: 10px; padding-top: 6px; }
|
||||
.details dd { margin-left: 70px; }
|
||||
.details ul { margin: 0; }
|
||||
.details ul { list-style-type: none; }
|
||||
.details li { margin-left: 30px; padding-top: 6px; }
|
||||
.details pre.prettyprint { margin: 0 }
|
||||
.details .object-value { padding-top: 0; }
|
||||
|
||||
.description {
|
||||
margin-bottom: 1em;
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
.code-caption
|
||||
{
|
||||
font-style: italic;
|
||||
font-size: 107%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.source
|
||||
{
|
||||
border: 1px solid #ddd;
|
||||
width: 80%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.prettyprint.source {
|
||||
width: inherit;
|
||||
}
|
||||
|
||||
.source code
|
||||
{
|
||||
font-size: 100%;
|
||||
line-height: 18px;
|
||||
display: block;
|
||||
padding: 4px 12px;
|
||||
margin: 0;
|
||||
background-color: #fff;
|
||||
color: #4D4E53;
|
||||
}
|
||||
|
||||
.prettyprint code span.line
|
||||
{
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.prettyprint.linenums
|
||||
{
|
||||
padding-left: 70px;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.prettyprint.linenums ol
|
||||
{
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.prettyprint.linenums li
|
||||
{
|
||||
border-left: 3px #ddd solid;
|
||||
}
|
||||
|
||||
.prettyprint.linenums li.selected,
|
||||
.prettyprint.linenums li.selected *
|
||||
{
|
||||
background-color: lightyellow;
|
||||
}
|
||||
|
||||
.prettyprint.linenums li *
|
||||
{
|
||||
-webkit-user-select: text;
|
||||
-moz-user-select: text;
|
||||
-ms-user-select: text;
|
||||
user-select: text;
|
||||
}
|
||||
|
||||
.params .name, .props .name, .name code {
|
||||
color: #4D4E53;
|
||||
font-family: Consolas, Monaco, 'Andale Mono', monospace;
|
||||
font-size: 100%;
|
||||
}
|
||||
|
||||
.params td.description > p:first-child,
|
||||
.props td.description > p:first-child
|
||||
{
|
||||
margin-top: 0;
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.params td.description > p:last-child,
|
||||
.props td.description > p:last-child
|
||||
{
|
||||
margin-bottom: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.disabled {
|
||||
color: #454545;
|
||||
}
|
||||
111
docs/styles/prettify-jsdoc.css
Normal file
111
docs/styles/prettify-jsdoc.css
Normal file
@@ -0,0 +1,111 @@
|
||||
/* JSDoc prettify.js theme */
|
||||
|
||||
/* plain text */
|
||||
.pln {
|
||||
color: #000000;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* string content */
|
||||
.str {
|
||||
color: #006400;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* a keyword */
|
||||
.kwd {
|
||||
color: #000000;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* a comment */
|
||||
.com {
|
||||
font-weight: normal;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* a type name */
|
||||
.typ {
|
||||
color: #000000;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* a literal value */
|
||||
.lit {
|
||||
color: #006400;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* punctuation */
|
||||
.pun {
|
||||
color: #000000;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* lisp open bracket */
|
||||
.opn {
|
||||
color: #000000;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* lisp close bracket */
|
||||
.clo {
|
||||
color: #000000;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* a markup tag name */
|
||||
.tag {
|
||||
color: #006400;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* a markup attribute name */
|
||||
.atn {
|
||||
color: #006400;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* a markup attribute value */
|
||||
.atv {
|
||||
color: #006400;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* a declaration */
|
||||
.dec {
|
||||
color: #000000;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* a variable name */
|
||||
.var {
|
||||
color: #000000;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* a function name */
|
||||
.fun {
|
||||
color: #000000;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* Specify class=linenums on a pre to get line numbering */
|
||||
ol.linenums {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
132
docs/styles/prettify-tomorrow.css
Normal file
132
docs/styles/prettify-tomorrow.css
Normal file
@@ -0,0 +1,132 @@
|
||||
/* Tomorrow Theme */
|
||||
/* Original theme - https://github.com/chriskempson/tomorrow-theme */
|
||||
/* Pretty printing styles. Used with prettify.js. */
|
||||
/* SPAN elements with the classes below are added by prettyprint. */
|
||||
/* plain text */
|
||||
.pln {
|
||||
color: #4d4d4c; }
|
||||
|
||||
@media screen {
|
||||
/* string content */
|
||||
.str {
|
||||
color: #718c00; }
|
||||
|
||||
/* a keyword */
|
||||
.kwd {
|
||||
color: #8959a8; }
|
||||
|
||||
/* a comment */
|
||||
.com {
|
||||
color: #8e908c; }
|
||||
|
||||
/* a type name */
|
||||
.typ {
|
||||
color: #4271ae; }
|
||||
|
||||
/* a literal value */
|
||||
.lit {
|
||||
color: #f5871f; }
|
||||
|
||||
/* punctuation */
|
||||
.pun {
|
||||
color: #4d4d4c; }
|
||||
|
||||
/* lisp open bracket */
|
||||
.opn {
|
||||
color: #4d4d4c; }
|
||||
|
||||
/* lisp close bracket */
|
||||
.clo {
|
||||
color: #4d4d4c; }
|
||||
|
||||
/* a markup tag name */
|
||||
.tag {
|
||||
color: #c82829; }
|
||||
|
||||
/* a markup attribute name */
|
||||
.atn {
|
||||
color: #f5871f; }
|
||||
|
||||
/* a markup attribute value */
|
||||
.atv {
|
||||
color: #3e999f; }
|
||||
|
||||
/* a declaration */
|
||||
.dec {
|
||||
color: #f5871f; }
|
||||
|
||||
/* a variable name */
|
||||
.var {
|
||||
color: #c82829; }
|
||||
|
||||
/* a function name */
|
||||
.fun {
|
||||
color: #4271ae; } }
|
||||
/* Use higher contrast and text-weight for printable form. */
|
||||
@media print, projection {
|
||||
.str {
|
||||
color: #060; }
|
||||
|
||||
.kwd {
|
||||
color: #006;
|
||||
font-weight: bold; }
|
||||
|
||||
.com {
|
||||
color: #600;
|
||||
font-style: italic; }
|
||||
|
||||
.typ {
|
||||
color: #404;
|
||||
font-weight: bold; }
|
||||
|
||||
.lit {
|
||||
color: #044; }
|
||||
|
||||
.pun, .opn, .clo {
|
||||
color: #440; }
|
||||
|
||||
.tag {
|
||||
color: #006;
|
||||
font-weight: bold; }
|
||||
|
||||
.atn {
|
||||
color: #404; }
|
||||
|
||||
.atv {
|
||||
color: #060; } }
|
||||
/* Style */
|
||||
/*
|
||||
pre.prettyprint {
|
||||
background: white;
|
||||
font-family: Consolas, Monaco, 'Andale Mono', monospace;
|
||||
font-size: 12px;
|
||||
line-height: 1.5;
|
||||
border: 1px solid #ccc;
|
||||
padding: 10px; }
|
||||
*/
|
||||
|
||||
/* Specify class=linenums on a pre to get line numbering */
|
||||
ol.linenums {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0; }
|
||||
|
||||
/* IE indents via margin-left */
|
||||
li.L0,
|
||||
li.L1,
|
||||
li.L2,
|
||||
li.L3,
|
||||
li.L4,
|
||||
li.L5,
|
||||
li.L6,
|
||||
li.L7,
|
||||
li.L8,
|
||||
li.L9 {
|
||||
/* */ }
|
||||
|
||||
/* Alternate shading for lines */
|
||||
li.L1,
|
||||
li.L3,
|
||||
li.L5,
|
||||
li.L7,
|
||||
li.L9 {
|
||||
/* */ }
|
||||
45770
docs/thirdparty_vis.js.html
Normal file
45770
docs/thirdparty_vis.js.html
Normal file
File diff suppressed because it is too large
Load Diff
119
docs/tutorial-LICENSE.html
Normal file
119
docs/tutorial-LICENSE.html
Normal file
@@ -0,0 +1,119 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Tutorial: LICENSE</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Tutorial: LICENSE</h1>
|
||||
|
||||
<section>
|
||||
|
||||
<header>
|
||||
|
||||
|
||||
<h2>LICENSE</h2>
|
||||
</header>
|
||||
|
||||
<article>
|
||||
<h2>oopt-gnpy-web-gui</h2>
|
||||
<h3>Introduction</h3>
|
||||
<p><strong>Copyright (c) oopt-gnpy-web-gui</strong></p>
|
||||
<p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>
|
||||
<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>
|
||||
<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>
|
||||
<h3>Dependencies</h3>
|
||||
<p><strong>vis-network</strong></p>
|
||||
<p>https://visjs.github.io/vis-network/
|
||||
A dynamic, browser-based visualization library.</p>
|
||||
<p>@version 9.1.2
|
||||
@date 2022-03-28T20:17:35.342Z
|
||||
@copyright (c) 2011-2017 Almende B.V, http://almende.com
|
||||
@copyright (c) 2017-2019 visjs contributors, https://github.com/visjs</p>
|
||||
<p>@license
|
||||
vis.js is dual licensed under both</p>
|
||||
<ol>
|
||||
<li>The Apache 2.0 License http://www.apache.org/licenses/LICENSE-2.0 and</li>
|
||||
<li>The MIT License http://opensource.org/licenses/MIT</li>
|
||||
</ol>
|
||||
<p>vis.js may be distributed under either license.</p>
|
||||
<p><strong>taffy.js</strong></p>
|
||||
<p>Software License Agreement (BSD License)
|
||||
Web: http://taffydb.com Twitter: http://twitter.com/biastoact
|
||||
Copyright (c) All rights reserved.
|
||||
Redistribution and use of this software in source and binary forms, with or without modification, are permitted provided that the following condition is met:</p>
|
||||
<p>Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p>
|
||||
<p><strong>Bootstrap</strong></p>
|
||||
<p>Bootstrap v4.6.1 (https://getbootstrap.com/)
|
||||
Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)</p>
|
||||
<p><strong>html2canvas</strong></p>
|
||||
<p>html2canvas 0.4.1 <a href="http:%5C/%5C/html2canvas.hertzen.com">http://html2canvas.hertzen.com</a>
|
||||
Copyright (c) 2013 Niklas von Hertzen
|
||||
Released under MIT License</p>
|
||||
<p><strong>jQuery</strong></p>
|
||||
<p>jQuery v1.12.4 | (c) jQuery Foundation | jquery.org/license</p>
|
||||
<p><strong>popper.min.js</strong></p>
|
||||
<p>Copyright (C) Federico Zivolo 2020
|
||||
Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT).
|
||||
sourceMappingURL=popper.min.js.map</p>
|
||||
<p><strong>Bootstrap</strong></p>
|
||||
<p>Bootstrap v4.6.1 (https://getbootstrap.com/)
|
||||
Copyright 2011-2021 The Bootstrap Authors
|
||||
Copyright 2011-2021 Twitter, Inc.
|
||||
Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)</p>
|
||||
<p><strong>FileSaver.js</strong></p>
|
||||
<p>A saveAs() FileSaver implementation.</p>
|
||||
<p>By Eli Grey, http://eligrey.com</p>
|
||||
<p>License : https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md (MIT)
|
||||
source : http://purl.eligrey.com/github/FileSaver.js</p>
|
||||
<p><strong>Font Awesome</strong></p>
|
||||
<p>Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome
|
||||
License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)</p>
|
||||
<p>Font Awesome Free 5.0.6 by @fontawesome - http://fontawesome.com
|
||||
License - http://fontawesome.com/license (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)</p>
|
||||
<p><strong>Material Icons</strong></p>
|
||||
<p>We have made these icons available for you to incorporate them into your products under the Apache License Version 2.0.</p>
|
||||
<p>Feel free to remix and re-share these icons and documentation in your products.</p>
|
||||
<p>We'd love attribution in your app's about screen, but it's not required.</p>
|
||||
<p><strong>Roboto Icons</strong></p>
|
||||
<p>These fonts are licensed under the Apache License, Version 2.0.</p>
|
||||
<p>You can use them in your products & projects <20> print or digital, commercial or otherwise.</p>
|
||||
<p>This isn't legal advice, please consider consulting a lawyer and see the full license for all details.</p>
|
||||
<p><strong>Oswald Icons</strong></p>
|
||||
<p>These fonts are licensed under the Open Font License.</p>
|
||||
<p>You can use them in your products & projects <20> print or digital, commercial or otherwise.</p>
|
||||
<p>This isn't legal advice, please consider consulting a lawyer and see the full license for all details.</p>
|
||||
</article>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">oopt-gnpy-web-gui-main</a></h2><h3>Modules</h3><ul><li><a href="module-alea.html">alea</a></li><li><a href="module-constraints.html">constraints</a></li><li><a href="module-exampleUtil.html">exampleUtil</a></li><li><a href="module-fiber.html">fiber</a></li><li><a href="module-filesaver.html">filesaver</a></li><li><a href="module-main.html">main</a></li><li><a href="module-mynetwork.html">mynetwork</a></li><li><a href="module-node.html">node</a></li><li><a href="module-patch.html">patch</a></li><li><a href="module-service.html">service</a></li><li><a href="module-validation.html">validation</a></li></ul><h3>Tutorials</h3><ul><li><a href="tutorial-LICENSE.html">LICENSE</a></li><li><a href="tutorial-technical_document.html">technical_document</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Wed Jul 06 2022 19:21:36 GMT+0530 (India Standard Time)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
<script src="scripts/linenumber.js"> </script>
|
||||
</body>
|
||||
</html>
|
||||
107
docs/tutorial-calculator-tutorial.html
Normal file
107
docs/tutorial-calculator-tutorial.html
Normal file
@@ -0,0 +1,107 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Tutorial: LICENSE</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Tutorial: LICENSE</h1>
|
||||
|
||||
<section>
|
||||
|
||||
<header>
|
||||
|
||||
|
||||
<h2>LICENSE</h2>
|
||||
</header>
|
||||
|
||||
<article>
|
||||
<h2>oopt-gnpy-web-gui</h2>
|
||||
<h3>Introduction</h3>
|
||||
<p><strong>Copyright (c) oopt-gnpy-web-gui</strong></p>
|
||||
<p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>
|
||||
<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>
|
||||
<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>
|
||||
<h3>Dependencies</h3>
|
||||
<p><strong>vis-network</strong></p>
|
||||
<p>https://visjs.github.io/vis-network/
|
||||
A dynamic, browser-based visualization library.</p>
|
||||
<p>@version 9.1.2
|
||||
@date 2022-03-28T20:17:35.342Z
|
||||
@copyright (c) 2011-2017 Almende B.V, http://almende.com
|
||||
@copyright (c) 2017-2019 visjs contributors, https://github.com/visjs</p>
|
||||
<p>@license
|
||||
vis.js is dual licensed under both</p>
|
||||
<ol>
|
||||
<li>The Apache 2.0 License http://www.apache.org/licenses/LICENSE-2.0 and</li>
|
||||
<li>The MIT License http://opensource.org/licenses/MIT</li>
|
||||
</ol>
|
||||
<p>vis.js may be distributed under either license.</p>
|
||||
<p><strong>taffy.js</strong></p>
|
||||
<p>Software License Agreement (BSD License)
|
||||
Web: http://taffydb.com Twitter: http://twitter.com/biastoact
|
||||
Copyright (c) All rights reserved.
|
||||
Redistribution and use of this software in source and binary forms, with or without modification, are permitted provided that the following condition is met:</p>
|
||||
<p>Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p>
|
||||
<p><strong>Bootstrap</strong></p>
|
||||
<p>Bootstrap v4.6.1 (https://getbootstrap.com/)
|
||||
Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)</p>
|
||||
<p><strong>html2canvas</strong></p>
|
||||
<p>html2canvas 0.4.1 <a href="http:%5C/%5C/html2canvas.hertzen.com">http://html2canvas.hertzen.com</a>
|
||||
Copyright (c) 2013 Niklas von Hertzen
|
||||
Released under MIT License</p>
|
||||
<p><strong>jQuery</strong></p>
|
||||
<p>jQuery v1.12.4 | (c) jQuery Foundation | jquery.org/license</p>
|
||||
<p><strong>popper.min.js</strong></p>
|
||||
<p>Copyright (C) Federico Zivolo 2020
|
||||
Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT).
|
||||
sourceMappingURL=popper.min.js.map</p>
|
||||
<p><strong>Bootstrap</strong></p>
|
||||
<p>Bootstrap v4.6.1 (https://getbootstrap.com/)
|
||||
Copyright 2011-2021 The Bootstrap Authors
|
||||
Copyright 2011-2021 Twitter, Inc.
|
||||
Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)</p>
|
||||
<p><strong>FileSaver.js</strong></p>
|
||||
<p>A saveAs() FileSaver implementation.</p>
|
||||
<p>By Eli Grey, http://eligrey.com</p>
|
||||
<p>License : https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md (MIT)
|
||||
source : http://purl.eligrey.com/github/FileSaver.js</p>
|
||||
<p><strong>Font Awesome</strong></p>
|
||||
<p>Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome
|
||||
License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)</p>
|
||||
<p>Font Awesome Free 5.0.6 by @fontawesome - http://fontawesome.com
|
||||
License - http://fontawesome.com/license (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)</p>
|
||||
</article>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">oopt-gnpy-web-gui-main</a></h2><h3>Modules</h3><ul><li><a href="module-constraints.html">constraints</a></li><li><a href="module-exampleUtil.html">exampleUtil</a></li><li><a href="module-fiber.html">fiber</a></li><li><a href="module-filesaver.html">filesaver</a></li><li><a href="module-main.html">main</a></li><li><a href="module-node.html">node</a></li><li><a href="module-patch.html">patch</a></li><li><a href="module-service.html">service</a></li><li><a href="module-validation.html">validation</a></li></ul><h3>Tutorials</h3><ul><li><a href="tutorial-calculator-tutorial.html">LICENSE</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Tue Jul 05 2022 20:05:36 GMT+0530 (India Standard Time)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
<script src="scripts/linenumber.js"> </script>
|
||||
</body>
|
||||
</html>
|
||||
70
docs/tutorial-program-tutorial.html
Normal file
70
docs/tutorial-program-tutorial.html
Normal file
@@ -0,0 +1,70 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Tutorial: Program Tutorial</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Tutorial: Program Tutorial</h1>
|
||||
|
||||
<section>
|
||||
|
||||
<header>
|
||||
|
||||
|
||||
<h2>Program Tutorial</h2>
|
||||
</header>
|
||||
|
||||
<article>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
||||
<title>Program Tutorial</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
Lorem ipsum dolor sit amet consectetur adipisicing elit. A consequuntur
|
||||
saepe libero eveniet quia perferendis autem vitae rem minima, molestias
|
||||
quo consequatur. Repellat facere enim distinctio culpa tenetur corrupti
|
||||
sit officia ratione laboriosam quo fuga soluta ducimus necessitatibus
|
||||
quasi, rerum voluptates, similique voluptas ut quaerat quisquam, pariatur
|
||||
optio voluptatibus. Reprehenderit.
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</article>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">oopt-gnpy-web-gui-main</a></h2><h3>Modules</h3><ul><li><a href="module-constraints.html">constraints</a></li><li><a href="module-exampleUtil.html">exampleUtil</a></li><li><a href="module-fiber.html">fiber</a></li><li><a href="module-filesaver.html">filesaver</a></li><li><a href="module-main.html">main</a></li><li><a href="module-node.html">node</a></li><li><a href="module-patch.html">patch</a></li><li><a href="module-service.html">service</a></li><li><a href="module-validation.html">validation</a></li></ul><h3>Tutorials</h3><ul><li><a href="tutorial-calculator-tutorial.html">Calculator Tutorial</a></li><li><a href="tutorial-program-tutorial.html">Program Tutorial</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Tue Jul 05 2022 20:03:36 GMT+0530 (India Standard Time)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
<script src="scripts/linenumber.js"> </script>
|
||||
</body>
|
||||
</html>
|
||||
97
docs/tutorial-readme.html
Normal file
97
docs/tutorial-readme.html
Normal file
@@ -0,0 +1,97 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Tutorial: README</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Tutorial: README</h1>
|
||||
|
||||
<section>
|
||||
|
||||
<header>
|
||||
|
||||
|
||||
<h2>README</h2>
|
||||
</header>
|
||||
|
||||
<article>
|
||||
<h4><ins>GNPy Tool UI/UX</ins></h4>
|
||||
<p><strong>Technologies:</strong></p>
|
||||
<p><strong>Front-End : HTML</strong></p>
|
||||
<p><strong>Client-Script : Javascript and Jquery</strong></p>
|
||||
<p><strong>CSS : Bootstrap</strong></p>
|
||||
<p><strong><ins>Js libraries:</ins></strong></p>
|
||||
<p><strong><ins>Vis.js (Network):</ins></strong></p>
|
||||
<p>A network is a visualization to display networks of networks consisting of nodes and edges. The visualization is easy to use and supports custom shapes, styles, colors, sizes, images, and more. The network visualization works smoothly on any modern browser for up to a few thousand nodes and edges. To handle a larger number of nodes, the Network has clustering support. The network uses HTML canvas for rendering.</p>
|
||||
<p><strong><ins>Alea.js:</ins></strong></p>
|
||||
<p>Alea library is a pseudo-random number generator (PRNG).</p>
|
||||
<p><strong><ins>ExampleUtil.js:</ins></strong></p>
|
||||
<p>This library describes how to create some random nodes and fiber/patch/service.</p>
|
||||
<p><strong><ins>Mynetwork.js:</ins></strong></p>
|
||||
<p>The mynetwork library file describes how to initialize the network area using vis.js and defines common functionalities of network components.</p>
|
||||
<p><strong><ins>Node.js:</ins></strong></p>
|
||||
<p>The node can be defined as the connection point of "ROADM, Attenuator, Transceiver, Amplifier, and Raman Amplifier" and defines the node manipulations.</p>
|
||||
<p><strong><ins>Fiber.js:</ins></strong></p>
|
||||
<p>The fiber library describes how to add a fiber connection between any 2 nodes by dragging from source node to destination and defines the fiber manipulation.</p>
|
||||
<p><strong><ins>Patch.js:</ins></strong></p>
|
||||
<p>The patch library describes how to add a patch connection between any 2 nodes by dragging from source node to destination and defines the patch manipulation.</p>
|
||||
<p><strong><ins>Service.js:</ins></strong></p>
|
||||
<p>The Service is also the same as the connectivity path between 2 transceiver nodes. This library file defines service manipulation.</p>
|
||||
<p><strong><ins>Constraints.js:</ins></strong></p>
|
||||
<p>The constraints library is a list of rules for components. It is defining the network topology validation.</p>
|
||||
<p><strong><ins>Validation.js:</ins></strong></p>
|
||||
<p>The Validations library currently describes the validation of component name, length, and type.</p>
|
||||
<p><strong><ins>Main.js:</ins></strong></p>
|
||||
<p>The main.js library describes UI actions. like show/hide and update the HTML element with style based on user interaction.</p>
|
||||
<p><strong><ins>Filesaver.js:</ins></strong></p>
|
||||
<p>Filesaver.js is the solution to saving files on the client-side and is perfect for web apps that generate files on the client.</p>
|
||||
<p><strong><ins>Html2Canvas.js:</ins></strong></p>
|
||||
<p>The library allows taking "screenshots" of webpages or parts of them, directly on the user’s browser. The screenshot is based on the DOM and as such may not be 100% accurate to the real representation as it does not make an actual screenshot, but builds the screenshot based on the information available on the page.</p>
|
||||
<p><strong><ins>Taffy.js:</ins></strong></p>
|
||||
<p>The library provides powerful in-memory database capabilities to both browser and server applications. this stores data in JSON format.</p>
|
||||
<p><strong><ins>Bootstrap.js:</ins></strong></p>
|
||||
<p>Bootstrap is a free front-end framework for faster and easier web development. Bootstrap includes HTML and CSS-based design templates for typography, forms, buttons, tables, navigation, modals, image carousels, and many others, as well as optional JavaScript plugins.</p>
|
||||
<p><strong><ins>Jquery.js:</ins></strong></p>
|
||||
<p>jQuery is a fast, small, and feature-rich JavaScript library. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.</p>
|
||||
<p><strong><ins>Lodash.js:</ins></strong></p>
|
||||
<p>Lodash helps programmers write more concisely and easier to maintain JavaScript code. Lodash contains tools to simplify programming with strings, numbers, arrays, functions, and objects. By convention, the Lodash module is mapped to the underscore character</p>
|
||||
<p><strong><ins>Popper.js:</ins></strong></p>
|
||||
<p>A library used to manage poppers in web applications. Popper. js is a positioning engine, its purpose is to calculate the position of an element to make it possible to position it near a given reference element.</p>
|
||||
<p><strong><ins>JSON:</ins></strong></p>
|
||||
<p><strong><ins>Configuration Data.json:</ins></strong></p>
|
||||
<p>This JSON describes the data configuration of network components.</p>
|
||||
<p><strong><ins>Style Data.json:</ins></strong></p>
|
||||
<p>This JSON describes the style configuration of network components.</p>
|
||||
</article>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">oopt-gnpy-web-gui-main</a></h2><h3>Modules</h3><ul><li><a href="module-alea.html">alea</a></li><li><a href="module-constraints.html">constraints</a></li><li><a href="module-exampleUtil.html">exampleUtil</a></li><li><a href="module-fiber.html">fiber</a></li><li><a href="module-filesaver.html">filesaver</a></li><li><a href="module-main.html">main</a></li><li><a href="module-mynetwork.html">mynetwork</a></li><li><a href="module-node.html">node</a></li><li><a href="module-patch.html">patch</a></li><li><a href="module-service.html">service</a></li><li><a href="module-validation.html">validation</a></li></ul><h3>Tutorials</h3><ul><li><a href="tutorial-LICENSE.html">LICENSE</a></li><li><a href="tutorial-readme.html">README</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Wed Jul 06 2022 19:13:06 GMT+0530 (India Standard Time)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
<script src="scripts/linenumber.js"> </script>
|
||||
</body>
|
||||
</html>
|
||||
97
docs/tutorial-technical_document.html
Normal file
97
docs/tutorial-technical_document.html
Normal file
@@ -0,0 +1,97 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Tutorial: technical_document</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Tutorial: technical_document</h1>
|
||||
|
||||
<section>
|
||||
|
||||
<header>
|
||||
|
||||
|
||||
<h2>technical_document</h2>
|
||||
</header>
|
||||
|
||||
<article>
|
||||
<h4><ins>GNPy Tool UI/UX</ins></h4>
|
||||
<p><strong>Technologies:</strong></p>
|
||||
<p><strong>Front-End : HTML</strong></p>
|
||||
<p><strong>Client-Script : Javascript and Jquery</strong></p>
|
||||
<p><strong>CSS : Bootstrap</strong></p>
|
||||
<p><strong><ins>Js libraries:</ins></strong></p>
|
||||
<p><strong><ins>Vis.js (Network):</ins></strong></p>
|
||||
<p>A network is a visualization to display networks of networks consisting of nodes and edges. The visualization is easy to use and supports custom shapes, styles, colors, sizes, images, and more. The network visualization works smoothly on any modern browser for up to a few thousand nodes and edges. To handle a larger number of nodes, the Network has clustering support. The network uses HTML canvas for rendering.</p>
|
||||
<p><strong><ins>Alea.js:</ins></strong></p>
|
||||
<p>Alea library is a pseudo-random number generator (PRNG).</p>
|
||||
<p><strong><ins>ExampleUtil.js:</ins></strong></p>
|
||||
<p>This library describes how to create some random nodes and fiber/patch/service.</p>
|
||||
<p><strong><ins>Mynetwork.js:</ins></strong></p>
|
||||
<p>The mynetwork library file describes how to initialize the network area using vis.js and defines common functionalities of network components.</p>
|
||||
<p><strong><ins>Node.js:</ins></strong></p>
|
||||
<p>The node can be defined as the connection point of "ROADM, Attenuator, Transceiver, Amplifier, and Raman Amplifier" and defines the node manipulations.</p>
|
||||
<p><strong><ins>Fiber.js:</ins></strong></p>
|
||||
<p>The fiber library describes how to add a fiber connection between any 2 nodes by dragging from source node to destination and defines the fiber manipulation.</p>
|
||||
<p><strong><ins>Patch.js:</ins></strong></p>
|
||||
<p>The patch library describes how to add a patch connection between any 2 nodes by dragging from source node to destination and defines the patch manipulation.</p>
|
||||
<p><strong><ins>Service.js:</ins></strong></p>
|
||||
<p>The Service is also the same as the connectivity path between 2 transceiver nodes. This library file defines service manipulation.</p>
|
||||
<p><strong><ins>Constraints.js:</ins></strong></p>
|
||||
<p>The constraints library is a list of rules for components. It is defining the network topology validation.</p>
|
||||
<p><strong><ins>Validation.js:</ins></strong></p>
|
||||
<p>The Validations library currently describes the validation of component name, length, and type.</p>
|
||||
<p><strong><ins>Main.js:</ins></strong></p>
|
||||
<p>The main.js library describes UI actions. like show/hide and update the HTML element with style based on user interaction.</p>
|
||||
<p><strong><ins>Filesaver.js:</ins></strong></p>
|
||||
<p>Filesaver.js is the solution to saving files on the client-side and is perfect for web apps that generate files on the client.</p>
|
||||
<p><strong><ins>Html2Canvas.js:</ins></strong></p>
|
||||
<p>The library allows taking "screenshots" of webpages or parts of them, directly on the user’s browser. The screenshot is based on the DOM and as such may not be 100% accurate to the real representation as it does not make an actual screenshot, but builds the screenshot based on the information available on the page.</p>
|
||||
<p><strong><ins>Taffy.js:</ins></strong></p>
|
||||
<p>The library provides powerful in-memory database capabilities to both browser and server applications. this stores data in JSON format.</p>
|
||||
<p><strong><ins>Bootstrap.js:</ins></strong></p>
|
||||
<p>Bootstrap is a free front-end framework for faster and easier web development. Bootstrap includes HTML and CSS-based design templates for typography, forms, buttons, tables, navigation, modals, image carousels, and many others, as well as optional JavaScript plugins.</p>
|
||||
<p><strong><ins>Jquery.js:</ins></strong></p>
|
||||
<p>jQuery is a fast, small, and feature-rich JavaScript library. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.</p>
|
||||
<p><strong><ins>Lodash.js:</ins></strong></p>
|
||||
<p>Lodash helps programmers write more concisely and easier to maintain JavaScript code. Lodash contains tools to simplify programming with strings, numbers, arrays, functions, and objects. By convention, the Lodash module is mapped to the underscore character</p>
|
||||
<p><strong><ins>Popper.js:</ins></strong></p>
|
||||
<p>A library used to manage poppers in web applications. Popper. js is a positioning engine, its purpose is to calculate the position of an element to make it possible to position it near a given reference element.</p>
|
||||
<p><strong><ins>JSON:</ins></strong></p>
|
||||
<p><strong><ins>Configuration Data.json:</ins></strong></p>
|
||||
<p>This JSON describes the data configuration of network components.</p>
|
||||
<p><strong><ins>Style Data.json:</ins></strong></p>
|
||||
<p>This JSON describes the style configuration of network components.</p>
|
||||
</article>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">oopt-gnpy-web-gui-main</a></h2><h3>Modules</h3><ul><li><a href="module-alea.html">alea</a></li><li><a href="module-constraints.html">constraints</a></li><li><a href="module-exampleUtil.html">exampleUtil</a></li><li><a href="module-fiber.html">fiber</a></li><li><a href="module-filesaver.html">filesaver</a></li><li><a href="module-main.html">main</a></li><li><a href="module-mynetwork.html">mynetwork</a></li><li><a href="module-node.html">node</a></li><li><a href="module-patch.html">patch</a></li><li><a href="module-service.html">service</a></li><li><a href="module-validation.html">validation</a></li></ul><h3>Tutorials</h3><ul><li><a href="tutorial-LICENSE.html">LICENSE</a></li><li><a href="tutorial-technical_document.html">technical_document</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Wed Jul 06 2022 19:21:36 GMT+0530 (India Standard Time)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
<script src="scripts/linenumber.js"> </script>
|
||||
</body>
|
||||
</html>
|
||||
196
docs/validation.js.html
Normal file
196
docs/validation.js.html
Normal file
@@ -0,0 +1,196 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Source: validation.js</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Source: validation.js</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="prettyprint source linenums"><code> /**
|
||||
* validation module
|
||||
* @module validation
|
||||
*/
|
||||
|
||||
/**
|
||||
* validation.js
|
||||
* The Validations library currently describes the validation of component name, length, type.
|
||||
*/
|
||||
|
||||
$(document).ready(function () {
|
||||
$("#txtSpan_Length").change(function () {
|
||||
var span_length = $("#txtSpan_Length").val().trim();
|
||||
var spanlen = parseFloat(span_length);
|
||||
if (isNaN(span_length) || spanlen <= 0 || span_length == "") {
|
||||
$("#txtSpan_Length").addClass('input_error');
|
||||
return;
|
||||
}
|
||||
else
|
||||
$("#txtSpan_Length").removeClass('input_error');
|
||||
|
||||
if ($('#cbxLength_Based_Loss').is(":checked")) {
|
||||
fiberCalc();
|
||||
|
||||
}
|
||||
});
|
||||
$("#txtLoss_Coefficient").change(function () {
|
||||
if ($('#cbxLength_Based_Loss').is(":checked")) {
|
||||
var span_length = $("#txtLoss_Coefficient").val().trim();
|
||||
var spanlen = parseFloat(span_length);
|
||||
if (isNaN(span_length) || spanlen <= 0 || span_length == "") {
|
||||
return;
|
||||
}
|
||||
fiberCalc();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
function fiberCalc() {
|
||||
var span_length = $("#txtSpan_Length").val().trim();
|
||||
var spanlen = parseFloat(span_length);
|
||||
var loss_coeff = $("#txtLoss_Coefficient").val().trim();
|
||||
var lossCoeff = parseFloat(loss_coeff);
|
||||
if (!isNaN(span_length) || spanlen >= 0 || span_length != "" || !isNaN(loss_coeff) || lossCoeff >= 0 || loss_coeff != "")
|
||||
fiberLengthCal('txtSpan_Length', 'txtLoss_Coefficient', 'txtSpan_Loss');
|
||||
}
|
||||
$("#ddlSingleFiberType").change(function () {
|
||||
if ($(this).val()=="") {
|
||||
$("#ddlSingleFiberType").addClass('input_error');
|
||||
return;
|
||||
}
|
||||
else
|
||||
$("#ddlSingleFiberType").removeClass('input_error');
|
||||
|
||||
});
|
||||
$("#ddlRoadmType").change(function () {
|
||||
if ($(this).val() == "") {
|
||||
$("#ddlRoadmType").addClass('input_error');
|
||||
return;
|
||||
}
|
||||
else
|
||||
$("#ddlRoadmType").removeClass('input_error');
|
||||
|
||||
});
|
||||
$("#ddlAmplifierType").change(function () {
|
||||
if ($(this).val() == "") {
|
||||
$("#ddlAmplifierType").addClass('input_error');
|
||||
return;
|
||||
}
|
||||
else
|
||||
$("#ddlAmplifierType").removeClass('input_error');
|
||||
|
||||
});
|
||||
$("#ddlRamanAmpType").change(function () {
|
||||
if ($(this).val() == "") {
|
||||
$("#ddlRamanAmpType").addClass('input_error');
|
||||
return;
|
||||
}
|
||||
else
|
||||
$("#ddlRamanAmpType").removeClass('input_error');
|
||||
|
||||
});
|
||||
$("#ddlRamanAmpCategory").change(function () {
|
||||
if ($(this).val() == "") {
|
||||
$("#ddlRamanAmpCategory").addClass('input_error');
|
||||
return;
|
||||
}
|
||||
else
|
||||
$("#ddlRamanAmpCategory").removeClass('input_error');
|
||||
|
||||
});
|
||||
$("#ddlTransceiverType").change(function () {
|
||||
if ($(this).val() == "") {
|
||||
$("#ddlTransceiverType").addClass('input_error');
|
||||
return;
|
||||
}
|
||||
else
|
||||
$("#ddlTransceiverType").removeClass('input_error');
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* Validate the node/fiber/patch/service name and name length.
|
||||
* @param {HTMLElement} element - Input element
|
||||
*/
|
||||
function nameLengthValidation(element) {
|
||||
var flag = true;
|
||||
var elementID = "#" + element
|
||||
var maxLength = Number(configData.node.site_length);
|
||||
var msg = "";
|
||||
if ($(elementID).val().trim() == '') {
|
||||
msg = "Please enter the name";
|
||||
flag = false;
|
||||
}
|
||||
else if (Number($(elementID).val().trim().length) > maxLength) {
|
||||
msg = "Name length should be less than or equal to 20";
|
||||
flag = false;
|
||||
}
|
||||
if (!flag)
|
||||
showMessage(alertType.Error, msg);
|
||||
return flag;
|
||||
}
|
||||
|
||||
/** Validate export file name. */
|
||||
function exportFileValidation() {
|
||||
var flag = false;
|
||||
if ($("#txtFileName").val().trim() != '')
|
||||
flag = true;
|
||||
else
|
||||
showMessage(alertType.Error, 'Please enter file name');
|
||||
return flag;
|
||||
}
|
||||
|
||||
/** Validate ROADM list, type and Amplifier type. */
|
||||
function roadmProVal() {
|
||||
var flag = false;
|
||||
if ($("#ddlRoadmList").val().trim() != 0 && $("#ddlROADMType").val().trim() != 0 && $("#ddlRPreAmpType").val().trim() != 0 && $("#ddlRBoosterType").val().trim() != 0)
|
||||
flag = true;
|
||||
else
|
||||
showMessage(alertType.Error, 'Please enter the value');
|
||||
return flag;
|
||||
}</code></pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">oopt-gnpy-web-gui-main</a></h2><h3>Modules</h3><ul><li><a href="module-alea.html">alea</a></li><li><a href="module-constraints.html">constraints</a></li><li><a href="module-exampleUtil.html">exampleUtil</a></li><li><a href="module-fiber.html">fiber</a></li><li><a href="module-filesaver.html">filesaver</a></li><li><a href="module-mynetwork.html">mynetwork</a></li><li><a href="module-node.html">node</a></li><li><a href="module-patch.html">patch</a></li><li><a href="module-service.html">service</a></li><li><a href="module-validation.html">validation</a></li></ul><h3>Tutorials</h3><ul><li><a href="tutorial-LICENSE.html">LICENSE</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Wed Jul 06 2022 15:49:42 GMT+0530 (India Standard Time)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
<script src="scripts/linenumber.js"> </script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,438 +0,0 @@
|
||||
GNPy Technical Document
|
||||
|
||||
Init:
|
||||
Initialize the network working area using vis.js
|
||||
|
||||
i. Code Location: js/networkgraph/mynetwork.js
|
||||
ii.Function name: init
|
||||
This function is used to define container, options and dataset then pass it as parameter to vis. network after we make all the network related events like click, oncontext, select node, select edge, hoverEdge/Node, blur Edge/Node etc.
|
||||
|
||||
File Reference:
|
||||
|
||||
1.js/thirdparty/vis.js
|
||||
2.js/networkgraph/alea.js
|
||||
3.js/networkgraph/exampleUtil.js
|
||||
4.css/thirdparty/vis-network.css
|
||||
|
||||
Document URL <20> vis js:
|
||||
|
||||
1.https://visjs.github.io/vis-network/docs/network/
|
||||
|
||||
Import Network using JSON:
|
||||
|
||||
User to import an external JSON file of a fixed format (determined by TIP) to input the network topology with node types, fiber/patch/service connectivity/parameters, Error message must be displayed in case the import fails.
|
||||
Automatically will create network topology-based on import json data, then will applied all the rules once json file loaded successfully.
|
||||
|
||||
i.Code location: js/networkgraph/mynetwork.js
|
||||
|
||||
ii.Function name: load_EqptConfig, importNetwork, importNode, draw
|
||||
|
||||
iii.load_EqptConfig:
|
||||
This function is used to load the equipment configuration data from the import json file.
|
||||
|
||||
iv.importNetwork:
|
||||
This is used to load the fiber/service data into array list.
|
||||
|
||||
v.importNode:
|
||||
This function is used to load all nodes element data into array list
|
||||
|
||||
|
||||
Draw:
|
||||
|
||||
This function is used to convert both array list into dataset then pass it as parameter also container, options to vis. Network.
|
||||
|
||||
Create/Edit Topology:
|
||||
|
||||
Node creation:
|
||||
|
||||
User to click the <20>ROADM/Attenuator/Transceiver/Amplifier/Raman Amplifier<65> button and create a node anywhere in the workspace by clicking on it.
|
||||
|
||||
i.Code location: js/networkgraph/node.js
|
||||
ii.Function name: addNodes
|
||||
iii.addNodes:
|
||||
Node will be created based on selected node type on left side menu. Node style and configuration data loaded from configurationdata, styledata json.
|
||||
File Reference:
|
||||
|
||||
1.data/configurationdata.json
|
||||
2.data/styledata.json
|
||||
|
||||
Node update:
|
||||
|
||||
User to right click on the <20>ROADM/Attenuator/Transceiver/Amplifier/Raman Amplifier<65> select edit option and node will be update based on selected node ID.
|
||||
|
||||
i.Code location: js/networkgraph/node.js
|
||||
ii.Function name: updateRoadm, updateAttenuator, updateAmplifier, updateRamanAmp, updateTransceiver, realUpdate.
|
||||
iii.realUpdate:
|
||||
This function is used to check the node rules after node updating, if node is fully completed node image will be change.
|
||||
|
||||
Node delete:
|
||||
|
||||
User to right click on the <20>ROADM/Attenuator/Transceiver/Amplifier/Raman Amplifier<65> select delete option and node will be removed based on selected node ID.
|
||||
|
||||
i.Code location: js/networkgraph/node.js
|
||||
ii.Function name: removeNodes
|
||||
|
||||
Node cancel:
|
||||
|
||||
This is function is used to clear input and temporary data for selected node ID.
|
||||
|
||||
i.Code location: js/networkgraph/node.js
|
||||
ii.Function name: clearRoadm, clearAttenuator, clearAmplifier, clearRamanAmp, clearTransceiver.
|
||||
|
||||
Copy and Paste node:
|
||||
|
||||
User to right click on the <20>ROADM/Attenuator/Transceiver/Amplifier/Raman Amplifier<65> select copy option, all the parameter of nodes will be copied then right click anywhere in the workspace then select paste option, the latest copied node shall be pasted. All the parameters of the nodes must be retained when the paste is performed.
|
||||
|
||||
i.Code location: js/networkgraph/node.js
|
||||
ii.Function name: copyNode, pasteNode
|
||||
|
||||
Node copy and apply template:
|
||||
|
||||
User to right click on the <20>ROADM /Transceiver/Amplifier/Raman Amplifier<65> select copy-template/paste-template option.
|
||||
|
||||
i.Code location: js/networkgraph/node.js
|
||||
ii.Function name: copyNodeTemplate, applyRoadmTemplate, applyTransceiverTemplate, applyAmpTemplate, applyRamanAmpTemplate, clearNodeTemplate
|
||||
This function is used to copy the properties of a node and apply them to one or multiple of same nodes by selecting all of them together
|
||||
iii.clearNodeTemplate:
|
||||
This function is used to clear the copy template data.
|
||||
Node hover:
|
||||
|
||||
This function is used to displays node name, type parameter when hover the mouse near the node.
|
||||
i.Code location: js/networkgraph/node.js
|
||||
ii.Function name: displayNodesHover
|
||||
|
||||
Single fiber creation:
|
||||
|
||||
User to click the <20>Single fiber<65> button and be able to add a fiber connection between any 2 nodes by dragging from source node to destination.
|
||||
|
||||
i.Code location: js/networkgraph/fiber.js
|
||||
|
||||
ii.Function name: addFiberComponent, multipleFiberService
|
||||
|
||||
iii.addFiberComponent:
|
||||
|
||||
Fiber will be created based on dragging from source node to destination. fiber style and configuration data loaded from configurationdata, styledata json.
|
||||
|
||||
iv.multipleFiberService:
|
||||
|
||||
This function is used to add multiple single fiber/patch and service between same set of nodes and re-arrange them one by one.
|
||||
|
||||
v.File Reference:
|
||||
|
||||
1.data/configurationdata.json
|
||||
2.data/styledata.json
|
||||
|
||||
Single fiber update:
|
||||
|
||||
User to right click on the <20>Single fiber<65> select edit option and fiber will be update based on selected fiber ID.
|
||||
|
||||
i.Code location: js/networkgraph/fiber.js
|
||||
ii.Function name: updateSingleFiber
|
||||
|
||||
Single fiber delete:
|
||||
|
||||
User to right click on the <20>Single fiber<65> select delete option and fiber will be removed based on selected fiber ID.
|
||||
|
||||
i.Code location: js/networkgraph/fiber.js
|
||||
ii.Function name: removeFiber
|
||||
|
||||
Single fiber cancel:
|
||||
|
||||
This is function is used to clear input and temporary data for selected fiber ID.
|
||||
|
||||
i.Code location: js/networkgraph/fiber.js
|
||||
ii.Function name: clearSingleFiber
|
||||
|
||||
Insert node:
|
||||
|
||||
User to right-click on any <20>single fiber<65> select <20>Insert Node<64> options.
|
||||
|
||||
i.Code location: js/networkgraph/fiber.js
|
||||
ii.Function name: singleFiberInsertNode
|
||||
|
||||
singleFiberInsertNode:
|
||||
|
||||
This function is used to insert a node (ROADM/Attenuator/Amplifier/Raman Amplifier) in the middle of selected fiber.
|
||||
|
||||
Single fiber hover:
|
||||
|
||||
This function is used to displays fiber details like span length, loss etc. when hover the mouse near the single fiber.
|
||||
|
||||
i.Code location: js/networkgraph/fiber.js
|
||||
ii.Function name: displayFiberHover
|
||||
|
||||
Single patch creation:
|
||||
|
||||
User to click the <20>Single patch<63> button and be able to add a patch connection between any 2 nodes by dragging from source node to destination.
|
||||
|
||||
i.Code location: js/networkgraph/patch.js
|
||||
|
||||
ii.Function name: addPatchComponent
|
||||
|
||||
iii.addPatchComponent:
|
||||
|
||||
Patch will be created based on dragging from source node to destination. patch style and configuration data loaded from configurationdata, styledata json.
|
||||
|
||||
iv.File Reference:
|
||||
|
||||
1.data/configurationdata.json
|
||||
2.data/styledata.json
|
||||
|
||||
Single patch update:
|
||||
|
||||
User to right click on the <20>Single patch<63> select edit option and fiber will be update based on selected patch ID.
|
||||
|
||||
i.Code location: js/networkgraph/patch.js
|
||||
ii.Function name: updateSinglePatch
|
||||
|
||||
Single patch delete:
|
||||
|
||||
User to right click on the <20>Single patch<63> select delete option and patch will be removed based on selected patch ID.
|
||||
|
||||
i.Code location: js/networkgraph/patch.js
|
||||
ii.Function name: deletePatch
|
||||
|
||||
Single patch cancel:
|
||||
|
||||
This is function is used to clear input and temporary data for selected patch ID.
|
||||
|
||||
i.Code location: js/networkgraph/patch.js
|
||||
ii.Function name: clearSinglePatch
|
||||
|
||||
Add/Edit services:
|
||||
|
||||
Service creation:
|
||||
|
||||
User to click the <20>Service<63> button and be able to add a service connection between only same type of 2 transceiver by dragging from source node to destination.
|
||||
|
||||
i.Code location: js/networkgraph/service.js
|
||||
|
||||
ii.Function name: addServiceComponent
|
||||
|
||||
iii.addServiceComponent:
|
||||
|
||||
Service will be created based on dragging from source node to destination. service style and configuration data loaded from configurationdata, styledata json.
|
||||
|
||||
iv.File Reference:
|
||||
|
||||
1.data/configurationdata.json
|
||||
2.data/styledata.json
|
||||
|
||||
Service update:
|
||||
|
||||
User to right click on the <20>Service<63> select edit option and service will be update based on selected service ID.
|
||||
|
||||
i.Code location: js/networkgraph/service.js
|
||||
ii.Function name: updateService
|
||||
|
||||
Service delete:
|
||||
|
||||
User to right click on the <20>Service<63> select delete option and service will be removed based on selected service ID.
|
||||
|
||||
i.Code location: js/networkgraph/service.js
|
||||
ii.Function name: deleteService
|
||||
|
||||
Service cancel:
|
||||
|
||||
This is function is used to clear input and temporary data for selected service.
|
||||
|
||||
i.Code location: js/networkgraph/service.js
|
||||
ii.Function name: clearService
|
||||
|
||||
Service hover:
|
||||
|
||||
This function is used to displays service. when hover the mouse near the service ID.
|
||||
|
||||
i.Code location: js/networkgraph/fiber.js
|
||||
ii.Function name: displayFiberHover
|
||||
|
||||
Analyze network:
|
||||
|
||||
Save and Export network:
|
||||
|
||||
Export/Save the network topology as a JSON file when the <20>Export/Save network<72> button is clicked. The schema of the JSON file will match the given JSON file like Equipment_JSON_MOD2.json.
|
||||
|
||||
i.Code location: js/networkgraph/mynetwork.js
|
||||
|
||||
ii.Function name: exportNetwork
|
||||
|
||||
This function is used to push the equipment data, nodes, fiber, patch and service data into separate array list then convert it to JSON then save/export as json file.
|
||||
|
||||
iii.File Reference: data/Equipment_JSON_MOD2.json
|
||||
|
||||
Simulation parameters:
|
||||
|
||||
We stored simulation parameters temporally in session storage also we edit/fetch simulation parameters from session storage.
|
||||
|
||||
i.Code location: js/networkgraph/mynetwork.js
|
||||
|
||||
ii.Function name: saveSimulations
|
||||
|
||||
This function is used to convert simulation parameters to JSON then stored it in session storage (<28>simulationParameters<72>).
|
||||
|
||||
Show labels:
|
||||
|
||||
Site names and link it to Show Labels switch so that we can prevent the overlap of the site names, especially for large networks.
|
||||
|
||||
i.Code location: js/networkgraph/mynetwork.js
|
||||
|
||||
ii.Function name: hideEdgeLabels
|
||||
|
||||
This function is used to show/hide the nodes/fiber/patch/service labels except ROAM. Here we change network options. Update the model of edge and node color as transparent then set it to network options.
|
||||
|
||||
Undo:
|
||||
|
||||
The undo function is used to reverse a mistake, such as deleting the wrong element in a network topology. We stored every action detail one by one into array list (tempUndo) like node creation/deletion/updating etc.
|
||||
|
||||
Ex: node creation/deletion/updating: tempUndo.push(nodedata).
|
||||
|
||||
i.Code location: js/networkgraph/mynetwork.js
|
||||
|
||||
ii.Event: <20>button_undo on click<63>
|
||||
|
||||
Users click on <20>button_undo<64> we fetch latest one record from array list (tempUndo) then will check record whether creation/deletion/updating after that will call the relevant action. After will stored action details into new array list (tempRedo) then will using pop method to remove record from array list (tempUndo) ex: tempUndo.pop().
|
||||
|
||||
Ex: node updating:
|
||||
|
||||
tempRedo.push(nodedata).
|
||||
data.nodes.update (latest record of tempUndo).
|
||||
|
||||
Redo:
|
||||
|
||||
The redo function is used to restores any actions that were previously undone using an undo. We stored every undo action detail one by one into array list (tempRedo) like node creation/deletion/updating etc.
|
||||
|
||||
Ex: node creation/deletion/updating: tempRedo.push(nodedata)
|
||||
|
||||
i.Code location: js/networkgraph/mynetwork.js
|
||||
|
||||
ii.Event: <20>button_redo on click<63>
|
||||
|
||||
Users click on <20>button_redo<64> we fetch latest one record from array list (tempRedo) then will check record whether creation/deletion/updating after that will call the relevant action. After will stored action details into new array list (tempUndo) then will using pop method to remove record from array list (tempRedo) ex: tempRedo.pop().
|
||||
|
||||
Ex: node deletion:
|
||||
|
||||
tempUndoo.push(nodedata).
|
||||
data.nodes.remove (latest record of tempRedo).
|
||||
|
||||
Screen capture:
|
||||
|
||||
User to click the <20>Screen capture<72> button and be able to capture the network topology as image file.
|
||||
|
||||
i.Code location: js/networkgraph/mynetwork.js
|
||||
|
||||
ii.Function name: captureImage
|
||||
|
||||
This function is used to convert the network area to <20>.png<6E> format image file (<28>NetworkPage.png<6E>) with help of html2canvas js.
|
||||
|
||||
iii.File Reference:
|
||||
|
||||
1.js/thirdparty/html2canvas.min.js
|
||||
|
||||
Check errors:
|
||||
|
||||
User to click the <20>Check errors<72> button and be able to see the summary of network topology error list.
|
||||
i.Code location:
|
||||
|
||||
1.js/networkgraph/mynetwork.js
|
||||
2.js/networkgraph/constraints.js
|
||||
|
||||
ii.Function name: topologyValidation, checkLink, checkMisLink, checkFiberPro.
|
||||
|
||||
iii.topologyValidation:
|
||||
|
||||
This function is used to check the node link, mis-link, fiber properties and consolidate all error list.
|
||||
|
||||
iv.checkLink:
|
||||
|
||||
This function is used to check the node link and type rules.
|
||||
Ex:
|
||||
|
||||
1.Node must have an even number of links with an equal number of incoming and outgoing links.
|
||||
2.Node type not entered by the user.
|
||||
|
||||
checkMisLink:
|
||||
|
||||
This function is used to check the limits of node link rules
|
||||
|
||||
Ex:
|
||||
|
||||
1. One or more links missing.
|
||||
2.Node Cannot support 2 links of the same type, must have one incoming and one outgoing link.
|
||||
3.Node cannot support more than 2 links.
|
||||
4.Amplifier type not entered by the user.
|
||||
5.Amplifier category not entered by the user.
|
||||
|
||||
checkFiberPro:
|
||||
|
||||
This function is used to check the fiber properties rules.
|
||||
|
||||
Ex:
|
||||
|
||||
1.Fiber type not entered by the user.
|
||||
2.Fiber length not entered by the user.
|
||||
|
||||
Node highlight:
|
||||
|
||||
User can be able to select multiple nodes by ctrl+click, it is used to edit/delete/applytemplate for multiple nodes.
|
||||
|
||||
i.Code location: js/networkgraph/mynetwork.js
|
||||
|
||||
ii.Event name: <20>selectNode on Click<63>
|
||||
|
||||
We highlight the node using <20>image<67> property. Ex, we are using different image to differentiate the node like complete/incomplete/selection/error node.
|
||||
|
||||
iii.File Reference:
|
||||
|
||||
1.data/configurationdata.json
|
||||
2.data/styledata.json
|
||||
|
||||
Fiber highlight:
|
||||
|
||||
User can be able to select multiple fiber by ctrl+click, it is used to edit/delete for multiple fiber.
|
||||
|
||||
i.Code location: js/networkgraph/mynetwork.js
|
||||
|
||||
ii.Event name: <20>selectEdge on Click<63>
|
||||
|
||||
We highlight the fiber using <20>shadow and color<6F> properties. Ex, we are using different color to differentiate the fiber like complete/incomplete/selection/error fiber.
|
||||
|
||||
iii.File Reference:
|
||||
|
||||
1.data/configurationdata.json
|
||||
2.data/styledata.json
|
||||
Font:
|
||||
|
||||
i.Font Name: Material Icons
|
||||
|
||||
ii.Location: css/thirdparty/icon.css
|
||||
|
||||
iii.Font URL: fonts/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2
|
||||
|
||||
iv.Open the material icon source link: https://fonts.googleapis.com/icon?family=Material+Icons
|
||||
|
||||
Description: Google provides a set of 750 icons designed under "material design guidelines" and these are known as Material Design icons. These icons are simple and they support all modern web browsers. Since these icons are vector based, they are scalable as well. To use these icons, we have to load the font (library) material-icons.
|
||||
You can increase or decrease the size of an icon by defining its size in the CSS and using it along with the class name as shown below. In the following example, we have declared the size as 6 em and Defining the Color: You can use the CSS to define the color of an icon.
|
||||
|
||||
i.Font Name: Roboto
|
||||
|
||||
ii.Location: css/thirdparty/roboto-css.css
|
||||
|
||||
iii.Font URL: fonts/KFOmCnqEu92Fr1Mu4mxK.woff2
|
||||
|
||||
iv.Open the roboto source link: https://fonts.googleapis.com/css?family=Roboto
|
||||
|
||||
Description: Roboto has a dual nature. It has a mechanical skeleton and the forms are largely geometric. At the same time, the font features friendly and open curves. While some grotesks distort their letterforms to force a rigid rhythm, Roboto doesn<73>t compromise, allowing letters to be settled into their natural width. This makes for a more natural reading rhythm more commonly found in humanist and serif types.
|
||||
|
||||
i.Font Name: Oswald
|
||||
|
||||
ii.Location: css/thirdparty/oswald-css.css
|
||||
|
||||
iii.Font URL: fonts/TK3_WkUHHAIjg75cFRf3bXL8LICs1_FvsUZiZQ.woff2
|
||||
|
||||
iv.Open the oswald source link: https://fonts.googleapis.com/css?family=Oswald
|
||||
|
||||
Description: Oswald is a reworking of the classic style historically represented by the 'Alternate Gothic' sans serif typefaces. The characters of Oswald were initially re-drawn and reformed to better fit the pixel grid of standard digital screens. Oswald is designed to be used freely across the internet by web browsers on desktop computers, laptops and mobile devices.
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user