mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-16 22:50:10 +03:00
B #4782: Fix NaN cost, remove 'create a new service' button
This commit is contained in:
parent
a367336436
commit
c2e6902ada
@ -127,7 +127,9 @@ define(function(require) {
|
||||
|
||||
var cost = OpenNebula.Template.cost(template_json);
|
||||
|
||||
if ((cost != 0) && Config.isFeatureEnabled("showback")) {
|
||||
var has_cost = (cost != 0) && Config.isFeatureEnabled("showback");
|
||||
|
||||
if (has_cost) {
|
||||
$(".provision_create_service_cost_div", context).show();
|
||||
$(".provision_create_service_cost_div", context).data("cost", cost);
|
||||
|
||||
@ -150,11 +152,15 @@ define(function(require) {
|
||||
$( ".cardinality_slider_div", context).show();
|
||||
$( ".cardinality_no_slider_div", context).hide();
|
||||
|
||||
$( ".cardinality_slider_div", context).on("input", 'input', function() {
|
||||
var cost_value = $(".provision_create_service_cost_div", context).data("cost")*$(this).val();
|
||||
$(".cost_value", context).html(cost_value.toFixed(2));
|
||||
_calculateFlowCost();
|
||||
});
|
||||
$( ".cardinality_slider_div", context).off("input");
|
||||
|
||||
if (has_cost) {
|
||||
$( ".cardinality_slider_div", context).on("input", 'input', function() {
|
||||
var cost_value = $(".provision_create_service_cost_div", context).data("cost")*$(this).val();
|
||||
$(".cost_value", context).html(cost_value.toFixed(2));
|
||||
_calculateFlowCost();
|
||||
});
|
||||
}
|
||||
} else {
|
||||
$( ".cardinality_slider_div", context).hide();
|
||||
$( ".cardinality_no_slider_div", context).show();
|
||||
|
@ -44,7 +44,7 @@
|
||||
<span class="selected_template">
|
||||
<span class="provision-logo selected_template_logo"></span>
|
||||
<span class="selected_template_name"></span>
|
||||
<span class="has-tip"> <i class="fa fa-pencil"/></span>
|
||||
<span> <i class="fa fa-pencil"/></span>
|
||||
</span>
|
||||
</a>
|
||||
<div id="provision_dd_flow_template" class="provision_select_flow_template accordion-content" data-tab-content>
|
||||
|
@ -151,17 +151,10 @@ define(function(require) {
|
||||
'<br>'+
|
||||
'<br>'+
|
||||
'<span>'+
|
||||
Locale.tr("Looks like you don't have any Service. Click the button below to get started")+
|
||||
Locale.tr("There are no Services")+
|
||||
'</span>'+
|
||||
'<br>'+
|
||||
'<br>'+
|
||||
'<div class="row">'+
|
||||
'<div class="large-6 large-centered columns">'+
|
||||
'<a href"#" class="medium large-12 button radius provision_create_flow_button"">'+Locale.tr("Create a new Service")+'</a>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'<br>'+
|
||||
'<br>'+
|
||||
'</div>');
|
||||
} else {
|
||||
$(".provision_flows_table", context).html('<div class="provision_flows_ul large-up-3 medium-up-3 small-up-1"></div>');
|
||||
|
Loading…
x
Reference in New Issue
Block a user