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
3218724e
Unverified
Commit
3218724e
authored
Dec 21, 2023
by
gaoyan
Committed by
GitHub
Dec 21, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Feature][Web] Add down log feature (#2706)
* fix log error * Added the download log feature * fix k8s editor bug * Removed the O&M green background
parent
217f60cc
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
28 additions
and
15 deletions
+28
-15
CircleBtn.tsx
dinky-web/src/components/CallBackButton/CircleBtn.tsx
+4
-1
index.tsx
dinky-web/src/components/CustomEditor/CodeShow/index.tsx
+10
-1
index.tsx
...-web/src/components/CustomEditor/EditorFloatBtn/index.tsx
+9
-1
StatisticsCard.tsx
...ges/DevOps/JobList/components/Overview/StatisticsCard.tsx
+1
-1
index.tsx
...eb/src/pages/DevOps/JobList/components/Overview/index.tsx
+3
-10
index.tsx
...s/ConfigurationModal/ConfigurationForm/FlinkK8s/index.tsx
+1
-1
No files found.
dinky-web/src/components/CallBackButton/CircleBtn.tsx
View file @
3218724e
...
...
@@ -28,6 +28,7 @@ export type CircleButtonProps = {
onClick
?:
()
=>
void
;
title
?:
string
;
key
?:
string
;
href
?:
string
;
};
export
type
CircleBottomButtonProps
=
{
icon
:
React
.
ReactNode
;
...
...
@@ -51,7 +52,7 @@ export type CircleDataStudioButtonProps = {
};
export
const
CircleBtn
:
React
.
FC
<
CircleButtonProps
>
=
(
props
)
=>
{
const
{
onClick
,
title
,
icon
,
loading
}
=
props
;
const
{
onClick
,
title
,
icon
,
loading
,
href
}
=
props
;
return
(
<
Button
...
...
@@ -62,6 +63,8 @@ export const CircleBtn: React.FC<CircleButtonProps> = (props) => {
type=
{
'text'
}
shape=
{
'circle'
}
onClick=
{
onClick
}
href=
{
href
}
download=
''
/>
);
};
dinky-web/src/components/CustomEditor/CodeShow/index.tsx
View file @
3218724e
...
...
@@ -158,6 +158,14 @@ const CodeShow = (props: CodeShowFormProps) => {
);
};
/**
* handle get downoad url
*/
const
handleDownloadLog
=
()
=>
{
const
blob
=
new
Blob
([
code
??
'not get content'
],
{
type
:
'text/plain'
});
return
URL
.
createObjectURL
(
blob
);
};
/**
* editorDidMount
* @param {editor.IStandaloneCodeEditor} editor
...
...
@@ -191,7 +199,8 @@ const CodeShow = (props: CodeShowFormProps) => {
handleBackTop
,
handleBackBottom
,
handleUpScroll
,
handleDownScroll
handleDownScroll
,
handleDownloadLog
};
/**
...
...
dinky-web/src/components/CustomEditor/EditorFloatBtn/index.tsx
View file @
3218724e
...
...
@@ -20,6 +20,7 @@
import
{
CircleBtn
}
from
'@/components/CallBackButton/CircleBtn'
;
import
{
l
}
from
'@/utils/intl'
;
import
{
CloudDownloadOutlined
,
DownCircleFilled
,
StopFilled
,
SyncOutlined
,
...
...
@@ -46,6 +47,7 @@ type EditFloatBtnProps = {
handleBackBottom
?:
()
=>
void
;
// back to bottom callback
handleUpScroll
?:
()
=>
void
;
// up scroll callback
handleDownScroll
?:
()
=>
void
;
// down scroll callback
handleDownloadLog
?:
()
=>
string
;
// download log callback
};
const
EditorFloatBtn
:
React
.
FC
<
EditFloatBtnProps
>
=
(
props
)
=>
{
/**
...
...
@@ -62,7 +64,8 @@ const EditorFloatBtn: React.FC<EditFloatBtnProps> = (props) => {
handleBackTop
,
handleBackBottom
,
handleUpScroll
,
handleDownScroll
handleDownScroll
,
handleDownloadLog
}
=
props
;
/**
...
...
@@ -113,6 +116,11 @@ const EditorFloatBtn: React.FC<EditFloatBtnProps> = (props) => {
onClick=
{
handleDownScroll
}
title=
{
l
(
'button.downScroll'
)
}
/>
<
CircleBtn
icon=
{
<
CloudDownloadOutlined
/>
}
href=
{
handleDownloadLog
?
handleDownloadLog
()
:
'123 '
}
title=
{
'Download'
}
/>
</
Space
>
</>
);
...
...
dinky-web/src/pages/DevOps/JobList/components/Overview/StatisticsCard.tsx
View file @
3218724e
...
...
@@ -46,7 +46,7 @@ const StatisticsCard = (props: StatisticsCardParams) => {
return
(
<>
<
ProCard
checked=
{
isChecked
}
//
checked={isChecked}
boxShadow=
{
isChecked
}
layout=
{
'center'
}
onClick=
{
()
=>
(
atClick
?
atClick
()
:
{})
}
...
...
dinky-web/src/pages/DevOps/JobList/components/Overview/index.tsx
View file @
3218724e
...
...
@@ -38,18 +38,12 @@ import { l } from '@/utils/intl';
import
{
ProCard
}
from
'@ant-design/pro-components'
;
import
{
Button
,
Col
,
Row
,
Space
}
from
'antd'
;
import
{
useContext
,
useEffect
,
useState
}
from
'react'
;
import
useHookRequest
from
"@/hooks/useHookRequest"
;
const
JobOverview
=
(
props
:
any
)
=>
{
const
[
statusCount
,
setStatusCount
]
=
useState
<
StatusCountOverView
>
();
const
{
statusFilter
,
setStatusFilter
}
=
useContext
<
any
>
(
DevopContext
);
useEffect
(()
=>
{
getData
(
API_CONSTANTS
.
GET_STATUS_COUNT
)
.
then
((
res
)
=>
{
setStatusCount
(
res
.
data
);
})
.
catch
(()
=>
{});
},
[]);
const
{
data
}
=
useHookRequest
(
getData
,{
defaultParams
:[
API_CONSTANTS
.
GET_STATUS_COUNT
]})
const
statusCount
=
data
as
StatusCountOverView
;
return
(
<
Row
gutter=
{
[
16
,
8
]
}
>
...
...
@@ -63,7 +57,6 @@ const JobOverview = (props: any) => {
atClick=
{
()
=>
{
setStatusFilter
(
undefined
);
}
}
isChecked=
{
!
statusFilter
}
extra=
{
<
Space
direction=
'vertical'
>
<
Button
type=
{
'text'
}
icon=
{
<
BatchIcons
size=
{
20
}
/>
}
>
...
...
dinky-web/src/pages/RegCenter/Cluster/Configuration/components/ConfigurationModal/ConfigurationForm/FlinkK8s/index.tsx
View file @
3218724e
...
...
@@ -92,7 +92,7 @@ const FlinkK8s = (props: { type: string; value: any; form: FormInstance<Values>
reader
.
readAsText
(
file
);
reader
.
onload
=
()
=>
{
form
.
setFieldValue
(
name
,
reader
.
result
as
string
);
onChange
(
reader
.
result
as
string
);
onChange
(
reader
.
result
as
string
+
"
\
n"
);
};
},
showUploadList
:
false
...
...
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