Changeset 18058 for trunk/FACT++/dim/WebDID
- Timestamp:
- 01/03/15 18:26:23 (10 years ago)
- Location:
- trunk/FACT++/dim/WebDID
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/dim/WebDID/did.js
r14939 r18058 99 99 { 100 100 storeServices.load(); 101 serviceInfo .setVisible(1);101 serviceInfoArea.setVisible(1); 102 102 commandInfoArea.setVisible(0); 103 serviceInfo .update("");103 serviceInfoArea.update(""); 104 104 } 105 105 106 var serviceInfo = Ext.create('Ext.Panel', {106 var serviceInfoArea = Ext.create('Ext.Panel', { 107 107 layout: 'fit', 108 108 id: 'details-panel', … … 112 112 autoScroll: true, 113 113 border: false, 114 html: '' 115 }); 116 114 html: '', 115 tools: [{ 116 type: 'gear', 117 id: 'update', 118 handler: function(e, toolEl, panel, tc) { 119 UpdateButton = tc; 120 if(UpdateService) 121 { 122 UpdateService = 0; 123 tc.setType('refresh'); 124 // tc.show(); 125 //console.log("changed icon 1", UpdateService); 126 } 127 else 128 { 129 UpdateService = 1; 130 tc.setType('gear'); 131 // tc.show(); 132 //console.log("changed icon 2", UpdateService); 133 } 134 } 135 }] 136 }); 137 138 var serviceButton = Ext.create('Ext.Button', { 139 text: 'Stop Updating', 140 margin: '5 5 5 5', 141 handler: function() { 142 //console.log('changed icon'); 143 // var pattern = commandData.getRawValue(); 144 // query(pattern, -1); 145 } 146 }); 147 /* 148 var serviceInfoArea = Ext.create('Ext.form.Panel', { 149 layout: 'vbox', 150 id: 'svc-details-panel', 151 title: 'Service Info', 152 width: 580, 153 // flex: 3, 154 // autoScroll: true, 155 border: false, 156 // html: 'Command test' 157 align:'stretch', 158 tools: [{ 159 type: 'gear', 160 handler: function(e, toolEl, panel, tc) { 161 UpdateButton = tc; 162 if(UpdateService) 163 { 164 UpdateService = 0; 165 tc.setType('refresh'); 166 // tc.show(); 167 //console.log("changed icon 1", UpdateService); 168 } 169 else 170 { 171 UpdateService = 1; 172 tc.setType('gear'); 173 // tc.show(); 174 doGetService(); 175 //console.log("changed icon 2", UpdateService); 176 } 177 } 178 }], 179 items: [serviceButton,serviceInfo] 180 }); 181 */ 117 182 var commandInfo = Ext.create('Ext.Panel', { 118 183 layout: 'fit', … … 164 229 }); 165 230 166 var service InfoArea = Ext.create('Ext.form.Panel', {231 var serviceCommandArea = Ext.create('Ext.form.Panel', { 167 232 layout: 'vbox', 168 233 // title: 'Service Info', … … 170 235 region: 'east', 171 236 align:'stretch', 172 items: [serviceInfo , commandInfoArea]237 items: [serviceInfoArea, commandInfoArea] 173 238 }); 174 239 /* … … 200 265 var OldNnodes = 0; 201 266 var OldNSearch = -1; 267 var UpdateService = 1; 268 var UpdateButton = 0; 269 270 202 271 function poll() 203 272 { … … 274 343 function doGetService() 275 344 { 276 getService(LastService, LastId); 345 if(LastService != "") 346 getService(LastService, LastId); 277 347 } 278 348 function getService(name, id) … … 285 355 { 286 356 forceUpdate = 1; 357 UpdateService = 1; 358 if(UpdateButton) 359 UpdateButton.setType('gear'); 287 360 LastService = name; 288 361 LastId = id; … … 304 377 CurrService = name1; 305 378 requestNumber = requestNumber + 1; 306 HTTPPacket.open( "GET", "/didServiceData.json/src?dimservice="+name1+"&id=src&reqNr="+requestNumber+"&reqId="+randomNumber+"&force="+forceUpdate, true ); 307 HTTPPacket.send( null ); 379 if(UpdateService) 380 { 381 HTTPPacket.open( "GET", "/didServiceData.json/src?dimservice="+name1+"&id=src&reqNr="+requestNumber+"&reqId="+randomNumber+"&force="+forceUpdate, true ); 382 HTTPPacket.send( null ); 383 } 308 384 } 309 385 function process() 310 386 { 311 serviceInfo .update("Updating - state "+HTTPPacket.readyState+"...");387 serviceInfoArea.update("Updating - state "+HTTPPacket.readyState+"..."); 312 388 if ( HTTPPacket.readyState != 4 ) 313 389 return; … … 320 396 if(forceUpdate != -1) 321 397 { 322 serviceInfo.update(HTTPPacket.responseText); 323 serviceInfo.setVisible(1); 324 commandInfoArea.setVisible(0); 398 // if(UpdateService) 399 // { 400 serviceInfoArea.update(HTTPPacket.responseText); 401 serviceInfoArea.setVisible(1); 402 commandInfoArea.setVisible(0); 403 // } 325 404 } 326 405 else 327 406 { 328 407 commandInfo.update(HTTPPacket.responseText); 329 serviceInfo .setVisible(0);408 serviceInfoArea.setVisible(0); 330 409 commandInfoArea.setVisible(1); 331 410 } … … 526 605 minSize: 100, 527 606 maxSize: 600, 528 items: [service InfoArea]607 items: [serviceCommandArea] 529 608 } 530 609 ], -
trunk/FACT++/dim/WebDID/index.html
r14939 r18058 5 5 <link rel="icon" href="favicon.ico" type="image/x-icon"> 6 6 <link rel="shortcut icon" href="favicon.ico" type="image/x-icon"> 7 <link rel="stylesheet" type="text/css" href="ext-4. 1.1a/resources/css/ext-all.css" />7 <link rel="stylesheet" type="text/css" href="ext-4.2.1.883/resources/css/ext-all.css" /> 8 8 9 9 <!-- GC --> 10 10 11 <script type="text/javascript" src="ext-4. 1.1a/ext-all.js"></script>11 <script type="text/javascript" src="ext-4.2.1.883/ext-all.js"></script> 12 12 <script type="text/javascript" src="did.js"></script> 13 13 </head>
Note:
See TracChangeset
for help on using the changeset viewer.