mirror of
https://github.com/ansible/awx.git
synced 2026-02-24 14:36:00 -03:30
Merge pull request #99 from joefiorini/inventory-remove-checkbox
Remove checkbox on inventory list for enabling/disabling
This commit is contained in:
@@ -41,6 +41,7 @@ export default
|
|||||||
key: true,
|
key: true,
|
||||||
label: 'Name',
|
label: 'Name',
|
||||||
columnClass: 'col-lg-4 col-md3 col-sm-3 col-xs-7 ellipsis',
|
columnClass: 'col-lg-4 col-md3 col-sm-3 col-xs-7 ellipsis',
|
||||||
|
ngClass: "{ 'host-disabled-label': !host.enabled }",
|
||||||
ngClick: "editHost(host.id)"
|
ngClick: "editHost(host.id)"
|
||||||
},
|
},
|
||||||
inventory_name: {
|
inventory_name: {
|
||||||
@@ -78,14 +79,6 @@ export default
|
|||||||
},
|
},
|
||||||
|
|
||||||
fieldActions: {
|
fieldActions: {
|
||||||
enabled_flag: {
|
|
||||||
//label: 'Enabled',
|
|
||||||
iconClass: "{{ 'fa icon-enabled-' + host.enabled }}",
|
|
||||||
dataPlacement: 'top',
|
|
||||||
awToolTip: "{{ host.enabledToolTip }}",
|
|
||||||
dataTipWatch: "host.enabledToolTip",
|
|
||||||
ngClick: "toggleHostEnabled(host.id, host.has_inventory_sources)"
|
|
||||||
},
|
|
||||||
/*active_failures: {
|
/*active_failures: {
|
||||||
//label: 'Job Status',
|
//label: 'Job Status',
|
||||||
//ngHref: "\{\{'/#/hosts/' + host.id + '/job_host_summaries/?inventory=' + inventory_id \}\}",
|
//ngHref: "\{\{'/#/hosts/' + host.id + '/job_host_summaries/?inventory=' + inventory_id \}\}",
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ export default
|
|||||||
key: true,
|
key: true,
|
||||||
label: 'Hosts',
|
label: 'Hosts',
|
||||||
ngClick: "editHost(host.id)",
|
ngClick: "editHost(host.id)",
|
||||||
|
ngClass: "{ 'host-disabled-label': !host.enabled }",
|
||||||
columnClass: 'col-lg-8 col-md-9 col-sm-9 col-xs-7',
|
columnClass: 'col-lg-8 col-md-9 col-sm-9 col-xs-7',
|
||||||
dataHostId: "{{ host.id }}",
|
dataHostId: "{{ host.id }}",
|
||||||
dataType: "host"
|
dataType: "host"
|
||||||
@@ -53,13 +54,6 @@ export default
|
|||||||
columnClass: 'col-lg-4 col-md-3 col-sm-3 col-xs-5 text-right',
|
columnClass: 'col-lg-4 col-md-3 col-sm-3 col-xs-5 text-right',
|
||||||
label: false,
|
label: false,
|
||||||
|
|
||||||
enabled_flag: {
|
|
||||||
iconClass: "{{ 'fa icon-enabled-' + host.enabled }}",
|
|
||||||
dataPlacement: 'top',
|
|
||||||
awToolTip: "{{ host.enabledToolTip }}",
|
|
||||||
dataTipWatch: "host.enabledToolTip",
|
|
||||||
ngClick: "toggleHostEnabled(host.id, host.has_inventory_sources)"
|
|
||||||
},
|
|
||||||
active_failures: {
|
active_failures: {
|
||||||
awPopOver: "{{ host.job_status_html }}",
|
awPopOver: "{{ host.job_status_html }}",
|
||||||
dataTitle: "{{ host.job_status_title }}",
|
dataTitle: "{{ host.job_status_title }}",
|
||||||
|
|||||||
@@ -336,6 +336,7 @@ angular.module('GeneratorHelpers', [systemStatus.name])
|
|||||||
|
|
||||||
html = "<td class=\"" + fld + "-column";
|
html = "<td class=\"" + fld + "-column";
|
||||||
html += (field.columnClass) ? " " + field.columnClass : "";
|
html += (field.columnClass) ? " " + field.columnClass : "";
|
||||||
|
html += (field.columnNgClass) ? "\" ng-class=\"" + field.columnNgClass : "";
|
||||||
html += "\">\n";
|
html += "\">\n";
|
||||||
html += "<a ng-href=\"" + field.ngHref + "\" aw-tool-tip=\"" + field.awToolTip + "\"";
|
html += "<a ng-href=\"" + field.ngHref + "\" aw-tool-tip=\"" + field.awToolTip + "\"";
|
||||||
html += (field.dataPlacement) ? " data-placement=\"" + field.dataPlacement + "\"" : "";
|
html += (field.dataPlacement) ? " data-placement=\"" + field.dataPlacement + "\"" : "";
|
||||||
@@ -595,7 +596,7 @@ angular.module('GeneratorHelpers', [systemStatus.name])
|
|||||||
html += " " + field.columnClass;
|
html += " " + field.columnClass;
|
||||||
}
|
}
|
||||||
html += "\" ";
|
html += "\" ";
|
||||||
html += (field.ngClass) ? Attr(field, 'ngClass') : "";
|
html += field.columnNgClass ? " ng-class=\"" + field.columnNgClass + "\"": "";
|
||||||
html += (options.mode === 'lookup' || options.mode === 'select') ? " ng-click=\"toggle_" + list.iterator +
|
html += (options.mode === 'lookup' || options.mode === 'select') ? " ng-click=\"toggle_" + list.iterator +
|
||||||
"(" + list.iterator + ".id)\"" : "";
|
"(" + list.iterator + ".id)\"" : "";
|
||||||
html += (field.columnShow) ? Attr(field, 'columnShow') : "";
|
html += (field.columnShow) ? Attr(field, 'columnShow') : "";
|
||||||
|
|||||||
@@ -547,6 +547,7 @@ angular.module('ListGenerator', ['GeneratorHelpers'])
|
|||||||
else if (list.fields[fld].columnClass) {
|
else if (list.fields[fld].columnClass) {
|
||||||
html += " " + list.fields[fld].columnClass;
|
html += " " + list.fields[fld].columnClass;
|
||||||
}
|
}
|
||||||
|
|
||||||
html += "\" id=\"" + list.iterator + "-" + fld + "-header\"";
|
html += "\" id=\"" + list.iterator + "-" + fld + "-header\"";
|
||||||
html += (list.fields[fld].columnShow) ? " ng-show=\"" + list.fields[fld].columnShow + "\" " : "";
|
html += (list.fields[fld].columnShow) ? " ng-show=\"" + list.fields[fld].columnShow + "\" " : "";
|
||||||
html += (list.fields[fld].nosort === undefined || list.fields[fld].nosort !== true) ? " ng-click=\"sort('" + list.iterator + "','" + fld + "')\"" : "";
|
html += (list.fields[fld].nosort === undefined || list.fields[fld].nosort !== true) ? " ng-click=\"sort('" + list.iterator + "','" + fld + "')\"" : "";
|
||||||
|
|||||||
@@ -62,6 +62,7 @@
|
|||||||
@import "jPushMenu.less";
|
@import "jPushMenu.less";
|
||||||
@import "survey-maker.less";
|
@import "survey-maker.less";
|
||||||
@import "portal.less";
|
@import "portal.less";
|
||||||
|
@import "text-label.less";
|
||||||
|
|
||||||
/* Bootstrap fix that's causing a right margin to appear
|
/* Bootstrap fix that's causing a right margin to appear
|
||||||
whenver a modal is opened */
|
whenver a modal is opened */
|
||||||
|
|||||||
22
awx/ui/static/less/text-label.less
Normal file
22
awx/ui/static/less/text-label.less
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
.include-text-label(@background-color; @color; @content) {
|
||||||
|
display: inline-block;
|
||||||
|
content: @content;
|
||||||
|
|
||||||
|
border-radius: 3px;
|
||||||
|
background-color: @background-color;
|
||||||
|
color: @color;
|
||||||
|
text-transform: uppercase;
|
||||||
|
font-size: .7em;
|
||||||
|
font-weight: bold;
|
||||||
|
font-style: normal;
|
||||||
|
margin-left: 0.5em;
|
||||||
|
padding: 0.35em;
|
||||||
|
padding-bottom: 0.2em;
|
||||||
|
line-height: 1.1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.host-disabled-label {
|
||||||
|
&:after {
|
||||||
|
.include-text-label(#676767; white; "disabled");
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user