Web UI for ARGUS server
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.6 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. //<?php require_once('../../js_asm.php'); ?>
  2. function updateDashBoardItemLayout( id, x, y ){
  3. Ext.Ajax.request({
  4. url: '/lib/controller/updateDashBoardItems.php',
  5. params: {
  6. SITE: <?=$SiteID;?>,
  7. UID: <?=$UserID;?>,
  8. SID: '<?=$Session;?>',
  9. PANEL: id,
  10. X: x,
  11. Y: y
  12. },
  13. success: function( response, opts ){
  14. //var data = Ext.decode(response.responseText);
  15. //var tPanel = Ext.getCmp('main_portal');
  16. //tPanel.removeAll(true);
  17. //for( i=0; i < data.length; i++) tPanel.add( data[i] );
  18. //tPanel.doLayout();
  19. },
  20. failure: function( response, opts ) {
  21. //var tPanel = Ext.getCmp('main_portal');
  22. //tPanel.remove(0);
  23. //tPanel.add( { html: 'Failed to load dashboard!' } );
  24. //tPanel.doLayout();
  25. }
  26. });
  27. };
  28. function loadDashBoard(){
  29. if( tlInterval!= null ){
  30. window.clearInterval( tlInterval );
  31. tlInterval = null;
  32. timelineObj = null;
  33. };
  34. Ext.Ajax.request({
  35. url: '/lib/controller/getDashBoardItems.php',
  36. params: {
  37. SITE: <?=$SiteID;?>,
  38. UID: <?=$UserID;?>,
  39. SID: '<?=$Session;?>'
  40. },
  41. success: function( response, opts ){
  42. var data = Ext.decode(response.responseText);
  43. var tPanel = Ext.getCmp('main_portal');
  44. tPanel.removeAll(true);
  45. for( i=0; i < data.length; i++) tPanel.add( data[i] );
  46. tPanel.doLayout();
  47. },
  48. failure: function( response, opts ) {
  49. var tPanel = Ext.getCmp('main_portal');
  50. tPanel.remove(0);
  51. tPanel.add( { html: 'Failed to load dashboard!' } );
  52. tPanel.doLayout();
  53. }
  54. });
  55. };