Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
nni
Commits
f84d90d6
Unverified
Commit
f84d90d6
authored
Mar 24, 2021
by
Lijiaoa
Committed by
GitHub
Mar 24, 2021
Browse files
WebUI dispatcher log / nnimanager log wrap (#3461)
parent
636ca9b5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
13 deletions
+18
-13
ts/webui/src/components/public-child/MonacoEditor.tsx
ts/webui/src/components/public-child/MonacoEditor.tsx
+18
-13
No files found.
ts/webui/src/components/public-child/MonacoEditor.tsx
View file @
f84d90d6
import
*
as
React
from
'
react
'
;
import
*
as
React
from
'
react
'
;
import
{
Spinner
}
from
'
@fluentui/react
'
;
import
{
Spinner
}
from
'
@fluentui/react
'
;
import
{
DRAWEROPTION
}
from
'
../../static/const
'
;
import
MonacoEditor
from
'
react-monaco-editor
'
;
import
MonacoEditor
from
'
react-monaco-editor
'
;
interface
MonacoEditorProps
{
interface
MonacoEditorProps
{
...
@@ -10,20 +9,10 @@ interface MonacoEditorProps {
...
@@ -10,20 +9,10 @@ interface MonacoEditorProps {
}
}
class
MonacoHTML
extends
React
.
Component
<
MonacoEditorProps
,
{}
>
{
class
MonacoHTML
extends
React
.
Component
<
MonacoEditorProps
,
{}
>
{
public
_isMonacoMount
!
:
boolean
;
constructor
(
props
:
MonacoEditorProps
)
{
constructor
(
props
:
MonacoEditorProps
)
{
super
(
props
);
super
(
props
);
}
}
componentDidMount
():
void
{
this
.
_isMonacoMount
=
true
;
}
componentWillUnmount
():
void
{
this
.
_isMonacoMount
=
false
;
}
render
():
React
.
ReactNode
{
render
():
React
.
ReactNode
{
const
{
content
,
loading
,
height
}
=
this
.
props
;
const
{
content
,
loading
,
height
}
=
this
.
props
;
return
(
return
(
...
@@ -40,11 +29,27 @@ class MonacoHTML extends React.Component<MonacoEditorProps, {}> {
...
@@ -40,11 +29,27 @@ class MonacoHTML extends React.Component<MonacoEditorProps, {}> {
height
=
{
height
}
height
=
{
height
}
language
=
'json'
language
=
'json'
value
=
{
content
}
value
=
{
content
}
options
=
{
DRAWEROPTION
}
options
=
{
{
minimap
:
{
enabled
:
false
},
readOnly
:
true
,
automaticLayout
:
true
,
wordWrap
:
'
on
'
}
}
/>
/>
</
Spinner
>
</
Spinner
>
)
:
(
)
:
(
<
MonacoEditor
width
=
'100%'
height
=
{
height
}
language
=
'json'
value
=
{
content
}
options
=
{
DRAWEROPTION
}
/>
<
MonacoEditor
width
=
'100%'
height
=
{
height
}
language
=
'json'
value
=
{
content
}
options
=
{
{
minimap
:
{
enabled
:
false
},
readOnly
:
true
,
automaticLayout
:
true
,
wordWrap
:
'
on
'
}
}
/>
)
}
)
}
</
React
.
Fragment
>
</
React
.
Fragment
>
);
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment