From 66a859872eda9b7da48895ac7c22c54661baff39 Mon Sep 17 00:00:00 2001 From: mabashian Date: Mon, 14 Jan 2019 17:23:52 -0500 Subject: [PATCH] Fixes for numerous bootstrap upgrade bugs, uses variables for colors in bootstrap override style file --- .../styles/bootstrap-custom-overrides.less | 30 ++--- .../forms/settings-form.partial.html | 2 +- .../src/inventories-hosts/hosts/host.list.js | 2 +- .../host-summary-popover.block.less | 2 +- .../host-filter-modal.directive.js | 5 +- .../src/organizations/organizations.form.js | 6 +- .../forms/workflow-node-form.partial.html | 109 ++++++++---------- .../e2e/tests/test-workflow-visualizer.js | 4 +- 8 files changed, 79 insertions(+), 81 deletions(-) diff --git a/awx/ui/client/legacy/styles/bootstrap-custom-overrides.less b/awx/ui/client/legacy/styles/bootstrap-custom-overrides.less index ce36df6cda..c8a6bf03ff 100644 --- a/awx/ui/client/legacy/styles/bootstrap-custom-overrides.less +++ b/awx/ui/client/legacy/styles/bootstrap-custom-overrides.less @@ -1,8 +1,8 @@ body { font-family: 'Open Sans', sans-serif; font-weight: 400; - color: #161B1F; - background-color: #FCFCFC; + color: @default-data-txt; + background-color: @default-secondary-bg; font-size: 0.88rem; } @@ -22,22 +22,22 @@ body { .bs-tooltip-top .arrow::before, .bs-tooltip-auto[x-placement^="top"] .arrow::before { - border-top-color: #707070; + border-top-color: @default-stdout-txt; } .bs-tooltip-bottom .arrow::before, .bs-tooltip-auto[x-placement^="bottom"] .arrow::before { - border-bottom-color: #707070; + border-bottom-color: @default-stdout-txt; } .bs-tooltip-left .arrow::before, .bs-tooltip-auto[x-placement^="left"] .arrow::before { - border-left-color: #707070; + border-left-color: @default-stdout-txt; } .bs-tooltip-right .arrow::before, .bs-tooltip-auto[x-placement^="right"] .arrow::before { - border-right-color: #707070; + border-right-color: @default-stdout-txt; } /* this used to exist but was removed */ @@ -108,27 +108,27 @@ button, html input[type=button], input[type=reset], input[type=submit] { } .bs-popover-auto[x-placement^=right] .arrow::after, .bs-popover-right .arrow::after { - border-right-color: #707070; + border-right-color: @default-stdout-txt; } .bs-popover-auto[x-placement^=left] .arrow::after, .bs-popover-left .arrow::after { - border-left-color: #707070; + border-left-color: @default-stdout-txt; } .bs-popover-auto[x-placement^=top] .arrow::after, .bs-popover-top .arrow::after { - border-top-color: #707070; + border-top-color: @default-stdout-txt; } .bs-popover-auto[x-placement^=bottom] .arrow::after, .bs-popover-bottom .arrow::after { - border-bottom-color: #707070; + border-bottom-color: @default-stdout-txt; } a:not([href]):not([tabindex]) { - color: #337AB7; + color: @default-link; } a:not([href]):not([tabindex]):hover { - color: #286090; + color: @default-link-hov; } .dropdown-menu>li>a { @@ -145,8 +145,8 @@ a:not([href]):not([tabindex]):hover { .dropdown-menu>li>a:hover, .dropdown-menu>li>a:focus { text-decoration: none; - color: #262626; - background-color: #f5f5f5; + color: @default-data-txt; + background-color: @f6grey; } .radio-inline+.radio-inline, .checkbox-inline+.checkbox-inline { @@ -162,7 +162,7 @@ label { } .form-control { - height: 34px; + height: 30px; } .btn-success{ diff --git a/awx/ui/client/src/configuration/forms/settings-form.partial.html b/awx/ui/client/src/configuration/forms/settings-form.partial.html index 23ba6f8fd1..cd279af19d 100644 --- a/awx/ui/client/src/configuration/forms/settings-form.partial.html +++ b/awx/ui/client/src/configuration/forms/settings-form.partial.html @@ -5,7 +5,7 @@
-
+
{{ vm.getCurrentFormTitle() }}
diff --git a/awx/ui/client/src/inventories-hosts/hosts/host.list.js b/awx/ui/client/src/inventories-hosts/hosts/host.list.js index efc0a3a797..9ca7a4114a 100644 --- a/awx/ui/client/src/inventories-hosts/hosts/host.list.js +++ b/awx/ui/client/src/inventories-hosts/hosts/host.list.js @@ -68,7 +68,7 @@ export default ['i18n', function(i18n) { key: true, label: i18n._('Name'), ngClick: "editHost(host.id)", - columnClass: 'col-sm-4 col-xs-7', + columnClass: 'col-sm-4', dataHostId: "{{ host.id }}", dataType: "host", class: 'InventoryManage-breakWord' diff --git a/awx/ui/client/src/inventories-hosts/inventories/list/host-summary-popover/host-summary-popover.block.less b/awx/ui/client/src/inventories-hosts/inventories/list/host-summary-popover/host-summary-popover.block.less index 5d04f3b558..325fbf2b25 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/list/host-summary-popover/host-summary-popover.block.less +++ b/awx/ui/client/src/inventories-hosts/inventories/list/host-summary-popover/host-summary-popover.block.less @@ -1,3 +1,3 @@ .HostSummaryPopover-noSourceSummary { - margin-left: 19px; + margin-left: 15px; } diff --git a/awx/ui/client/src/inventories-hosts/inventories/smart-inventory/smart-inventory-host-filter/host-filter-modal/host-filter-modal.directive.js b/awx/ui/client/src/inventories-hosts/inventories/smart-inventory/smart-inventory-host-filter/host-filter-modal/host-filter-modal.directive.js index 4f6bc0c15d..80727fc742 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/smart-inventory/smart-inventory-host-filter/host-filter-modal/host-filter-modal.directive.js +++ b/awx/ui/client/src/inventories-hosts/inventories/smart-inventory/smart-inventory-host-filter/host-filter-modal/host-filter-modal.directive.js @@ -45,15 +45,18 @@ export default ['templateUrl', function(templateUrl) { $scope.hosts = $scope.host_dataset.results; let hostList = _.cloneDeep(HostsList); + delete hostList.staticColumns; delete hostList.fields.toggleHost; delete hostList.fields.active_failures; delete hostList.fields.name.ngClick; - hostList.fields.name.class += " HostFilterModal-tableRow"; + hostList.fields.name.columnClass = 'col-sm-6'; hostList.fields.name.noLink = true; hostList.well = false; delete hostList.fields.inventory.ngClick; + hostList.fields.inventory.columnClass = 'col-sm-6'; hostList.fields.inventory.ngBind = 'host.summary_fields.inventory.name'; hostList.emptyListText = 'You must have access to at least one host in order to create a smart inventory host filter'; + hostList.layoutClass = 'List-defaultLayout'; let html = GenerateList.build({ list: hostList, input_type: 'host-filter-modal-body', diff --git a/awx/ui/client/src/organizations/organizations.form.js b/awx/ui/client/src/organizations/organizations.form.js index b24f77f9f5..3c58fa5aa7 100644 --- a/awx/ui/client/src/organizations/organizations.form.js +++ b/awx/ui/client/src/organizations/organizations.form.js @@ -142,19 +142,19 @@ export default ['NotificationsList', 'i18n', key: true, label: i18n._('User'), linkBase: 'users', - class: 'col-lg-3 col-md-3 col-sm-3 col-xs-4' + columnClass: 'col-lg-3 col-md-3 col-sm-3 col-xs-4' }, role: { label: i18n._('Role'), type: 'role', nosort: true, - class: 'col-lg-4 col-md-4 col-sm-4 col-xs-4', + columnClass: 'col-lg-4 col-md-4 col-sm-4 col-xs-4', }, team_roles: { label: i18n._('Team Roles'), type: 'team_roles', nosort: true, - class: 'col-lg-5 col-md-5 col-sm-5 col-xs-4', + columnClass: 'col-lg-5 col-md-5 col-sm-5 col-xs-4', } } }, diff --git a/awx/ui/client/src/templates/workflows/workflow-maker/forms/workflow-node-form.partial.html b/awx/ui/client/src/templates/workflows/workflow-maker/forms/workflow-node-form.partial.html index 4811012465..beadf08571 100644 --- a/awx/ui/client/src/templates/workflows/workflow-maker/forms/workflow-node-form.partial.html +++ b/awx/ui/client/src/templates/workflows/workflow-maker/forms/workflow-node-form.partial.html @@ -17,31 +17,29 @@
PLEASE ADD ITEMS TO THIS LIST
- - - - - - - - - - - - - - - -
- -
- - +
+
+
+
+
+
+
+
+
+
+ +
+
+
{{wf_maker_template.name}} {{:: strings.get('workflow_maker.WORKFLOW') }} -
+
+
+
+
+ @@ -56,24 +54,22 @@
No Projects Have Been Created
- - - - - - - - - - - - - -
-
- - - {{ wf_maker_project.name }}
+
+
+
+
+
+
+
+
+
+ +
+
+
{{ wf_maker_project.name }}
+
+
+
@@ -88,25 +84,22 @@
PLEASE ADD ITEMS TO THIS LIST
- - - - - - - - - - - - - -
-
- - - {{ wf_maker_inventory_source.name }} -
+
+
+
+
+
+
+
+
+
+ +
+
+
{{ wf_maker_inventory_source.name }}
+
+
+
diff --git a/awx/ui/test/e2e/tests/test-workflow-visualizer.js b/awx/ui/test/e2e/tests/test-workflow-visualizer.js index c9347dd165..03e1556cb8 100644 --- a/awx/ui/test/e2e/tests/test-workflow-visualizer.js +++ b/awx/ui/test/e2e/tests/test-workflow-visualizer.js @@ -24,7 +24,7 @@ const nodeAdd = "//*[contains(@class, 'WorkflowChart-nodeAddIcon')]"; const nodeRemove = "//*[contains(@class, 'WorkflowChart-nodeRemoveIcon')]"; // one of the jobs or projects or inventories -const testActionsJob = "//td[contains(text(), 'test-actions-job')]"; +const testActionsJob = "//div[contains(@class, 'List-tableCell') and contains(text(), 'test-actions-job')]"; const testActionsJobText = 'name.iexact:"test-actions-job-template"'; // search bar for visualizer templates @@ -134,6 +134,7 @@ module.exports = { }); client + .waitForElementVisible(jobSearchBar) .clearValue(jobSearchBar) .setValue(jobSearchBar, [testActionsJobText, client.Keys.ENTER]) .pause(1000) @@ -164,6 +165,7 @@ module.exports = { // xPathLinkById leafNodeId = res.value.split('-')[1]; client + .waitForElementVisible(jobSearchBar) .clearValue(jobSearchBar) .setValue(jobSearchBar, [testActionsJobText, client.Keys.ENTER]) .pause(1000)