Revision edd35b99

View differences:

src/sunstone/public/css/application.css
186 186
    margin:0;
187 187
    padding:0;}
188 188

  
189
fieldset{
190
    margin:0 0;
191
    border:none;
192
    border-top:1px solid #ccc;
193
    padding: 10px 5px;}
194

  
195
fieldset div{
196
    margin-bottom:.5em;
197
    padding:0;
198
    display:block;
199
}
200 189

  
201 190

  
202
fieldset input,
203
fieldset textarea{
204
    width:180px;
205
    /*border-top:1px solid #555;
206
      border-left:1px solid #555;
207
      border-bottom:1px solid #ccc;
208
      border-right:1px solid #ccc;*/
209
    padding:1px;color:#333;
210
    vertical-align: top;
211
    margin: 0 2px;
212
    margin-bottom: 4px;
213
}
214

  
215
fieldset select{
216
    width:184px;
217
    /*border-top:1px solid #555;
218
      border-left:1px solid #555;
219
      border-bottom:1px solid #ccc;
220
      border-right:1px solid #ccc;*/
221
    padding:1px;
222
    color:#333;
223
    vertical-align: top;
224
    margin: 0 2px;
225
    margin-bottom: 4px;
226
}
227

  
228 191
/*Chrome hack*/
229 192
input[type="radio"],input[type="checkbox"] {
230 193
    width:20px;
231 194
}
232 195

  
233
legend{
234
    margin-top:0;
235
    margin-bottom: 5px;
236
    padding:0 .5em;
237
    color:#036;
238
    background:transparent;
239
    font-size:1.0em;
240
    font-weight:bold;
241
}
242 196

  
243
label{
244
    float: left;
245
    width:120px;
246
    padding:0 1em;
247
    text-align:left;
248
}
197

  
249 198

  
250 199
.dataTables_wrapper {
251 200
    min-height: 0;
......
307 256
    clear:both;
308 257
}
309 258

  
310
.vm_param label{
311
    float:left;
312
}
259

  
313 260

  
314 261
fieldset div.vm_section {
315 262
    margin-top:-8px;
......
693 640

  
694 641
.padding2 {
695 642
    padding-left: 55px!important;
643
}
644

  
645
div.wizard_tab {
646
    overflow: auto; 
647
    height: 480px;
648
    overflow-x: hidden;
649
    width: auto;
696 650
}
src/sunstone/public/js/plugins/templates-tab.js
24 24
<table id="datatable_templates" class="display">\
25 25
  <thead>\
26 26
    <tr>\
27
      <th class="check"><input type="checkbox" class="check_all" value="">'+tr("All")+'</input></th>\
27
      <th class="check"><input type="checkbox" class="check_all" value=""></input></th>\
28 28
      <th>'+tr("ID")+'</th>\
29 29
      <th>'+tr("Owner")+'</th>\
30 30
      <th>'+tr("Group")+'</th>\
......
47 47
</form>';
48 48

  
49 49

  
50
var capacity_tab = 
51
    '<fieldset>'+
52
      '<div class="vm_param kvm_opt xen_opt vmware_opt">'+
53
          '<label for="NAME">'+tr("Name")+':</label>'+
54
          '<input type="text" id="NAME" name="name"/>'+
55
          '<div class="tip">'+tr("Name that the VM will get for description purposes. If NAME is not supplied a name generated by one will be in the form of one-&lt;VID&gt;.")+'</div>'+
56
      '</div>'+
57
      '<div class="vm_param kvm xen vmware_opt">'+
58
          '<label for="MEMORY">'+tr("Memory")+':</label>'+
59
          '<input type="text" id="MEMORY" name="memory" size="4" />'+
60
            '<select id="memory_unit" name="MEMORY_UNIT">'+
61
                '<option value="MB">'+tr("MB")+'</option>'+
62
                '<option value="GB">'+tr("GB")+'</option>'+
63
            '</select>'+
64
          '<div class="tip">'+tr("Amount of RAM required for the VM, in Megabytes.")+'</div>'+
65
          '<div id="memory_slider"></div>'+
66
      '</div>'+
67
      '<div class="vm_param kvm xen vmware">'+
68
          '<label for="CPU">'+tr("CPU")+':</label>'+
69
            '<input type="text" id="CPU" name="cpu" size="2"/>'+
70
            '<div class="tip">'+tr("Percentage of CPU divided by 100 required for the Virtual Machine. Half a processor is written 0.5.")+'</div>'+
71
            '<div id="cpu_slider"></div>'+
72
      '</div>'+
73
    '</fieldset>'+
74
       '<div class="show_hide" id="advanced_capacity">'+
75
            '<h4>'+tr("Advanced options")+'<a id="add_os_boot_opts" class="icon_left" href="#"><span class="ui-icon ui-icon-plus" /></a></h4>'+
76
       '</div>'+
77
    '<fieldset class="advanced">'+
78
      '<div class="vm_param kvm_opt xen_opt vmware_opt">'+
79
            '<label for="VCPU">'+tr("VCPU")+':</label>'+
80
            '<input type="text" id="VCPU" name="vcpu" size="3" />'+
81
            '<div class="tip">'+tr("Number of virtual cpus. This value is optional, the default hypervisor behavior is used, usually one virtual CPU.")+'</div>'+
82
            '<div id="vcpu_slider"></div>'+
83
      '</div>'+
84
    '</fieldset>'+
85
    '<div class="form_buttons">'+
86
      '<button href="#" class="next-tab" rel="1">'+tr("STORAGE")+' ></button>'+
87
    '</div>'
88 50

  
89 51

  
90
  
91
var create_template_tmpl = '<div id="template_create_tabs">'+
92
    '<ul class="main">'+
93
        '<li class="temp_tab"><a href="#tab-capacity">'+tr("GENERAL")+'</a></li>'+
94 52

  
53
  
54
var create_template_tmpl = '<div id="template_create_tabs" class="row">'+
55
    '<ul class="main tabs vertical">'+
95 56
    '</ul>'+
96
    '<div id="tab-capacity">'+
97
      capacity_tab +
57
  '</div>'+
58
  '<br>'+
59
  '<div class="row">'+
60
    '<div class="two columns">'+
61
      '<button class="success large button" id="create_template_form_easy" value="OpenNebula.Template.create">'+tr("Create")+'</button>'+
98 62
    '</div>'+
99
'</div>'+
100
    '<fieldset>'+
101
    '<div class="form_buttons">'+
102
    '<button class="button" id="create_template_form_easy" value="OpenNebula.Template.create">'+
103
      ''+tr("Create")+''+
104
    '</button>'+
105
    '<button class="button" id="reset_template_form" type="reset" value="reset">'+tr("Reset")+'</button>'+
63
    '<div class="ten columns">'+
64
      '<button class="large button" id="wizard_next" type="reset" value="reset"  style="float: right">'+tr("Next")+'</button>'+
65
      '<button class="large button" id="wizard_previous" type="reset" value="reset"  style="float: right">'+tr("Previous")+'</button>'+
106 66
    '</div>'+
107
    '</fieldset>';
67
  '</div>';
108 68

  
109 69

  
110 70
/*
......
1038 998
        // ui.index   // zero-based index of the selected (clicked) tab
1039 999

  
1040 1000
        //disable all items
1041
        $(items,dialog).attr('disabled','disabled');
1001
        //$(items,dialog).attr('disabled','disabled');
1042 1002
        //hide all mandatory icons
1043 1003
        $('.vm_param .man_icon',dialog).css("display","none");
1044 1004

  
......
1333 1293
            });
1334 1294
    };
1335 1295

  
1296

  
1336 1297
    /**************************************************************************
1337 1298
        CAPACITY TAB
1338 1299

  
1339 1300
    **************************************************************************/
1340 1301

  
1341 1302
    // Set ups the capacity section
1342
    var capacity_setup = function(){
1343
        $(function() {
1344
            add_disks_tab();
1345
            add_nics_tab();
1346

  
1347
            var temp_index = 3
1348
            add_os_tab(temp_index);
1349

  
1350
            temp_index++;
1351
            add_io_tab(temp_index);
1352

  
1353
            temp_index++;
1354
            add_context_tab(temp_index);
1355

  
1356
            temp_index++;
1357
            add_placement_tab(temp_index);
1303
    var add_capacity_tab = function(){
1304
        var html_tab_content = '<div id="capacity_tab" class="wizard_tab">'+
1305
          '<form>'+
1306
            '<div class="row vm_param">'+
1307
                '<div class="two columns">'+
1308
                  '<label class="inline right" for="NAME">'+tr("NAME")+':</label>'+
1309
                '</div>'+
1310
                '<div class="nine columns">'+
1311
                  '<input type="text" id="NAME" name="name"/>'+
1312
                '</div>'+
1313
                '<div class="one columns">'+
1314
                  '<div class="tip">'+tr("Name that the VM will get for description purposes. If NAME is not supplied a name generated by one will be in the form of one-&lt;VID&gt;.")+'</div>'+
1315
                '</div>'+
1316
            '</div>'+
1317
            '<br>'+
1318
            '<br>'+
1319
            '<div class="row vm_param">'+
1320
                '<div class="two columns">'+
1321
                  '<label class="inline right" for="CPU">'+tr("CPU")+':</label>'+
1322
                '</div>'+
1323
                '<div class="seven columns">'+
1324
                  '<div id="cpu_slider"></div>'+
1325
                '</div>'+
1326
                '<div class="two columns">'+
1327
                  '<input type="text" id="CPU" name="cpu" size="2"/>'+
1328
                '</div>'+
1329
                '<div class="one columns">'+
1330
                  '<div class="tip">'+tr("Percentage of CPU divided by 100 required for the Virtual Machine. Half a processor is written 0.5.")+'</div>'+
1331
                '</div>'+
1332
            '</div>'+ 
1333
            '<div class="row vm_param">'+
1334
                '<div class="two columns">'+
1335
                  '<label class="inline right" for="MEMORY">'+tr("MEMORY")+':</label>'+
1336
                '</div>'+
1337
                '<div class="six columns">'+
1338
                  '<div id="memory_slider"></div>'+
1339
                '</div>'+
1340
                '<div class="two columns">'+
1341
                  '<input type="text" id="MEMORY" name="memory" size="4" />'+
1342
                '</div>'+
1343
                '<div class="one columns">'+
1344
                  '<select id="memory_unit" name="MEMORY_UNIT">'+
1345
                      '<option value="MB">'+tr("MB")+'</option>'+
1346
                      '<option value="GB">'+tr("GB")+'</option>'+
1347
                  '</select>'+
1348
                '</div>'+
1349
                '<div class="one columns">'+
1350
                  '<div class="tip">'+tr("Amount of RAM required for the VM, in Megabytes.")+'</div>'+
1351
                '</div>'+
1352
            '</div>'+      
1353
            '<div class="show_hide" id="advanced_capacity">'+
1354
                 '<h4>'+tr("Advanced options")+'<a id="add_os_boot_opts" class="icon_left" href="#"><span class="ui-icon ui-icon-plus" /></a></h4>'+
1355
            '</div>'+
1356
            '<div class="advanced">'+
1357
              '<div class="row vm_param">'+
1358
                  '<div class="two columns">'+
1359
                    '<label class="inline right" for="VCPU">'+tr("VCPU")+':</label>'+
1360
                  '</div>'+
1361
                  '<div class="seven columns">'+
1362
                    '<div id="vcpu_slider"></div>'+
1363
                  '</div>'+
1364
                  '<div class="two columns">'+
1365
                    '<input type="text" id="VCPU" name="vcpu" size="3" />'+
1366
                  '</div>'+
1367
                  '<div class="one columns">'+
1368
                    '<div class="tip">'+tr("Number of virtual cpus. This value is optional, the default hypervisor behavior is used, usually one virtual CPU.")+'</div>'+
1369
                  '</div>'+
1370
              '</div>'+ 
1371
            '</div>'+
1372
          '</form>'+
1373
        '</div>'
1358 1374

  
1359
            temp_index++;
1360
            add_other_tab(temp_index);
1375
        tabs.append(html_tab_content).tabs('add', '#capacity_tab', 'General', 0); 
1361 1376

  
1362
            // Enhace buttons
1363
            $('button',dialog).button();
1377
        // Enhace buttons
1378
        $('button',dialog).button();
1364 1379

  
1365
            // Change tab if the DISKs button is clicked
1366
            //$(".tf_btn_nics", dialog).click(add_nic_tab);
1367
            //$(".tf_btn_nics").live('click', add_nic_tab);
1380
        // Change tab if the DISKs button is clicked
1381
        //$(".tf_btn_nics", dialog).click(add_nic_tab);
1382
        //$(".tf_btn_nics").live('click', add_nic_tab);
1368 1383

  
1369
            // Hide advanced options
1370
            $('fieldset.advanced',section_capacity).hide();
1384
        // Hide advanced options
1385
        $('.advanced',section_capacity).hide();
1371 1386

  
1372
            $('#advanced_capacity',section_capacity).click(function(){
1373
                $('fieldset.advanced',section_capacity).toggle();
1374
                return false;
1375
            });
1387
        $('#advanced_capacity',section_capacity).click(function(){
1388
            $('.advanced',section_capacity).toggle();
1389
            return false;
1390
        });
1376 1391

  
1377
            // Define memory slider
1378
            var memory_input = $( "#MEMORY", section_capacity );
1379
            var memory_unit  = $( "#memory_unit", section_capacity );
1380
            var memory_slider = $( "#memory_slider", section_capacity ).slider({
1381
                min: 0,
1382
                max: 4096,
1383
                range: "min",
1384
                value: 0,
1385
                step: 128,
1386
                slide: function( event, ui ) {
1387
                    memory_input.val(ui.value);
1388
                }
1389
            });
1390
            memory_input.change(function() {
1391
                memory_slider.slider( "value", this.value );
1392
            });
1393
            memory_unit.change(function() {
1394
                var memory_unit_val = $('#memory_unit :selected').val();
1395
                if (memory_unit_val == 'GB') {
1396
                    memory_slider.slider( "option", "min", 0 );
1397
                    memory_slider.slider( "option", "max", 16 );
1398
                    memory_slider.slider( "option", "step", 0.5 );
1399
                    memory_slider.slider( "option", "value", 4 );
1400
                    memory_input.val(4);
1401
                } 
1402
                else if (memory_unit_val == 'MB') {
1403
                    memory_slider.slider( "option", "min", 0 );
1404
                    memory_slider.slider( "option", "max", 4096 );
1405
                    memory_slider.slider( "option", "step", 128 );
1406
                    memory_slider.slider( "option", "value", 512 );
1407
                    memory_input.val(512);
1408
                }
1409
                
1410
            });
1392
        // Define memory slider
1393
        var memory_input = $( "#MEMORY", section_capacity );
1394
        var memory_unit  = $( "#memory_unit", section_capacity );
1395
        var memory_slider = $( "#memory_slider", section_capacity ).slider({
1396
            min: 0,
1397
            max: 4096,
1398
            range: "min",
1399
            value: 0,
1400
            step: 128,
1401
            slide: function( event, ui ) {
1402
                memory_input.val(ui.value);
1403
            }
1404
        });
1405
        memory_input.change(function() {
1406
            memory_slider.slider( "value", this.value );
1407
        });
1408
        memory_unit.change(function() {
1409
            var memory_unit_val = $('#memory_unit :selected').val();
1410
            if (memory_unit_val == 'GB') {
1411
                memory_slider.slider( "option", "min", 0 );
1412
                memory_slider.slider( "option", "max", 16 );
1413
                memory_slider.slider( "option", "step", 0.5 );
1414
                memory_slider.slider( "option", "value", 4 );
1415
                memory_input.val(4);
1416
            } 
1417
            else if (memory_unit_val == 'MB') {
1418
                memory_slider.slider( "option", "min", 0 );
1419
                memory_slider.slider( "option", "max", 4096 );
1420
                memory_slider.slider( "option", "step", 128 );
1421
                memory_slider.slider( "option", "value", 512 );
1422
                memory_input.val(512);
1423
            }
1424
            
1425
        });
1411 1426

  
1412
            // Define cpu slider
1413
            var cpu_input = $( "#CPU", section_capacity );
1414
            var cpu_slider = $( "#cpu_slider", section_capacity ).slider({
1415
                min: 0,
1416
                max: 8,
1417
                range: "min",
1418
                value: 0,
1419
                step: 0.5,
1420
                slide: function( event, ui ) {
1421
                    cpu_input.val(ui.value);
1422
                }
1423
            });
1424
            cpu_input.change(function() {
1425
                cpu_slider.slider( "value", this.value );
1426
            });
1427
        // Define cpu slider
1428
        var cpu_input = $( "#CPU", section_capacity );
1429
        var cpu_slider = $( "#cpu_slider", section_capacity ).slider({
1430
            min: 0,
1431
            max: 8,
1432
            range: "min",
1433
            value: 0,
1434
            step: 0.5,
1435
            slide: function( event, ui ) {
1436
                cpu_input.val(ui.value);
1437
            }
1438
        });
1439
        cpu_input.change(function() {
1440
            cpu_slider.slider( "value", this.value );
1441
        });
1427 1442

  
1428
            // Define vcpu slider
1429
            var vcpu_input = $( "#VCPU", section_capacity );
1430
            var vcpu_slider = $( "#vcpu_slider", section_capacity ).slider({
1431
                min: 0,
1432
                max: 8,
1433
                range: "min",
1434
                value: 0,
1435
                step: 0.5,
1436
                slide: function( event, ui ) {
1437
                    vcpu_input.val(ui.value);
1438
                }
1439
            });
1440
            vcpu_input.change(function() {
1441
                vcpu_slider.slider( "value", this.value );
1442
            });
1443
        // Define vcpu slider
1444
        var vcpu_input = $( "#VCPU", section_capacity );
1445
        var vcpu_slider = $( "#vcpu_slider", section_capacity ).slider({
1446
            min: 0,
1447
            max: 8,
1448
            range: "min",
1449
            value: 0,
1450
            step: 0.5,
1451
            slide: function( event, ui ) {
1452
                vcpu_input.val(ui.value);
1453
            }
1454
        });
1455
        vcpu_input.change(function() {
1456
            vcpu_slider.slider( "value", this.value );
1443 1457
        });
1444 1458
    }
1445 1459

  
......
1452 1466
    var disks_index     = 0;
1453 1467

  
1454 1468
    var add_disks_tab = function() {
1455
      var html_tab_content = '<div id="template_create_disks_tabs">'+
1469
      var html_tab_content = '<div id="template_create_disks_tabs" class="wizard_tab">'+
1456 1470
          '<ul>'+
1457 1471
              '<li class="temp_tab"><a href="#" class="button" type="" value="" id="tf_btn_disks">'+tr("Add disk")+' +</a></li>'+
1458 1472
          '</ul>'+
1459 1473
        '</div>';
1460 1474

  
1461
      tabs.append(html_tab_content).tabs('add', '#template_create_disks_tabs', 'STORAGE', 1); 
1475
      tabs.append(html_tab_content).tabs('add', '#template_create_disks_tabs', 'Storage', 1); 
1462 1476

  
1463 1477
      var disk_tabs = $( "#template_create_disks_tabs", dialog).tabs({
1464 1478
          tabTemplate: "<li><a href='#{href}'>#{label}</a><span class='ui-icon ui-icon-close'>Remove Tab</span></li>",
......
1492 1506
        var str_datatable_id = 'datatable_template_images' + number_of_disks;
1493 1507

  
1494 1508
        var html_tab_content = '<div id="'+str_disk_tab_id+'" class="disk">'+
1509
            '<div class="row">'+
1510
              '<div class="three columns push-three">'+
1511
                '<input type="radio" name="'+str_disk_tab_id+'" value="image" checked> Image '+
1512
              '</div>'+
1513
              '<div class="three columns pull-three">'+
1514
                '<input type="radio" name="'+str_disk_tab_id+'" value="volatile"> Volatile Disk '+
1515
              '</div>'+
1516
            '</div>'+         
1517
              '<div id="disk_type" class="image">'+
1495 1518
            '<fieldset>'+
1496
              '<input type="radio" name="'+str_disk_tab_id+'" value="image" checked> Image '+
1497
              '<input type="radio" name="'+str_disk_tab_id+'" value="volatile"> Volatile Disk '+
1498
            '</fieldset>'+
1499
            '<br>'+
1500
            '<div id="disk_type" class="image vm_param">'+
1501
              '<table id="'+str_datatable_id+'" class="display">'+
1502
                '<thead>'+
1503
                  '<tr>'+
1504
                    '<th class="check"><input type="checkbox" class="check_all" value="">'+tr("All")+'</input></th>'+
1505
                    '<th>'+tr("ID")+'</th>'+
1506
                    '<th>'+tr("Owner")+'</th>'+
1507
                    '<th>'+tr("Group")+'</th>'+
1508
                    '<th>'+tr("Name")+'</th>'+
1509
                    '<th>'+tr("Datastore")+'</th>'+
1510
                    '<th>'+tr("Size")+'</th>'+
1511
                    '<th>'+tr("Type")+'</th>'+
1512
                    '<th>'+tr("Registration time")+'</th>'+
1513
                    '<th>'+tr("Persistent")+'</th>'+
1514
                    '<th>'+tr("Status")+'</th>'+
1515
                    '<th>'+tr("#VMS")+'</th>'+
1516
                    '<th>'+tr("Target")+'</th>'+
1517
                  '</tr>'+
1518
                '</thead>'+
1519
                '<tbody id="tbodyimages">'+
1520
                '</tbody>'+
1521
              '</table>'+
1522
              '<fieldset>'+
1519
              '<legend>'+tr("Please select an image from the list")+'</legend>'+
1520
                '<table id="'+str_datatable_id+'" class="display">'+
1521
                  '<thead>'+
1522
                    '<tr>'+
1523
                      '<th class="check"><input type="checkbox" class="check_all" value=""></input></th>'+
1524
                      '<th>'+tr("ID")+'</th>'+
1525
                      '<th>'+tr("Owner")+'</th>'+
1526
                      '<th>'+tr("Group")+'</th>'+
1527
                      '<th>'+tr("Name")+'</th>'+
1528
                      '<th>'+tr("Datastore")+'</th>'+
1529
                      '<th>'+tr("Size")+'</th>'+
1530
                      '<th>'+tr("Type")+'</th>'+
1531
                      '<th>'+tr("Registration time")+'</th>'+
1532
                      '<th>'+tr("Persistent")+'</th>'+
1533
                      '<th>'+tr("Status")+'</th>'+
1534
                      '<th>'+tr("#VMS")+'</th>'+
1535
                      '<th>'+tr("Target")+'</th>'+
1536
                    '</tr>'+
1537
                  '</thead>'+
1538
                  '<tbody id="tbodyimages">'+
1539
                  '</tbody>'+
1540
                '</table>'+
1523 1541
                '<div class="vm_param kvm_opt xen_opt vmware_opt">'+
1524 1542
                  '<p>You selected the following image: '+
1525 1543
                    '<span type="text" id="IMAGE" name="image"></span>'+
1526
                    '</p>'+
1544
                  '</p>'+
1527 1545
                  '<input type="hidden" id="IMAGE_ID" name="image_id" size="2"/>'+
1528
                  '</div>'+
1546
                '</div>'+
1529 1547
              '</fieldset>'+
1530 1548
              '<div class="show_hide" id="advanced_image">'+
1531 1549
                '<h4>'+tr("Advanced options")+'<a id="add_os_boot_opts" class="icon_left" href="#"><span class="ui-icon ui-icon-plus" /></a></h4>'+
1532 1550
              '</div>'+
1533
              '<fieldset class="advanced">'+
1534
                '<div class="vm_param kvm_opt xen_opt vmware_opt">'+
1535
                  '<label for="TARGET">'+tr("TARGET")+':</label>'+
1536
                  '<input type="text" id="TARGET" name="target" size="3" />'+
1537
                  '<div class="tip">'+tr("Device to map image disk. If set, it will overwrite the default device mapping")+'</div>'+
1551
              '<div class="row advanced">'+
1552
                '<div class="six columns">'+
1553
                  '<div class="row">'+
1554
                    '<div class="four columns">'+
1555
                      '<label class="right inline" for="TARGET">'+tr("TARGET")+':</label>'+
1556
                    '</div>'+
1557
                    '<div class="six columns">'+
1558
                      '<input type="text" id="TARGET" name="target"/>'+
1559
                    '</div>'+
1560
                    '<div class="two columns">'+
1561
                      '<div class="tip">'+tr("Device to map image disk. If set, it will overwrite the default device mapping")+'</div>'+
1562
                    '</div>'+
1563
                  '</div>'+
1538 1564
                '</div>'+
1539
                '<div class="vm_param kvm_opt xen_opt vmware_opt">'+
1540
                      '<label for="DRIVER">'+tr("Driver")+':</label>'+
1541
                      '<input type="text" id="DRIVER" name="driver" />'+
1542
                      '<div class="tip">'+tr("Specific image mapping driver. KVM: raw, qcow2. Xen:tap:aio:, file:. VMware unsupported")+'</div>'+
1565
                '<div class="six columns">'+
1566
                  '<div class="row">'+
1567
                    '<div class="four columns">'+
1568
                        '<label class="right inline" for="DRIVER">'+tr("DRIVER")+':</label>'+
1569
                    '</div>'+
1570
                    '<div class="six columns">'+
1571
                        '<input type="text" id="DRIVER" name="driver" />'+
1572
                    '</div>'+
1573
                    '<div class="two columns">'+
1574
                        '<div class="tip">'+tr("Specific image mapping driver. KVM: raw, qcow2. Xen:tap:aio:, file:. VMware unsupported")+'</div>'+
1575
                    '</div>'+
1576
                  '</div>'+
1543 1577
                '</div>'+
1544
              '</fieldset>'+
1578
              '</div>'+
1545 1579
            '</div>'+
1546 1580
            '<div id="disk_type" class="volatile hidden">'+
1547
              '<fieldset>'+
1548
                  '<div class="vm_param kvm_opt xen_opt vmware_opt">'+
1549
                    '<label for="TYPE">'+tr("Type")+':</label>'+
1550
                    '<select id="TYPE" name="type">'+
1551
                      '<option value="fs">'+tr("FS")+'</option>'+
1552
                      '<option value="swap">'+tr("Swap")+'</option>'+
1553
                    '</select>'+
1554
                    '<div class="tip">'+tr("Disk type")+'</div>'+
1555
                  '</div>'+
1556
                  '<div class="vm_param kvm xen vmware">'+
1557
                    '<label for="SIZE">'+tr("Size")+':</label>'+
1558
                    '<input type="text" id="SIZE" name="size" size="4" />'+
1559
                      '<select id="size_unit" name="SIZE_UNIT">'+
1560
                          '<option value="MB">'+tr("MB")+'</option>'+
1561
                          '<option value="GB">'+tr("GB")+'</option>'+
1562
                      '</select>'+
1563
                      '<div class="tip">'+tr("Size of the new disk")+'</div>'+
1564
                      '<div id="size_slider"></div>'+
1581
              '<br>'+
1582
                '<form>'+
1583
                  '<div class="row">'+
1584
                    '<div class="six columns">'+
1585
                      '<div class="row">'+
1586
                        '<div class="four columns">'+
1587
                          '<label class="right inline" for="TYPE">'+tr("TYPE")+':</label>'+
1588
                        '</div>'+
1589
                        '<div class="six columns">'+                    
1590
                          '<select id="TYPE" name="type">'+
1591
                            '<option value="fs">'+tr("FS")+'</option>'+
1592
                            '<option value="swap">'+tr("Swap")+'</option>'+
1593
                          '</select>'+
1594
                        '</div>'+
1595
                        '<div class="two columns">'+
1596
                          '<div class="tip">'+tr("Disk type")+'</div>'+
1597
                        '</div>'+
1598
                      '</div>'+
1599
                    '</div>'+
1600
                    '<div class="six columns">'+
1601
                      '<div class="row">'+
1602
                        '<div class="four columns">'+
1603
                          '<label class="right inline" for="FORMAT">'+tr("FORMAT")+':</label>'+
1604
                        '</div>'+
1605
                        '<div class="six columns">'+
1606
                          '<input type="text" id="FORMAT" name="format" />'+
1607
                        '</div>'+
1608
                        '<div class="two columns">'+
1609
                          '<div class="tip">'+tr("Filesystem type for the fs images")+'</div>'+
1610
                        '</div>'+
1611
                      '</div>'+
1612
                    '</div>'+
1613
                  '</div>'+        
1614
                  '<div class="row">'+
1615
                      '<div class="two columns">'+
1616
                        '<label class="inline right" for="SIZE">'+tr("SIZE")+':</label>'+
1617
                      '</div>'+
1618
                      '<div class="six columns">'+
1619
                        '<div id="size_slider"></div>'+
1620
                      '</div>'+
1621
                      '<div class="two columns">'+
1622
                        '<input type="text" id="SIZE" name="size"/>'+
1623
                      '</div>'+
1624
                      '<div class="one columns">'+
1625
                        '<select id="size_unit" name="SIZE_UNIT">'+
1626
                            '<option value="MB">'+tr("MB")+'</option>'+
1627
                            '<option value="GB">'+tr("GB")+'</option>'+
1628
                        '</select>'+
1629
                      '</div>'+
1630
                      '<div class="one columns">'+
1631
                        '<div class="tip">'+tr("Size of the new disk")+'</div>'+
1632
                      '</div>'+
1565 1633
                  '</div>'+
1566
                  '<div class="vm_param kvm xen wmware">'+
1567
                        '<label for="FORMAT">'+tr("Format")+':</label>'+
1568
                        '<input type="text" id="FORMAT" name="format" />'+
1569
                        '<div class="tip">'+tr("Filesystem type for the fs images")+'</div>'+
1570
                  '</div>'+
1571
              '</fieldset>'+
1572 1634
              '<div class="show_hide" id="advanced_volatile">'+
1573 1635
                '<h4>'+tr("Advanced options")+'<a id="add_os_boot_opts" class="icon_left" href="#"><span class="ui-icon ui-icon-plus" /></a></h4>'+
1574 1636
              '</div>'+
1575
              '<fieldset class="advanced">'+
1576
                '<div class="vm_param kvm_opt xen_opt vmware_opt">'+
1577
                  '<label for="TARGET">'+tr("TARGET")+':</label>'+
1578
                  '<input type="text" id="TARGET" name="target" size="3" />'+
1579
                  '<div class="tip">'+tr("Device to map image disk. If set, it will overwrite the default device mapping")+'</div>'+
1637
              '<div class="row advanced">'+
1638
                '<div class="six columns">'+
1639
                  '<div class="row">'+
1640
                    '<div class="four columns">'+
1641
                      '<label class="right inline" for="TARGET">'+tr("TARGET")+':</label>'+
1642
                    '</div>'+
1643
                    '<div class="six columns">'+
1644
                      '<input type="text" id="TARGET" name="target"/>'+
1645
                    '</div>'+
1646
                    '<div class="two columns">'+
1647
                      '<div class="tip">'+tr("Device to map image disk. If set, it will overwrite the default device mapping")+'</div>'+
1648
                    '</div>'+
1649
                  '</div>'+
1580 1650
                '</div>'+
1581
                '<div class="vm_param kvm_opt xen_opt vmware_opt">'+
1582
                      '<label for="DRIVER">'+tr("Driver")+':</label>'+
1583
                      '<input type="text" id="DRIVER" name="driver" />'+
1584
                      '<div class="tip">'+tr("Specific image mapping driver. KVM: raw, qcow2. Xen:tap:aio:, file:. VMware unsupported")+'</div>'+
1651
                '<div class="six columns">'+
1652
                  '<div class="row">'+
1653
                    '<div class="four columns">'+
1654
                        '<label class="right inline" for="DRIVER">'+tr("DRIVER")+':</label>'+
1655
                    '</div>'+
1656
                    '<div class="six columns">'+
1657
                        '<input type="text" id="DRIVER" name="driver" />'+
1658
                    '</div>'+
1659
                    '<div class="two columns">'+
1660
                        '<div class="tip">'+tr("Specific image mapping driver. KVM: raw, qcow2. Xen:tap:aio:, file:. VMware unsupported")+'</div>'+
1661
                    '</div>'+
1662
                  '</div>'+
1585 1663
                '</div>'+
1586
              '</fieldset>'+
1587
            '</div>'+
1588
            '<div class="form_buttons">'+
1589
              '<button href="#" class="prev-tab" rel="0" style="float: left">< '+tr("GENERAL")+'</button>'+
1590
              '<button href="#" class="next-tab" rel="2">'+tr("NETWORK")+' ></button>'+
1664
                '</form>'+
1665
              '</div>'+
1591 1666
            '</div>'+
1592 1667
          '</div>'
1593 1668

  
......
1716 1791
        });
1717 1792

  
1718 1793
        // Hide image advanced options
1719
        $('.image fieldset.advanced', $('div#' + str_disk_tab_id)).hide();
1794
        $('.image .advanced', $('div#' + str_disk_tab_id)).hide();
1720 1795

  
1721 1796
        $('#advanced_image', $('div#' + str_disk_tab_id)).click(function(){
1722
            $('.image fieldset.advanced', $('div#' + str_disk_tab_id)).toggle();
1797
            $('.image .advanced', $('div#' + str_disk_tab_id)).toggle();
1723 1798
            return false;
1724 1799
        });
1725 1800

  
1726 1801
        // Hide volatile advanced options
1727
        $('.volatile fieldset.advanced', $('div#' + str_disk_tab_id)).hide();
1802
        $('.volatile .advanced', $('div#' + str_disk_tab_id)).hide();
1728 1803

  
1729 1804
        $('#advanced_volatile', $('div#' + str_disk_tab_id)).click(function(){
1730
            $('.volatile fieldset.advanced', $('div#' + str_disk_tab_id)).toggle();
1805
            $('.volatile .advanced', $('div#' + str_disk_tab_id)).toggle();
1731 1806
            return false;
1732 1807
        });
1733 1808

  
......
1747 1822
    var nics_index     = 0;
1748 1823

  
1749 1824
    var add_nics_tab = function() {
1750
      var html_tab_content = '<div id="template_create_nics_tabs">'+
1825
      var html_tab_content = '<div id="template_create_nics_tabs" class="wizard_tab">'+
1751 1826
          '<ul>'+
1752 1827
              '<li class="temp_tab"><a href="#" class="button" type="" value="" id="tf_btn_nics">'+tr("Add nic")+' +</a></li>'+
1753 1828
          '</ul>'+
1754 1829
        '</div>';
1755 1830

  
1756
      tabs.append(html_tab_content).tabs('add', '#template_create_nics_tabs', 'NETWORK', 2); 
1831
      tabs.append(html_tab_content).tabs('add', '#template_create_nics_tabs', 'Network', 2); 
1757 1832

  
1758 1833
      var nic_tabs = $( "#template_create_nics_tabs", dialog).tabs({
1759 1834
          tabTemplate: "<li><a href='#{href}'>#{label}</a><span class='ui-icon ui-icon-close'>Remove Tab</span></li>",
......
1762 1837
          }
1763 1838
      });
1764 1839

  
1840
      
1841
        nic_tabs.tabs("refresh");
1842

  
1765 1843
      // close icon: removing the tab on click
1766 1844
      $( "#template_create_nics_tabs span.ui-icon-close" ).live( "click", function() {
1767 1845
          var parent = $( this ).parent();
......
1779 1857

  
1780 1858
      $("#tf_btn_nics").bind("click", function(){
1781 1859
        add_nic_tab(nic_tabs);
1860
        nic_tabs.tabs("refresh");
1782 1861
      });
1783 1862
    }
1784 1863

  
......
1787 1866
      var str_datatable_id = 'datatable_template_networks' + number_of_nics;
1788 1867

  
1789 1868
      var html_tab_content = '<div id="'+str_nic_tab_id+'" class="nic">'+
1869
      '<form>'+
1870
      '<fieldset>'+
1871
        '<legend>'+tr("Please select a network from the list")+'</legend>'+
1790 1872
          '<table id="'+str_datatable_id+'" class="display">'+
1791 1873
            '<thead>'+
1792 1874
              '<tr>'+
1793
                '<th class="check"><input type="checkbox" class="check_all" value="">'+tr("All")+'</input></th>'+
1875
                '<th class="check"><input type="checkbox" class="check_all" value=""></input></th>'+
1794 1876
                '<th>'+tr("ID")+'</th>'+
1795 1877
                '<th>'+tr("Owner")+'</th>'+
1796 1878
                '<th>'+tr("Group")+'</th>'+
......
1804 1886
            '<tbody id="tbodynetworks">'+
1805 1887
            '</tbody>'+
1806 1888
          '</table>'+
1807
          '<fieldset>'+
1808
            '<div class="vm_param kvm_opt xen_opt vmware_opt">'+
1809
              '<p>You selected the following image: '+
1810
                '<span type="text" id="NETWORK" name="network"></span>'+
1811
                '</p>'+
1812
              '<input type="hidden" id="NETWORK_ID" name="network_id" size="2"/>'+
1813
              '</div>'+
1814
          '</fieldset>'+
1815
          '<fieldset>'+
1816
            '<legend>'+tr("TCP Firewall")+'</legend>'+
1817
            '<input type="radio" name="tcp_type" id="tcp_type" value="WHITE_PORTS_TCP"> Whitelist '+
1818
            '<input type="radio" name="tcp_type" id="tcp_type" value="BLACK_PORTS_TCP"> Blacklist'+
1819
            '<div>'+
1820
                  '<label for="TCP_PORTS">'+tr("PORTS")+':</label>'+
1821
                  '<input type="text" id="TCP_PORTS" name="ports" />'+
1822
                  '<div class="tip">'+tr("A list of ports separated by commas or a ranges separated by semilocolons, e.g.: 22,80,5900:6000")+'</div>'+
1889
          '<div class="vm_param kvm_opt xen_opt vmware_opt">'+
1890
            '<p>You selected the following image: '+
1891
              '<span type="text" id="NETWORK" name="network"></span>'+
1892
              '</p>'+
1893
            '<input type="hidden" id="NETWORK_ID" name="network_id" size="2"/>'+
1823 1894
            '</div>'+
1824
          '</fieldset>'+
1825
          '<fieldset>'+
1826
            '<legend>'+tr("UDP Firewall")+'</legend>'+
1827
            '<input type="radio" name="udp_type" id="udp_type" value="WHITE_PORTS_UDP"> Whitelist '+
1828
            '<input type="radio" name="udp_type" id="udp_type" value="BLACK_PORTS_UDP"> Blacklist'+
1829
            '<div>'+
1830
                  '<label for="UDP_PORTS">'+tr("PORTS")+':</label>'+
1831
                  '<input type="text" id="UDP_PORTS" name="ports" />'+
1832
                  '<div class="tip">'+tr("A list of ports separated by commas or a ranges separated by semilocolons, e.g.: 22,80,5900:6000")+'</div>'+
1833
            '</div>'+
1834
          '</fieldset>'+
1835
          '<fieldset>'+
1836
            '<legend>'+tr("ICMP Firewall")+'</legend>'+
1837
            '<input type="checkbox" name="icmp_type" id="icmp_type" value="ICMP"> Drop '+
1838
          '</fieldset>'+
1895
      '</fieldset>'+
1839 1896
          '<div class="show_hide" id="advanced">'+
1840 1897
            '<h4>'+tr("Advanced options")+'<a id="add_os_boot_opts" class="icon_left" href="#"><span class="ui-icon ui-icon-plus" /></a></h4>'+
1841 1898
          '</div>'+
1842
          '<fieldset class="advanced">'+
1843
            '<div class="vm_param kvm_opt xen_opt vmware_opt">'+
1844
              '<label for="IP">'+tr("IP")+':</label>'+
1845
              '<input type="text" id="IP" name="IP" size="3" />'+
1846
              '<div class="tip">'+tr("Request an specific IP from the Network")+'</div>'+
1847
            '</div>'+
1848
            '<div class="vm_param kvm_opt xen_opt vmware_opt">'+
1849
                  '<label for="MODEL">'+tr("MODEL")+':</label>'+
1850
                  '<input type="text" id="MODEL" name="MODEL" />'+
1851
                  '<div class="tip">'+tr("Hardware that will emulate this network interface. With Xen this is the type attribute of the vif.")+'</div>'+
1899
          '<div class="advanced">'+          
1900
          '<div class="row">'+
1901
          '<div class="six columns">'+
1902
            '<fieldset>'+
1903
              '<legend>'+tr("TCP Firewall")+'</legend>'+
1904
              '<div class="row">'+
1905
                '<div class="four columns push-two">'+
1906
                  '<input type="radio" name="tcp_type" id="tcp_type" value="WHITE_PORTS_TCP"> Whitelist '+
1907
                '</div>'+
1908
                '<div class="four columns pull-two">'+
1909
                  '<input type="radio" name="tcp_type" id="tcp_type" value="BLACK_PORTS_TCP"> Blacklist'+
1910
                '</div>'+
1911
              '</div>'+
1912
              '<br>'+
1913
              '<div class="row">'+
1914
                '<div class="four columns">'+
1915
                  '<label class="right inline" for="TCP_PORTS">'+tr("PORTS")+':</label>'+
1916
                '</div>'+
1917
                '<div class="six columns">'+
1918
                    '<input type="text" id="TCP_PORTS" name="ports" />'+
1919
                '</div>'+
1920
                '<div class="two columns">'+
1921
                    '<div class="tip">'+tr("A list of ports separated by commas or a ranges separated by semilocolons, e.g.: 22,80,5900:6000")+'</div>'+
1922
                '</div>'+
1923
              '</div>'+
1924
            '</fieldset>'+
1925
          '</div>'+
1926
          '<div class="six columns">'+
1927
            '<fieldset>'+
1928
              '<legend>'+tr("UDP Firewall")+'</legend>'+
1929
              '<div class="row">'+
1930
                '<div class="four columns push-two">'+
1931
                  '<input type="radio" name="udp_type" id="udp_type" value="WHITE_PORTS_UDP"> Whitelist '+
1932
                '</div>'+
1933
                '<div class="four columns pull-two">'+
1934
                  '<input type="radio" name="udp_type" id="udp_type" value="BLACK_PORTS_UDP"> Blacklist'+
1935
                '</div>'+
1936
              '</div>'+
1937
              '<br>'+
1938
              '<div class="row">'+
1939
                '<div class="four columns">'+
1940
                  '<label class="right inline" for="UDP_PORTS">'+tr("PORTS")+':</label>'+
1941
                '</div>'+
1942
                '<div class="six columns">'+
1943
                    '<input type="text" id="UDP_PORTS" name="ports" />'+
1944
                '</div>'+
1945
                '<div class="two columns">'+
1946
                    '<div class="tip">'+tr("A list of ports separated by commas or a ranges separated by semilocolons, e.g.: 22,80,5900:6000")+'</div>'+
1947
                '</div>'+
1948
              '</div>'+
1949
            '</fieldset>'+
1950
          '</div>'+
1951
          '</div>'+
1952
            '<div class="row">'+
1953
              '<div class="six columns">'+
1954
                '<div class="row">'+
1955
                  '<div class="four columns">'+
1956
                    '<label class="right inline" for="IP">'+tr("IP")+':</label>'+
1957
                  '</div>'+
1958
                  '<div class="six columns">'+
1959
                    '<input type="text" id="IP" name="IP" size="3" />'+
1960
                  '</div>'+
1961
                  '<div class="two columns">'+
1962
                    '<div class="tip">'+tr("Request an specific IP from the Network")+'</div>'+
1963
                  '</div>'+
1964
                '</div>'+
1965
              '</div>'+
1966
              '<div class="six columns">'+
1967
                '<div class="row">'+
1968
                  '<div class="four columns">'+
1969
                      '<label class="right inline" for="MODEL">'+tr("MODEL")+':</label>'+
1970
                  '</div>'+
1971
                  '<div class="six columns">'+
1972
                    '<input type="text" id="MODEL" name="MODEL" />'+
1973
                  '</div>'+
1974
                  '<div class="two columns">'+
1975
                    '<div class="tip">'+tr("Hardware that will emulate this network interface. With Xen this is the type attribute of the vif.")+'</div>'+
1976
                  '</div>'+
1977
                '</div>'+
1978
              '</div>'+
1852 1979
            '</div>'+
1853
          '</fieldset>'+
1854
            '<div class="form_buttons">'+
1855
              '<button href="#" class="prev-tab" rel="1" style="float: left">< '+tr("STORAGE")+'</button>'+
1856
              '<button href="#" class="next-tab" rel="3">'+tr("OS BOOTING")+' ></button>'+
1980
            '<div class="row">'+
1981
              '<div class="six columns">'+
1982
                '<div class="row">'+
1983
                  '<div class="four columns">'+
1984
                      '<label class="right inline" for="ICMP">'+tr("ICMP")+':</label>'+
1985
                  '</div>'+
1986
                  '<div class="six columns">'+
1987
                    '<input type="checkbox" name="icmp_type" id="icmp_type" value="ICMP" class="right"> Drop '+
1988
                  '</div>'+
1989
                  '<div class="two columns">'+
1990
                  '</div>'+
1991
                '</div>'+
1992
              '</div>'+
1857 1993
            '</div>'+
1994
          '</div>'+
1995
      '</form>'+
1858 1996
        '</div>'
1859 1997

  
1860 1998
      // Append the new div containing the tab and add the tab to the list
......
1931 2069
      });
1932 2070

  
1933 2071

  
1934
      $('fieldset.advanced', $('div#' + str_nic_tab_id)).hide();
2072
      $('.advanced', $('div#' + str_nic_tab_id)).hide();
1935 2073

  
1936 2074
      $('#advanced', $('div#' + str_nic_tab_id)).click(function(){
1937
          $('fieldset.advanced', $('div#' + str_nic_tab_id)).toggle();
2075
          $('.advanced', $('div#' + str_nic_tab_id)).toggle();
1938 2076
          return false;
1939 2077
      });
1940 2078

  
......
1979 2117
    **************************************************************************/
1980 2118

  
1981 2119
    var add_os_tab = function(temp_index) {
1982
      var html_tab_content = '<div id="os_tab">'+            
1983
            '<fieldset>'+
1984
              '<input type="radio" name="kernel_type" value="kernel_ds" checked> Select a registered KERNEL '+
1985
              '<input type="radio" name="kernel_type" value="kernel_path"> Specify the KERNEL path in the remote Host'+
1986
            '</fieldset>'+
1987
            '<br>'+
1988
            '<div class="kernel_ds">'+
1989
              '<table id="datatable_kernel" class="display">'+
1990
                '<thead>'+
1991
                  '<tr>'+
1992
                    '<th class="check"><input type="checkbox" class="check_all" value="">'+tr("All")+'</input></th>'+
1993
                    '<th>'+tr("ID")+'</th>'+
1994
                    '<th>'+tr("Owner")+'</th>'+
1995
                    '<th>'+tr("Group")+'</th>'+
1996
                    '<th>'+tr("Name")+'</th>'+
1997
                    '<th>'+tr("Datastore")+'</th>'+
1998
                    '<th>'+tr("Size")+'</th>'+
1999
                    '<th>'+tr("Type")+'</th>'+
2000
                    '<th>'+tr("Registration time")+'</th>'+
2001
                    '<th>'+tr("Persistent")+'</th>'+
2002
                    '<th>'+tr("Status")+'</th>'+
2003
                    '<th>'+tr("#VMS")+'</th>'+
2004
                    '<th>'+tr("Target")+'</th>'+
2005
                  '</tr>'+
2006
                '</thead>'+
2007
                '<tbody id="tbodyimages">'+
2008
                '</tbody>'+
2009
              '</table>'+
2010
              '<fieldset>'+
2011
                '<div id="kernel_ds_inputs" class="vm_param kvm_opt xen_opt vmware_opt">'+
2012
                  '<p>You selected the following KERNEL: '+
2013
                    '<span type="text" id="KERNEL" name="kernel"></span>'+
2014
                    '</p>'+
2015
                  '<input type="hidden" id="KERNEL_DS" name="kernel_ds" size="2"/>'+
2016
                  '</div>'+
2017
              '</fieldset>'+
2018
            '</div>'+
2019
            '<div id="kernel_path_inputs" class="kernel_path hidden">'+
2020
                  '<label for="KERNEL">'+tr("Kernel")+':</label>'+
2021
                  '<input type="text" id="KERNEL" name="kernel" />'+
2022
                  '<div class="tip">'+tr("Path to the OS kernel to boot the image")+'</div>'+
2120
      var html_tab_content = '<div id="os_tab" class="wizard_tab">'+     
2121
      '<form>'+
2122
        '<div class="row">'+
2123
          '<div class="six columns">'+ 
2124
              '<div class="row">'+
2125
                '<div class="four columns">'+
2126
                  '<label class="right inline" for="ARCH">'+tr("ARCH")+':</label>'+
2023 2127
                '</div>'+
2024
            '<br>'+  
2025
            '<fieldset>'+
2026
              '<input type="radio" name="initrd_type" value="initrd_ds" checked> Select a registered INITRD '+
2027
              '<input type="radio" name="initrd_type" value="initrd_path"> Specify the INITRD path in the remote Host'+
2028
            '</fieldset>'+
2029
            '<br>'+
2030
            '<div class="initrd_ds">'+
2031
              '<table id="datatable_initrd" class="display">'+
2032
                '<thead>'+
2033
                  '<tr>'+
2034
                    '<th class="check"><input type="checkbox" class="check_all" value="">'+tr("All")+'</input></th>'+
2035
                    '<th>'+tr("ID")+'</th>'+
2036
                    '<th>'+tr("Owner")+'</th>'+
2037
                    '<th>'+tr("Group")+'</th>'+
2038
                    '<th>'+tr("Name")+'</th>'+
2039
                    '<th>'+tr("Datastore")+'</th>'+
2040
                    '<th>'+tr("Size")+'</th>'+
2041
                    '<th>'+tr("Type")+'</th>'+
2042
                    '<th>'+tr("Registration time")+'</th>'+
2043
                    '<th>'+tr("Persistent")+'</th>'+
2044
                    '<th>'+tr("Status")+'</th>'+
2045
                    '<th>'+tr("#VMS")+'</th>'+
2046
                    '<th>'+tr("Target")+'</th>'+
2047
                  '</tr>'+
2048
                '</thead>'+
2049
                '<tbody id="tbodyimages">'+
2050
                '</tbody>'+
2051
              '</table>'+
2052
              '<fieldset>'+
2053
                '<div id="initrd_ds_inputs" class="vm_param kvm_opt xen_opt vmware_opt">'+
2054
                  '<p>You selected the following INITRD: '+
2055
                    '<span type="text" id="INITRD" name="initrd"></span>'+
2056
                    '</p>'+
2057
                  '<input type="hidden" id="INITRD_DS" name="initrd_id" size="2"/>'+
2058
                  '</div>'+
2059
              '</fieldset>'+
2060
            '</div>'+
2061
            '<div id="initrd_path_inputs" class="initrd_path hidden">'+
2062
                  '<label for="INITRD">'+tr("Initrd")+':</label>'+
2063
                  '<input type="text" id="INITRD" name="initrd"/>'+
2064
                  '<div class="tip">'+tr("Path to the initrd image")+'</div>'+
2128
                '<div class="six columns">'+
2129
                  '<select id="ARCH" name="arch">'+
2130
                        '<option value="i686">i686</option>'+
2131
                        '<option value="x86_64">x86_64</option>'+
2132
                  '</select>'+
2065 2133
                '</div>'+
2066
            '<br>'+  
2067
          '<fieldset>'+
2068
            '<div class="vm_param kvm vmware">'+
2069
              '<label for="ARCH">'+tr("Architecture")+':</label>'+
2070
              '<select id="ARCH" name="arch">'+
2071
                    '<option value="i686">i686</option>'+
2072
                    '<option value="x86_64">x86_64</option>'+
2073
              '</select>'+
2074
              '<div class="tip">'+tr("CPU architecture to virtualization")+'</div>'+
2075
            '</div>'+
2076
            '<!--xen necesita kernel o bootloader.'+
2077
            'Opciones de kernel son obligatorias si se activa kernel-->'+
2078
            '<div class="" id="kernel_bootloader">'+
2079
              '<label for="BOOT">'+tr("Boot")+':</label>'+
2080
              '<select id="BOOT" name="boot">'+
2081
                '<option id="no_boot" name="no_boot" value=""></option>'+
2082
                '<option value="hd">'+tr("HD")+'</option>'+
2083
                '<option value="fd">'+tr("FD")+'</option>'+
2084
                '<option value="cdrom">'+tr("CDROM")+'</option>'+
2085
                '<option value="network">'+tr("NETWORK")+'</option>'+
2086
              '</select>'+
2087
              '<div class="tip">'+tr("Boot device type")+'</div>'+
2088
            '</div>'+
2089
            '<div class="vm_param kvm xen kernel">'+
2090
                  '<label for="ROOT">'+tr("Root")+':</label>'+
2134
                '<div class="two columns">'+
2135
                  '<div class="tip">'+tr("CPU architecture to virtualization")+'</div>'+
2136
                '</div>'+
2137
              '</div>'+
2138
              '<div class="row">'+
2139
                '<div class="four columns">'+
2140
                  '<label class="right inline" for="BOOT">'+tr("BOOT")+':</label>'+
2141
                '</div>'+
2142
                '<div class="six columns">'+
2143
                  '<select id="BOOT" name="boot">'+
2144
                    '<option id="no_boot" name="no_boot" value=""></option>'+
2145
                    '<option value="hd">'+tr("HD")+'</option>'+
2146
                    '<option value="fd">'+tr("FD")+'</option>'+
2147
                    '<option value="cdrom">'+tr("CDROM")+'</option>'+
2148
                    '<option value="network">'+tr("NETWORK")+'</option>'+
2149
                  '</select>'+
2150
                '</div>'+
2151
                '<div class="two columns">'+
2152
                  '<div class="tip">'+tr("Boot device type")+'</div>'+
2153
                '</div>'+
2154
              '</div>'+
2155
              '<div class="row">'+
2156
                '<div class="four columns">'+
2157
                  '<label class="right inline" for="ROOT">'+tr("ROOT")+':</label>'+
2158
                '</div>'+
2159
                '<div class="six columns">'+
2091 2160
                  '<input type="text" id="ROOT" name="root"/>'+
2161
                '</div>'+
2162
                '<div class="two columns">'+
2092 2163
                  '<div class="tip">'+tr("Device to be mounted as root")+'</div>'+
2093
            '</div>'+
2094
                '<div class="vm_param kvm xen kernel">'+
2095
                  '<label for="KERNEL_CMD">'+tr("Kernel commands")+':</label>'+
2164
                '</div>'+
2165
              '</div>'+
2166
          '</div>'+
2167
          '<div class="six columns">'+ 
2168
              '<div class="row">'+
2169
                '<div class="four columns">'+
2170
                  '<label class="right inline" for="KERNEL_CMD">'+tr("KERNEL CMD")+':</label>'+
2171
                '</div>'+
2172
                '<div class="six columns">'+
2096 2173
                  '<input type="text" id="KERNEL_CMD" name="kernel_cmd" />'+
2174
                '</div>'+
2175
                '<div class="two columns">'+
2097 2176
                  '<div class="tip">'+tr("Arguments for the booting kernel")+'</div>'+
2098
            '</div>'+
2099
            '<div class="vm_param kvm_opt xen bootloader">'+
2100
                  '<label for="BOOTLOADER">'+tr("Bootloader")+':</label>'+
2177
                '</div>'+
2178
              '</div>'+
2179
              '<div class="row">'+
2180
                '<div class="four columns">'+
2181
                  '<label class="right inline" for="BOOTLOADER">'+tr("BOOTLOADER")+':</label>'+
2182
                '</div>'+
2183
                '<div class="six columns">'+
2101 2184
                  '<input type="text" id="BOOTLOADER" name="bootloader" />'+
2185
                '</div>'+
2186
                '<div class="two columns">'+
2102 2187
                  '<div class="tip">'+tr("Path to the bootloader executable")+'</div>'+
2103
            '</div>'+
2104
          '</fieldset>'+
2105
            '<div class="form_buttons">'+
2106
              '<button href="#" class="prev-tab" rel="2" style="float: left">< '+tr("NETWORK")+'</button>'+
2107
              '<button href="#" class="next-tab" rel="4">'+tr("INPUT/OUTPUT")+' ></button>'+
2108
            '</div>'+
2188
                '</div>'+
2189
              '</div>'+
2190
          '</div>'+
2191
        '</div>'+
2192
        '<div class="row">'+
2193
          '<div class="six columns">'+
2194
            '<fieldset>'+
2195
              '<legend>'+tr("Kernel")+'</legend>'+
2196
              '<div class="row">'+
2197
                '<div class="six columns">'+
2198
                  '<input type="radio" name="kernel_type" value="kernel_ds" checked> Registered Image'+
2199
                '</div>'+
2200
                '<div class="six columns">'+
2201
                  '<input type="radio" name="kernel_type" value="kernel_path"> Remote PATH'+
2202
                '</div>'+
2203
              '</div>'+
2204
              '<br>'+
2205
              '<div class="row kernel_ds">'+
2206
                '<table id="datatable_kernel" class="display">'+
2207
                  '<thead>'+
2208
                    '<tr>'+
2209
                      '<th class="check"><input type="checkbox" class="check_all" value=""></input></th>'+
2210
                      '<th>'+tr("ID")+'</th>'+
2211
                      '<th>'+tr("Owner")+'</th>'+
2212
                      '<th>'+tr("Group")+'</th>'+
2213
                      '<th>'+tr("Name")+'</th>'+
2214
                      '<th>'+tr("Datastore")+'</th>'+
2215
                      '<th>'+tr("Size")+'</th>'+
2216
                      '<th>'+tr("Type")+'</th>'+
2217
                      '<th>'+tr("Registration time")+'</th>'+
2218
                      '<th>'+tr("Persistent")+'</th>'+
2219
                      '<th>'+tr("Status")+'</th>'+
2220
                      '<th>'+tr("#VMS")+'</th>'+
2221
                      '<th>'+tr("Target")+'</th>'+
2222
                    '</tr>'+
2223
                  '</thead>'+
2224
                  '<tbody id="tbodyimages">'+
2225
                  '</tbody>'+
2226
                '</table>'+
2227
                '<fieldset>'+
2228
                  '<div id="kernel_ds_inputs" class="vm_param kvm_opt xen_opt vmware_opt">'+
2229
                    '<p>You selected the following KERNEL: '+
2230
                      '<span type="text" id="KERNEL" name="kernel"></span>'+
2231
                      '</p>'+
2232
                    '<input type="hidden" id="KERNEL_DS" name="kernel_ds" size="2"/>'+
2233
                    '</div>'+
2234
                '</fieldset>'+
2235
              '</div>'+
2236
            '<div id="kernel_path_inputs" class="kernel_path hidden row">'+
2237
                '<div class="four columns">'+
2238
                  '<label class="right inline" for="KERNEL">'+tr("PATH")+':</label>'+
2239
                '</div>'+
2240
                '<div class="six columns">'+
2241
                  '<input type="text" id="KERNEL" name="kernel" />'+
2242
                '</div>'+
2243
                '<div class="two columns">'+
2244
                  '<div class="tip">'+tr("Path to the OS kernel to boot the image")+'</div>'+
2245
                '</div>'+
2246
              '</div>'+
2247
            '</fieldset>'+
2248
          '</div>'+
2249
          '<div class="six columns">'+
2250
            '<fieldset>'+
2251
              '<legend>'+tr("Ramdisk")+'</legend>'+
2252
              '<div class="row">'+
2253
                '<div class="six columns">'+
2254
                  '<input type="radio" name="initrd_type" value="initrd_ds" checked> Registered Image '+
2255
                '</div>'+
2256
                '<div class="six columns">'+
2257
                  '<input type="radio" name="initrd_type" value="initrd_path"> Remote PATH'+
2258
                '</div>'+
2259
              '</div>'+
2260
              '<br>'+
2261
              '<div class="row initrd_ds">'+
2262
                '<table id="datatable_initrd" class="display">'+
2263
                  '<thead>'+
2264
                    '<tr>'+
2265
                      '<th class="check"><input type="checkbox" class="check_all" value=""></input></th>'+
2266
                      '<th>'+tr("ID")+'</th>'+
2267
                      '<th>'+tr("Owner")+'</th>'+
2268
                      '<th>'+tr("Group")+'</th>'+
2269
                      '<th>'+tr("Name")+'</th>'+
2270
                      '<th>'+tr("Datastore")+'</th>'+
2271
                      '<th>'+tr("Size")+'</th>'+
2272
                      '<th>'+tr("Type")+'</th>'+
2273
                      '<th>'+tr("Registration time")+'</th>'+
2274
                      '<th>'+tr("Persistent")+'</th>'+
2275
                      '<th>'+tr("Status")+'</th>'+
2276
                      '<th>'+tr("#VMS")+'</th>'+
2277
                      '<th>'+tr("Target")+'</th>'+
2278
                    '</tr>'+
2279
                  '</thead>'+
2280
                  '<tbody id="tbodyimages">'+
2281
                  '</tbody>'+
2282
                '</table>'+
2283
                '<fieldset>'+
2284
                  '<div id="initrd_ds_inputs" class="vm_param kvm_opt xen_opt vmware_opt">'+
2285
                    '<p>You selected the following INITRD: '+
2286
                      '<span type="text" id="INITRD" name="initrd"></span>'+
2287
                      '</p>'+
2288
                    '<input type="hidden" id="INITRD_DS" name="initrd_id" size="2"/>'+
2289
                    '</div>'+
2290
                '</fieldset>'+
2291
              '</div>'+
2292
            '<div id="initrd_path_inputs" class="initrd_path hidden row">'+
2293
                '<div class="four columns">'+
2294
                  '<label class="right inline" for="INITRD">'+tr("PATH")+':</label>'+
2295
                '</div>'+
2296
                '<div class="six columns">'+
2297
                  '<input type="text" id="INITRD" name="initrd"/>'+
2298
                '</div>'+
2299
                '<div class="two columns">'+
2300
                  '<div class="tip">'+tr("Path to the initrd image")+'</div>'+
2301
                '</div>'+
2302
              '</div>'+
2303
            '</fieldset>'+
2304
          '</div>'+  
2305
        '</div>'+
2306
      '</form>'+
2109 2307
        '</div>'
2110 2308

  
2111 2309
      // Append the new div containing the tab and add the tab to the list
2112
      tabs.append(html_tab_content).tabs('add', '#os_tab', 'OS BOOTING', temp_index); 
2310
      tabs.append(html_tab_content).tabs('add', '#os_tab', 'OS Booting', temp_index); 
2113 2311
      $( "#template_create_tabs a[href='#os_tab']").parent().remove("span")
2114 2312

  
2115 2313
        // Select Image or Volatile disk. The div is hidden depending on the selection, and the 
......
2148 2346
            "bJQueryUI": true,
2149 2347
            "bSortClasses": false,
2150 2348
            "bAutoWidth":false,
2151
            "sDom" : '<"H"frC>t<"F"ip>',
2349
            "sDom" : '<"H"fr>t<"F"p>',
2152 2350
            "iDisplayLength": 4,
2153 2351
            "oColVis": {
2154 2352
                "aiExclude": [ 0 ]
......
2160 2358
                { "sWidth": "35px", "aTargets": [1,6,11,12] },
2161 2359
                { "sWidth": "100px", "aTargets": [5,7] },
2162 2360
                { "sWidth": "150px", "aTargets": [8] },
2163
                { "bVisible": false, "aTargets": [0,2,3,6,7,9,8,12]}
2361
                { "bVisible": false, "aTargets": [0,3,2,5,6,7,9,8,11,12,10]}
2164 2362
            ],
2165 2363
            "oLanguage": (datatable_lang != "") ?
2166 2364
                {
......
2219 2417
            "bSortClasses": false,
2220 2418
            "bAutoWidth":false,
2221 2419
            "iDisplayLength": 4,
2222
            "sDom" : '<"H"frC>t<"F"ip>',
2420
            "sDom" : '<"H"fr>t<"F"p>',
2223 2421
            "oColVis": {
2224 2422
                "aiExclude": [ 0 ]
2225 2423
            },
......
2230 2428
                { "sWidth": "35px", "aTargets": [1,6,11,12] },
2231 2429
                { "sWidth": "100px", "aTargets": [5,7] },
2232 2430
                { "sWidth": "150px", "aTargets": [8] },
2233
                { "bVisible": false, "aTargets": [0,2,3,6,7,9,8,12]}
2431
                { "bVisible": false, "aTargets": [0,2,3,5,6,7,9,8,10,11,12]}
2234 2432
            ],
2235 2433
            "oLanguage": (datatable_lang != "") ?
2236 2434
                {
......
2256 2454
          error: onError
2257 2455
        });
2258 2456

  
2457
        datTable_template_initrd.fnFilter("RAMDISK", 6)
2259 2458
        // TBD Add refresh button for the datatable
2260 2459

  
2261 2460
        // When a row is selected the background color is updated. If a previous row
......
2300 2499
    **************************************************************************/
2301 2500

  
2302 2501
    var add_io_tab = function(temp_index) {
2303
      var html_tab_content = '<div id="io_tab">'+
2304
        '<div class="graphics">'+
2305
          '<fieldset>'+
2306
            '<legend>'+tr("Graphics")+'</legend>'+
2307
            '<input type="radio" name="graphics_type" ID="TYPE" value="VNC"> VNC '+
2308
            '<input type="radio" name="graphics_type" ID="TYPE" value="SDL"> SDL'+
2309
            '<input type="radio" name="graphics_type" ID="TYPE" value="SPICE"> SPICE'+
2310
            '<div class="vm_param kvm_opt xen_opt vmware_opt">'+
2311
                  '<label for="LISTEN">'+tr("Listen IP")+':</label>'+
2502
      var html_tab_content = '<div id="io_tab" class="wizard_tab">'+
2503
        '<form>'+
2504
          '<div class="row">'+
2505
          '<div class="six columns graphics">'+
2506
            '<fieldset>'+
2507
              '<legend>'+tr("Graphics")+'</legend>'+
2508
              '<div class="row vm_param">'+
2509
                '<input type="radio" name="graphics_type" ID="TYPE" value="VNC"> VNC '+
2510
                '<input type="radio" name="graphics_type" ID="TYPE" value="SDL"> SDL'+
2511
                '<input type="radio" name="graphics_type" ID="TYPE" value="SPICE"> SPICE'+
2512
              '</div>'+
2513
              '<br>'+
2514
              '<div class="row vm_param">'+
2515
                '<div class="four columns">'+
2516
                  '<label class="right inline" for="LISTEN">'+tr("Listen IP")+':</label>'+
2517
                '</div>'+
2518
                '<div class="six columns">'+
2312 2519
                  '<input type="text" id="LISTEN" name="graphics_ip" />'+
2520
                '</div>'+
2521
                '<div class="two columns">'+
2313 2522
                  '<div class="tip">'+tr("IP to listen on")+'</div>'+
2314
            '</div>'+
2315
            '<div class="vm_param kvm_opt xen_opt vmware_opt">'+
2316
                  '<label for="PORT">'+tr("Port")+':</label>'+
2523
                '</div>'+
2524
              '</div>'+
2525
              '<div class="row vm_param">'+
2526
                '<div class="four columns">'+
2527
                  '<label class="right inline" for="PORT">'+tr("Port")+':</label>'+
2528
                '</div>'+
2529
                '<div class="six columns">'+
2317 2530
                  '<input type="text" id="PORT" name="port" />'+
2531
                '</div>'+
2532
                '<div class="two columns">'+
2318 2533
                  '<div class="tip">'+tr("Port for the VNC/SPICE server")+'</div>'+
2319
            '</div>'+
2320
            '<div class="vm_param kvm_opt xen_opt vmware_opt">'+
2321
                  '<label for="PASSWD">'+tr("Password")+':</label>'+
2534
                '</div>'+
2535
              '</div>'+
2536
              '<div class="row vm_param">'+
2537
                '<div class="four columns">'+
2538
                  '<label class="right inline" for="PASSWD">'+tr("Password")+':</label>'+
2539
                '</div>'+
2540
                '<div class="six columns">'+
2322 2541
                  '<input type="text" id="PASSWD" name="graphics_pw" />'+
2542
                '</div>'+
2543
                '<div class="two columns">'+
2323 2544
                  '<div class="tip">'+tr("Password for the VNC/SPICE server")+'</div>'+
2324
            '</div>'+
2325
            '<div class="vm_param kvm_opt xen_opt vmware_opt">'+
2326
                  '<label for="KEYMAP">'+tr("Keymap")+'</label>'+
2545
                '</div>'+
2546
              '</div>'+
2547
              '<div class="row vm_param">'+
2548
                '<div class="four columns">'+
2549
                  '<label class="right inline" for="KEYMAP">'+tr("Keymap")+'</label>'+
2550
                '</div>'+
2551
                '<div class="six columns">'+
2327 2552
                  '<input type="text" id="KEYMAP" name="keymap" />'+
2553
                '</div>'+
2554
                '<div class="two columns">'+
2328 2555
                  '<div class="tip">'+tr("Keyboard configuration locale to use in the VNC/SPICE display")+'</div>'+
2329
            '</div>'+
2330
          '</fieldset>'+
2331
        '</div>'+
2332
        '<div class="input">'+
2333
          '<fieldset>'+
2334
            '<legend>'+tr("Inputs")+'</legend>'+
2335
            '<div class="">'+
2336
              '<label for="TYPE">'+tr("Type")+':</label>'+
2337
              '<select id="TYPE" name="input_type">'+
2338
                    '<option value="mouse">'+tr("Mouse")+'</option>'+
2339
                    '<option value="tablet">'+tr("Tablet")+'</option>'+
2340
              '</select>'+
2341
              '<div class="tip"></div>'+
2342
            '</div>'+
2343
            '<div class="">'+
2344
              '<label for="BUS">'+tr("Bus")+':</label>'+
2345
              '<select id="BUS" name="input_bus">'+
2346
                  '<option value="usb">'+tr("USB")+'</option>'+
2347
                  '<option value="ps2">'+tr("PS2")+'</option>'+
2348
                  '<option value="xen">'+tr("XEN")+'</option>'+
2349
              '</select>'+
2350
              '<div class="tip"></div>'+
2351
            '</div>'+
2352
            '<button id="add_input" class="kvm_opt">'+tr("Add")+'</button>'+
2353
            '<div class="vm_param kvm_opt xen_opt vmware_opt">'+
2354
              '<table id="input_table" class="display">'+
2556
                '</div>'+
2557
              '</div>'+
2558
            '</fieldset>'+
2559
          '</div>'+
2560
          '<div class="six columns">'+
2561
            '<fieldset>'+
2562
              '<legend>'+tr("Inputs")+'</legend>'+
2563
              '<div class="row">'+
2564
                '<div class="four columns">'+
2565
                  '<label class="right inline" for="TYPE">'+tr("Type")+':</label>'+
2566
                '</div>'+
2567
                '<div class="six columns">'+
2568
                  '<select id="TYPE" name="input_type">'+
2569
                        '<option value="mouse">'+tr("Mouse")+'</option>'+
2570
                        '<option value="tablet">'+tr("Tablet")+'</option>'+
2571
                  '</select>'+
2572
                '</div>'+
2573
                '<div class="two columns">'+
2574
                  '<div class="tip"></div>'+
2575
                '</div>'+
2576
              '</div>'+
2577
              '<div class="row">'+
2578
                '<div class="four columns">'+
2579
                  '<label class="right inline" for="BUS">'+tr("Bus")+':</label>'+
2580
                '</div>'+
2581
                '<div class="six columns">'+
2582
                  '<select id="BUS" name="input_bus">'+
2583
                      '<option value="usb">'+tr("USB")+'</option>'+
2584
                      '<option value="ps2">'+tr("PS2")+'</option>'+
2585
                      '<option value="xen">'+tr("XEN")+'</option>'+
2586
                  '</select>'+
2587
                '</div>'+
2588
                '<div class="two columns">'+
2589
                  '<div class="tip"></div>'+
2590
                '</div>'+
2591
              '</div>'+
2592
              '<div class="row">'+
2593
                '<button href="#" id="add_input" class="push-four six" action="" onclick="return false">'+tr("Add")+'</button>'+
2594
              '</div>'+
2595
              '<br>'+
2596
              '<div class="row">'+
2597
              '<table id="input_table" class="table-custom display">'+
2355 2598
                 '<thead>'+
2356 2599
                   '<tr>'+
2357 2600
                     '<th>'+tr("TYPE")+'</th>'+
......
2362 2605
                 '<tbody id="tbodyinput">'+
2363 2606
                 '</tbody>'+
2364 2607
              '</table>'+
2365
            '</div>'+
2366
          '</fieldset>'+
2367
        '</div>'+
2368
        '<div class="form_buttons">'+
2369
          '<button href="#" class="prev-tab" rel="3" style="float: left">< '+tr("OS BOOTING")+'</button>'+
2370
          '<button href="#" class="next-tab" rel="5">'+tr("CONTEXT")+' ></button>'+
2371
        '</div>'+
2608
              '<br>'+
2609
              '</div>'+
2610
            '</fieldset>'+
2611
          '</div>'+
2612
          '</div>'+
2613
        '</form>'+
2372 2614
      '</div>'
2373 2615

  
2374 2616
      // Append the new div containing the tab and add the tab to the list
2375
      tabs.append(html_tab_content).tabs('add', '#io_tab', 'INPUT/OUTPUT', temp_index); 
2617
      tabs.append(html_tab_content).tabs('add', '#io_tab', 'Input/Output', temp_index); 
2376 2618

  
2377 2619
      $("input[name='graphics_type']").change(function(){
2378 2620
        $("#LISTEN", $('div#io_tab')).val("0.0.0.0")
......
2417 2659
    **************************************************************************/
2418 2660

  
2419 2661
    var add_context_tab = function(temp_index) {
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff