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
e0cb9b7b
Unverified
Commit
e0cb9b7b
authored
Dec 22, 2023
by
ZackYoung
Committed by
GitHub
Dec 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Fix] [Web] Fix debug (#2720)
* fix_debug * fix_debug * fix_debug
parent
e9c59e24
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
36 additions
and
16 deletions
+36
-16
index.tsx
dinky-web/src/pages/DataStudio/HeaderContainer/index.tsx
+10
-9
index.tsx
dinky-web/src/pages/DataStudio/LeftContainer/index.tsx
+1
-1
index.tsx
...c/pages/DataStudio/MiddleContainer/StudioEditor/index.tsx
+4
-2
model.ts
dinky-web/src/pages/DataStudio/model.ts
+2
-2
JobOperator.tsx
...eb/src/pages/DevOps/JobDetail/JobOperator/JobOperator.tsx
+18
-2
endpoints.tsx
dinky-web/src/services/endpoints.tsx
+1
-0
No files found.
dinky-web/src/pages/DataStudio/HeaderContainer/index.tsx
View file @
e0cb9b7b
...
...
@@ -190,20 +190,21 @@ const HeaderContainer = (props: connect) => {
const
handlerDebug
=
async
()
=>
{
if
(
!
currentData
)
return
;
// @ts-ignore
const
editor
=
currentTab
.
monacoInstance
.
editor
.
getEditors
().
find
((
x
:
any
)
=>
x
[
"id"
]
===
currentData
.
id
);
let
selectsql
=
null
;
if
(
currentTab
.
editorInstance
)
{
selectsql
=
currentTab
.
editorInstance
.
getModel
()
.
getValueInRange
(
currentTab
.
editorInstance
.
getSelection
());
//
let
selectSql
=
''
;
if
(
editor
)
{
selectSql
=
editor
.
getModel
().
getValueInRange
(
editor
.
getSelection
());
}
if
(
select
sql
==
null
||
selects
ql
==
''
)
{
select
s
ql
=
currentData
.
statement
;
if
(
select
Sql
==
null
||
selectS
ql
==
''
)
{
select
S
ql
=
currentData
.
statement
;
}
const
res
=
await
debugTask
(
l
(
'pages.datastudio.editor.debugging'
,
''
,
{
jobName
:
currentData
.
name
}),
{
...
currentData
,
statement
:
select
s
ql
}
{
...
currentData
,
statement
:
select
S
ql
}
);
if
(
!
res
)
return
;
...
...
@@ -402,7 +403,7 @@ const HeaderContainer = (props: connect) => {
currentTab
?.
type
==
TabsPageType
.
project
&&
!
isRunning
(
currentData
)
&&
(
currentTab
?.
subType
?.
toLowerCase
()
===
DIALECT
.
FLINK_SQL
||
isSql
(
currentTab
?.
subType
?.
toLowerCase
())),
isSql
(
currentTab
?.
subType
?.
toLowerCase
()
??
""
)),
props
:
{
style
:
{
background
:
'#52c41a'
},
type
:
'primary'
...
...
dinky-web/src/pages/DataStudio/LeftContainer/index.tsx
View file @
e0cb9b7b
...
...
@@ -86,7 +86,7 @@ const LeftContainer: React.FC<LeftContainerProps> = (props: any) => {
handlerMaxsize
:
handleMaxsize
,
visible
:
leftContainer
.
selectKey
!==
''
,
defaultSize
:
{
width
:
leftContainer
.
width
,
height
:
leftContainer
.
height
},
minWidth
:
160
,
minWidth
:
225
,
maxWidth
:
MAX_WIDTH
,
enable
:
{
right
:
true
},
btnGroup
:
btn
[
leftContainer
.
selectKey
]
...
...
dinky-web/src/pages/DataStudio/MiddleContainer/StudioEditor/index.tsx
View file @
e0cb9b7b
...
...
@@ -39,6 +39,7 @@ import { Monaco } from '@monaco-editor/react';
import
{
Button
,
Spin
}
from
'antd'
;
import
{
editor
}
from
'monaco-editor'
;
import
React
,
{
memo
,
useEffect
,
useRef
,
useState
}
from
'react'
;
import
{
getCurrentData
,
getCurrentTab
}
from
"@/pages/DataStudio/function"
;
export
type
EditorProps
=
{
tabsItem
:
DataStudioTabsItemType
;
...
...
@@ -105,10 +106,12 @@ const StudioEditor: React.FC<EditorProps & connect> = (props) => {
editor
.
layout
();
editor
.
focus
();
editorInstance
.
current
=
editor
;
// @ts-ignore
editor
[
'id'
]
=
getCurrentTab
(
tabs
.
panes
,
tabs
.
activeKey
)?.
params
.
taskId
tabsItem
.
monacoInstance
=
monaco
;
tabsItem
.
editorInstance
=
editor
;
editor
.
onDidChangeCursorPosition
((
e
)
=>
{
props
.
footContainer
.
codePosition
=
[
e
.
position
.
lineNumber
,
e
.
position
.
column
];
dispatch
({
type
:
STUDIO_MODEL
.
saveFooterValue
,
...
...
@@ -144,7 +147,6 @@ const StudioEditor: React.FC<EditorProps & connect> = (props) => {
/>
<
CodeEdit
monacoRef=
{
tabsItem
?.
monacoInstance
}
editorRef=
{
tabsItem
?.
editorInstance
}
code=
{
tabsItem
?.
params
?.
taskData
?.
statement
}
language=
{
matchLanguage
(
tabsItem
?.
subType
)
}
editorDidMount=
{
editorDidMount
}
...
...
dinky-web/src/pages/DataStudio/model.ts
View file @
e0cb9b7b
...
...
@@ -164,7 +164,6 @@ export interface TabsItemType {
closable
:
boolean
;
path
:
string
[];
monacoInstance
:
React
.
RefObject
<
Monaco
|
undefined
>
;
editorInstance
:
editor
.
IStandaloneCodeEditor
|
undefined
;
console
:
ConsoleType
;
isModified
:
boolean
;
}
...
...
@@ -184,6 +183,7 @@ export interface DataStudioTabsItemType extends TabsItemType {
export
type
TabsType
=
{
activeKey
:
string
;
activeBreadcrumbTitle
:
string
;
selectedStatement
?:
string
;
panes
:
TabsItemType
[];
};
...
...
@@ -868,7 +868,7 @@ const Model: ModelType = {
...
state
,
suggestions
:
payload
};
}
}
,
}
};
...
...
dinky-web/src/pages/DevOps/JobDetail/JobOperator/JobOperator.tsx
View file @
e0cb9b7b
...
...
@@ -32,7 +32,8 @@ const operatorType = {
CANCEL_JOB
:
'canceljob'
,
SAVEPOINT_CANCEL
:
'cancel'
,
SAVEPOINT_TRIGGER
:
'trigger'
,
SAVEPOINT_STOP
:
'stop'
SAVEPOINT_STOP
:
'stop'
,
AUTO_STOP
:
'autostop'
};
export
type
OperatorType
=
{
jobDetail
:
Jobs
.
JobInfoDetail
;
...
...
@@ -59,6 +60,21 @@ const JobOperator = (props: OperatorType) => {
id
:
jobDetail
?.
instance
?.
taskId
,
isOnLine
:
jobDetail
?.
instance
?.
step
==
JOB_LIFE_CYCLE
.
PUBLISH
});
}
else
if
(
key
==
operatorType
.
SAVEPOINT_CANCEL
)
{
getData
(
API_CONSTANTS
.
SAVEPOINT
,
{
taskId
:
jobDetail
?.
instance
?.
taskId
,
savePointType
:
"cancel"
});
}
else
if
(
key
==
operatorType
.
SAVEPOINT_STOP
)
{
getData
(
API_CONSTANTS
.
SAVEPOINT
,
{
taskId
:
jobDetail
?.
instance
?.
taskId
,
savePointType
:
"stop"
});
}
else
if
(
key
==
operatorType
.
SAVEPOINT_TRIGGER
)
{
getData
(
API_CONSTANTS
.
SAVEPOINT
,
{
taskId
:
jobDetail
?.
instance
?.
taskId
,
savePointType
:
"trigger"
});
}
else
{
cancelTask
(
''
,
jobDetail
?.
instance
?.
taskId
);
}
...
...
@@ -91,7 +107,7 @@ const JobOperator = (props: OperatorType) => {
<
Button
key=
'autostop'
type=
'primary'
onClick=
{
()
=>
handleJobOperator
(
operatorType
.
SAVEPOINT
_STOP
)
}
onClick=
{
()
=>
handleJobOperator
(
operatorType
.
AUTO
_STOP
)
}
danger
>
{
jobDetail
?.
instance
?.
step
==
5
...
...
dinky-web/src/services/endpoints.tsx
View file @
e0cb9b7b
...
...
@@ -244,6 +244,7 @@ export enum API_CONSTANTS {
// /api/jobInstance/getLineage
JOB_INSTANCE_GET_LINEAGE
=
'/api/jobInstance/getLineage'
,
RESTART_TASK
=
'/api/task/restartTask'
,
SAVEPOINT
=
'/api/task/savepoint'
,
RESTART_TASK_FROM_CHECKPOINT
=
'/api/task/selectSavePointRestartTask'
,
GET_SAVEPOINTS
=
'/api/savepoints'
,
ALERT_HISTORY_LIST
=
'/api/alertHistory/list'
,
...
...
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