mirror of https://github.com/apache/cloudstack.git
bug 11260: cloudStack - create system service offering dialog: add network rate field.
This commit is contained in:
parent
b4123700dd
commit
80ec132cc8
|
|
@ -124,6 +124,16 @@ dictionary = {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<fmt:message key="network.rate"/>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="network_rate">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
|
|
@ -262,7 +272,12 @@ dictionary = {
|
|||
<label for="user_name"><fmt:message key="label.memory.mb"/>:</label>
|
||||
<input class="text" type="text" name="add_service_memory" id="add_service_memory"/>
|
||||
<div id="add_service_memory_errormsg" class="dialog_formcontent_errormsg" style="display:none;" ></div>
|
||||
</li>
|
||||
</li>
|
||||
<li>
|
||||
<label><fmt:message key="network.rate"/>:</label>
|
||||
<input class="text" type="text" id="network_rate"/>
|
||||
<div id="network_rate_errormsg" class="dialog_formcontent_errormsg" style="display:none;" ></div>
|
||||
</li>
|
||||
<li id="add_service_offerha_container">
|
||||
<label><fmt:message key="label.offer.ha"/>:</label>
|
||||
<select class="select" id="add_service_offerha">
|
||||
|
|
|
|||
|
|
@ -82,6 +82,7 @@ function initAddSystemServiceOfferingDialog() {
|
|||
$dialogAddSystemServiceOffering.find("#add_service_cpucore").val("");
|
||||
$dialogAddSystemServiceOffering.find("#add_service_cpu").val("");
|
||||
$dialogAddSystemServiceOffering.find("#add_service_memory").val("");
|
||||
$dialogAddSystemServiceOffering.find("#network_rate").val("");
|
||||
$dialogAddSystemServiceOffering.find("#add_service_offerha").val("false");
|
||||
|
||||
$dialogAddSystemServiceOffering
|
||||
|
|
@ -96,6 +97,7 @@ function initAddSystemServiceOfferingDialog() {
|
|||
isValid &= validateInteger("# of CPU Core", $thisDialog.find("#add_service_cpucore"), $thisDialog.find("#add_service_cpucore_errormsg"), 1, 1000);
|
||||
isValid &= validateInteger("CPU", $thisDialog.find("#add_service_cpu"), $thisDialog.find("#add_service_cpu_errormsg"), 100, 100000);
|
||||
isValid &= validateInteger("Memory", $thisDialog.find("#add_service_memory"), $thisDialog.find("#add_service_memory_errormsg"), 64, 1000000);
|
||||
isValid &= validateInteger("Network Rate", $thisDialog.find("#network_rate"), $thisDialog.find("#network_rate_errormsg"), null, null, true); //optional
|
||||
isValid &= validateString("Tags", $thisDialog.find("#add_service_tags"), $thisDialog.find("#add_service_tags_errormsg"), true); //optional
|
||||
|
||||
if($thisDialog.find("#domain_container").css("display") != "none") {
|
||||
|
|
@ -143,6 +145,10 @@ function initAddSystemServiceOfferingDialog() {
|
|||
var memory = $thisDialog.find("#add_service_memory").val();
|
||||
array1.push("&memory="+memory);
|
||||
|
||||
var networkRate = $thisDialog.find("#network_rate").val();
|
||||
if(networkRate != null && networkRate.length > 0)
|
||||
array1.push("&networkrate="+networkRate);
|
||||
|
||||
var offerha = $thisDialog.find("#add_service_offerha").val();
|
||||
array1.push("&offerha="+offerha);
|
||||
|
||||
|
|
@ -326,6 +332,7 @@ function systemServiceOfferingJsonToDetailsTab() {
|
|||
$thisTab.find("#storagetype").text(fromdb(jsonObj.storagetype));
|
||||
$thisTab.find("#cpu").text(jsonObj.cpunumber + " x " + convertHz(jsonObj.cpuspeed));
|
||||
$thisTab.find("#memory").text(convertBytes(parseInt(jsonObj.memory)*1024*1024));
|
||||
$thisTab.find("#network_rate").text(fromdb(jsonObj.networkrate));
|
||||
|
||||
setBooleanReadField(jsonObj.offerha, $thisTab.find("#offerha"));
|
||||
setBooleanEditField(jsonObj.offerha, $thisTab.find("#offerha_edit"));
|
||||
|
|
|
|||
Loading…
Reference in New Issue