Changeset 600 for trunk/web2/addons/job_monarch/js/monarch.js
- Timestamp:
- 02/11/09 12:28:50 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/web2/addons/job_monarch/js/monarch.js
r599 r600 510 510 }); 511 511 512 function jobRowSelect( selModel ) 513 { 514 if( selModel.hasSelection() ) 512 function jobBeforeRowSelect( mySelectionModel, rowIndex, keepExisting, myRecord ) 513 { 514 if( myRecord.get('status') == 'Q' ) 515 { // return false: dont select row if queued 516 return false; 517 } 518 519 return true; 520 } 521 522 function jobRowSelect( mySelectionModel, rowIndex, myRecord ) 523 { 524 if( mySelectionModel.hasSelection() ) 515 525 { 516 526 showGraphsButton.enable(); 517 } 518 else519 {520 showGraphsButton.disable(); 521 }527 528 return 0; 529 } 530 531 showGraphsButton.disable(); 522 532 } 523 533 … … 690 700 listeners: 691 701 { 692 'selectionchange': 702 'beforerowselect': 703 { 704 scope: this, 705 fn: jobBeforeRowSelect 706 }, 707 'rowselect': 708 { 709 scope: this, 710 fn: jobRowSelect 711 }, 712 'rowdeselect': 693 713 { 694 714 scope: this, … … 862 882 {name: 'l', type: 'string', mapping: 'l'}, 863 883 {name: 'jr', type: 'string', mapping: 'jr'}, 864 {name: 'js', type: 'string', mapping: 'js'} 884 {name: 'js', type: 'string', mapping: 'js'}, 885 {name: 'jid', type: 'string', mapping: 'jid'} 865 886 ]), 866 887 listeners: … … 876 897 // 877 898 myStore.proxy.url = 'jobstore.php?timestamp=' + new Date().getTime(); 878 //alert( myStore.proxy.url );879 899 } 880 900 } … … 903 923 store: store, 904 924 layout: 'fit', 925 closable: true, 905 926 tpl: 906 927 907 928 new Ext.XTemplate( 908 929 '<tpl for=".">', 909 '<div class="rrd-float">< img src="../../graph.php?z=small&c={c}&h={h}&l={l}&v={v}&x={x}&r=job&jr={jr}&js={js}" border="0"></div>',930 '<div class="rrd-float"><a href="../../graph.php?z=large&c={c}&h={h}&l={l}&v={v}\&x={x}&r=job&jr={jr}&js={js}" border="0" rel="lightbox[{jid}]"><img src="../../graph.php?z=small&c={c}&h={h}&l={l}&v={v}&x={x}&r=job&jr={jr}&js={js}" border="0"></a></div>', 910 931 '</tpl>' 911 932 ) … … 927 948 autoHeight: true, 928 949 autoWidth: true, 929 //margins: '2 2 2 0', 930 //layout: 'fit', 950 autoScroll: true, 931 951 resizeTabs: true, 932 952 minTabWidth: 60, … … 935 955 enableTabScroll:true, 936 956 resizeTabs: true, 937 //defaults: {autoScroll:true}, 938 listeners: 939 { 940 'tabchange': 957 // RB TODO: range combobox; hour, day, week, etc 958 959 tbar: 960 [ 961 new Ext.form.ComboBox( 941 962 { 942 scope: this, 943 fn: function( myTabPanel, tab ) 963 fieldLabel: 'Metric', 964 store: MetricsDataStore, 965 valueField: 'name', 966 displayField: 'name', 967 typeAhead: true, 968 mode: 'remote', 969 triggerAction: 'all', 970 emptyText: 'load_one', 971 selectOnFocus: true, 972 xtype: 'combo', 973 width: 190, 974 listeners: 975 { 976 select: 977 978 function(combo, record, index) 944 979 { 945 //myTabPanel.items[0].refresh(); 946 //this.view.refresh(); 980 var metric = record.data.name; 981 // doe iets 982 983 // RB: misschien zo metric opgeven aan datastore? 984 //items[0].items[0].getStore().baseParams.metric = metric; 947 985 } 948 } 949 } 986 } 987 }) 988 ] 950 989 }); 951 990 … … 966 1005 animCollapse: true, 967 1006 maximizable: true, 968 autoScroll: true,969 defaults: {autoScroll:true},1007 //autoScroll: true, 1008 //defaults: {autoScroll:true}, 970 1009 title: 'Node graph details', 971 //layout: 'fit', 972 tbar: 1010 tbar: panel, 973 1011 974 // RB TODO: range combobox; hour, day, week, etc975 976 new Ext.form.ComboBox(977 {978 fieldLabel: 'Metric',979 store: MetricsDataStore,980 valueField: 'name',981 displayField: 'name',982 typeAhead: true,983 mode: 'remote',984 triggerAction: 'all',985 emptyText: 'load_one',986 selectOnFocus: true,987 xtype: 'combo',988 width: 190,989 listeners:990 {991 select:992 993 function(combo, record, index)994 {995 var metric = record.data.name;996 // doe iets997 998 // RB: misschien zo metric opgeven aan datastore?999 //items[0].items[0].getStore().baseParams.metric = metric;1000 }1001 }1002 }),1003 1004 items: [ panel ],1005 1012 listeners: 1006 1013 { … … 1009 1016 function( myWindow, width, height ) 1010 1017 { 1011 //var myPanel = myWindow.getComponent( 'tabPanel' ).getEl();1012 1018 var myPanel = myWindow.items.get( 'tabPanel' ); 1013 1014 1019 var myView = myPanel.getActiveTab(); 1015 1020 1016 //myView.doLayout();1017 1021 myPanel.doLayout(); 1018 1022 myWindow.doLayout(); … … 1058 1062 for( var w=0; w<=windowCount; w++ ) 1059 1063 { 1060 if( graphWindowBehaviour == 'tabbed-prev-window')1064 if( ( graphWindowBehaviour == 'tabbed-prev-window' ) && ( previousGraphWindow != null ) && ( previousGraphPanel != null ) ) 1061 1065 { 1062 1066 myWindow = previousGraphWindow; … … 1103 1107 clicksToEdit: 1, 1104 1108 loadMask: true, 1105 selModel: new Ext.grid.RowSelectionModel( {singleSelect:false}),1109 selModel: new Ext.grid.RowSelectionModel( { singleSelect: false } ), 1106 1110 stripeRows: true, 1107 1111 sm: CheckJobs,
Note: See TracChangeset
for help on using the changeset viewer.