1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

feature #3748: Add template panel

This commit is contained in:
Daniel Molina 2015-06-09 19:01:36 +02:00
parent b2ee8711ef
commit 1771ee4236
3 changed files with 58 additions and 1 deletions

View File

@ -24,7 +24,8 @@ define(function(require) {
require('./vms-tab/panels/snapshots'),
require('./vms-tab/panels/placement'),
require('./vms-tab/panels/actions'),
// require('./vms-tab/panels/template')
require('./vms-tab/panels/template'),
require('./vms-tab/panels/log')
];
var _formPanels = [

View File

@ -0,0 +1,53 @@
define(function(require) {
/*
DEPENDENCIES
*/
var Locale = require('utils/locale');
var Humanize = require('utils/humanize');
/*
CONSTANTS
*/
var TAB_ID = require('../tabId');
var PANEL_ID = require('./template/panelId');
var RESOURCE = "VM"
var XML_ROOT = "VM"
/*
CONSTRUCTOR
*/
function Panel(info) {
this.title = Locale.tr("Template");
this.icon = "fa-file-o";
this.element = info[XML_ROOT];
return this;
};
Panel.PANEL_ID = PANEL_ID;
Panel.prototype.html = _html;
Panel.prototype.setup = _setup;
return Panel;
/*
FUNCTION DEFINITIONS
*/
function _html() {
return '<div class="row">\
<div class="large-12 columns">\
<table id="vm_template_table" class="info_table dataTable">' +
Humanize.prettyPrintJSON(this.element.TEMPLATE) +
'</table>\
</div>\
</div>'
}
function _setup(context) {
}
});

View File

@ -0,0 +1,3 @@
define(function(require){
return 'vm_template_tab';
});