source: trunk/web2/addons/job_monarch/js/monarch.js @ 591

Last change on this file since 591 was 591, checked in by ramonb, 15 years ago

job_monarch/templates/header.tpl,
job_monarch/js/jobgrid.js -> job_monarch/js/monarch.js:

  • renamed

job_monarch/templates/overview.tpl.orig:

  • cleanup
File size: 21.4 KB
Line 
1var JobsDataStore;
2var JobsColumnModel;
3var JobListingEditorGrid;
4var JobListingWindow;
5var JobProxy;
6var SearchField;
7var filterButton;
8var myfilters = { };
9var myparams = { };
10var mylimit = 15;
11var ClusterImageArgs = { };
12
13var filterfields = [ "jid", "queue", "name", "owner" ];
14
15var filterMenu = new Ext.menu.Menu({
16    id: 'filterMenu',
17    items: [ new Ext.menu.Item({ text: 'Clear all', handler: clearFilters }) ]
18});
19
20var filterButton = new Ext.MenuButton({
21                        id: 'filtermenuknop',
22                        text: 'Filters',
23                        disabled: true,
24                        menu: filterMenu,
25                      listeners:  {
26                                'click': {
27                                        scope: this,
28                                        fn: function( myButton, event )
29                                                {
30                                                        myButton.menu.show( myButton.getEl() );
31                                                }
32                                }
33                        }
34
35                });
36
37Ext.namespace('Ext.ux');
38
39Ext.ux.PageSizePlugin = function() {
40    Ext.ux.PageSizePlugin.superclass.constructor.call(this, {
41        store: new Ext.data.SimpleStore({
42            fields: ['text', 'value'],
43            data: [['10', 10], ['15', 15], ['20', 20], ['30', 30], ['50', 50], ['100', 100], ['max', 'max' ]]
44        }),
45        mode: 'local',
46        displayField: 'text',
47        valueField: 'value',
48        editable: false,
49        allowBlank: false,
50        triggerAction: 'all',
51        width: 40
52    });
53};
54
55Ext.extend(Ext.ux.PageSizePlugin, Ext.form.ComboBox, {
56    init: function(paging) {
57        paging.on('render', this.onInitView, this);
58    },
59   
60    onInitView: function(paging) {
61        paging.add('-',
62            this,
63            'jobs per page'
64        );
65        this.setValue(paging.pageSize);
66        this.on('select', this.onPageSizeChanged, paging);
67    },
68   
69    onPageSizeChanged: function(combo) {
70        if ( combo.getValue() == 'max' )
71          mylimit = JobsDataStore.getTotalCount();
72        else
73          mylimit = parseInt(combo.getValue());
74        this.pageSize = mylimit;
75        this.doLoad(0);
76    }
77});
78
79Ext.namespace( 'Ext' );
80
81function clearFilters()
82{
83        if( inMyArrayKeys( myfilters, 'query' ) )
84        {
85                SearchField.getEl().dom.value = '';
86                delete SearchField.store.baseParams['query'];
87                delete myfilters['query'];
88                delete myparams['query'];
89        }
90        if( inMyArrayKeys( myfilters, 'host' ) )
91        {
92                delete myfilters['host'];
93                delete myparams['host'];
94        }
95        if( inMyArrayKeys( myfilters, 'jid' ) )
96        {
97                delete myfilters['jid'];
98                delete myparams['jid'];
99        }
100        if( inMyArrayKeys( myfilters, 'queue' ) )
101        {
102                delete myfilters['queue'];
103                delete myparams['queue'];
104        }
105        if( inMyArrayKeys( myfilters, 'owner' ) )
106        {
107                delete myfilters['owner'];
108                delete myparams['owner'];
109        }
110        if( inMyArrayKeys( myfilters, 'status' ) )
111        {
112                delete myfilters['status'];
113                delete myparams['status'];
114        }
115        reloadJobStore();
116}
117
118function makeArrayURL( somearr )
119{
120  filter_url = '';
121  filter_sep = '';
122
123  for( filtername in somearr )
124  {
125    filter_url = filter_url + filter_sep + filtername + '=' + somearr[filtername];
126    filter_sep = '&';
127  }
128
129  return filter_url;
130}
131
132
133function isset( somevar )
134{
135  try
136  {
137    if( eval( somevar ) ) { }
138  }
139  catch( err )
140  {
141    return false;
142  }
143  return true;
144}
145
146function inMyArray( arr, someval )
147{
148  for( arval in arr )
149  {
150    if( arval == someval )
151    {
152      return true;
153    }
154  }
155  return false;
156}
157
158function ArraySize( arr )
159{
160  count = 0;
161
162  for( arkey in arr )
163  {
164    count = count + 1;
165  }
166
167  return count;
168}
169
170function inMyArrayValues( arr, someval )
171{
172  for( arkey in arr )
173  {
174    if( arr[arkey] == someval )
175    {
176      return true;
177    }
178  }
179  return false;
180}
181
182function inMyArrayKeys( arr, someval )
183{
184  for( arkey in arr )
185  {
186    if( arkey == someval )
187    {
188      return true;
189    }
190  }
191  return false;
192}
193
194function joinMyArray( arr1, arr2 )
195{
196  for( arkey in arr2 )
197  {
198    arr1[arkey] = arr2[arkey];
199  }
200
201  return arr1;
202}
203
204function ClusterImageSelectHost( somehost )
205{
206
207  if( !inMyArrayKeys( myfilters, 'host' ) )
208  {
209    myfilters['host'] = somehost;
210  }
211  else
212  {
213    if( myfilters['host'] == somehost )
214    {
215      delete myfilters['host'];
216      delete myparams['host'];
217    }
218    else
219    {
220      myfilters['host'] = somehost;
221    }
222  }
223
224  reloadClusterImage();
225  reloadJobStore();
226
227  return false;
228}
229
230function reloadJobStore()
231{
232  // Respect any other parameters that may have been set outside filters
233  //
234  myparams = joinMyArray( myparams, myfilters );
235
236  // Can't be sure if there are enough pages for new filter: reset to page 1
237  //
238  myparams = joinMyArray( myparams, { start: 0, limit: mylimit } );
239
240  JobsDataStore.reload( { params: myparams } );
241}
242
243function addListener(element, type, expression, bubbling)
244{
245  bubbling = bubbling || false;
246  if(window.addEventListener)
247  { // Standard
248    element.addEventListener(type, expression, bubbling);
249    return true;
250  } 
251  else if(window.attachEvent) 
252  { // IE
253    element.attachEvent('on' + type, expression);
254    return true;
255  } 
256  else 
257    return false;
258}
259
260function makeFilterString()
261{
262  var filter_str = '';
263
264  for( arkey in myfilters )
265  {
266    filter_str = filter_str + ' > ' + myfilters[arkey];
267  }
268
269  return filter_str;
270}
271
272var ImageLoader = function( id, url )
273{
274  this.url = url;
275  this.image = document.getElementById( id );
276  this.loadEvent = null;
277};
278
279ImageLoader.prototype = 
280{
281  load:function()
282  {
283    var url = this.url;
284    var image = this.image;
285    var loadEvent = this.loadEvent;
286    addListener( this.image, 'load', function(e)
287    {
288      if( loadEvent != null )
289      {
290        loadEvent( url, image );
291      }
292    }, false);
293    this.image.src = this.url;
294  },
295  getImage: function()
296  {
297    return this.image;
298  }
299};
300
301function achorJobListing()
302{
303  JobListingWindow.anchorTo( "ClusterImageWindow", "tr-br", [ 0, 10 ] );
304}
305
306function setClusterImagePosition()
307{
308  ci_x = (window.innerWidth - ClusterImageWindow.getSize()['width'] - 20); 
309  ClusterImageWindow.setPosition( ci_x, 10 );
310}
311
312function deselectFilterMenu( menuItem, event )
313{
314  filterValue = menuItem.text;
315
316  if( filterValue == SearchField.getEl().dom.value && inMyArrayKeys( myfilters, 'query' ) )
317  {
318    SearchField.getEl().dom.value = '';
319    delete SearchField.store.baseParams['query'];
320  }
321
322  for( arkey in myfilters )
323  {
324    if( myfilters[arkey] == filterValue )
325    {
326      delete myfilters[arkey];
327      delete myparams[arkey];
328    }
329  }
330  reloadJobStore();
331}
332
333function makeFilterMenu()
334{
335  var filterMenu = new Ext.menu.Menu({
336      id: 'filterMenu',
337      items: [ new Ext.menu.Item({ text: 'Clear all', handler: clearFilters }) ]
338  });
339
340  if( ArraySize( myfilters ) > 0 )
341  {
342    filterMenu.addSeparator();
343  }
344
345  for( arkey in myfilters )
346  {
347    filterMenu.add( new Ext.menu.CheckItem({ text: myfilters[arkey], handler: deselectFilterMenu, checked: true }) );
348  }
349
350  if( filterButton )
351  {
352    filterButton.menu = filterMenu;
353
354    if( ArraySize( myfilters ) > 0 )
355    {
356      filterButton.enable();
357    }
358    else
359    {
360      filterButton.disable();
361    }
362  }
363}
364
365function reloadClusterImage()
366{
367  ClusterImageArgs['view'] = 'big-clusterimage';
368
369  filt_url = makeArrayURL( myfilters );
370  imag_url = makeArrayURL( ClusterImageArgs );
371  img_url = './image.php?' + filt_url + '&' + imag_url;
372
373  var newClusterImage = new ImageLoader( 'clusterimage', img_url );
374  newClusterImage.loadEvent = function( url, image ) 
375    {
376      ClusterImageWindow.getBottomToolbar().clearStatus( { useDefaults:true } );
377      setTimeout( "resizeClusterImage()", 250 );
378      setTimeout( "setClusterImagePosition()", 500 );
379      //setTimeout( "achorJobListing()", 1000 );
380    }
381
382  ClusterImageWindow.getBottomToolbar().showBusy();
383
384  filter_str = 'Nodes' + makeFilterString();
385  ClusterImageWindow.setTitle( filter_str );
386
387  newClusterImage.load();
388}
389
390function resizeClusterImage()
391{
392  var ci_height = document.getElementById( "clusterimage" ).height + ClusterImageWindow.getFrameHeight();
393  var ci_width = document.getElementById( "clusterimage" ).width + ClusterImageWindow.getFrameWidth();
394
395  ClusterImageWindow.setSize( ci_width, ci_height );
396}
397
398Ext.apply(Ext.form.VTypes, {
399        num: function(val, field) {
400
401                if (val) {
402                   var strValidChars = "0123456789";
403                   var blnResult = true;
404
405                   if (val.length == 0) return false;
406
407                   //  test strString consists of valid characters listed above
408                   for (i = 0; i < val.length && blnResult == true; i++)
409                      {
410                      strChar = val.charAt(i);
411                      if (strValidChars.indexOf(strChar) == -1)
412                         {
413                         blnResult = false;
414                         }
415                      }
416                   return blnResult;
417
418                }
419                },
420        numText: 'Must be numeric'
421});
422
423function initJobGrid() {
424
425  Ext.QuickTips.init();
426
427  function jobRowSelect( selModel ) 
428  {
429    if( selModel.hasSelection() )
430    {
431      showGraphsButton.enable();
432    }
433    else
434    {
435      showGraphsButton.disable();
436    }
437  }
438
439  function jobCellClick(grid, rowIndex, columnIndex, e)
440  {
441    var record = grid.getStore().getAt(rowIndex);  // Get the Record
442    var fieldName = grid.getColumnModel().getDataIndex(columnIndex);
443    var data = record.get(fieldName);
444    var view = grid.getView();
445    var cell = view.getCell( rowIndex, columnIndex );
446    var filter_title = false;
447    var fil_dis = 'filter';
448    var fil_ena = 'filterenabled';
449    var filterName = fieldName;
450
451    if( fieldName == 'owner' || fieldName == 'jid' || fieldName == 'status' || fieldName == 'queue' || fieldName == 'nodes')
452    {
453      if( fieldName == 'nodes' )
454      {
455        filterName = 'host';
456        fil_dis = 'nodesfilter';
457        fil_ena = 'nodesfilterenabled';
458      }
459      if( inMyArrayKeys( myfilters, filterName ) )
460      {
461        Ext.fly(cell).removeClass( fil_ena );
462        Ext.fly(cell).addClass( fil_dis );
463
464        // Remove this filter
465        //
466        delete myfilters[filterName];
467        delete myparams[filterName];
468
469        reloadJobStore();
470        //reloadClusterImage();
471      }
472      else
473      {
474        Ext.fly(cell).removeClass( fil_dis );
475        Ext.fly(cell).addClass( fil_ena );
476
477        if( fieldName == 'nodes' )
478        { // Get the first node (master mom) as node filter
479          new_data = data.split( ',' )[0];
480          data = new_data;
481        }
482
483        // Set filter for selected column to selected cell value
484        //
485        myfilters[filterName] = data;
486
487        reloadJobStore();
488        //reloadClusterImage();
489      }
490      JobListingWindow.setTitle( filter_str );
491      filter_title = true;
492      filter_str = myparams.c + ' Jobs Overview' + makeFilterString();
493    }
494  }
495
496  function jobCellRender( value, metadata, record, rowindex, colindex, store )
497  {
498    var fieldName = JobsColumnModel.getColumnById( colindex ).dataIndex;
499    var fil_dis = 'filter';
500    var fil_ena = 'filterenabled';
501    var filterName = fieldName;
502
503    if( fieldName == 'owner' || fieldName == 'jid' || fieldName == 'status' || fieldName == 'queue' || fieldName == 'nodes' )
504    {
505      if( fieldName == 'nodes' )
506      {
507        fil_dis = 'nodesfilter';
508        fil_ena = 'nodesfilterenabled';
509        filterName = 'host';
510      }
511      if( myfilters[filterName] != null )
512      {
513        metadata.css = fil_ena;
514      }
515      else
516      {
517        metadata.css = fil_dis;
518      }
519    }
520    return value;
521  }
522
523  JobProxy = new Ext.data.HttpProxy({
524                url: 'jobstore.php',
525                method: 'POST'
526            });
527
528
529  JobsDataStore = new Ext.data.Store({
530      id: 'JobsDataStore',
531      proxy: JobProxy,
532      baseParams: { task: "GETJOBS" },
533      reader: new Ext.data.JsonReader({
534        root: 'results',
535        totalProperty: 'total',
536        id: 'id'
537      },[
538        {name: 'jid', type: 'int', mapping: 'jid'},
539        {name: 'status', type: 'string', mapping: 'status'},
540        {name: 'owner', type: 'string', mapping: 'owner'},
541        {name: 'queue', type: 'string', mapping: 'queue'},
542        {name: 'name', type: 'string', mapping: 'name'},
543        {name: 'requested_time', type: 'string', mapping: 'requested_time'},
544        {name: 'requested_memory', type: 'string', mapping: 'requested_memory'},
545        {name: 'ppn', type: 'int', mapping: 'ppn'},
546        {name: 'nodect', type: 'int', mapping: 'nodect'},
547        {name: 'nodes', type: 'string', mapping: 'nodes'},
548        {name: 'queued_timestamp', type: 'string', mapping: 'queued_timestamp'},
549        {name: 'start_timestamp', type: 'string', mapping: 'start_timestamp'},
550        {name: 'runningtime', type: 'string', mapping: 'runningtime'}
551      ]),
552      sortInfo: { field: 'jid', direction: "DESC" },
553      remoteSort: true,
554      listeners:
555        { 
556                'beforeload':
557                {
558                        scope: this,
559                        fn: function()
560                        {
561                                if( SearchField )
562                                {
563                                        search_value = SearchField.getEl().dom.value;
564                                        if( search_value == '' )
565                                        {
566                                                delete SearchField.store.baseParams['query'];
567                                                delete myfilters['query'];
568                                                delete myparams['query'];
569                                        }
570                                        else
571                                        {
572                                                myfilters['query']      = search_value;
573                                        }
574
575                                        makeFilterMenu();
576                                        reloadClusterImage();
577
578                                        filter_str = myparams.c + ' Jobs Overview' + makeFilterString();
579                                        JobListingWindow.setTitle( filter_str );
580                                }
581                        }
582                } //,
583                //'load':
584                //{
585                //      scope: this,
586                //      fn: function()
587                //      {
588                //              if( SearchField )
589                //              {
590                //                      search_value = SearchField.getEl().dom.value;
591
592                //                      if( search_value != '' )
593                //                      {
594                //                              myfilters['query']      = search_value;
595                //                      }
596
597                //                      reloadClusterImage();
598
599                //                      filter_str = myparams.c + ' Jobs Overview' + makeFilterString();
600                //                      JobListingWindow.setTitle( filter_str );
601
602                //                      if( search_value != '' )
603                //                      {
604                //                              delete myfilters['query'];
605                //                      }
606                //              }
607                //      }
608                //}
609        }
610    });
611   
612  var CheckJobs = new Ext.grid.CheckboxSelectionModel();
613
614  JobsColumnModel = new Ext.grid.ColumnModel(
615    [ CheckJobs,
616    {
617        header: '#',
618        tooltip: 'Job id',
619        readOnly: true,
620        dataIndex: 'jid',
621        width: 50,
622        hidden: false,
623        renderer: jobCellRender
624      },{
625        header: 'S',
626        tooltip: 'Job status',
627        readOnly: true,
628        dataIndex: 'status',
629        width: 20,
630        hidden: false,
631        renderer: jobCellRender
632      },{
633        header: 'User',
634        tooltip: 'Owner of job',
635        readOnly: true,
636        dataIndex: 'owner',
637        width: 60,
638        hidden: false,
639        renderer: jobCellRender
640      },{
641        header: 'Queue',
642        tooltip: 'In which queue does this job reside',
643        readOnly: true,
644        dataIndex: 'queue',
645        width: 60,
646        hidden: false,
647        renderer: jobCellRender
648      },{
649        header: 'Name',
650        tooltip: 'Name of job',
651        readOnly: true,
652        dataIndex: 'name',
653        width: 100,
654        hidden: false
655      },{
656        header: 'Requested Time',
657        tooltip: 'Amount of requested time (wallclock)',
658        readOnly: true,
659        dataIndex: 'requested_time',
660        width: 100,
661        hidden: false
662      },{
663        header: 'Requested Memory',
664        tooltip: 'Amount of requested memory',
665        readOnly: true,
666        dataIndex: 'requested_memory',
667        width: 100,
668        hidden: true
669      },{
670        header: 'P',
671        tooltip: 'Number of processors per node (PPN)',
672        readOnly: true,
673        dataIndex: 'ppn',
674        width: 25,
675        hidden: false
676      },{
677        header: 'N',
678        tooltip: 'Number of nodes (hosts)',
679        readOnly: true,
680        dataIndex: 'nodect',
681        width: 25,
682        hidden: false
683      },{
684        header: 'Nodes',
685        readOnly: true,
686        dataIndex: 'nodes',
687        width: 100,
688        hidden: false,
689        renderer: jobCellRender
690      },{
691        header: 'Queued',
692        tooltip: 'At what time did this job enter the queue',
693        readOnly: true,
694        dataIndex: 'queued_timestamp',
695        width: 120,
696        hidden: false
697      },{
698        header: 'Started',
699        tooltip: 'At what time did this job enter the running status',
700        readOnly: true,
701        dataIndex: 'start_timestamp',
702        width: 120,
703        hidden: false
704      },{
705        header: 'Runningtime',
706        tooltip: 'How long has this job been in the running status',
707        readOnly: true,
708        dataIndex: 'runningtime',
709        width: 140,
710        hidden: false
711      }]
712    );
713    JobsColumnModel.defaultSortable= true;
714
715  var win;
716
717  MetricsDataStore = new Ext.data.Store({
718      id: 'MetricsDataStore',
719      proxy: JobProxy,
720      autoLoad: false,
721      baseParams: { task: "GETMETRICS" },
722      reader: new Ext.data.JsonReader({
723        root: 'names',
724        totalProperty: 'total',
725        id: 'id'
726      },[{
727        name: 'ID'
728      },{
729        name: 'name'
730        }])
731  });
732
733  SearchField   = new Ext.app.SearchField({
734                                store: JobsDataStore,
735                                params: {start: 0, limit: mylimit},
736                                width: 200
737                    });
738
739  NodesDataStore = new Ext.data.Store({
740      id: 'NodesDataStore',
741      proxy: JobProxy,
742      autoLoad: false,
743      baseParams: { task: "GETNODES" },
744      reader: new Ext.data.JsonReader({
745        root: 'results',
746        totalProperty: 'total',
747        id: 'id'
748      },[
749        {name: 'c', type: 'string', mapping: 'c'},
750        {name: 'h', type: 'string', mapping: 'h'},
751        {name: 'x', type: 'string', mapping: 'x'},
752        {name: 'v', type: 'string', mapping: 'v'},
753        {name: 'l', type: 'string', mapping: 'l'},
754        {name: 'jr', type: 'string', mapping: 'jr'},
755        {name: 'js', type: 'string', mapping: 'js'}
756      ]),
757      listeners: {
758                'beforeload': {
759                        scope: this,
760                        fn: function() {
761                                        var jids;
762
763                                        var row_records = CheckJobs.getSelections();
764
765                                        for(var i=0; i<row_records.length; i++ )
766                                        {
767                                                rsel = row_records[i];
768                                                if( !jids )
769                                                {
770                                                        jids = rsel.get('jid');
771                                                }
772                                                else
773                                                {
774                                                        jids = jids + ',' + rsel.get('jid');
775                                                }
776                                        }
777                                        NodesDataStore.baseParams.jids  = jids;
778                                        NodesDataStore.baseParams.c     = myparams.c;
779                        }
780                }
781        }
782    });
783
784function ShowGraphs( Button, Event ) {
785   
786    var GraphView = new Ext.DataView({
787        itemSelector: 'thumb',
788        style:'overflow:auto',
789        multiSelect: true,
790        store: NodesDataStore,
791        tpl: new Ext.XTemplate(
792            '<tpl for=".">',
793            '<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>',
794            '</tpl>'
795        )
796    });
797
798    var images = new Ext.Panel({
799        id:'images',
800        //title:'My Images',
801        region:'center',
802        bodyStyle: 'background: transparent',
803        //margins: '2 2 2 0',
804        layout:'fit',
805        items: GraphView
806    });
807
808        if(!win){
809            win = new Ext.Window({
810                        animateTarget: Button,
811                        width       : 500,
812                        height      : 300,
813                        closeAction :'hide',
814                        collapsible: true,
815                        animCollapse: true,
816                        maximizable: true,
817                        title:  'Node graph details',
818                        layout: 'fit',
819                        tbar:   new Ext.form.ComboBox({
820                                        fieldLabel: 'Metric',
821                                        //hiddenName:'ID',
822                                        store: MetricsDataStore,
823                                        valueField:'name',
824                                        displayField:'name',
825                                        typeAhead: true,
826                                        mode: 'remote',
827                                        triggerAction: 'all',
828                                        emptyText:'Select metric',
829                                        selectOnFocus:true,
830                                        xtype: 'combo',
831                                        width:190,
832                                        listeners: {
833                                                select: function(combo, record, index){
834                                                        var metric = record.data.name;
835                                                        // doe iets
836                                                }
837                                        }
838                                       
839                                }),
840                        items:  [ images ]
841                    });
842        }
843        NodesDataStore.load();
844        win.show(Button);
845}
846
847  showGraphsButton = new Ext.Button({
848                                text: 'Show graphs',
849                                tooltip: 'Show node graphs for selected jobs',
850                                iconCls: 'option',
851                                disabled: true,
852                                listeners: {
853                                        'click': {
854                                                scope: this,
855                                                fn: ShowGraphs
856                                        }
857                                }
858                        });
859
860  JobListingEditorGrid =  new Ext.grid.EditorGridPanel({
861      id: 'JobListingEditorGrid',
862      store: JobsDataStore,
863      cm: JobsColumnModel,
864      enableColLock:false,
865      clicksToEdit:1,
866      loadMask: true,
867      selModel: new Ext.grid.RowSelectionModel({singleSelect:false}),
868      stripeRows: true,
869      sm: CheckJobs,
870      bbar: new Ext.PagingToolbar({
871                pageSize: 15,
872                store: JobsDataStore,
873                displayInfo: true,
874                displayMsg: 'Displaying jobs {0} - {1} out of {2} jobs total found.',
875                emptyMsg: 'No jobs found to display',
876                plugins: [new Ext.ux.PageSizePlugin()]
877            }),
878      tbar: [ SearchField,
879                showGraphsButton,
880                filterButton ]
881    });
882
883  ClusterImageWindow = new Ext.Window({
884      id: 'ClusterImageWindow',
885      title: 'Nodes',
886      closable: true,
887      collapsible: true,
888      animCollapse: true,
889      width: 1,
890      height: 1,
891      y: 15,
892      plain: true,
893      shadow: true,
894      resizable: false,
895      shadowOffset: 10,
896      layout: 'fit',
897      bbar: new Ext.StatusBar({
898                defaultText: 'Ready.',
899                id: 'basic-statusbar',
900                defaultIconCls: ''
901        })
902    });
903
904  GraphSummaryWindow = new Ext.Window({
905      id: 'GraphSummaryWindow',
906      title: 'Graph Summary',
907      closable: true,
908      collapsible: true,
909      animCollapse: true,
910      width: 500,
911      height: 400,
912      x: 10,
913      y: 10,
914      plain: true,
915      shadow: true,
916      resizable: true,
917      shadowOffset: 10,
918      layout: 'table',
919      layoutConfig: {
920                columns: 2
921        },
922      defaults:{border: false},
923      items: [{
924        id: 'monarchlogo',
925        cls: 'monarch',
926        bodyStyle: 'background: transparent',
927        html: '<A HREF="https://subtrac.sara.nl/oss/jobmonarch/" TARGET="_blank"><IMG SRC="./jobmonarch.gif" ALT="Job Monarch" BORDER="0"></A>'
928        //colspan: 2
929       },{
930        id: 'summarycount'
931       },{
932        id: 'rjqjgraph'
933       },{
934        id: 'pie',
935        colspan: 2
936       }],
937      bbar: new Ext.StatusBar({
938                defaultText: 'Ready.',
939                id: 'basic-statusbar',
940                defaultIconCls: ''
941        })
942    });
943
944  JobListingWindow = new Ext.Window({
945      id: 'JobListingWindow',
946      title: 'Cluster Jobs Overview',
947      closable:true,
948      collapsible: true,
949      animCollapse: true,
950      maximizable: true,
951      y: 375,
952      width:860,
953      height:445,
954      plain:true,
955      shadow: true,
956      shadowOffset: 10,
957      layout: 'fit',
958      items: JobListingEditorGrid
959    });
960
961  JobListingEditorGrid.addListener( 'cellclick', jobCellClick );
962  CheckJobs.addListener( 'selectionchange', jobRowSelect );
963}
Note: See TracBrowser for help on using the repository browser.