Beispiel #1
0
<?php

/*
 * Use Extjs helper to dynamic create data store and column model javascript
 */
// use_helper('Extjs');
$extraDSfields = array('vnc_port', 'SfGuardGroupName', 'all_shared_disks', 'has_snapshots_disks', 'has_snapshots_support', 'has_devices');
$extraCMAttrs = array('Boot' => array('editor' => "bootCmb", 'scope' => 'this', 'renderer' => "function(value){\n\n                                                    var storage = bootCmb.getStore();\n                                                    var index = storage.find('value',value);\n                                                    var name = '';\n                                                    if(index!=-1) name = storage.getAt(index).data['name'];\n                                                    return name;\n\n                                }"), 'SfGuardGroupId' => array('editor' => "new Ext.form.ComboBox({\n                                valueField: 'Id',displayField: 'Name',pageSize:5,\n                                forceSelection: true,store: sfGuardGroup_ds,\n                                mode: 'remote',lazyRender: true,triggerAction: 'all',\n                                listClass: 'x-combo-list-small'})", 'renderer' => "rendersfGuardGroupName"));
$js_grid = js_grid_info($server_tableMap, true, $extraDSfields, $extraCMAttrs);
$js_sfGuard = js_grid_info($sfGuardGroup_tableMap);
?>
<script>



Ext.namespace('Server');

Server.Start = function(obj){
                                var node_id = obj.node_id;
                                var server_name = obj.data['name'];
                                var server_id = obj.data['id'];
                                var send_data = {'nid':node_id,
                                                 'server':server_name};

                                var start_openconsole = (obj.data['withconsole']) ? true : false;

                                var title = String.format(<?php 
echo json_encode(__('Start server'));
?>
);
Beispiel #2
0
<?php

/*
 * Use Extjs helper to dynamic create data store and column model javascript
 */
$extraDSfields = array('mem_text', 'mem_available', 'state_text');
$js_grid = js_grid_info($node_tableMap, true, $extraDSfields);
/*
 * Default data to be inserted in DB
 */
$default_model_values = array('default' => 'name', 'items' => array('name' => 'Change me...'));
// $insert_model = js_insert_model($node_form,$default_model_values);
?>
<script>

Ext.namespace('Node');
  Node.Grid = function(){
  return{
    init:function(config){
    Ext.QuickTips.init();

    var fm = Ext.form;    
    
    Ext.apply(this,config);


    var expander = new Ext.ux.grid.RowExpander({
        enableCaching : false,
        tpl : new Ext.XTemplate(
        '<p><b>UUID:</b> {uuid}&nbsp&nbsp <b>Port:</b> {port}<br>',
        '<b>VirtAgent status:</b>',
Beispiel #3
0
<?php

$extraDSfields = array('ServerName');
$js_grid = js_grid_info($network_tableMap, false, $extraDSfields);
/*
 * Default data to be inserted in DB
 */
//$default_model_values = array('default'=>'name','items'=>
//    array('name'=>'Change me...',
//                                      'server_id'=>$server_id,
//                                      'ip'=>'000.000.000.000',
//                                      'mask'=>'000.000.000.000'
//    )
//);
// $insert_model = js_insert_model($network_form,$default_model_values);
?>
<script>
/*
 * Partial networkGrid
 */
// shorthand alias
Ext.namespace('Network');
Network.Grid = function(){        

    return{
        init:function(config){
            Ext.QuickTips.init();

            Ext.apply(this,config);

            var cm = new Ext.grid.ColumnModel([<?php 
Beispiel #4
0
<?php

$js_grid = js_grid_info($tableMap);
?>
<script>
/*
 * Partial vlanGrid
 */
// shorthand alias
Ext.namespace('Vlan');    
Vlan.Grid = Ext.extend(Ext.grid.GridPanel,{
    border: false,    
    loadMask: {msg: <?php 
echo json_encode(__('Retrieving data...'));
?>
},
    viewConfig:{
        emptyText: __('Empty!'),  //  emptyText Message
        forceFit:true
    },
    autoScroll:true,
    stripeRows:true,    
    clicksToEdit:1,
    initComponent:function(){        

        <?php 
$url = json_encode(url_for('vlan/jsonList'));
$store_id = json_encode($js_grid['pk']);
?>

        var gridUrl = <?php