-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Feature][scaleph-ui-react] update flink kubernetes session cluster w…
…eb (#677) * feature: add xflow event listener * feature: update flink kubernetes session cluster * feature: add tooltip for flink kubernetes * feature: add tooltip for flink kubernetes --------- Co-authored-by: wangqi <wangqi@xinxuan.net>
- Loading branch information
Showing
16 changed files
with
235 additions
and
125 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
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
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
38 changes: 38 additions & 0 deletions
38
...rkspace/Kubernetes/SessionCluster/Detail/YAML/FlinkKubernetesSessionClusterStatusYaml.tsx
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import React, {useEffect, useRef} from "react"; | ||
import Editor, {Monaco, useMonaco} from "@monaco-editor/react"; | ||
import {connect} from "umi"; | ||
|
||
const FlinkKubernetesSessionClusterDetailStatusYaml: React.FC = (props: any) => { | ||
const editorRef = useRef(null); | ||
const monaco = useMonaco(); | ||
|
||
useEffect(() => { | ||
// do conditional chaining | ||
monaco?.languages.typescript.javascriptDefaults.setEagerModelSync(true); | ||
}, [monaco]); | ||
|
||
const handleEditorDidMount = (editor, monaco: Monaco) => { | ||
editorRef.current = editor; | ||
} | ||
|
||
return ( | ||
<Editor | ||
width="730" | ||
height="600px" | ||
language="yaml" | ||
theme="vs-white" | ||
value={props.flinkKubernetesSessionClusterDetail.sessionClusterStatusYaml} | ||
options={{ | ||
selectOnLineNumbers: true, | ||
readOnly: true, | ||
minimap: { | ||
enabled: false | ||
} | ||
}} | ||
onMount={handleEditorDidMount} | ||
/> | ||
); | ||
} | ||
|
||
const mapModelToProps = ({flinkKubernetesSessionClusterDetail}: any) => ({flinkKubernetesSessionClusterDetail}) | ||
export default connect(mapModelToProps)(FlinkKubernetesSessionClusterDetailStatusYaml); |
Oops, something went wrong.