Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Responsive design for UI #86

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion src/components/uniconfig/deviceTable/List.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,19 @@

.scrollWrapper {
overflow: auto;
max-height: 700px;
max-height: 708px;
}

@media screen and (max-height: 1020px) {
.scrollWrapper {
height: 610px;
}
}

@media screen and (max-height: 900px) {
.scrollWrapper {
height: 565px;
}
}

.leftAligned1 {
Expand Down
48 changes: 37 additions & 11 deletions src/components/uniconfig/deviceView/DeviceView.css
Original file line number Diff line number Diff line change
@@ -1,23 +1,51 @@
.config {
.container-props {
width: 1280px;
}

.config, .operational {
width: 49%;
float: left;
padding: 20px;
max-width: 700px;
box-shadow: 0px 2px 20px 0px rgba(0,0,0,0.1);
}

.container-props {
width: 1280px;
}

.operational {
width: 49%;
float: right;
padding: 20px;
max-width: 700px;
box-shadow: 0px 2px 20px 0px rgba(0,0,0,0.1);
}

@media screen and (max-width: 2100px) {
.container-props {
width: 1710px;
}

.operational, .config {
max-width: 880px;
}
}


@media screen and (max-width: 1910px) {
.container-props {
width: 1440px;
}

.operational, .config {
max-width: 820px;
}
}

@media screen and (max-width: 1440px) {
.container-props {
width: 1280px;
}

.operational, .config {
max-width: 760px;
}
}


.options button {
margin-left: 5px;
}
Expand All @@ -31,7 +59,6 @@
.leftAligned {
float: left;
text-align: left;

}

.rightAligned {
Expand Down Expand Up @@ -65,7 +92,6 @@
}

.floating-btn {
position: absolute;
left: 30px;
margin-top: 20px;
}
Expand Down
19 changes: 9 additions & 10 deletions src/components/uniconfig/deviceView/DeviceView.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {
Row,
Spinner
} from "react-bootstrap";
import DropdownMenu from "./dropdownMenu/DropdownMenu";
import SnapshotModal from "./snapshotModal/SnapshotModal";
import CustomAlerts from "../customAlerts/CustomAlerts";
import ConsoleModal from "./consoleModal/ConsoleModal";
Expand Down Expand Up @@ -365,18 +364,18 @@ class DeviceView extends Component {
return (
<div>
<header className="options">
<Button
className="round floating-btn noshadow"
onClick={() => {
this.props.history.push("/devices");
}}
variant="outline-light"
>
<i className="fas fa-chevron-left" />
</Button>
<Container fluid className="container-props">
<Row>
<Col md={5} className="child">
<Button
className="round noshadow leftAligned"
onClick={() => {
this.props.history.push("/devices");
}}
variant="outline-light"
>
<i className="fas fa-chevron-left" />
</Button>
<Dropdown
onClick={this.getSnapshots.bind(this)}
className="leftAligned"
Expand Down
14 changes: 13 additions & 1 deletion src/components/uniconfig/deviceView/editor/Codemirror.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,23 @@
.CodeMirror {
/* Set height, width, borders, and global font properties here */
font-family: monospace;
height: 500px;
height: 700px;
color: black;
direction: ltr;
}

@media screen and (max-height: 1020px) {
.CodeMirror {
height: 600px;
}
}

@media screen and (max-height: 900px) {
.CodeMirror {
height: 500px;
}
}

/* PADDING */

.CodeMirror-lines {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ class WorkflowDefs extends Component {
</Form.Group>
</Col>
</Row>
<div className="scrollWrapper" style={{ maxHeight: "650px" }}>
<div className="scrollWrapper">
<Table ref={this.table}>
<thead>
<tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,14 @@ class WorkflowBulk extends Component {
>
<Card>
<Accordion.Toggle
onClick={() =>
onClick={() => {
this.setState({
showBulk: this.state.showBulk === "0" ? null : "0"
})
}
});
document
.querySelector(".execTableWrapper.collapsible")
.classList.toggle("collapsed");
}}
className="clickable"
as={Card.Header}
eventKey="0"
Expand Down Expand Up @@ -156,22 +159,23 @@ class WorkflowBulk extends Component {
variant="outline-primary"
value="pause"
onClick={e => this.performOperation(e)}
style={{ marginBottom: "5px" }}
>
Pause
</Button>
<Button
variant="outline-primary"
value="resume"
onClick={e => this.performOperation(e)}
style={{ marginLeft: "5px" }}
style={{ marginLeft: "5px", marginBottom: "5px" }}
>
Resume
</Button>
<Button
variant="outline-primary"
value="retry"
onClick={e => this.performOperation(e)}
style={{ marginLeft: "5px" }}
style={{ marginLeft: "5px", marginBottom: "5px" }}
>
Retry
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,18 @@
text-align: left;
}

.execTableWrapper {
.execTableWrapper.collapsible {
overflow: auto;
max-height: 550px;
max-height: 643px;
}

@media screen and (max-height: 1020px) {
.execTableWrapper {
height: 500px;
}
}
.execTableWrapper.collapsed {
height: 500px;
}

.childWf {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,11 @@ class WorkflowExec extends Component {
refreshTable={
this.state.allData
? this.props.fetchNewData.bind(this, 1, this.state.defaultPages)
: this.props.fetchParentWorkflows.bind(this, 1, this.state.defaultPages)
: this.props.fetchParentWorkflows.bind(
this,
1,
this.state.defaultPages
)
}
show={this.state.detailsModal}
/>
Expand Down Expand Up @@ -524,7 +528,7 @@ class WorkflowExec extends Component {
<i className="fas fa-times" />
</Button>
</Row>
<div className="execTableWrapper">
<div className="execTableWrapper collapsible">
<Table ref={this.table} striped={this.state.allData} hover size="sm">
<thead>
<tr>
Expand Down