Merge "Display policy in server groups table instead of sub table"
This commit is contained in:
commit
07faca4701
@ -1,13 +0,0 @@
|
||||
<table st-table="row.policies"
|
||||
class="table table-condensed table-rsp server-group-details">
|
||||
<thead>
|
||||
<tr>
|
||||
<th st-sort="policy" st-sort-default translate>Policy</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="policy in row.policies">
|
||||
<td>{$ policy | noValue $}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
@ -21,20 +21,18 @@
|
||||
.controller('LaunchInstanceServerGroupsController', LaunchInstanceServerGroupsController);
|
||||
|
||||
LaunchInstanceServerGroupsController.$inject = [
|
||||
'launchInstanceModel',
|
||||
'horizon.dashboard.project.workflow.launch-instance.basePath'
|
||||
'launchInstanceModel'
|
||||
];
|
||||
|
||||
/**
|
||||
* @ngdoc controller
|
||||
* @name LaunchInstanceServerGroupsController
|
||||
* @param {Object} launchInstanceModel
|
||||
* @param {string} basePath
|
||||
* @description
|
||||
* Allows selection of server groups.
|
||||
* @returns {undefined} No return value
|
||||
*/
|
||||
function LaunchInstanceServerGroupsController(launchInstanceModel, basePath) {
|
||||
function LaunchInstanceServerGroupsController(launchInstanceModel) {
|
||||
var ctrl = this;
|
||||
|
||||
ctrl.tableData = {
|
||||
@ -44,8 +42,6 @@
|
||||
displayedAllocated: []
|
||||
};
|
||||
|
||||
ctrl.tableDetails = basePath + 'server-groups/server-group-details.html';
|
||||
|
||||
ctrl.tableHelp = {
|
||||
/*eslint-disable max-len */
|
||||
noneAllocText: gettext('Select a server group from the available groups below.'),
|
||||
@ -56,13 +52,5 @@
|
||||
ctrl.tableLimits = {
|
||||
maxAllocation: 1
|
||||
};
|
||||
|
||||
ctrl.filterFacets = [
|
||||
{
|
||||
label: gettext('Name'),
|
||||
name: 'name',
|
||||
singleton: true
|
||||
}
|
||||
];
|
||||
}
|
||||
})();
|
||||
|
@ -19,8 +19,8 @@
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="expander"></th>
|
||||
<th st-sort="name" st-sort-default class="rsp-p1" translate>Name</th>
|
||||
<th st-sort="policy" class="rsp-p1" translate>Policy</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -39,13 +39,10 @@
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr ng-repeat-start="row in $displayedItems track by row.id"
|
||||
<tr ng-repeat="row in $displayedItems track by row.id"
|
||||
ng-if="$isAllocatedTable || ($isAvailableTable && !trCtrl.allocatedIds[row.id])">
|
||||
<td class="expander">
|
||||
<span class="fa fa-chevron-right" hz-expand-detail
|
||||
title="{$ ::trCtrl.helpText.expandDetailsText $}"></span>
|
||||
</td>
|
||||
<td class="rsp-p1">{$ row.name $}</td>
|
||||
<td class="rsp-p1">{$ row.policies[0] | noValue $}</td>
|
||||
<td class="actions_column">
|
||||
<action-list>
|
||||
<action ng-if="$isAllocatedTable"
|
||||
@ -61,11 +58,6 @@
|
||||
</action-list>
|
||||
</td>
|
||||
</tr>
|
||||
<tr ng-repeat-end class="detail-row">
|
||||
<td></td>
|
||||
<td class="detail" colspan="3" ng-include="ctrl.tableDetails">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</transfer-table> <!-- End Server Groups Transfer Table -->
|
||||
|
@ -33,8 +33,7 @@
|
||||
ctrl = $controller(
|
||||
'LaunchInstanceServerGroupsController',
|
||||
{
|
||||
launchInstanceModel: model,
|
||||
'horizon.dashboard.project.workflow.launch-instance.basePath': ''
|
||||
launchInstanceModel: model
|
||||
});
|
||||
}));
|
||||
|
||||
@ -52,10 +51,6 @@
|
||||
expect(ctrl.tableData.displayedAllocated).toEqual([]);
|
||||
});
|
||||
|
||||
it('defines table details template', function() {
|
||||
expect(ctrl.tableDetails).toBeDefined();
|
||||
});
|
||||
|
||||
it('defines table help', function() {
|
||||
expect(ctrl.tableHelp).toBeDefined();
|
||||
expect(Object.keys(ctrl.tableHelp).length).toBe(2);
|
||||
|
Loading…
Reference in New Issue
Block a user