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:
parent
b2ee8711ef
commit
1771ee4236
@ -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 = [
|
||||
|
53
src/sunstone/public/app/tabs/vms-tab/panels/template.js
Normal file
53
src/sunstone/public/app/tabs/vms-tab/panels/template.js
Normal 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) {
|
||||
}
|
||||
});
|
@ -0,0 +1,3 @@
|
||||
define(function(require){
|
||||
return 'vm_template_tab';
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user