feat(ui/kapacitor): add logs view

pull/5767/head
Pavel Zavora 2021-06-12 14:43:24 +02:00
parent 20f629aebe
commit 75f7fe6622
2 changed files with 29 additions and 16 deletions

View File

@ -157,6 +157,11 @@ const FluxTaskPage: FC<Props> = ({source, params: {taskID, kid}, router}) => {
) )
} else if (task) { } else if (task) {
contents = ( contents = (
<>
<div className="fluxtask-controls">
{task.name} <i>{task.status}</i>
</div>
<div className="fluxtask-editor">
<FluxScriptEditor <FluxScriptEditor
onChangeScript={noop} onChangeScript={noop}
onSubmitScript={noop} onSubmitScript={noop}
@ -167,6 +172,8 @@ const FluxTaskPage: FC<Props> = ({source, params: {taskID, kid}, router}) => {
visibility="visible" visibility="visible"
readOnly={true} readOnly={true}
/> />
</div>
</>
) )
} }

View File

@ -1,20 +1,26 @@
/* $fluxtask-controls-height: 60px;
Styles for fluxtask Editor
----------------------------------------------------------------------------
*/
.fluxtask { .fluxtask {
flex: 1 0 0; flex: 1 0 0;
position: relative; position: relative;
max-width: 100%;
} }
.fluxtask-controls,
.fluxtask-editor { .fluxtask-editor {
// cannot use 100%, since it does not work in FireFox // cannot use 100%, since it does not work in FireFox
// see https://github.com/influxdata/chronograf/issues/5037 // see https://github.com/influxdata/chronograf/issues/5037
width: calc(100vw - 60px); width: calc(100vw - 60px);
max-width: 100%
}
.fluxtask-controls {
padding: 0 60px;
display: flex;
align-items: center;
height: $fluxtask-controls-height;
justify-content: space-between;
background-color: $g3-castle;
} }
.fluxtask-editor { .fluxtask-editor {
height: 100%; height: calc(100% - #{$fluxtask-controls-height});
} }
.page.fluxtask-editor-page { .page.fluxtask-editor-page {
// The default page layout (flex) does not work well on FireFox, the height of fluxtask-editor grows // The default page layout (flex) does not work well on FireFox, the height of fluxtask-editor grows