From 27b67de20d19b104fd83fd30c1f9faba35fb373a Mon Sep 17 00:00:00 2001 From: Daniel Molina Date: Tue, 25 Jun 2013 17:38:21 +0200 Subject: [PATCH] Update role layout in service tab --- .../public/js/apptools-appflow-services.js | 80 +++++++++---------- 1 file changed, 36 insertions(+), 44 deletions(-) diff --git a/flow/sunstone/public/js/apptools-appflow-services.js b/flow/sunstone/public/js/apptools-appflow-services.js index c422c26386..854d26b027 100644 --- a/flow/sunstone/public/js/apptools-appflow-services.js +++ b/flow/sunstone/public/js/apptools-appflow-services.js @@ -1439,16 +1439,38 @@ function updateServiceInfo(request,elem){ var generate_role_div = function(role_index) { var role = roles[role_index] - var info_str = '
\ + var info_str = "\
\ - '+tr("Role")+' - '+role.name+'\ + "+tr("Role")+" - "+role.name+"\ +
\ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ +
"+tr("Information")+"
"+tr("Shutdown action")+""+(role.shutdown_action || "-")+""+tr("Cooldown")+""+(role.cooldown || "-")+""+tr("Min VMs")+""+(role.min_vms || "-")+""+tr("Max VMs")+""+(role.max_vms || "-")+"
\ +
"; + + info_str += '
\ + '+tr("Virtual Machines")+'\
\
\
\
\
\
\ - \ +
\ \ \ \ @@ -1469,43 +1491,13 @@ function updateServiceInfo(request,elem){ \ \
\ -
'; + \ +
'; - info_str += "
\ - \ - \ - \ - \ - "; - - info_str += "\ - \ - \ - \ - \ - \ - \ - "; - - - info_str += "\ - \ - \ - \ - \ - \ - \ - "; - - info_str += "\ -
"+tr("Information")+"
"+tr("State")+""+Role.state(role.state)+""+tr("Shutdown action")+""+(role.shutdown_action || "")+""+tr("Cooldown")+""+(role.cooldown || "")+"
"+tr("Cardinality")+""+role.cardinality+""+tr("Min VMs")+""+(role.min_vms || "")+""+tr("Max VMs")+""+(role.max_vms || "")+"
"; - - - info_str += "
\ -
"; + info_str += "

"; if (role.elasticity_policies && role.elasticity_policies.length > 0) { - info_str += '\ + info_str += '
\ \ \ \ @@ -1528,11 +1520,11 @@ function updateServiceInfo(request,elem){ info_str += '\ \ \ - \ + \ \ \ - \ - \ + \ + \ ' }); @@ -1541,7 +1533,7 @@ function updateServiceInfo(request,elem){ } if (role.scheduled_policies && role.scheduled_policies.length > 0) { - info_str += '
'+tr("Elasticity policies")+'
'+this.type+''+this.adjust+''+(this.min_adjust_step || "")+''+(this.min_adjust_step || "-")+''+(this.expression_evaluated || this.expression)+''+(this.true_evals || 0 )+'/'+ this.period+''+this.period_number+''+(this.cooldown || "")+''+(this.period_number || "-")+''+(this.cooldown || "-")+'
\ + info_str += '
\ \ \ \ @@ -1587,9 +1579,9 @@ function updateServiceInfo(request,elem){ var vms = []; serviceroleVMsDataTable = $('#datatable_service_vms_'+role.name, context).dataTable({ "aoColumnDefs": [ - { "bSortable": false, "aTargets": [0,6,7,9,11] }, - { "sWidth": "35px", "aTargets": [0] }, - { "bVisible": false, "aTargets": [6,7,10]} + { "bSortable": false, "aTargets": [0,1,7,8,10,12] }, + { "sWidth": "35px", "aTargets": [0,1] }, + { "bVisible": false, "aTargets": [7,8,11]} ] });
'+tr("Scheduled policies")+'