Add tooltips for nodes in topology in UI 22/1622/2
authorAlissa Bonas <abonas@redhat.com>
Wed, 2 Oct 2013 13:12:02 +0000 (16:12 +0300)
committerGerrit Code Review <gerrit@opendaylight.org>
Sat, 5 Oct 2013 14:36:00 +0000 (14:36 +0000)
Bug:97
Change-Id: I12ec43b79e2df5c305b6a63c9e5434998db646d1
Signed-off-by: Alissa Bonas <abonas@redhat.com>
opendaylight/web/root/src/main/resources/css/opendaylight.css
opendaylight/web/root/src/main/resources/js/open-topology.js

index 9a988b02211ca20827f9fd7c3b707b67964cf8f7..296bdf771d26ccc8ae7792dbfb122bc339abdb96 100644 (file)
   width: 16px;
 }
 
+.tip {
+   background-color: white;
+   border: 1px solid #CCCCCC;
+   box-shadow: 2px 2px 8px #555555;
+   color: #111111;
+   font-family: Verdana,Geneva,Arial,Helvetica,sans-serif;
+   font-size: 14px;
+   opacity: 0.9;
+   padding: 7px;
+   width: 260px;
+   border-radius: 8px;
+}
+
index 21a37e49c1e6de776d1861191dc25312fb2d3776..d5041bda498c0c86cd742d10097a052e17af4a0a 100644 (file)
@@ -98,11 +98,16 @@ one.topology.init = function(json) {
                 Edge : one.topology.option.edge(true, '23A4FF', 1.5),
                 Tips : {
                     enable : true,
-                    type : 'Native',
+                    type : 'auto',
+                    offsetX: 15,
+                    offsetY: 15,
                     onShow : function(tip, node) {
                         if (node.name != undefined)
-                            tip.innerHTML = "";
-                        // tipsOnShow(tip, node);
+                            tip.innerHTML = "Name : " + node.name + "<br>";
+                        if(node.data["$type"]!=undefined)
+                            tip.innerHTML = tip.innerHTML + "Type : " + node.data["$type"] + "<br>";
+                        if(node.data["$desc"]!=undefined)
+                            tip.innerHTML = tip.innerHTML + "Description : " + node.data["$desc"];
                     }
                 },
                 Events : {