-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ui: Change layout styling for healthcheckoutput, add CheckID (#6195)
- Loading branch information
Showing
9 changed files
with
159 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import Component from '@ember/component'; | ||
import Slotted from 'block-slots'; | ||
|
||
export default Component.extend({ | ||
export default Component.extend(Slotted, { | ||
classNames: ['healthcheck-output'], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78 changes: 65 additions & 13 deletions
78
ui-v2/app/styles/components/healthcheck-output/layout.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,75 @@ | ||
%healthcheck-output { | ||
display: flex; | ||
|
||
padding: 20px 16px; | ||
padding-right: 24px; | ||
|
||
margin-bottom: 24px; | ||
} | ||
%healthcheck-output::before { | ||
left: 14px; | ||
top: 20px; | ||
margin-right: 15px; | ||
} | ||
%healthcheck-output { | ||
%healthcheck-output > div { | ||
flex: 1 1 auto; | ||
} | ||
%healthcheck-output header { | ||
margin-bottom: 0.9em; | ||
} | ||
%healthcheck-output dl:not(:last-of-type) { | ||
float: left; | ||
width: 25%; | ||
margin-right: 2%; | ||
} | ||
%healthcheck-output dl:nth-of-type(3) { | ||
width: 46%; | ||
margin-right: 0; | ||
} | ||
%healthcheck-output dl:not(:last-of-type) dd { | ||
word-break: break-all; | ||
} | ||
%healthcheck-output dt { | ||
margin-bottom: 0; | ||
} | ||
%healthcheck-output dl:last-of-type { | ||
clear: both; | ||
margin-bottom: 0; | ||
} | ||
%healthcheck-output dl:last-of-type dt { | ||
margin-bottom: 0.3em; | ||
} | ||
%healthcheck-output dl:last-of-type dd { | ||
position: relative; | ||
padding: 20px 24px; | ||
padding-bottom: 26px; | ||
padding-left: 57px; | ||
margin-bottom: 24px; | ||
} | ||
%healthcheck-output dl > * { | ||
float: none; | ||
display: block; | ||
width: auto; | ||
position: static; | ||
padding-left: 0; | ||
} | ||
%healthcheck-output pre { | ||
padding: 12px; | ||
padding-right: 40px; | ||
white-space: pre-wrap; | ||
} | ||
%healthcheck-output .with-feedback { | ||
float: right; | ||
} | ||
%healthcheck-output dt { | ||
margin-bottom: 0.2em; | ||
position: absolute; | ||
right: 0.5em; | ||
top: 1em; | ||
} | ||
%healthcheck-output dd:first-of-type { | ||
margin-bottom: 0.6em; | ||
@media #{$--lt-spacious-healthcheck-output} { | ||
%healthcheck-output { | ||
padding-top: 15px; | ||
padding-bottom: 15px; | ||
padding-left: 14px; | ||
padding-right: 19px; | ||
} | ||
%healthcheck-output::before { | ||
margin-right: 8px; | ||
} | ||
%healthcheck-output dl:not(:last-of-type) { | ||
float: none; | ||
width: auto; | ||
margin-right: 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,28 @@ | ||
<ul data-test-healthchecks> | ||
{{#each (sort-by (action 'sortChecksByImportance') items) as |check| }} | ||
{{healthcheck-output data-test-node-healthcheck=check.Name tagName='li' name=check.Name class=check.Status status=check.Status notes=check.Notes output=check.Output}} | ||
{{#each (sort-by (action 'sortChecksByImportance') items) as |item| }} | ||
{{#healthcheck-output | ||
data-test-node-healthcheck=item.Name | ||
class=item.Status | ||
tagName='li' | ||
output=item.Output | ||
}} | ||
{{#block-slot 'header'}} | ||
<h3>{{item.Name}}</h3> | ||
{{/block-slot}} | ||
{{#block-slot 'content'}} | ||
<dl> | ||
<dt>ServiceName</dt> | ||
<dd>{{or item.ServiceName '-'}}</dd> | ||
</dl> | ||
<dl> | ||
<dt>CheckID</dt> | ||
<dd>{{or item.CheckID '-'}}</dd> | ||
</dl> | ||
<dl> | ||
<dt>Notes</dt> | ||
<dd>{{or item.Notes '-'}}</dd> | ||
</dl> | ||
{{/block-slot}} | ||
{{/healthcheck-output}} | ||
{{/each}} | ||
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,28 @@ | ||
{{#feedback-dialog type='inline'}} | ||
{{#block-slot 'action' as |success error|}} | ||
{{#copy-button success=(action success) error=(action error) clipboardText=output title='copy output to clipboard'}} | ||
Copy Output | ||
{{/copy-button}} | ||
{{/block-slot}} | ||
{{#block-slot 'success' as |transition|}} | ||
<p class={{transition}}> | ||
Copied output! | ||
</p> | ||
{{/block-slot}} | ||
{{#block-slot 'error' as |transition|}} | ||
<p class={{transition}}> | ||
Sorry, something went wrong! | ||
</p> | ||
{{/block-slot}} | ||
{{/feedback-dialog}} | ||
<dl> | ||
<dt>{{name}}</dt> | ||
<dd>{{notes}}</dd> | ||
{{yield}} | ||
<div> | ||
<header> | ||
{{#yield-slot 'header'}}{{yield}}{{/yield-slot}} | ||
</header> | ||
{{#yield-slot 'content'}}{{yield}}{{/yield-slot}} | ||
<dl> | ||
<dt>Output</dt> | ||
<dd> | ||
<pre><code>{{output}}</code></pre> | ||
{{#feedback-dialog type='inline'}} | ||
{{#block-slot 'action' as |success error|}} | ||
{{copy-button success=(action success) error=(action error) clipboardText=output title='copy output to clipboard'}} | ||
{{/block-slot}} | ||
{{#block-slot 'success' as |transition|}} | ||
<p class={{transition}}> | ||
Copied output! | ||
</p> | ||
{{/block-slot}} | ||
{{#block-slot 'error' as |transition|}} | ||
<p class={{transition}}> | ||
Sorry, something went wrong! | ||
</p> | ||
{{/block-slot}} | ||
{{/feedback-dialog}} | ||
</dd> | ||
</dl> | ||
</dl> | ||
</div> |