mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-10-22 21:01:00 +02:00
GUI -- Starting migration of topology view to the updated framework. WIP.
This commit is contained in:
parent
af92d1277e
commit
142d003abf
@ -70,6 +70,7 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var ONOS = $.onos({
|
var ONOS = $.onos({
|
||||||
comment: "configuration options",
|
comment: "configuration options",
|
||||||
|
startVid: 'topo',
|
||||||
trace: false
|
trace: false
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@ -77,12 +78,15 @@
|
|||||||
<!-- Framework module files included here -->
|
<!-- Framework module files included here -->
|
||||||
<script src="mast2.js"></script>
|
<script src="mast2.js"></script>
|
||||||
|
|
||||||
<!-- Contributed (application) views injected here -->
|
<!-- Sample views; can be dispensed with eventually -->
|
||||||
<!-- TODO: replace with template marker and inject refs server-side -->
|
|
||||||
<script src="sample2.js"></script>
|
<script src="sample2.js"></script>
|
||||||
<script src="sampleAlt2.js"></script>
|
<script src="sampleAlt2.js"></script>
|
||||||
<script src="sampleRadio.js"></script>
|
<script src="sampleRadio.js"></script>
|
||||||
|
|
||||||
|
<!-- Contributed (application) views injected here -->
|
||||||
|
<!-- TODO: replace with template marker and inject refs server-side -->
|
||||||
|
<script src="topo2.js"></script>
|
||||||
|
|
||||||
<!-- finally, build the UI-->
|
<!-- finally, build the UI-->
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(ONOS.buildUi);
|
$(ONOS.buildUi);
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
var tsI = new Date().getTime(), // initialize time stamp
|
var tsI = new Date().getTime(), // initialize time stamp
|
||||||
tsB, // build time stamp
|
tsB, // build time stamp
|
||||||
mastHeight = 36, // see mast2.css
|
mastHeight = 36, // see mast2.css
|
||||||
defaultHash = 'sample';
|
defaultVid = 'sample';
|
||||||
|
|
||||||
|
|
||||||
// attach our main function to the jQuery object
|
// attach our main function to the jQuery object
|
||||||
@ -35,7 +35,8 @@
|
|||||||
navApi;
|
navApi;
|
||||||
|
|
||||||
var defaultOptions = {
|
var defaultOptions = {
|
||||||
trace: false
|
trace: false,
|
||||||
|
startVid: defaultVid
|
||||||
};
|
};
|
||||||
|
|
||||||
// compute runtime settings
|
// compute runtime settings
|
||||||
@ -91,7 +92,7 @@
|
|||||||
traceFn('hash', hash);
|
traceFn('hash', hash);
|
||||||
|
|
||||||
if (!hash) {
|
if (!hash) {
|
||||||
hash = defaultHash;
|
hash = settings.startVid;
|
||||||
redo = true;
|
redo = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -336,10 +337,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
var viewInstanceMethods = {
|
var viewInstanceMethods = {
|
||||||
toString: function () {
|
|
||||||
return '[View: id="' + this.vid + '"]';
|
|
||||||
},
|
|
||||||
|
|
||||||
token: function () {
|
token: function () {
|
||||||
return {
|
return {
|
||||||
// attributes
|
// attributes
|
||||||
@ -350,6 +347,7 @@
|
|||||||
// functions
|
// functions
|
||||||
width: this.width,
|
width: this.width,
|
||||||
height: this.height,
|
height: this.height,
|
||||||
|
uid: this.uid,
|
||||||
setRadio: this.setRadio
|
setRadio: this.setRadio
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -433,6 +431,10 @@
|
|||||||
|
|
||||||
setRadio: function (btnSet, cb) {
|
setRadio: function (btnSet, cb) {
|
||||||
setRadioButtons(this.vid, btnSet, cb);
|
setRadioButtons(this.vid, btnSet, cb);
|
||||||
|
},
|
||||||
|
|
||||||
|
uid: function (id) {
|
||||||
|
return uid(this, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: consider schedule, clearTimer, etc.
|
// TODO: consider schedule, clearTimer, etc.
|
||||||
|
1219
web/gui/src/main/webapp/topo2-OLD.js
Normal file
1219
web/gui/src/main/webapp/topo2-OLD.js
Normal file
File diff suppressed because it is too large
Load Diff
@ -20,3 +20,7 @@
|
|||||||
@author Simon Hunt
|
@author Simon Hunt
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
svg #topo-bg {
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user