Changeset 553


Ignore:
Timestamp:
07/15/08 09:55:27 (14 years ago)
Author:
ramonb
Message:

job_monarch/templates/header.tpl:

  • load Window's after showing, so that loadMask is displayed

job_monarch/jobstore.php:

  • new summary task for summarywindow

job_monarch/js/jobgrid.js:

  • some code cleanup
Location:
trunk/web2/addons/job_monarch
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/web2/addons/job_monarch/jobstore.php

    r550 r553  
    7878    case "LISTING":
    7979        getList();
     80        break;         
     81    case "SUMMARY":
     82        getSummary();
    8083        break;         
    8184    default:
  • trunk/web2/addons/job_monarch/js/jobgrid.js

    r552 r553  
    119119{
    120120  bubbling = bubbling || false;
    121   if(window.addEventListener)   { // Standard
     121  if(window.addEventListener)
     122  { // Standard
    122123    element.addEventListener(type, expression, bubbling);
    123124    return true;
    124   } else if(window.attachEvent) { // IE
     125  }
     126  else if(window.attachEvent)
     127  { // IE
    125128    element.attachEvent('on' + type, expression);
    126129    return true;
    127   } else return false;
     130  }
     131  else
     132    return false;
    128133}
    129134
     
    135140};
    136141
    137 ImageLoader.prototype = {
    138   load:function(){
     142ImageLoader.prototype =
     143{
     144  load:function()
     145  {
    139146    var url = this.url;
    140147    var image = this.image;
    141148    var loadEvent = this.loadEvent;
    142     addListener(this.image, 'load', function(e){
    143       if(loadEvent != null){
    144         loadEvent(url, image);
     149    addListener( this.image, 'load', function(e)
     150    {
     151      if( loadEvent != null )
     152      {
     153        loadEvent( url, image );
    145154      }
    146155    }, false);
    147156    this.image.src = this.url;
    148157  },
    149   getImage:function(){
     158  getImage: function()
     159  {
    150160    return this.image;
    151161  }
     
    161171
    162172  var newClusterImage = new ImageLoader( 'clusterimage', img_url );
    163   newClusterImage.loadEvent = function( url, image ) {ClusterImageWindow.getBottomToolbar().clearStatus({useDefaults:true});}
     173  newClusterImage.loadEvent = function( url, image )
     174    {
     175      ClusterImageWindow.getBottomToolbar().clearStatus( { useDefaults:true } );
     176    }
    164177
    165178  ClusterImageWindow.getBottomToolbar().showBusy();
     
    235248      id: 'JobsDataStore',
    236249      proxy: JobProxy,
    237       baseParams:{task: "LISTING"}, // this parameter is passed for any HTTP request
     250      baseParams: { task: "LISTING" },
    238251      reader: new Ext.data.JsonReader({
    239252        root: 'results',
     
    247260        {name: 'name', type: 'string', mapping: 'name'},
    248261        {name: 'requested_time', type: 'string', mapping: 'requested_time'},
    249         //{name: 'requested_memory', type: 'string', mapping: 'requested_memory'},
     262        {name: 'requested_memory', type: 'string', mapping: 'requested_memory'},
    250263        {name: 'ppn', type: 'int', mapping: 'ppn'},
    251264        {name: 'nodect', type: 'int', mapping: 'nodect'},
     
    255268        {name: 'runningtime', type: 'string', mapping: 'runningtime'}
    256269      ]),
    257       sortInfo: {field: 'jid', direction: "ASC"},
     270      sortInfo: { field: 'jid', direction: "DESC" },
    258271      remoteSort: true
    259272    });
  • trunk/web2/addons/job_monarch/templates/header.tpl

    r552 r553  
    1717Ext.onReady( function(){
    1818  initJobGrid();
    19   JobProxy.on('beforeload', function(p, params) {
     19  JobProxy.on('beforeload', function(p, params)
     20    {
    2021        params.c = "{cluster}";
    2122        newparams = joinMyArray( params, myfilters );
     
    2324        params = newparams;
    2425    });
     26
    2527  ClusterImageArgs['{session_name}'] = '{session_id}';
    2628  ClusterImageArgs['c'] = '{cluster}';
     29
    2730  ClusterImageWindow.html = '<IMG ID="clusterimage" SRC="{clusterimage}" USEMAP="#MONARCH_CLUSTER_BIG" BORDER="0">';
    2831  ClusterImageWindow.height = '{clusterimage_height}';
     
    3033  ClusterImageWindow.x = (window.innerWidth - ClusterImageWindow.width - 25);
    3134  ClusterImageWindow.show();
    32   JobsDataStore.load( {params: {start: 0, limit: 30}} );
     35  reloadClusterImage();
     36
    3337  JobListingWindow.setTitle( "{cluster} Jobs Overview" );
    3438  JobListingWindow.y = ({clusterimage_height} + 150);
    3539  JobListingWindow.show();
     40  reloadJobStore();
    3641  });
    3742</script>
Note: See TracChangeset for help on using the changeset viewer.