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
390f8d8a
Unverified
Commit
390f8d8a
authored
Dec 27, 2023
by
Zzm0809
Committed by
GitHub
Dec 27, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Improvement-2809] Improvement result not scroll (#2819)
* improve-result-scroll * Spotless Apply --------- Co-authored-by:
Zzm0809
<
Zzm0809@users.noreply.github.com
>
parent
abc78693
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
index.tsx
...web/src/pages/DataStudio/BottomContainer/Result/index.tsx
+6
-5
No files found.
dinky-web/src/pages/DataStudio/BottomContainer/Result/index.tsx
View file @
390f8d8a
...
@@ -24,7 +24,7 @@ import {
...
@@ -24,7 +24,7 @@ import {
mapDispatchToProps
mapDispatchToProps
}
from
'@/pages/DataStudio/function'
;
}
from
'@/pages/DataStudio/function'
;
import
{
isSql
}
from
'@/pages/DataStudio/HeaderContainer/function'
;
import
{
isSql
}
from
'@/pages/DataStudio/HeaderContainer/function'
;
import
{
StateType
}
from
'@/pages/DataStudio/model'
;
import
{
StateType
,
TaskDataType
}
from
'@/pages/DataStudio/model'
;
import
{
handleGetOption
,
handleGetOptionWithoutMsg
}
from
'@/services/BusinessCrud'
;
import
{
handleGetOption
,
handleGetOptionWithoutMsg
}
from
'@/services/BusinessCrud'
;
import
{
DIALECT
}
from
'@/services/constants'
;
import
{
DIALECT
}
from
'@/services/constants'
;
import
{
API_CONSTANTS
}
from
'@/services/endpoints'
;
import
{
API_CONSTANTS
}
from
'@/services/endpoints'
;
...
@@ -53,7 +53,7 @@ const Result = (props: any) => {
...
@@ -53,7 +53,7 @@ const Result = (props: any) => {
const
[
dataList
,
setDataList
]
=
useState
<
DataList
>
([]);
const
[
dataList
,
setDataList
]
=
useState
<
DataList
>
([]);
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
true
);
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
true
);
const
currentTabs
=
getCurrentTab
(
panes
,
activeKey
);
const
currentTabs
=
getCurrentTab
(
panes
,
activeKey
);
const
current
=
getCurrentData
(
panes
,
activeKey
)
??
{}
;
const
current
=
getCurrentData
(
panes
,
activeKey
)
as
TaskDataType
;
const
[
searchText
,
setSearchText
]
=
useState
(
''
);
const
[
searchText
,
setSearchText
]
=
useState
(
''
);
const
[
searchedColumn
,
setSearchedColumn
]
=
useState
(
''
);
const
[
searchedColumn
,
setSearchedColumn
]
=
useState
(
''
);
...
@@ -135,10 +135,10 @@ const Result = (props: any) => {
...
@@ -135,10 +135,10 @@ const Result = (props: any) => {
}
else
if
(
consoleData
.
results
&&
!
isRefresh
)
{
}
else
if
(
consoleData
.
results
&&
!
isRefresh
)
{
setDataList
(
consoleData
.
results
);
setDataList
(
consoleData
.
results
);
}
else
{
}
else
{
if
(
current
.
dialect
&&
current
.
dialect
.
toLowerCase
()
==
DIALECT
.
FLINK_SQL
)
{
if
(
current
?.
dialect
&&
current
?.
dialect
?
.
toLowerCase
()
==
DIALECT
.
FLINK_SQL
)
{
// flink sql
// flink sql
// to do: get job data by history id list, not flink jid
// to do: get job data by history id list, not flink jid
if
(
current
.
id
)
{
if
(
current
?
.
id
)
{
const
res
=
await
handleGetOptionWithoutMsg
(
API_CONSTANTS
.
GET_LATEST_HISTORY_BY_ID
,
{
const
res
=
await
handleGetOptionWithoutMsg
(
API_CONSTANTS
.
GET_LATEST_HISTORY_BY_ID
,
{
id
:
current
.
id
id
:
current
.
id
});
});
...
@@ -173,7 +173,7 @@ const Result = (props: any) => {
...
@@ -173,7 +173,7 @@ const Result = (props: any) => {
loadData
();
loadData
();
},
[
currentTabs
?.
console
?.
result
,
currentTabs
?.
console
?.
results
]);
},
[
currentTabs
?.
console
?.
result
,
currentTabs
?.
console
?.
results
]);
const
getColumns
=
(
columns
:
string
[])
=>
{
const
getColumns
=
(
columns
:
string
[]
=
[]
)
=>
{
return
columns
?.
map
((
item
)
=>
{
return
columns
?.
map
((
item
)
=>
{
return
{
return
{
title
:
item
,
title
:
item
,
...
@@ -236,6 +236,7 @@ const Result = (props: any) => {
...
@@ -236,6 +236,7 @@ const Result = (props: any) => {
<
Table
<
Table
columns=
{
getColumns
(
data
.
columns
)
}
columns=
{
getColumns
(
data
.
columns
)
}
size=
'small'
size=
'small'
scroll=
{
{
x
:
'max-content'
}
}
dataSource=
{
data
.
rowData
?.
map
((
item
:
any
,
index
:
number
)
=>
{
dataSource=
{
data
.
rowData
?.
map
((
item
:
any
,
index
:
number
)
=>
{
return
{
...
item
,
key
:
index
};
return
{
...
item
,
key
:
index
};
})
}
})
}
...
...
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