Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dinky
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangpeng
dinky
Commits
1cd2930d
Unverified
Commit
1cd2930d
authored
Oct 27, 2023
by
ZackYoung
Committed by
GitHub
Oct 27, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Fix]fix_some_web_bug (#2448)
* fix_some_web_bug * fix_some_web_bug
parent
4d9e70dc
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
48 additions
and
27 deletions
+48
-27
config.ts
dinky-web/config/config.ts
+1
-1
index.tsx
dinky-web/src/components/CustomEditor/CodeShow/index.tsx
+0
-0
index.tsx
...b/src/components/CustomEditor/languages/javalog/index.tsx
+21
-0
ConsoleContent.tsx
...ges/DataStudio/BottomContainer/Console/ConsoleContent.tsx
+0
-0
index.tsx
...eb/src/pages/DataStudio/HeaderContainer/Explain/index.tsx
+13
-13
function.tsx
dinky-web/src/utils/function.tsx
+13
-13
No files found.
dinky-web/config/config.ts
View file @
1cd2930d
...
...
@@ -193,5 +193,5 @@ export default defineConfig({
strategy
:
'normal'
},
// requestRecord: {},
dva
:
{}
dva
:
{}
,
});
dinky-web/src/components/CustomEditor/CodeShow/index.tsx
View file @
1cd2930d
This diff is collapsed.
Click to expand it.
dinky-web/src/components/CustomEditor/languages/javalog/index.tsx
0 → 100644
View file @
1cd2930d
import
{
editor
}
from
"monaco-editor"
;
import
{
languages
}
from
"monaco-editor"
;
// todo 自定义语言不生效
export
const
JavaLog
=
()
=>
{
// Register a new language
languages
.
register
({
id
:
"java-log"
});
// Register a tokens provider for the language
languages
.
setMonarchTokensProvider
(
"java-log"
,
{
tokenizer
:
{
root
:
[
[
/
\[
error.*/
,
"custom-error"
],
[
/
\[
notice.*/
,
"custom-notice"
],
[
/.*/
,
"custom-info"
],
[
/
\[[
a-zA-Z 0-9:
]
+
\]
/
,
"custom-date"
],
],
},
});
}
\ No newline at end of file
dinky-web/src/pages/DataStudio/BottomContainer/Console/ConsoleContent.tsx
View file @
1cd2930d
This diff is collapsed.
Click to expand it.
dinky-web/src/pages/DataStudio/HeaderContainer/Explain/index.tsx
View file @
1cd2930d
...
...
@@ -24,7 +24,7 @@ import { StateType } from '@/pages/DataStudio/model';
import
{
l
}
from
'@/utils/intl'
;
import
{
ConsoleSqlOutlined
}
from
'@ant-design/icons'
;
import
ProList
from
'@ant-design/pro-list'
;
import
{
Space
,
Tag
,
Typography
}
from
'antd'
;
import
{
Button
,
Drawer
,
Space
,
Tag
,
Typography
}
from
'antd'
;
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
connect
}
from
'umi'
;
...
...
@@ -48,6 +48,8 @@ export type ExplainProps = {
const
Explain
:
React
.
FC
<
ExplainProps
>
=
(
props
:
any
)
=>
{
const
[
explainData
,
setExplainData
]
=
useState
([]);
const
[
result
,
setResult
]
=
useState
(<
Text
>
{
l
(
'pages.datastudio.explain.validate'
)
}
</
Text
>);
const
[
showModal
,
setShowModal
]
=
useState
(
false
);
const
[
explainInfo
,
setExplainInfo
]
=
useState
(
""
);
const
{
tabs
:
{
panes
,
activeKey
}
}
=
props
;
...
...
@@ -103,7 +105,10 @@ const Explain: React.FC<ExplainProps> = (props: any) => {
}
});
},
[]);
const
showPlanDrawer
=
(
info
:
string
)
=>
{
setShowModal
(
true
);
setExplainInfo
(
info
)
};
const
renderContent
=
()
=>
{
return
(
<>
...
...
@@ -142,15 +147,18 @@ const Explain: React.FC<ExplainProps> = (props: any) => {
return
(
<>
{
row
.
sql
?
(
<>
<
Paragraph
ellipsis=
{
{
rows
:
2
,
expandable
:
true
,
symbol
:
'more'
}
}
>
{
row
.
sql
}
</
Paragraph
>
</>
)
:
null
}
{
row
.
error
?
(
<
Paragraph
>
<
CodeShow
code=
{
row
.
error
}
language=
'java'
height=
'500px'
/>
</
Paragraph
>
)
:
null
}
{
row
.
explain
?
<
a
onClick=
{
()
=>
showPlanDrawer
(
row
.
explain
)
}
style=
{
{
float
:
"right"
}
}
type=
{
"link"
}
>
Show Plan
</
a
>
:<></>
}
</>
);
}
...
...
@@ -199,18 +207,10 @@ const Explain: React.FC<ExplainProps> = (props: any) => {
<
blockquote
>
{
result
}
</
blockquote
>
</
Paragraph
>
{
renderContent
()
}
<
Drawer
width=
{
"50%"
}
title=
"Show Plan"
placement=
"right"
onClose=
{
()
=>
setShowModal
(
false
)
}
open=
{
showModal
}
>
<
CodeShow
style=
{
{
alignItems
:
"inherit"
}
}
code=
{
explainInfo
}
language=
'java'
height=
'500px'
/>
</
Drawer
>
</>
//
<
Modal
// width={'100%'}
// destroyOnClose
// centered
// title={l('pages.datastudio.explain.validate.msg')}
// open={modalVisible}
// footer={false}
// onCancel={onClose}
// >
//
// </Modal>
);
};
...
...
dinky-web/src/utils/function.tsx
View file @
1cd2930d
...
...
@@ -146,27 +146,27 @@ export function convertCodeEditTheme() {
],
// colors is an object of color identifiers and their color values.
colors
:
{
'editor.background'
:
'#2f2e2e'
,
// editor background color
'editor.lineHighlightBackground'
:
'#959cb6'
,
// editor line highlight background color
'editorLineNumber.foreground'
:
'#ffffff'
,
// editor line number color
'editorCursor.foreground'
:
'#ffffff'
,
// editor cursor color
'editorIndentGuide.background'
:
'#ffffff'
,
// editor indent guide color
'editor.foreground'
:
'#ffffff'
,
// editor selection highlight border color
'editor.selectionBackground'
:
'#4ba1ef'
,
// editor selection highlight color
'editor.selectionHighlightBorder'
:
'#4ba1ef'
,
// editor selection highlight border color
'editor.findMatchBackground'
:
'#4ba1ef'
,
// editor find match highlight color
'editor.wordHighlightBackground'
:
'#8bb2d2'
// editor word highlight color
//
'editor.background': '#2f2e2e', // editor background color
//
'editor.lineHighlightBackground': '#959cb6', // editor line highlight background color
//
'editorLineNumber.foreground': '#ffffff', // editor line number color
//
'editorCursor.foreground': '#ffffff', // editor cursor color
//
'editorIndentGuide.background': '#ffffff', // editor indent guide color
//
'editor.foreground': '#ffffff', // editor selection highlight border color
//
'editor.selectionBackground': '#4ba1ef', // editor selection highlight color
//
'editor.selectionHighlightBorder': '#4ba1ef', // editor selection highlight border color
//
'editor.findMatchBackground': '#4ba1ef', // editor find match highlight color
//
'editor.wordHighlightBackground': '#8bb2d2' // editor word highlight color
}
});
const
theme
=
getLocalTheme
();
switch
(
theme
)
{
case
THEME
.
dark
:
return
CODE_EDIT_THEME
.
VS_CUSTOME
;
case
THEME
.
light
:
return
CODE_EDIT_THEME
.
DARK
;
case
THEME
.
light
:
return
CODE_EDIT_THEME
.
VS_CUSTOME
;
default
:
return
CODE_EDIT_THEME
.
HC_BLACK
;
return
CODE_EDIT_THEME
.
VS_CUSTOME
;
}
}
...
...
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