diff --git a/env/sunstone/public/js/user-plugins/apptools.appenv.js b/env/sunstone/public/js/user-plugins/apptools.appenv.js
index 45338e4252..d8b03de205 100644
--- a/env/sunstone/public/js/user-plugins/apptools.appenv.js
+++ b/env/sunstone/public/js/user-plugins/apptools.appenv.js
@@ -618,6 +618,7 @@ function setupCreateAppEnvDialog(){
return false;
});
+/******** UNUSED
$('#add_custom_var_appenv_button', dialog).click(
function(){
var name = $('#custom_var_appenv_name',dialog).val();
@@ -640,6 +641,7 @@ function setupCreateAppEnvDialog(){
return false;
}
);
+*/
$('#create_appenv_form',dialog).submit(function(){
diff --git a/flow/sunstone/public/js/user-plugins/apptools.appflow.services.js b/flow/sunstone/public/js/user-plugins/apptools.appflow.services.js
index 598603f1a4..fa8b91939e 100644
--- a/flow/sunstone/public/js/user-plugins/apptools.appflow.services.js
+++ b/flow/sunstone/public/js/user-plugins/apptools.appflow.services.js
@@ -400,9 +400,22 @@ function updateServicesView(request, services_list){
//updateVResDashboard("images",images_list);
}
+// Callback to refresh the list of Virtual Machines
+function updateServiceVMInfo(vmachine_list){
+ var vmachine_list_array = [];
+
+ $.each(vmachine_list,function(){
+ vmachine_list_array.push( vMachineElementArray(this));
+ });
+
+ updateView(vmachine_list_array, servicevmsDataTable);
+};
+
// Callback to update the information panel tabs and pop it up
function updateServiceInfo(request,elem){
var elem_info = elem.DOCUMENT;
+
+ /*
elem_info.TEMPLATE.BODY = JSON.parse(elem_info.TEMPLATE.BODY);
// Form trs for variables
@@ -426,43 +439,35 @@ function updateServiceInfo(request,elem){
compat_templates += '';
-
+*/
var info_tab = {
- title: tr("Flowironment information"),
+ title: tr("Information"),
content:
- '
\
+ '\
\
- | '+tr("Flowironment")+' "'+elem_info.NAME+'" '+
+ |
|---|
| '+tr("Service")+' \"'+elem_info.NAME+'\" '+
tr("information")+' |
\
\
\
- | '+tr("ID")+' | \
- '+elem_info.ID+' | \
+ '+tr("ID")+' | \
+ '+elem_info.ID+' | \
\
\
- | '+tr("Name")+' | \
- '+elem_info.NAME+' | \
+ '+tr("Name")+' | \
+ '+elem_info.NAME+' | \
\
\
- | '+tr("Description")+' | \
- '+(elem_info.TEMPLATE.BODY.description ? elem_info.TEMPLATE.BODY.description : "None" )+' | \
+ '+tr("Owner")+' | \
+ '+elem_info.UNAME+' | \
\
\
- | '+tr("Owner")+' | \
- '+elem_info.UNAME+' | \
+ '+tr("Group")+' | \
+ '+elem_info.GNAME+' | \
\
- \
- | '+tr("Group")+' | \
- '+elem_info.GNAME+' | \
-
\
-'+ (templates ?
- '| '+tr("Compatible templates")+' | '+ templates.join(',')+' |
' : "")
-+ (elem_info.TEMPLATE.BODY.cookbooks ?
- '| '+tr("Cookbooks")+' | '+elem_info.TEMPLATE.BODY.cookbooks+' |
' : "")+
-' | '+tr("Permissions")+' | |
\
+ | '+tr("Permissions")+' | |
\
\
| '+tr("Owner")+' | \
'+ownerPermStr(elem_info)+' | \
@@ -475,41 +480,79 @@ function updateServiceInfo(request,elem){
'+tr("Other")+' | \
'+otherPermStr(elem_info)+' | \
\
-'+ (!$.isEmptyObject(defaults) ?
- '| '+tr("Default variables")+' | |
' +
- prettyPrintJSON(defaults, 28) : "") + '
\
-\
- \
- \
- | '+tr("Instantiate this flowironment")+' |
\
- \
\
- | '+tr("Template")+': | \
- | \
-
\
- | '+tr("Variables")+': | \
- | \
+ '+tr("Strategy")+' | \
+ '+elem_info.TEMPLATE.BODY.deployment+' | \
\
-'+ vars +'\
- \
- | \
- | \
-
'
+
'
}
var node_tab = {
title: tr("Node"),
content: '\
| '+tr("Node")+' |
'+
- (elem_info.TEMPLATE.BODY.node ? prettyPrintJSON(elem_info.TEMPLATE.BODY.node) : "" )+
+ (elem_info.TEMPLATE.BODY ? prettyPrintJSON(elem_info.TEMPLATE.BODY) : "" )+
'
'
}
+ var vms_tab = {
+ title : "Virtual Machines",
+ content : '\
+\
+
\
+ \
+ \
+ | ID | \
+ Owner | \
+ Group | \
+ Name | \
+ Status | \
+ Used CPU | \
+ Used Memory | \
+ Host | \
+ IPs | \
+ Start Time | \
+
\
+ \
+ \
+ \
+
'
+ };
+
+
+
+ var vms = [];
+ vms.push(elem_info.TEMPLATE.BODY.roles[0].nodes[0].vm_info);
+
+
Sunstone.updateInfoPanelTab("service_info_panel","service_info_tab",info_tab);
Sunstone.updateInfoPanelTab("service_info_panel","service_node_tab",node_tab);
+ Sunstone.updateInfoPanelTab("service_info_panel","service_vms_tab",vms_tab);
+
+ servicevmsDataTable = $('#datatable_service_vms').dataTable({
+ "bJQueryUI": true,
+ "bSortClasses": false,
+ "sPaginationType": "full_numbers",
+ "bAutoWidth":false,
+ "sDom" : '<"H"lfrC>t<"F"ip>',
+ "aoColumnDefs": [
+ { "sWidth": "35px", "aTargets": [0] },
+ { "sWidth": "60px", "aTargets": [5,6] },
+ { "sWidth": "100px", "aTargets": [1,2,4,8] },
+ { "bVisible" : false, "aTargets": [5,6,9] }
+ ]
+ });
+
+ var vmachine_list_array = [];
+
+ $.each(vms,function(){
+ vmachine_list_array.push( vMachineElementArray(this));
+ });
+
+ servicevmsDataTable.fnAddData(vmachine_list_array);
+ servicevmsDataTable.fnDraw(false);
Sunstone.popUpInfoPanel("service_info_panel");
-
}
@@ -634,6 +677,8 @@ $(document).ready(function(){
} : ""
});
+
+
dataTable_services.fnClearTable();
addElement([
spinner,
diff --git a/flow/sunstone/public/js/user-plugins/apptools.appflow.templates.js b/flow/sunstone/public/js/user-plugins/apptools.appflow.templates.js
index 2c7b92f03f..21a655c40b 100644
--- a/flow/sunstone/public/js/user-plugins/apptools.appflow.templates.js
+++ b/flow/sunstone/public/js/user-plugins/apptools.appflow.templates.js
@@ -16,6 +16,11 @@
var ServiceTemplate = {
"resource" : 'DOCUMENT',
"path" : 'service_template',
+ "create": function(params){
+ OpenNebula.Action.create(params, ServiceTemplate.resource,
+ ServiceTemplate.path);
+ },
+
"instantiate": function(params){
var action_obj = params.data.extra_param;
OpenNebula.Action.simple_action(params,
@@ -76,50 +81,55 @@ var service_template_tab_content = '\
\
-->\
';
-/*+++++++++++++++++++++++++++++++
+
var create_service_template_tmpl = '\