Changeset 637


Ignore:
Timestamp:
08/03/09 21:21:10 (15 years ago)
Author:
ramonb
Message:

job_monarch/js/monarch.js:

  • fixed metric selection for graphs works now

job_monarch/jobstore.php:

  • fixed a scope error in metricname parsing from POST
Location:
trunk/web/addons/job_monarch
Files:
2 edited

Legend:

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

    r604 r637  
    2525$queue                  = isset($_POST['queue']) ? $_POST['queue'] : null;
    2626$host                   = isset($_POST['host']) ? $_POST['host'] : null;
    27 $metricname             = isset($_POST['metricname']) ? $_POST['metricname'] : 'load_one';
     27$p_metricname           = isset($_POST['metricname']) ? $_POST['metricname'] : 'load_one';
     28
     29//print_r( $_POST );
    2830
    2931if( $jids != null )
     
    446448function getNodes()
    447449{
    448         global $jobs, $jobids, $clustername, $metrics, $jid, $metricname;
     450        global $jobs, $jobids, $clustername, $metrics, $jid, $p_metricname;
    449451        global $always_timestamp, $always_constant;
    450452
    451453        $display_nodes  = array();
     454
     455        $metricname     = $p_metricname;
    452456
    453457        printCacheHeaders();
  • trunk/web/addons/job_monarch/js/monarch.js

    r636 r637  
    698698                        function( store, records, options )
    699699                        {
    700                                 if( records.length == 1 )
     700                                if( records.length == 1 ) // TODO: if job state is running
    701701                                {
    702702                                        jobid           = records[0].get('jid');
     
    959959                new Ext.DataView(
    960960                {
    961                         //id:           jid,   
     961                        //id:           jid,
     962                        id:             'jobPanel',
    962963                        itemSelector:   'thumb',
    963964                        title:          jid,
     
    996997                {
    997998                        id:             'tabPanel',
     999                        xtype:          'tabpanel',
    9981000                        //region:               'center',
    9991001                        //bodyStyle:    'background: transparent',
     
    10121014                        tbar:
    10131015                        [
     1016                                'Metric name: ',
    10141017                                new Ext.form.ComboBox(
    10151018                                {
     
    10261029                                        xtype:          'combo',
    10271030                                        width:          100,
    1028                                         myview:         view,
     1031                                        //myview:               view,
    10291032                                        listeners:
    10301033                                        {
     
    10331036                                                function(combo, record, index)
    10341037                                                {
    1035                                                         var metric = record.data.name;
    1036                                                         // doe iets
    1037 
    1038                                                         //this.myview.getStore().baseParams.metricname  = metric;
    1039                                                         //this.myview.refresh();
    1040                                                         // RB: misschien zo metric opgeven aan datastore?
    1041                                                         //items[0].items[0].getStore().baseParams.metric = metric;
     1038                                                        var metric      = record.data.name;
     1039
     1040                                                        parentPanel     = this.findParentByType( 'tabpanel' );
     1041                                                        my_dataview     = parentPanel.getActiveTab();
     1042
     1043                                                        my_dataview.getStore().baseParams.metricname    = metric;
     1044                                                        my_dataview.getStore().reload();
    10421045                                                }
    10431046                                        }
Note: See TracChangeset for help on using the changeset viewer.