Merge remote-tracking branch 'ui/master'

This commit is contained in:
Zaid Abdulla committed 2018-12-27 22:22:44 -08:00
commit 4530967b6b
70 files changed
+10951 -8

No files matched your search

+685
View File
@@ -0,0 +1,685 @@
@import "normalize.css";
@import "codemirror/lib/codemirror.css";
:root {
--base-font-size: 13px;
--base-line-height: 16px;
--color1: #ebe0bf;
--color2: #b9b098;
--color3: #f2ebd5;
--color4: #046380;
--color5: #002f2f;
--fade: 0.2s;
--disabled: #666;
--status-red: hsl(0, 80%, 80%);
--status-green: hsl(125, 80%, 80%);
--status-gray: hsl(58, 3%, 80%);
}
body,
input,
button,
select,
option,
textarea {
font-family: sans-serif;
color: var(--color5);
}
a {
color: var(--color4);
cursor: pointer;
transition: background-color var(--fade), color var(--fade);
&:visited {
color: var(--color4);
}
&:hover {
color: white;
background-color: var(--color4);
}
/* text-decoration does not propagate to inline-block children */
& span {
text-decoration: inherit;
}
}
strong,
b {
font-weight: bold;
}
i {
font-style: italic;
}
@keyframes pending-blink {
from {
background-color: color(var(--status-green) a(90%));
}
to {
background-color: transparent;
}
}
#header {
background-color: #f2eddf;
border-bottom: 1px solid var(--color1);
overflow: visible;
position: relative;
& > .drawer-wrapper {
position: fixed;
z-index: 10;
width: 720px;
margin-left: -360px;
top: 0;
left: 50%;
& > .drawer {
background-color: rgba(255, 255, 255, 0.9);
border-bottom-left-radius: 6px;
border-bottom-right-radius: 6px;
border-bottom: 1px solid var(--color1);
border-left: 1px solid var(--color1);
border-right: 1px solid var(--color1);
margin-top: -1px;
box-shadow: 0 0 10px #ccc;
overflow: hidden;
transition: height var(--fade), opacity var(--fade);
& > div {
padding: 0.3em;
}
& > .status {
display: flex;
& > span {
margin-right: 1em;
padding-left: 0.2em;
padding-right: 0.2em;
border-radius: 0.4em;
}
& > .pending.active {
&.active {
animation: 0.5s linear 0s infinite alternate pending-blink;
}
}
& > .stale.active {
background-color: color(var(--status-gray) a(90%));
}
& > .fault.active {
background-color: color(var(--status-red) a(90%));
}
& > .queued.active {
font-weight: bold;
}
& > .actions {
flex-grow: 1;
text-align: right;
}
}
& > .staging {
& .parameter {
font-style: italic;
max-width: 500px;
text-overflow: ellipsis;
display: inline-block;
overflow: hidden;
vertical-align: text-bottom;
}
& input {
width: 100%;
padding: 0.3em;
margin-top: 0.3em;
margin-bottom: 0.3em;
}
& .actions {
text-align: right;
}
}
& > .queue {
& > .pending {
animation: 0.5s linear 0s infinite alternate pending-blink;
border-radius: 0.4em;
}
& > .stale {
background-color: color(var(--status-gray) a(90%));
border-radius: 0.4em;
}
& > .fault {
background-color: color(var(--status-red) a(90%));
border-radius: 0.4em;
}
& .parameter {
font-style: italic;
max-width: 400px;
text-overflow: ellipsis;
display: inline-block;
overflow: hidden;
vertical-align: text-bottom;
}
& .value {
max-width: 200px;
text-overflow: ellipsis;
display: inline-block;
overflow: hidden;
vertical-align: text-bottom;
white-space: nowrap;
}
& > div {
display: flex;
& > .actions {
flex-grow: 1;
text-align: right;
}
}
}
}
& > .notifications-wrapper {
& > .notification {
padding: 0.3em;
left: 0;
right: 0;
background-color: rgba(255, 255, 255, 0.9);
border: 1px solid var(--color1);
border-radius: 6px;
box-shadow: 0 0 10px #ccc;
transition: opacity var(--fade), top var(--fade);
&.error {
background-color: color(var(--status-red) a(90%));
border: 1px solid var(--status-red);
}
&.success {
background-color: color(var(--status-green) a(90%));
border: 1px solid var(--status-green);
}
}
}
}
& > nav {
display: inline-block;
overflow: visible;
position: absolute;
bottom: -1px;
& > ul {
font-weight: bold;
display: inline-block;
margin: 0 10px;
padding: 0;
& > li {
margin: 0 2px;
background-color: var(--color1);
display: inline-block;
border-top-left-radius: 6px;
border-top-right-radius: 6px;
border-top: 1px solid var(--color1);
border-left: 1px solid var(--color1);
border-right: 1px solid var(--color1);
transition: background-color var(--fade);
&.active,
&:hover {
background-color: white;
}
& > a,
& > a:visited,
& > a:hover {
display: inline-block;
min-width: 140px;
color: var(--color4);
text-decoration: none;
background: none;
padding: 8px;
}
}
}
}
& > .logo {
margin: 10px;
display: inline;
height: 56px;
}
& > .user-menu {
float: right;
margin: 5px;
}
}
#content-wrapper {
display: flex;
}
#side-menu {
width: 200px;
& > ul {
padding: 0;
list-style: none;
& > li {
& > a {
display: block;
text-decoration: none;
margin: 5px 0;
padding: 8px;
border-bottom-right-radius: 6px;
border-top-right-radius: 6px;
background-color: var(--color3);
&:hover {
background-color: var(--color4);
color: var(--color3);
}
}
&.active {
font-weight: bold;
}
}
}
}
#content {
flex-grow: 1;
overflow: auto;
margin: 10px;
min-height: 250px;
}
table.table {
border-spacing: 0;
text-align: left;
display: block;
overflow-x: auto;
& table.table {
font-size: 90%;
}
& th {
white-space: nowrap;
color: var(--color4);
font-weight: bold;
border-bottom: 2px solid var(--color4);
margin: 0;
padding: 0.2em 0.5em;
}
& td {
margin: 0;
padding: 0.2em 0.5em;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 400px;
}
& tfoot td > a {
margin-left: 1em;
}
&.highlight > tbody > tr {
& > td {
border-bottom: 1px dotted var(--color1);
}
transition: background-color var(--fade);
&:hover {
background-color: var(--color3);
}
}
& tbody > tr.empty {
text-align: center;
color: var(--disabled);
&:hover {
background-color: initial;
}
}
}
h1 {
color: var(--color4);
font-size: 130%;
font-weight: bold;
margin-top: 1em;
margin-bottom: 0.5em;
}
h2 {
color: var(--color5);
font-weight: bold;
font-size: 120%;
margin-top: 1em;
margin-bottom: 0.5em;
}
h3 {
color: var(--color5);
font-size: 110%;
margin-top: 1em;
margin-bottom: 0.5em;
}
p.error {
color: #a00;
}
/* Remove button padding in FF */
input::-moz-focus-inner {
border: 0;
padding: 0;
}
input[type="button"],
button {
background: transparent;
border: 0;
color: var(--color4);
border-radius: 4px;
transition: background-color var(--fade), color var(--fade);
&.primary {
border: 1px solid var(--color1);
background-color: var(--color3);
}
&.critical {
border: 1px solid var(--color1);
background-color: var(--color3);
color: #700;
}
&:hover:enabled {
background-color: var(--color4);
color: var(--color3);
}
&:disabled {
color: var(--disabled);
cursor: not-allowed;
}
}
.CodeMirror,
textarea,
select,
input {
display: block;
border: 1px solid var(--color1);
background-color: var(--color3);
border-radius: 4px;
transition: border-color var(--fade), background-color var(--fade);
&.error {
background-color: #efcbcf;
border-color: #e6b2b7;
}
&:focus,
&:hover {
border-color: var(--color4);
}
}
.filter {
margin-bottom: 0.5em;
& > input {
font-size: 90%;
width: 30em;
margin: 2px;
padding: 2px;
}
}
.page-overview {
& > h1 {
text-align: center;
}
}
.overview-chart-group {
display: flex;
justify-content: center;
& h2 {
text-align: center;
}
}
table.parameter-list {
border-spacing: 0;
text-align: left;
& th {
padding: 0;
padding-right: 1em;
}
}
.overview-dot {
& > svg {
margin-bottom: -0.125em;
margin-left: 0.2em;
margin-right: 0.2em;
& > circle {
stroke: var(--color5);
stroke-width: 0.08em;
}
}
}
span.inform {
& > * {
margin-right: 0.5em;
}
}
.pie-chart {
margin: 20px;
text-align: center;
& > svg {
& > path {
stroke: var(--color1);
stroke-width: 1px;
}
& > a {
transition: opacity var(--fade);
opacity: 0;
& > text {
font-weight: bold;
opacity: 0.4;
}
& > path {
stroke: var(--color4);
}
&:hover {
opacity: 1;
}
}
}
& > .legend {
text-align: left;
margin: 15px;
& > .legend-line {
& > .color {
height: 12px;
width: 12px;
margin-right: 5px;
border: 1px solid var(--color1);
display: inline-block;
}
}
}
}
span.na {
color: var(--disabled);
}
.all-parameters {
& > input {
font-family: monospace;
margin-bottom: 2px;
padding: 4px;
width: 600px;
}
& > .parameter-list {
font-family: monospace;
overflow-y: scroll;
height: 200px;
& > table {
width: 100%;
table-layout: fixed;
border-spacing: 0;
& > tbody {
& > tr {
& > td {
overflow: hidden;
white-space: nowrap;
border-bottom: 1px dotted var(--color1);
}
transition: background-color var(--fade);
&:hover {
background-color: var(--color3);
}
& > td.left {
& > * {
max-width: 100%;
}
}
& > td.right {
text-align: right;
padding-right: 0.5em;
}
}
}
}
}
}
.container-right {
float: right;
clear: right;
}
.container-full-width {
clear: both;
}
.actions-bar {
margin-top: 10px;
& > button {
margin-right: 10px;
}
}
span.tag {
display: inline-block;
background-image: url('data:image/svg+xml;utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="190" height="16"><path d="M6.59 15.42l-6-6a2 2 0 0 1 0-2.83l6-6A2 2 0 0 1 8 0h180a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H8a2 2 0 0 1-1.41-.58zM4.35 6.59A2 2 0 1 0 7.17 9.4 2 2 0 0 0 4.35 6.6z" fill="#e8d5b2"></path></svg>');
background-size: cover;
background-repeat: no-repeat;
border-radius: 0.2em;
padding-left: 1em;
padding-right: 0.2em;
}
.tags {
& > .tag {
margin-right: 0.5em;
}
}
.overlay-wrapper {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.2);
z-index: 100;
transition: opacity var(--fade), top var(--fade);
display: flex;
align-items: center;
justify-content: center;
& > .overlay {
max-width: 90vw;
max-height: 90vh;
background-color: white;
border: 1px solid var(--color1);
border-radius: 10px;
padding: 10px;
box-shadow: 0 0 15px #aaa;
overflow: auto;
}
}
.overlay > .put-form {
min-width: 700px;
}
.autocomplete {
box-shadow: 0 0 10px #ccc;
background-color: rgba(255, 255, 255, 0.9);
border: 1px solid var(--color1);
border-radius: 4px;
max-height: 300px;
overflow-y: auto;
transition: opacity var(--fade);
& > .suggestion {
padding: 5px;
&.selected,
&:hover {
background-color: var(--color3);
}
}
}
span.long-text {
display: inline-block;
overflow-x: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 400px;
/*
"overflow: hidden" changes the baseline as explained here:
https://stackoverflow.com/questions/9273016/why-is-this-inline-block-element-pushed-downward
*/
vertical-align: top;
}
span.long-text-overflowed {
cursor: pointer;
&:hover {
text-decoration: underline;
text-decoration-style: dotted;
}
}
textarea.long-text {
font-family: monospace;
min-width: 10vw;
min-height: 10vh;
}
span.parameter-value {
& > span:empty::before {
content: "blank";
color: #aaa;
}
}
+450
View File
@@ -0,0 +1,450 @@
/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */
/* Document
========================================================================== */
/**
* 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in
* IE on Windows Phone and in iOS.
*/
html {
line-height: 1.15; /* 1 */
-ms-text-size-adjust: 100%; /* 2 */
-webkit-text-size-adjust: 100%; /* 2 */
}
/* Sections
========================================================================== */
/**
* Remove the margin in all browsers (opinionated).
*/
body {
margin: 0;
}
/**
* Add the correct display in IE 9-.
*/
article,
aside,
footer,
header,
nav,
section {
display: block;
}
/**
* Correct the font size and margin on `h1` elements within `section` and
* `article` contexts in Chrome, Firefox, and Safari.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
/* Grouping content
========================================================================== */
/**
* Add the correct display in IE 9-.
* 1. Add the correct display in IE.
*/
figcaption,
figure,
main {
/* 1 */
display: block;
}
/**
* Add the correct margin in IE 8.
*/
figure {
margin: 1em 40px;
}
/**
* 1. Add the correct box sizing in Firefox.
* 2. Show the overflow in Edge and IE.
*/
hr {
box-sizing: content-box; /* 1 */
height: 0; /* 1 */
overflow: visible; /* 2 */
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
pre {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/* Text-level semantics
========================================================================== */
/**
* 1. Remove the gray background on active links in IE 10.
* 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
*/
a {
background-color: transparent; /* 1 */
-webkit-text-decoration-skip: objects; /* 2 */
}
/**
* 1. Remove the bottom border in Chrome 57- and Firefox 39-.
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
*/
abbr[title] {
border-bottom: none; /* 1 */
text-decoration: underline; /* 2 */
text-decoration: underline dotted; /* 2 */
}
/**
* Prevent the duplicate application of `bolder` by the next rule in Safari 6.
*/
b,
strong {
font-weight: inherit;
}
/**
* Add the correct font weight in Chrome, Edge, and Safari.
*/
b,
strong {
font-weight: bolder;
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
samp {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/**
* Add the correct font style in Android 4.3-.
*/
dfn {
font-style: italic;
}
/**
* Add the correct background and color in IE 9-.
*/
mark {
background-color: #ff0;
color: #000;
}
/**
* Add the correct font size in all browsers.
*/
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` elements from affecting the line height in
* all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
/* Embedded content
========================================================================== */
/**
* Add the correct display in IE 9-.
*/
audio,
video {
display: inline-block;
}
/**
* Add the correct display in iOS 4-7.
*/
audio:not([controls]) {
display: none;
height: 0;
}
/**
* Remove the border on images inside links in IE 10-.
*/
img {
border-style: none;
}
/**
* Hide the overflow in IE.
*/
svg:not(:root) {
overflow: hidden;
}
/* Forms
========================================================================== */
/**
* 1. Change the font styles in all browsers (opinionated).
* 2. Remove the margin in Firefox and Safari.
*/
button,
input,
optgroup,
select,
textarea {
font-family: sans-serif; /* 1 */
font-size: 100%; /* 1 */
line-height: 1.15; /* 1 */
margin: 0; /* 2 */
}
/**
* Show the overflow in IE.
* 1. Show the overflow in Edge.
*/
button,
input {
/* 1 */
overflow: visible;
}
/**
* Remove the inheritance of text transform in Edge, Firefox, and IE.
* 1. Remove the inheritance of text transform in Firefox.
*/
button,
select {
/* 1 */
text-transform: none;
}
/**
* 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
* controls in Android 4.
* 2. Correct the inability to style clickable types in iOS and Safari.
*/
button,
html [type="button"],
/* 1 */ [type="reset"],
[type="submit"] {
-webkit-appearance: button; /* 2 */
}
/**
* Remove the inner border and padding in Firefox.
*/
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
border-style: none;
padding: 0;
}
/**
* Restore the focus styles unset by the previous rule.
*/
button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
outline: 1px dotted ButtonText;
}
/**
* Correct the padding in Firefox.
*/
fieldset {
padding: 0.35em 0.75em 0.625em;
}
/**
* 1. Correct the text wrapping in Edge and IE.
* 2. Correct the color inheritance from `fieldset` elements in IE.
* 3. Remove the padding so developers are not caught out when they zero out
* `fieldset` elements in all browsers.
*/
legend {
box-sizing: border-box; /* 1 */
color: inherit; /* 2 */
display: table; /* 1 */
max-width: 100%; /* 1 */
padding: 0; /* 3 */
white-space: normal; /* 1 */
}
/**
* 1. Add the correct display in IE 9-.
* 2. Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/
progress {
display: inline-block; /* 1 */
vertical-align: baseline; /* 2 */
}
/**
* Remove the default vertical scrollbar in IE.
*/
textarea {
overflow: auto;
}
/**
* 1. Add the correct box sizing in IE 10-.
* 2. Remove the padding in IE 10-.
*/
[type="checkbox"],
[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
/**
* Correct the cursor style of increment and decrement buttons in Chrome.
*/
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto;
}
/**
* 1. Correct the odd appearance in Chrome and Safari.
* 2. Correct the outline style in Safari.
*/
[type="search"] {
-webkit-appearance: textfield; /* 1 */
outline-offset: -2px; /* 2 */
}
/**
* Remove the inner padding and cancel buttons in Chrome and Safari on macOS.
*/
[type="search"]::-webkit-search-cancel-button,
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* 1. Correct the inability to style clickable types in iOS and Safari.
* 2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
-webkit-appearance: button; /* 1 */
font: inherit; /* 2 */
}
/* Interactive
========================================================================== */
/*
* Add the correct display in IE 9-.
* 1. Add the correct display in Edge, IE, and Firefox.
*/
details,
/* 1 */ menu {
display: block;
}
/*
* Add the correct display in all browsers.
*/
summary {
display: list-item;
}
/* Scripting
========================================================================== */
/**
* Add the correct display in IE 9-.
*/
canvas {
display: inline-block;
}
/**
* Add the correct display in IE.
*/
template {
display: none;
}
/* Hidden
========================================================================== */
/**
* Add the correct display in IE 10-.
*/
[hidden] {
display: none;
}