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,16 +157,23 @@ const FluxTaskPage: FC<Props> = ({source, params: {taskID, kid}, router}) => {
) )
} else if (task) { } else if (task) {
contents = ( contents = (
<FluxScriptEditor <>
onChangeScript={noop} <div className="fluxtask-controls">
onSubmitScript={noop} {task.name} <i>{task.status}</i>
onCursorChange={noop} </div>
suggestions={[]} <div className="fluxtask-editor">
status={{text: '', type: 'success'}} <FluxScriptEditor
script={task.flux} onChangeScript={noop}
visibility="visible" onSubmitScript={noop}
readOnly={true} onCursorChange={noop}
/> suggestions={[]}
status={{text: '', type: 'success'}}
script={task.flux}
visibility="visible"
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