Skip to content

Commit

Permalink
avoid Inventory page components scss overriding other pages (#496)
Browse files Browse the repository at this point in the history
* avoid Inventory page components scss overriding other pages

* Fixes in InventoryModal & tabHeader
  • Loading branch information
Ron-Lavi committed Mar 7, 2021
1 parent 1ae98a8 commit b7bbe6b
Show file tree
Hide file tree
Showing 19 changed files with 153 additions and 127 deletions.
@@ -1,7 +1,9 @@
.blank-slate-pf {
margin-top: 100px;
.rh-cloud-inventory-page {
.blank-slate-pf {
margin-top: 100px;

.no_results_icon {
margin-right: 5px;
.no_results_icon {
margin-right: 5px;
}
}
}
@@ -1,7 +1,9 @@
.blank-slate-pf {
margin-top: 100px;
.rh-cloud-inventory-page {
.blank-slate-pf {
margin-top: 100px;

.spinner {
float: none;
.spinner {
float: none;
}
}
}
@@ -1,18 +1,20 @@
$error_color: #d10d0d;

.error_state {
margin-top: 100px;
text-align: center;
font-weight: bold;
font-size: 16px;
.rh-cloud-inventory-page {
.error_state {
margin-top: 100px;
text-align: center;
font-weight: bold;
font-size: 16px;

.error_icon {
color: $error_color;
margin-right: 15px;
margin-bottom: 10px;
}
.error_icon {
color: $error_color;
margin-right: 15px;
margin-bottom: 10px;
}

.error_description {
color: $error_color;
.error_description {
color: $error_color;
}
}
}
@@ -1,32 +1,34 @@
.account-list {
.pf-c-accordion__toggle {
margin-top: 10px;
}
.rh-cloud-inventory-page {
.account-list {
.pf-c-accordion__toggle {
margin-top: 10px;
}

.pf-c-accordion__toggle-text {
font-size: 16px;
display: flex;
justify-content: space-between;
width: 100%;
.pf-c-accordion__toggle-text {
font-size: 16px;
display: flex;
justify-content: space-between;
width: 100%;

.account-icon {
margin-right: 5px;
.account-icon {
margin-right: 5px;

.pf-c-label__icon {
margin: 0;
.pf-c-label__icon {
margin: 0;
}
}
}

span {
align-self: center;
}
span {
align-self: center;
}

.status {
margin: 0;
.status {
margin: 0;
}
}
}

.list-item-status > span {
margin-left: 7px;
.list-item-status > span {
margin-left: 7px;
}
}
}
@@ -1,3 +1,5 @@
button {
float: right;
.rh-cloud-inventory-page {
button {
float: right;
}
}
@@ -1,19 +1,21 @@
#full-screen-terminal {
.modal-dialog {
width: 95%;
height: 95%;
margin: 30px 0 0 30px;
.rh-cloud-inventory-page {
#full-screen-terminal {
.modal-dialog {
width: 95%;
height: 95%;
margin: 30px 0 0 30px;

.modal-body {
padding: 0;
display: flex;
height: -webkit-fill-available;
height: -moz-available;
height: fill-available;
.modal-body {
padding: 0;
display: flex;
height: -webkit-fill-available;
height: -moz-available;
height: fill-available;

.terminal {
margin: 0 -20px;
height: 100%;
.terminal {
margin: 0 -20px;
height: 100%;
}
}
}
}
Expand Down
@@ -1,7 +1,9 @@
.dashboard {
.nav_item {
font-size: 12px;
text-align: center;
width: 130px;
.rh-cloud-inventory-page {
.dashboard {
.nav_item {
font-size: 12px;
text-align: center;
width: 130px;
}
}
}
@@ -1,4 +1,4 @@
.rh-cloud-page {
.rh-cloud-inventory-page {
.inventory-upload-header {
.settings-alert {
margin-bottom: 30px;
Expand Down
Expand Up @@ -6,7 +6,7 @@ import { foremanUrl } from '../../../../../../ForemanRhCloudHelpers';
import './modal.scss';

const SyncModal = ({ show, toggleModal }) => (
<Modal show={show} onHide={toggleModal} id="sync_modal">
<Modal show={show} onHide={toggleModal} id="inventory-sync-modal">
<Modal.Header>
<button
className="close"
Expand Down
@@ -1,4 +1,4 @@
#sync_modal {
#inventory-sync-modal {
height: 300px;
margin: auto;
overflow: hidden;
Expand Down
@@ -1,11 +1,13 @@
.scheduled_run {
font-size: 14px;
.rh-cloud-inventory-page {
.scheduled_run {
font-size: 14px;

p {
margin: 0 0 -10px 0;
p {
margin: 0 0 -10px 0;

.fa {
margin-right: 5px;
.fa {
margin-right: 5px;
}
}
}
}
@@ -1,8 +1,10 @@
.status-chart {
display: flex;
align-items: center;
-webkit-justify-content: center;
justify-content: center;
margin: 10%;
padding: 5%;
.rh-cloud-inventory-page {
.status-chart {
display: flex;
align-items: center;
-webkit-justify-content: center;
justify-content: center;
margin: 10%;
padding: 5%;
}
}
@@ -1,3 +1,5 @@
.tab_body {
margin-bottom: 0;
.rh-cloud-inventory-page {
.tab_body {
margin-bottom: 0;
}
}
@@ -1,8 +1,10 @@
.dashboard .tab-content {
padding: 20px;
min-height: 0;
.rh-cloud-inventory-page {
.dashboard .tab-content {
padding: 20px;
min-height: 0;

.row {
margin-bottom: 20px;
.row {
margin-bottom: 20px;
}
}
}
28 changes: 15 additions & 13 deletions webpack/ForemanInventoryUpload/Components/TabHeader/tabHeader.scss
@@ -1,20 +1,22 @@
.tab-header {
h1 {
margin-top: 0;
}

p {
font-size: 16px;
}
.rh-cloud-inventory-page {
.tab-header {
h1 {
margin-top: 0;
}

.tab-action-buttons {
float: right;
p {
font-size: 16px;
}

button {
margin-left: 5px;
.tab-action-buttons {
float: right;

span {
button {
margin-left: 5px;

span {
margin-left: 5px;
}
}
}
}
Expand Down
52 changes: 27 additions & 25 deletions webpack/ForemanInventoryUpload/Components/Terminal/terminal.scss
@@ -1,32 +1,34 @@
.terminal {
height: 200px;
background-color: #222;
padding: 10px 0;
margin-bottom: 20px;
overflow-y: scroll;
overflow-x: hidden;
.rh-cloud-inventory-page {
.terminal {
height: 200px;
background-color: #222;
padding: 10px 0;
margin-bottom: 20px;
overflow-y: scroll;
overflow-x: hidden;

p {
font-family: monospace;
font-size: 16px;
color: #22da26;
overflow-wrap: anywhere;
p {
font-family: monospace;
font-size: 16px;
color: #22da26;
overflow-wrap: anywhere;

&.terminal_error {
color: #f00;
&.terminal_error {
color: #f00;
}
}
}

&::-webkit-scrollbar {
width: 12px;
height: 12px;
background: #aaa;
}
&::-webkit-scrollbar {
width: 12px;
height: 12px;
background: #aaa;
}

&::-webkit-scrollbar-thumb {
background: #222;
border-radius: 6px;
border: 3px solid transparent;
background-clip: content-box;
&::-webkit-scrollbar-thumb {
background: #222;
border-radius: 6px;
border: 3px solid transparent;
background-clip: content-box;
}
}
}
2 changes: 1 addition & 1 deletion webpack/ForemanInventoryUpload/ForemanInventoryUpload.js
Expand Up @@ -4,7 +4,7 @@ import AccountList from './Components/AccountList';
import PageHeader from './Components/PageHeader';

const ForemanInventoryUpload = () => (
<div className="rh-cloud-page">
<div className="rh-cloud-inventory-page">
<PageLayout searchable={false} beforeToolbarComponent={<PageHeader />}>
<AccountList />
</PageLayout>
Expand Down
Expand Up @@ -2,7 +2,7 @@

exports[`ForemanInventoryUpload render without Props 1`] = `
<div
className="rh-cloud-page"
className="rh-cloud-inventory-page"
>
<PageLayout
beforeToolbarComponent={<PageHeader />}
Expand Down
2 changes: 1 addition & 1 deletion webpack/common/Switcher/SwitcherPF4.scss
@@ -1,4 +1,4 @@
.rh-cloud-page {
.rh-cloud-inventory-page {
label.foreman-switcher {
font-weight: 400;
margin-bottom: 5px;
Expand Down

0 comments on commit b7bbe6b

Please sign in to comment.