1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-16 22:50:10 +03:00

Feature #4446: Move IPAM sunstone attrs. to advanced section

This commit is contained in:
Carlos Martín 2016-08-29 12:41:39 +02:00
parent 496dba9d23
commit 0b47d9cd4f
4 changed files with 15 additions and 30 deletions

View File

@ -81,12 +81,8 @@ define(function(require) {
var ar = arList[i];
var id = ar.AR_ID;
var ipam_mad = (ar.IPAM_MAD ? ar.IPAM_MAD : "internal");
var type = (ar.TYPE ? ar.TYPE : "--");
var ip4_subnet = (ar.IP4_SUBNET ? ar.IP4_SUBNET : "--");
var start = "";
if(ar.TYPE == "IP4" || ar.TYPE == "IP4_6"){
@ -111,9 +107,7 @@ define(function(require) {
processedARList.push({
"id" : id,
"ipam_mad" : ipam_mad,
"type" : type,
"ip4_subnet": ip4_subnet,
"start" : start,
"prefixHTML" : prefix,
"leasesHTML" : leases
@ -308,16 +302,15 @@ define(function(require) {
var last_ip6_ula = ar.IP6_ULA_END;
var arKnownAttr = [
{key: Locale.tr("IPAM Driver"), value: ar.IPAM_MAD},
{key: Locale.tr("Type"), value: ar.TYPE},
{key: Locale.tr("MAC Start"), value: ar.MAC},
{key: Locale.tr("IPv4 Subnet"), value: ar.IP4_SUBNET},
{key: Locale.tr("IPv4 Start"), value: ar.IP},
{key: Locale.tr("IP Start"), value: ar.IP},
{key: Locale.tr("Global prefix"),value: ar.GLOBAL_PREFIX},
{key: Locale.tr("ULA prefix"), value: ar.ULA_PREFIX},
{key: Locale.tr("Size"), value: ar.SIZE},
{key: Locale.tr("Used leases"), value: ar.USED_LEASES},
{key: Locale.tr("Reservation parent AR"), value: ar.PARENT_NETWORK_AR_ID}
{key: Locale.tr("Reservation parent AR"), value: ar.PARENT_NETWORK_AR_ID},
{key: Locale.tr("IPAM driver"), value: ar.IPAM_MAD},
];
delete ar["MAC_END"];
@ -330,7 +323,6 @@ define(function(require) {
delete ar["IPAM_MAD"];
delete ar["TYPE"];
delete ar["MAC"];
delete ar["IP4_SUBNET"];
delete ar["IP"];
delete ar["GLOBAL_PREFIX"];
delete ar["ULA_PREFIX"];

View File

@ -42,9 +42,7 @@
<thead>
<tr>
<th>{{tr "Address Range"}}</th>
<th>{{tr "IPAM"}}</th>
<th>{{tr "Type"}}</th>
<th>{{tr "IPv4 Subnet"}}</th>
<th>{{tr "Start"}}</th>
<th>{{tr "IPv6 Prefix"}}</th>
<th>{{tr "Leases"}}</th>
@ -54,9 +52,7 @@
{{#each arList}}
<tr ar="{{id}}">
<td style="white-space: nowrap" class="value_td">{{id}}</td>
<td style="white-space: nowrap" class="value_td">{{ipam_mad}}</td>
<td style="white-space: nowrap" class="value_td">{{type}}</td>
<td style="white-space: nowrap" class="value_td">{{ip4_subnet}}</td>
<td style="white-space: nowrap" class="value_td">{{start}}</td>
<td style="white-space: nowrap" class="value_td">{{{prefixHTML}}}</td>
<td style="white-space: nowrap" class="value_td">{{{leasesHTML}}}</td>

View File

@ -182,7 +182,6 @@ define(function(require) {
$('input[name$="ar_type"]',this.ar_section).prop("disabled", true);
$('input[wizard_field="IPAM_MAD"]',this.ar_section).prop("disabled", true);
$('input[wizard_field="IP4_SUBNET"]',this.ar_section).prop("disabled", true);
$('input[wizard_field="IP"]',this.ar_section).prop("disabled", true);
$('input[wizard_field="MAC"]',this.ar_section).prop("disabled", true);
}

View File

@ -22,23 +22,10 @@
<input wizard_field="TYPE" type="radio" name="{{str_ar_tab_id}}_ar_type" id="{{str_ar_tab_id}}_ar_type_ether" value="ETHER"/><label for="{{str_ar_tab_id}}_ar_type_ether">{{tr "Ethernet"}}</label>
</div>
</div>
<div class="row">
<div class="medium-6 columns ar_input type_ip4 type_ip4_6 type_ip6">
<label for="{{str_ar_tab_id}}_ipam_mad">{{tr "IPAM Driver"}}</label>
<input wizard_field="IPAM_MAD" type="text" name="IPAM_MAD" id="{{str_ar_tab_id}}_ipam_mad"/>
</div>
</div>
<div class="row">
<div class="medium-6 columns ar_input type_ip4 type_ip4_6">
<label for="{{str_ar_tab_id}}_ip4_subnet">{{tr "IPv4 Subnet"}}
</label>
<input wizard_field="IP4_SUBNET" type="text" name="IP4_SUBNET" id="{{str_ar_tab_id}}_ip4_subnet"/>
</div>
</div>
<div class="row">
<div class="medium-6 columns">
<div class="row collapse ar_input type_ip4 type_ip4_6">
<label for="{{str_ar_tab_id}}_ip_start">{{tr "First IPv4 address"}}
<label for="{{str_ar_tab_id}}_ip_start">{{tr "First IP address"}}
</label>
<input wizard_field="IP" type="text" name="IP" id="{{str_ar_tab_id}}_ip_start"/>
</div>
@ -81,6 +68,17 @@
{{{securityGroupsTableHTML}}}
</div>
</fieldset>
<div class="ar_input type_ip4 type_ip4_6 type_ip6">
<fieldset>
<legend>{{tr "IPAM"}}</legend>
<div class="row">
<div class="medium-6 columns">
<label for="{{str_ar_tab_id}}_ipam_mad">{{tr "IPAM driver"}}</label>
<input wizard_field="IPAM_MAD" type="text" name="IPAM_MAD" id="{{str_ar_tab_id}}_ipam_mad"/>
</div>
</div>
</fieldset>
</div>
{{/advancedSection}}
</div>
</div>