This is an automated email from the ASF dual-hosted git repository.
twalthr pushed a commit to branch release-1.14
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/release-1.14 by this push:
new 1c06ee7 [FLINK-23111][runtime-web] Fix monaco editor async setup
1c06ee7 is described below
commit 1c06ee70aaabd0e5d014ed39d29a2d86f3a81007
Author: 子扬 <[email protected]>
AuthorDate: Wed Aug 25 18:05:09 2021 +0800
[FLINK-23111][runtime-web] Fix monaco editor async setup
This closes #16980.
---
.../src/app/pages/job/exceptions/job-exceptions.component.less | 2 ++
.../src/app/share/common/monaco-editor/monaco-editor.component.ts | 3 ++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git
a/flink-runtime-web/web-dashboard/src/app/pages/job/exceptions/job-exceptions.component.less
b/flink-runtime-web/web-dashboard/src/app/pages/job/exceptions/job-exceptions.component.less
index a44e895..967b2be 100644
---
a/flink-runtime-web/web-dashboard/src/app/pages/job/exceptions/job-exceptions.component.less
+++
b/flink-runtime-web/web-dashboard/src/app/pages/job/exceptions/job-exceptions.component.less
@@ -32,12 +32,14 @@ nz-table {
flink-monaco-editor {
height: calc(~"100vh - 346px");
+
&.subtask {
height: 300px;
}
}
.expand-td {
+ display: block;
padding: 0 !important;
}
diff --git
a/flink-runtime-web/web-dashboard/src/app/share/common/monaco-editor/monaco-editor.component.ts
b/flink-runtime-web/web-dashboard/src/app/share/common/monaco-editor/monaco-editor.component.ts
index 94367ba..e25ed17 100644
---
a/flink-runtime-web/web-dashboard/src/app/share/common/monaco-editor/monaco-editor.component.ts
+++
b/flink-runtime-web/web-dashboard/src/app/share/common/monaco-editor/monaco-editor.component.ts
@@ -74,7 +74,8 @@ export class MonacoEditorComponent implements AfterViewInit,
OnDestroy {
ngAfterViewInit() {
if ((window as any).monaco) {
- this.setupMonaco();
+ // TODO: temporary solution, the editor should render depending on its
own dimension
+ setTimeout(() => this.setupMonaco());
} else {
const script = document.createElement('script');
script.type = 'text/javascript';