add default_value for neutron and modify the css
Change-Id: I554b37c5d89f627991b3a0cc6ad8842649a66444
This commit is contained in:
parent
7c25e25238
commit
3818764ffe
|
@ -1091,4 +1091,7 @@ h4.widget-title:hover {
|
||||||
}
|
}
|
||||||
.yellow{
|
.yellow{
|
||||||
color: #FEE188 !important;
|
color: #FEE188 !important;
|
||||||
|
}
|
||||||
|
.input-spacing{
|
||||||
|
margin-top: 8px;
|
||||||
}
|
}
|
|
@ -61,11 +61,11 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- input-type is drop-down -->
|
<!-- input-type is drop-down -->
|
||||||
<div ng-if="val.input_type=='dropdown'">
|
<div ng-if="val.input_type=='dropdown'">
|
||||||
<label class="col-sm-4 control-label no-padding-right">
|
<label class="col-sm-4 control-label no-padding-right" style="padding-top: 14px;">
|
||||||
{{val.label}}
|
{{val.label}}
|
||||||
<span ng-if="val.is_required=='true'" class="text-danger">*</span>
|
<span ng-if="val.is_required=='true'" class="text-danger">*</span>
|
||||||
</label>
|
</label>
|
||||||
<select ng-model="package_config[value.category][val.name]" name="{{val.name}}" class="col-xs-10 col-sm-5" ng-change="change(value.category,val.name,package_config[value.category][val.name])">
|
<select ng-model="package_config[value.category][val.name]" name="{{val.name}}" class="col-xs-10 col-sm-5 input-spacing" ng-change="change(value.category,val.name,package_config[value.category][val.name])">
|
||||||
<!-- ng-change="change(value.category,val.name,package_config[value.category][val.name])" -->
|
<!-- ng-change="change(value.category,val.name,package_config[value.category][val.name])" -->
|
||||||
<option ng-repeat="opt in val.options">{{opt}}</option>
|
<option ng-repeat="opt in val.options">{{opt}}</option>
|
||||||
</select>
|
</select>
|
||||||
|
@ -75,20 +75,24 @@
|
||||||
<!-- input-type is dropdown_text_multiple -->
|
<!-- input-type is dropdown_text_multiple -->
|
||||||
<div ng-if="detail.display_type=='dropdown_text_multiple'">
|
<div ng-if="detail.display_type=='dropdown_text_multiple'">
|
||||||
<div ng-repeat="x in package_config[value.category][detail.name] track by $index">
|
<div ng-repeat="x in package_config[value.category][detail.name] track by $index">
|
||||||
<label class="col-sm-4 control-label no-padding-right">
|
<label class="col-sm-4 control-label no-padding-right" style="padding-top: 14px;">
|
||||||
|
<span ng-show="$index==0">
|
||||||
{{detail.label}}
|
{{detail.label}}
|
||||||
<span ng-if="val.is_required=='true'" class="text-danger">*</span>
|
<span ng-if="val.is_required=='true'" class="text-danger">*</span>
|
||||||
</label>
|
|
||||||
<input ng-model="package_config[value.category][detail.name][$index]" type="text" placeholder="{{val.label}}" name="{{val.name}}" class="col-xs-10 col-sm-5" ng-required="val.is_required=='true'">
|
|
||||||
<span class="col-xs-2 col-sm-3">
|
|
||||||
<!--Add Action-->
|
|
||||||
<span class="action" ng-click="addValue(value.category,detail.name)">
|
|
||||||
<i class="fa fa-plus-circle bigger-140 blue"></i>
|
|
||||||
</span>
|
</span>
|
||||||
|
</label>
|
||||||
|
<span>
|
||||||
|
<input ng-model="package_config[value.category][detail.name][$index]" type="text" name="{{val.name}}" class="col-xs-10 col-sm-5 input-spacing" ng-required="val.is_required=='true'">
|
||||||
|
<span class="col-xs-2 col-sm-3">
|
||||||
|
<!--Add Action-->
|
||||||
|
<span class="action input-spacing" ng-click="addValue(value.category,detail.name)">
|
||||||
|
<i class="fa fa-plus-circle bigger-140 blue input-spacing"></i>
|
||||||
|
</span>
|
||||||
<!--Remove Action-->
|
<!--Remove Action-->
|
||||||
<!--span ng-show="package_config[value.category][detail.name].length > 1" class="action" ng-click="general.dns_servers.splice($index,1)">-->
|
<!--span ng-show="package_config[value.category][detail.name].length > 1" class="action" ng-click="general.dns_servers.splice($index,1)">-->
|
||||||
<span ng-show="package_config[value.category][detail.name].length > 1" class="action" ng-click="package_config[value.category][detail.name].splice($index,1)">
|
<span ng-show="package_config[value.category][detail.name].length > 1" class="action input-spacing" ng-click="package_config[value.category][detail.name].splice($index,1)">
|
||||||
<i class="fa fa-minus-circle bigger-140 blue"></i>
|
<i class="fa fa-minus-circle bigger-140 blue input-spacing"></i>
|
||||||
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -96,19 +100,18 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- </form> -->
|
||||||
</div>
|
</div>
|
||||||
<!-- </form> -->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</accordion-group>
|
</accordion-group>
|
||||||
</accordion>
|
</accordion>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<!-- <div ng-controller="packageConfigCtrl">
|
||||||
<!-- <div ng-controller="packageConfigCtrl">
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<div class="accordion-style1 panel-group accordion-style2" id="accordion">
|
<div class="accordion-style1 panel-group accordion-style2" id="accordion">
|
||||||
|
@ -149,16 +152,16 @@
|
||||||
<input ng-show="editServiceMode[$index]" ng-model="credential.confirmPassword" placeholder="Confirm Password" type="password" ng-required />
|
<input ng-show="editServiceMode[$index]" ng-model="credential.confirmPassword" placeholder="Confirm Password" type="password" ng-required />
|
||||||
</td>
|
</td>
|
||||||
<td> -->
|
<td> -->
|
||||||
<!--edit button-->
|
<!--edit button-->
|
||||||
<!-- <button ng-hide="editServiceMode[$index]" ng-click="editServiceMode[$index] = true; sEdit($index)" class="btn btn-xs btn-success border-radius-4">
|
<!-- <button ng-hide="editServiceMode[$index]" ng-click="editServiceMode[$index] = true; sEdit($index)" class="btn btn-xs btn-success border-radius-4">
|
||||||
<i class="ace-icon fa fa-pencil bigger-120"></i>
|
<i class="ace-icon fa fa-pencil bigger-120"></i>
|
||||||
</button> -->
|
</button> -->
|
||||||
<!--save button -->
|
<!--save button -->
|
||||||
<!-- <button ng-show="editServiceMode[$index]" ng-click="editServiceMode[$index] = false; sSave()" class="btn btn-xs btn-primary border-radius-4">
|
<!-- <button ng-show="editServiceMode[$index]" ng-click="editServiceMode[$index] = false; sSave()" class="btn btn-xs btn-primary border-radius-4">
|
||||||
<i class="ace-icon fa fa-check bigger-120"></i>
|
<i class="ace-icon fa fa-check bigger-120"></i>
|
||||||
</button> -->
|
</button> -->
|
||||||
<!--cancel button -->
|
<!--cancel button -->
|
||||||
<!-- <button ng-show="editServiceMode[$index]" ng-click="editServiceMode[$index] = false; sReset()" class="btn btn-xs btn-danger border-radius-4">
|
<!-- <button ng-show="editServiceMode[$index]" ng-click="editServiceMode[$index] = false; sReset()" class="btn btn-xs btn-danger border-radius-4">
|
||||||
<i class="ace-icon fa fa-times bigger-120"></i>
|
<i class="ace-icon fa fa-times bigger-120"></i>
|
||||||
</button>
|
</button>
|
||||||
</td>
|
</td>
|
||||||
|
@ -208,16 +211,16 @@
|
||||||
<input ng-show="editMgntMode[$index]" ng-model="credential.confirmPassword" placeholder="Confirm Password" type="password" ng-required />
|
<input ng-show="editMgntMode[$index]" ng-model="credential.confirmPassword" placeholder="Confirm Password" type="password" ng-required />
|
||||||
</td>
|
</td>
|
||||||
<td> -->
|
<td> -->
|
||||||
<!--edit button-->
|
<!--edit button-->
|
||||||
<!-- <button ng-hide="editMgntMode[$index]" ng-click="mEdit($index)" class="btn btn-xs btn-success border-radius-4">
|
<!-- <button ng-hide="editMgntMode[$index]" ng-click="mEdit($index)" class="btn btn-xs btn-success border-radius-4">
|
||||||
<i class="ace-icon fa fa-pencil bigger-120"></i>
|
<i class="ace-icon fa fa-pencil bigger-120"></i>
|
||||||
</button> -->
|
</button> -->
|
||||||
<!--save button-->
|
<!--save button-->
|
||||||
<!-- <button ng-show="editMgntMode[$index]" ng-click="editMgntMode[$index] = false; mSave()" class="btn btn-xs btn-primary border-radius-4">
|
<!-- <button ng-show="editMgntMode[$index]" ng-click="editMgntMode[$index] = false; mSave()" class="btn btn-xs btn-primary border-radius-4">
|
||||||
<i class="ace-icon fa fa-check bigger-120"></i>
|
<i class="ace-icon fa fa-check bigger-120"></i>
|
||||||
</button> -->
|
</button> -->
|
||||||
<!--cancel button-->
|
<!--cancel button-->
|
||||||
<!-- <button ng-show="editMgntMode[$index]" ng-click="editMgntMode[$index] = false; mReset()" class="btn btn-xs btn-default btn-danger border-radius-4">
|
<!-- <button ng-show="editMgntMode[$index]" ng-click="editMgntMode[$index] = false; mReset()" class="btn btn-xs btn-default btn-danger border-radius-4">
|
||||||
<i class="ace-icon fa fa-times bigger-120"></i>
|
<i class="ace-icon fa fa-times bigger-120"></i>
|
||||||
</button>
|
</button>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -1134,20 +1134,20 @@ define(['angular', 'angularMocks'], function() {
|
||||||
"display_type": "dropdown_text_multiple",
|
"display_type": "dropdown_text_multiple",
|
||||||
"name": "tunnel_id_ranges",
|
"name": "tunnel_id_ranges",
|
||||||
"label": "Tunnel ID Ranges",
|
"label": "Tunnel ID Ranges",
|
||||||
"hint": "e.g. 1:1000"
|
"hint": "1:1000"
|
||||||
}],
|
}],
|
||||||
"vlan":[{
|
"vlan":[{
|
||||||
"is_required": 'true',
|
"is_required": 'true',
|
||||||
"display_type": "dropdown_text_multiple",
|
"display_type": "dropdown_text_multiple",
|
||||||
"name": "vlan_ranges",
|
"name": "vlan_ranges",
|
||||||
"label": "Network Vlan Ranges",
|
"label": "Network Vlan Ranges",
|
||||||
"hint": "e.g. physnet1:2700:2999"
|
"hint": "physnet1:2700:2999"
|
||||||
},{
|
},{
|
||||||
"is_required": 'true',
|
"is_required": 'true',
|
||||||
"display_type": "dropdown_text_multiple",
|
"display_type": "dropdown_text_multiple",
|
||||||
"name": "bridge",
|
"name": "bridge",
|
||||||
"label": "Bridge Mapping",
|
"label": "Bridge Mapping",
|
||||||
"hint": "e.g. physnet1:br-eth1"
|
"hint": "physnet1:br-eth1"
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
"is_required": 'true',
|
"is_required": 'true',
|
||||||
|
|
|
@ -274,19 +274,22 @@ define(['./baseService'], ()->
|
||||||
for key,value of $scope.metaData
|
for key,value of $scope.metaData
|
||||||
if value.category isnt "service_credentials" and value.category isnt "console_credentials"
|
if value.category isnt "service_credentials" and value.category isnt "console_credentials"
|
||||||
if !$scope.package_config[value.category]
|
if !$scope.package_config[value.category]
|
||||||
$scope.package_config[value.category] = {};
|
$scope.package_config[value.category] = {}
|
||||||
|
|
||||||
if value.data_structure is "form"
|
if value.data_structure is "form"
|
||||||
for serialNum, content of value.data
|
for serialNum, content of value.data
|
||||||
if !$scope.package_config[value.category][content.name]
|
if !$scope.package_config[value.category][content.name]
|
||||||
if !content.default_value
|
if !content.default_value
|
||||||
$scope.package_config[value.category][content.name] = "";
|
$scope.package_config[value.category][content.name] = ""
|
||||||
else
|
else
|
||||||
$scope.package_config[value.category][content.name] = content.default_value;
|
$scope.package_config[value.category][content.name] = content.default_value
|
||||||
for content_data_key, content_data_value of content.content_data
|
for content_data_key, content_data_value of content.content_data
|
||||||
for details_content_data_key, details_content_data_value of content_data_value
|
for details_content_data_key, details_content_data_value of content_data_value
|
||||||
if !$scope.package_config[value.category][details_content_data_value.name]
|
if !$scope.package_config[value.category][details_content_data_value.name]
|
||||||
$scope.package_config[value.category][details_content_data_value.name] = [""]
|
if !details_content_data_value.hint
|
||||||
|
$scope.package_config[value.category][details_content_data_value.name] = [""]
|
||||||
|
else
|
||||||
|
$scope.package_config[value.category][details_content_data_value.name] = [details_content_data_value.hint]
|
||||||
|
|
||||||
if value.category is "service_credentials" or value.category is "console_credentials"
|
if value.category is "service_credentials" or value.category is "console_credentials"
|
||||||
if !$scope.package_config["security"]
|
if !$scope.package_config["security"]
|
||||||
|
@ -307,8 +310,10 @@ define(['./baseService'], ()->
|
||||||
if content_data_key is value
|
if content_data_key is value
|
||||||
for i in content_data_value
|
for i in content_data_value
|
||||||
if !$scope.package_config[category][i.name]
|
if !$scope.package_config[category][i.name]
|
||||||
|
if !i.hint
|
||||||
$scope.package_config[category][i.name] = [""]
|
$scope.package_config[category][i.name] = [""]
|
||||||
|
else
|
||||||
|
$scope.package_config[category][i.name] = [i.hint]
|
||||||
keyLength_service_credentials = Object.keys($scope.service_credentials).length;
|
keyLength_service_credentials = Object.keys($scope.service_credentials).length;
|
||||||
$scope.editServiceMode = []
|
$scope.editServiceMode = []
|
||||||
$scope.editServiceMode.length = keyLength_service_credentials
|
$scope.editServiceMode.length = keyLength_service_credentials
|
||||||
|
|
Loading…
Reference in New Issue