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