Authored by qinchao

mha

@@ -74,25 +74,27 @@ @@ -74,25 +74,27 @@
74 74
75 <style> 75 <style>
76 .node-container{ 76 .node-container{
77 - position: absolute; 77 + position: relative;
  78 + //position: absolute;
78 z-index: 9999; 79 z-index: 9999;
79 width: 300px; 80 width: 300px;
80 - height: 80px; 81 + height: 100px;
81 border: 1px solid #999; 82 border: 1px solid #999;
82 - border-radius: 6px; 83 + border-radius: 3px;
83 overflow: hidden; 84 overflow: hidden;
84 - position: relative; 85 +
85 } 86 }
86 87
87 .node-container .node-container-title{ 88 .node-container .node-container-title{
88 color: white; 89 color: white;
89 font-size: 2em; 90 font-size: 2em;
90 float:left; 91 float:left;
91 - height:20px; 92 + height:40px;
92 } 93 }
93 94
94 .node-container .node-container-content{ 95 .node-container .node-container-content{
95 - margin-top:30px; 96 + margin-top:40px;
  97 + height: 100%;
96 background-color: white; 98 background-color: white;
97 } 99 }
98 100
@@ -100,10 +102,11 @@ @@ -100,10 +102,11 @@
100 float:right; 102 float:right;
101 } 103 }
102 104
103 - .node-container .node-container-title-button-div button{ 105 + .node-container .node-container-title-button-div span{
  106 + margin-top:3px;
104 margin-left:3px; 107 margin-left:3px;
105 margin-right:3px; 108 margin-right:3px;
106 - width:20px; 109 + //width:20px;
107 } 110 }
108 111
109 112
@@ -191,22 +194,29 @@ @@ -191,22 +194,29 @@
191 getHtml: function(cfg){ 194 getHtml: function(cfg){
192 var model = cfg.model; 195 var model = cfg.model;
193 var container = Util.createDOM('<div class="node-container"></div>'); 196 var container = Util.createDOM('<div class="node-container"></div>');
194 - var title = Util.createDOM('<div class="node-container-title">'+model.id+'</div>'); 197 + var title = Util.createDOM('<div class="node-container-title">'+model.label+'</div>');
195 container.appendChild(title); 198 container.appendChild(title);
196 199
197 - var buttonDiv = Util.createDOM('<div class="node-container-title-button-div"></div>');  
198 - var btn = Util.createDOM('<button>I</button>');  
199 - btn.addEventListener('click', function(){  
200 - alert(222);  
201 - });  
202 - buttonDiv.appendChild(btn); 200 + if(!model.disabledFlag){
  201 + var buttonDiv = Util.createDOM('<div class="node-container-title-button-div"></div>');
  202 + var btn = Util.createDOM('' +
  203 + ' <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>' +
  204 + ' ');
  205 + btn.addEventListener('click', function(){
  206 + alert(1111);
  207 + });
  208 + buttonDiv.appendChild(btn);
  209 +
  210 + btn = Util.createDOM('' +
  211 + ' <span class="glyphicon glyphicon-minus" aria-hidden="true"></span>' +
  212 + '');
  213 + btn.addEventListener('click', function(){
  214 + alert(222);
  215 + });
  216 + buttonDiv.appendChild(btn);
  217 + container.appendChild(buttonDiv);
  218 + }
203 219
204 - btn = Util.createDOM('<button >X</button>');  
205 - btn.addEventListener('click', function(){  
206 - alert(1111);  
207 - });  
208 - buttonDiv.appendChild(btn);  
209 - container.appendChild(buttonDiv);  
210 220
211 var content = Util.createDOM('<div class="node-container-content">'+model.ip+'</div>'); 221 var content = Util.createDOM('<div class="node-container-content">'+model.ip+'</div>');
212 container.appendChild(content); 222 container.appendChild(content);
@@ -234,7 +244,7 @@ @@ -234,7 +244,7 @@
234 }).color( function(obj){ 244 }).color( function(obj){
235 var rst; 245 var rst;
236 if(obj.disabledFlag){ 246 if(obj.disabledFlag){
237 - rst = '#CCC'; 247 + rst = '#aaa';
238 }else{ 248 }else{
239 if(obj.noMaster==1){ 249 if(obj.noMaster==1){
240 //rst = '#F90426'; 250 //rst = '#F90426';