Changeset 643


Ignore:
Timestamp:
08/05/09 12:56:12 (15 years ago)
Author:
ramonb
Message:

job_monarch/js/monarch.js:

  • added nodeWindow
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/web/addons/job_monarch/js/monarch.js

    r642 r643  
    974974                        region:         'center',
    975975                        title:          jid,
    976                         style:          'overflow:auto, heigth: auto',
     976                        //style:                'overflow:auto, heigth: auto',
     977                        bodyStyle:      'overflow:auto; background: transparent; heigth: auto',
    977978                        multiSelect:    true,
    978979                        //autoHeight:   true,
     
    987988                                new Ext.XTemplate(
    988989                                        '<tpl for=".">',
    989                                         '<div class="rrd-float"><a href="./graph.php?z=large&{ga}" border="0" rel="lightbox[{jid}.{[globalWindowCount]}]"><img src="./graph.php?z=small&{ga}" border="0"></a></div>',
     990                                        //'<div class="rrd-float"><a href="./graph.php?z=large&{ga}" border="0" rel="lightbox[{jid}.{[globalWindowCount]}]"><img src="./graph.php?z=small&{ga}" border="0"></a></div>',
     991                                        '<div class="rrd-float"><img src="./graph.php?z=small&{ga}" border="0" style="cursor:pointer" onclick="nodeWindow(\'node x\', \'{ga}\');"></a></div>',
    990992                                        '</tpl>')
    991993                });
     
    994996}
    995997
     998
    996999function createGraphTab( view, jobid )
    9971000{
     
    10001003                new Ext.Panel(
    10011004                {
    1002                         title:  jobid,
    1003                         layout: 'border',
     1005                        title:          jobid,
     1006                        layout:         'border',
     1007                        bodyStyle:      'overflow:auto; background: transparent; heigth: auto',
     1008                        closable:       true,
    10041009
    10051010                        items:
     
    10821087                                                        //var parentPanel       = Ext.getCmp( this.el.up( 'div.x-tab-panel' ).id );
    10831088                                        //              var my_dataview = parentPanel.getActiveTab().findByType(Ext.DataView);
     1089                                        //              alert( my_dataview.xtype );
    10841090
    10851091                                        //              my_dataview.getStore().baseParams.metricname    = metric;
     
    11451151
    11461152        return graphWindow;
     1153}
     1154
     1155function nodeWindow( node, node_url )
     1156{
     1157        source_url      = '../../?c=' + myparams.c + '&h=' + node_url;
     1158
     1159        var nodePanel = new Ext.Panel(
     1160        {
     1161                html:   '<iframe style="overflow:auto;width:100%;height:100%;background: transparent;" frameborder="0"  src="' + source_url + '"></iframe>',
     1162                layout: 'fit',
     1163                tbar:
     1164                [
     1165                        {
     1166                                text:           'Back',
     1167                                handler:        function()
     1168                                {
     1169                                        history.back();
     1170                                }
     1171                        },
     1172                        {
     1173                                text:           'Forward',
     1174                                handler:        function()
     1175                                {
     1176                                        history.forward();
     1177                                }
     1178                        },
     1179                        {
     1180                                text:           'Reload',
     1181                                handler:        function()
     1182                                {
     1183                                        my_panel        = this.findParentByType('panel').getEl();
     1184                                        my_frame        = my_panel.child('iframe', true);
     1185
     1186                                        my_frame.contentDocument.location.reload();
     1187                                }
     1188                        }
     1189                ],
     1190        });
     1191
     1192        var win = new Ext.Window(
     1193        {
     1194                width:          800,
     1195                //id:           'autoload-win',
     1196                height:         300,
     1197                maximizable:    true,
     1198                //autoScroll:   true,
     1199                title:          node,
     1200                layout:         'fit',
     1201                items:          [ nodePanel ],
     1202                listeners:
     1203                {
     1204                        show:   function()
     1205                        {
     1206                                this.loadMask = new Ext.LoadMask(this.body, {
     1207                                        msg:'Loading. Please wait...'
     1208                                 });
     1209                        }
     1210                }
     1211        });
     1212
     1213        win.show();
    11471214}
    11481215
Note: See TracChangeset for help on using the changeset viewer.