08d97a19ca
* ui: Toggle for `read-only` view (#16279) * ui: model update for specification * style: add styling for select * style: add styling for select * refact: add spec to view * refact: update component API * test: refactor for new UI state * refact: clean conditional * refact: update component API for prop * chore: correct naming * chore: remove `fn` helper Co-authored-by: Phil Renaud <phil.renaud@hashicorp.com> * update `default` Mirage scenario (#16496) * chore: update mirage scenario: * ui: conditionally render toggle button (#16497) * chore: update css variable name (#16498) --------- Co-authored-by: Phil Renaud <phil.renaud@hashicorp.com> * ui: Display JSON view of variables associated to job specification (#16570) * chore: move fixture to util * chore: update tests: * ui: display variables table * chore: add mirage fixture (#16572) * ui: regex for job spec parse (#16668) * ui: remove variable table (#16670) * ui: notify user if specification has variables (#16671) * ui: regex for job spec parse * chore: deprecate variable references * chore: update mirage * ui: add notification * test: add test coverage for parse method (#16590) * refact: `JobEditor` reactive query parameters (#16710) * refact: add query parameter * refact: move toggle action to controller * ui: remove toggle behavior in `JobEditor` (#16711) * refact: rename logic for select * chore: instantiate qp in route * refact: uniform alerts (#16715) * style: buffer between alert and header * refact: extract alerts into a component * chore: update tests for qp * chore: defensive logic for app controller * refact: move `edit` state to controller (#16725) * refact: move edit state to controller * refact: handle edit state (#16731) * refact: handle edit state * ui: warning message (#16732) * ui: warning message * ui: enable editing of HCL vars in the UI (#16734) * enable editing of HCL vars * refact: default qp logic * refact: alert condition * refact: Pass `variables` as string (#16849) * ui: Toggle for `read-only` view (#16279) * ui: model update for specification * style: add styling for select * style: add styling for select * refact: add spec to view * refact: update component API * test: refactor for new UI state * refact: clean conditional * refact: update component API for prop * chore: correct naming * chore: remove `fn` helper Co-authored-by: Phil Renaud <phil.renaud@hashicorp.com> * update `default` Mirage scenario (#16496) * chore: update mirage scenario: * ui: conditionally render toggle button (#16497) * chore: update css variable name (#16498) --------- Co-authored-by: Phil Renaud <phil.renaud@hashicorp.com> * refact: `JobEditor` reactive query parameters (#16710) * refact: add query parameter * refact: move toggle action to controller * ui: remove toggle behavior in `JobEditor` (#16711) * refact: rename logic for select * chore: instantiate qp in route * refact: uniform alerts (#16715) * style: buffer between alert and header * refact: extract alerts into a component * chore: update tests for qp * chore: defensive logic for app controller * refact: move `edit` state to controller (#16725) * refact: move edit state to controller * refact: handle edit state (#16731) * refact: handle edit state * ui: warning message (#16732) * ui: warning message * ui: enable editing of HCL vars in the UI (#16734) * enable editing of HCL vars * refact: default qp logic * refact: alert condition * refact: variables as string * style: revert styling change --------- Co-authored-by: Phil Renaud <phil.renaud@hashicorp.com> * bug: correctly edit variables (#16989) * ui: visualize variables (#16987) * ui: fetchRawSpecification * refact: integrate new model method * test: fetchRaw unit * styling: enable height on cm * chore: update copy * feat: visual variables * chore: conditional render info txt * refact: add mirage endpoint * refact: update test for new schema * refact: job submit flow (#17015) * refact: job update logic * chore: remove dead code * bug: update `job.run` and `job.update` adapter methods (#17055) * refact: update adapter * chore: update api usage * styling: UX requests (#17064) * refact: update adapter * chore: update api usage * styling: disable toggle w text * styling: stick button * style: space out alerts * chore: autofocus on first editor * bug: dismiss alert * chore: add jsdoc and assertion check * chore: update mirage for Vercel (#17054) * chore: mirage logic for vercel deploy * chore: update test for mirage change * refact: API refactoring (#17083) * refact: udpate for req schema * refact: update for variable flags and literal * bug: visualize job model not derived state * chore: update copy * chore: fix incorrect copy * chore: deprecate variables derived state * chore: update copy * feat: enable toggle on edit * chore: prettify * refact: move conditional --------- Co-authored-by: Phil Renaud <phil.renaud@hashicorp.com>
209 lines
3.1 KiB
SCSS
209 lines
3.1 KiB
SCSS
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
*/
|
|
|
|
$dark-bright: lighten($dark, 15%);
|
|
|
|
.CodeMirror {
|
|
height: auto;
|
|
}
|
|
|
|
.CodeMirror-scroll {
|
|
min-height: 500px;
|
|
}
|
|
|
|
.cm-s-hashi,
|
|
.cm-s-hashi-read-only {
|
|
&.CodeMirror {
|
|
background-color: $dark-3;
|
|
color: $grey-blue;
|
|
border: none;
|
|
font-family: $family-monospace;
|
|
-webkit-font-smoothing: auto;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.CodeMirror-gutters {
|
|
background-color: $dark-2;
|
|
border: none;
|
|
}
|
|
|
|
.CodeMirror-cursor {
|
|
border-left: solid thin $white-ter;
|
|
}
|
|
|
|
.CodeMirror-linenumber {
|
|
color: $dark-bright;
|
|
}
|
|
|
|
&.CodeMirror-focused div.CodeMirror-selected {
|
|
background: rgba(255, 255, 255, 0.1);
|
|
}
|
|
|
|
.CodeMirror-line::selection,
|
|
.CodeMirror-line > span::selection,
|
|
.CodeMirror-line > span > span::selection {
|
|
background: rgba(255, 255, 255, 0.1);
|
|
}
|
|
|
|
span.cm-comment {
|
|
color: $grey;
|
|
}
|
|
|
|
span.cm-string,
|
|
span.cm-string-2 {
|
|
color: $nomad-green;
|
|
}
|
|
|
|
span.cm-number {
|
|
color: $serf-red;
|
|
}
|
|
|
|
span.cm-variable {
|
|
color: $packer-blue;
|
|
}
|
|
|
|
span.cm-variable-2 {
|
|
color: $packer-blue;
|
|
}
|
|
|
|
span.cm-def {
|
|
color: $nomad-green;
|
|
}
|
|
|
|
span.cm-operator {
|
|
color: $grey;
|
|
}
|
|
span.cm-keyword {
|
|
color: $yellow;
|
|
}
|
|
|
|
span.cm-atom {
|
|
color: $terraform-purple-bright;
|
|
}
|
|
|
|
span.cm-meta {
|
|
color: $nomad-green;
|
|
}
|
|
|
|
span.cm-tag {
|
|
color: $nomad-green;
|
|
}
|
|
|
|
span.cm-attribute {
|
|
color: $consul-pink;
|
|
}
|
|
|
|
span.cm-qualifier {
|
|
color: $consul-pink;
|
|
}
|
|
|
|
span.cm-property {
|
|
color: $nomad-green;
|
|
}
|
|
|
|
span.cm-variable-3 {
|
|
color: $consul-pink;
|
|
}
|
|
|
|
span.cm-builtin {
|
|
color: $consul-pink;
|
|
}
|
|
|
|
.CodeMirror-activeline-background {
|
|
background: $black-ter;
|
|
}
|
|
|
|
.CodeMirror-matchingbracket {
|
|
text-decoration: underline;
|
|
color: $white;
|
|
}
|
|
}
|
|
|
|
.cm-s-auto-height.CodeMirror {
|
|
height: auto;
|
|
}
|
|
|
|
.cm-s-hashi-read-only {
|
|
&.CodeMirror {
|
|
background-color: $dark-2;
|
|
}
|
|
|
|
.CodeMirror-gutters {
|
|
background-color: $dark-2;
|
|
}
|
|
}
|
|
|
|
header.run-job-header {
|
|
display: grid;
|
|
grid-template-columns: 1fr auto;
|
|
margin-bottom: 2rem;
|
|
gap: 0 1rem;
|
|
& > h1 {
|
|
grid-column: -1 / 1;
|
|
}
|
|
}
|
|
|
|
.job-spec-upload {
|
|
.button {
|
|
cursor: pointer;
|
|
}
|
|
input {
|
|
width: 100%;
|
|
height: 100%;
|
|
position: absolute;
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
.buttonset {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
|
|
&.sticky {
|
|
position: sticky;
|
|
bottom: 0;
|
|
background: white;
|
|
padding: 0.5rem 0;
|
|
}
|
|
}
|
|
|
|
.job-definition-select {
|
|
border: 1px solid $grey-blue;
|
|
background: rgba(0, 0, 0, 0.05);
|
|
border-radius: 2px;
|
|
display: grid;
|
|
gap: 0.5rem;
|
|
grid-template-columns: 1fr 1fr;
|
|
padding: 0.25rem 0.5rem;
|
|
margin: 0rem 1rem;
|
|
|
|
&.disabled {
|
|
opacity: 0.5;
|
|
pointer-events: none;
|
|
}
|
|
|
|
button {
|
|
height: auto;
|
|
padding: 0 0.5rem;
|
|
background: transparent;
|
|
transition: 0.1s;
|
|
|
|
&:hover {
|
|
background: rgba(255, 255, 255, 0.5);
|
|
}
|
|
|
|
&.is-active {
|
|
background: $white;
|
|
}
|
|
}
|
|
}
|
|
|
|
.job-editor-alerts {
|
|
display: grid;
|
|
grid-template-rows: repeat(minmax(200px, 1fr), auto-fit);
|
|
gap: 10px;
|
|
margin-bottom: 10px;
|
|
}
|