Merge "add default_value for neutron and modify the css"
This commit is contained in:
commit
2eafd08e7b
|
@ -1091,4 +1091,7 @@ h4.widget-title:hover {
|
|||
}
|
||||
.yellow{
|
||||
color: #FEE188 !important;
|
||||
}
|
||||
.input-spacing{
|
||||
margin-top: 8px;
|
||||
}
|
|
@ -61,11 +61,11 @@
|
|||
</div>
|
||||
<!-- input-type is drop-down -->
|
||||
<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}}
|
||||
<span ng-if="val.is_required=='true'" class="text-danger">*</span>
|
||||
</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])" -->
|
||||
<option ng-repeat="opt in val.options">{{opt}}</option>
|
||||
</select>
|
||||
|
@ -75,20 +75,24 @@
|
|||
<!-- input-type is 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">
|
||||
<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}}
|
||||
<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>
|
||||
</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-->
|
||||
<!--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)">
|
||||
<i class="fa fa-minus-circle bigger-140 blue"></i>
|
||||
<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 input-spacing"></i>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
|
@ -96,19 +100,18 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </form> -->
|
||||
</div>
|
||||
<!-- </form> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</accordion-group>
|
||||
</accordion>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div ng-controller="packageConfigCtrl">
|
||||
<!-- <div ng-controller="packageConfigCtrl">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<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 />
|
||||
</td>
|
||||
<td> -->
|
||||
<!--edit button-->
|
||||
<!-- <button ng-hide="editServiceMode[$index]" ng-click="editServiceMode[$index] = true; sEdit($index)" class="btn btn-xs btn-success border-radius-4">
|
||||
<!--edit button-->
|
||||
<!-- <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>
|
||||
</button> -->
|
||||
<!--save button -->
|
||||
<!-- <button ng-show="editServiceMode[$index]" ng-click="editServiceMode[$index] = false; sSave()" class="btn btn-xs btn-primary border-radius-4">
|
||||
<!--save button -->
|
||||
<!-- <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>
|
||||
</button> -->
|
||||
<!--cancel button -->
|
||||
<!-- <button ng-show="editServiceMode[$index]" ng-click="editServiceMode[$index] = false; sReset()" class="btn btn-xs btn-danger border-radius-4">
|
||||
<!--cancel button -->
|
||||
<!-- <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>
|
||||
</button>
|
||||
</td>
|
||||
|
@ -208,16 +211,16 @@
|
|||
<input ng-show="editMgntMode[$index]" ng-model="credential.confirmPassword" placeholder="Confirm Password" type="password" ng-required />
|
||||
</td>
|
||||
<td> -->
|
||||
<!--edit button-->
|
||||
<!-- <button ng-hide="editMgntMode[$index]" ng-click="mEdit($index)" class="btn btn-xs btn-success border-radius-4">
|
||||
<!--edit button-->
|
||||
<!-- <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>
|
||||
</button> -->
|
||||
<!--save button-->
|
||||
<!-- <button ng-show="editMgntMode[$index]" ng-click="editMgntMode[$index] = false; mSave()" class="btn btn-xs btn-primary border-radius-4">
|
||||
<!--save button-->
|
||||
<!-- <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>
|
||||
</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">
|
||||
<!--cancel button-->
|
||||
<!-- <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>
|
||||
</button>
|
||||
</td>
|
||||
|
|
|
@ -1134,20 +1134,20 @@ define(['angular', 'angularMocks'], function() {
|
|||
"display_type": "dropdown_text_multiple",
|
||||
"name": "tunnel_id_ranges",
|
||||
"label": "Tunnel ID Ranges",
|
||||
"hint": "e.g. 1:1000"
|
||||
"hint": "1:1000"
|
||||
}],
|
||||
"vlan":[{
|
||||
"is_required": 'true',
|
||||
"display_type": "dropdown_text_multiple",
|
||||
"name": "vlan_ranges",
|
||||
"label": "Network Vlan Ranges",
|
||||
"hint": "e.g. physnet1:2700:2999"
|
||||
"hint": "physnet1:2700:2999"
|
||||
},{
|
||||
"is_required": 'true',
|
||||
"display_type": "dropdown_text_multiple",
|
||||
"name": "bridge",
|
||||
"label": "Bridge Mapping",
|
||||
"hint": "e.g. physnet1:br-eth1"
|
||||
"hint": "physnet1:br-eth1"
|
||||
}]
|
||||
},
|
||||
"is_required": 'true',
|
||||
|
|
|
@ -274,19 +274,22 @@ define(['./baseService'], ()->
|
|||
for key,value of $scope.metaData
|
||||
if value.category isnt "service_credentials" and value.category isnt "console_credentials"
|
||||
if !$scope.package_config[value.category]
|
||||
$scope.package_config[value.category] = {};
|
||||
$scope.package_config[value.category] = {}
|
||||
|
||||
if value.data_structure is "form"
|
||||
for serialNum, content of value.data
|
||||
if !$scope.package_config[value.category][content.name]
|
||||
if !content.default_value
|
||||
$scope.package_config[value.category][content.name] = "";
|
||||
$scope.package_config[value.category][content.name] = ""
|
||||
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 details_content_data_key, details_content_data_value of content_data_value
|
||||
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 !$scope.package_config["security"]
|
||||
|
@ -307,8 +310,10 @@ define(['./baseService'], ()->
|
|||
if content_data_key is value
|
||||
for i in content_data_value
|
||||
if !$scope.package_config[category][i.name]
|
||||
if !i.hint
|
||||
$scope.package_config[category][i.name] = [""]
|
||||
|
||||
else
|
||||
$scope.package_config[category][i.name] = [i.hint]
|
||||
keyLength_service_credentials = Object.keys($scope.service_credentials).length;
|
||||
$scope.editServiceMode = []
|
||||
$scope.editServiceMode.length = keyLength_service_credentials
|
||||
|
|
Loading…
Reference in New Issue