adding disabled toggle for related hosts

to match the mockup
This commit is contained in:
Jared Tabor
2017-06-12 14:06:00 -07:00
parent 05f29e5144
commit 3494e2f136
3 changed files with 153 additions and 139 deletions

View File

@@ -19,4 +19,4 @@ angular.module('relatedHost', [
relatedGroupsLabels.name relatedGroupsLabels.name
]) ])
.factory('RelatedHostsFormDefinition', relatedHostsFormDefinition) .factory('RelatedHostsFormDefinition', relatedHostsFormDefinition)
.value('RelatedHostsListDefinition', relatedHostsListDefinition); .factory('RelatedHostsListDefinition', relatedHostsListDefinition);

View File

@@ -1,6 +1,3 @@
/** @define LabelList */
// @import "./client/src/shared/branding/colors.default.less";
.RelatedGroupsLabelsCell{ .RelatedGroupsLabelsCell{
width:100%; width:100%;
} }

View File

@@ -4,7 +4,8 @@
* All Rights Reserved * All Rights Reserved
*************************************************/ *************************************************/
export default { export default ['i18n', function(i18n) {
return {
name: 'hosts', name: 'hosts',
iterator: 'host', iterator: 'host',
editTitle: '{{ selected_group }}', editTitle: '{{ selected_group }}',
@@ -19,6 +20,22 @@ export default {
basePath: 'api/v2/inventories/{{$stateParams.inventory_id}}/hosts/', basePath: 'api/v2/inventories/{{$stateParams.inventory_id}}/hosts/',
fields: { fields: {
toggleHost: {
ngDisabled: 'host.has_inventory_sources',
label: '',
columnClass: 'List-staticColumn--toggle',
type: "toggle",
ngClick: "toggleHost($event, host)",
awToolTip: "<p>" +
i18n._("Indicates if a host is available and should be included in running jobs.") +
"</p><p>" +
i18n._("For hosts that are part of an external" +
" inventory, this flag cannot be changed. It will be" +
" set by the inventory sync process.") +
"</p>",
dataPlacement: "right",
nosort: true,
},
active_failures: { active_failures: {
label: '', label: '',
iconOnly: true, iconOnly: true,
@@ -140,5 +157,5 @@ export default {
dataPlacement: "top", dataPlacement: "top",
} }
} }
};
}; }];