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 = {
...
@@ -28,6 +28,7 @@ export type CircleButtonProps = {
onClick
?:
()
=>
void
;
onClick
?:
()
=>
void
;
title
?:
string
;
title
?:
string
;
key
?:
string
;
key
?:
string
;
href
?:
string
;
};
};
export
type
CircleBottomButtonProps
=
{
export
type
CircleBottomButtonProps
=
{
icon
:
React
.
ReactNode
;
icon
:
React
.
ReactNode
;
...
@@ -51,7 +52,7 @@ export type CircleDataStudioButtonProps = {
...
@@ -51,7 +52,7 @@ export type CircleDataStudioButtonProps = {
};
};
export
const
CircleBtn
:
React
.
FC
<
CircleButtonProps
>
=
(
props
)
=>
{
export
const
CircleBtn
:
React
.
FC
<
CircleButtonProps
>
=
(
props
)
=>
{
const
{
onClick
,
title
,
icon
,
loading
}
=
props
;
const
{
onClick
,
title
,
icon
,
loading
,
href
}
=
props
;
return
(
return
(
<
Button
<
Button
...
@@ -62,6 +63,8 @@ export const CircleBtn: React.FC<CircleButtonProps> = (props) => {
...
@@ -62,6 +63,8 @@ export const CircleBtn: React.FC<CircleButtonProps> = (props) => {
type=
{
'text'
}
type=
{
'text'
}
shape=
{
'circle'
}
shape=
{
'circle'
}
onClick=
{
onClick
}
onClick=
{
onClick
}
href=
{
href
}
download=
''
/>
/>
);
);
};
};
dinky-web/src/components/CustomEditor/CodeShow/index.tsx
View file @
3218724e
...
@@ -158,6 +158,14 @@ const CodeShow = (props: CodeShowFormProps) => {
...
@@ -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
* editorDidMount
* @param {editor.IStandaloneCodeEditor} editor
* @param {editor.IStandaloneCodeEditor} editor
...
@@ -191,7 +199,8 @@ const CodeShow = (props: CodeShowFormProps) => {
...
@@ -191,7 +199,8 @@ const CodeShow = (props: CodeShowFormProps) => {
handleBackTop
,
handleBackTop
,
handleBackBottom
,
handleBackBottom
,
handleUpScroll
,
handleUpScroll
,
handleDownScroll
handleDownScroll
,
handleDownloadLog
};
};
/**
/**
...
...
dinky-web/src/components/CustomEditor/EditorFloatBtn/index.tsx
View file @
3218724e
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
import
{
CircleBtn
}
from
'@/components/CallBackButton/CircleBtn'
;
import
{
CircleBtn
}
from
'@/components/CallBackButton/CircleBtn'
;
import
{
l
}
from
'@/utils/intl'
;
import
{
l
}
from
'@/utils/intl'
;
import
{
import
{
CloudDownloadOutlined
,
DownCircleFilled
,
DownCircleFilled
,
StopFilled
,
StopFilled
,
SyncOutlined
,
SyncOutlined
,
...
@@ -46,6 +47,7 @@ type EditFloatBtnProps = {
...
@@ -46,6 +47,7 @@ type EditFloatBtnProps = {
handleBackBottom
?:
()
=>
void
;
// back to bottom callback
handleBackBottom
?:
()
=>
void
;
// back to bottom callback
handleUpScroll
?:
()
=>
void
;
// up scroll callback
handleUpScroll
?:
()
=>
void
;
// up scroll callback
handleDownScroll
?:
()
=>
void
;
// down scroll callback
handleDownScroll
?:
()
=>
void
;
// down scroll callback
handleDownloadLog
?:
()
=>
string
;
// download log callback
};
};
const
EditorFloatBtn
:
React
.
FC
<
EditFloatBtnProps
>
=
(
props
)
=>
{
const
EditorFloatBtn
:
React
.
FC
<
EditFloatBtnProps
>
=
(
props
)
=>
{
/**
/**
...
@@ -62,7 +64,8 @@ const EditorFloatBtn: React.FC<EditFloatBtnProps> = (props) => {
...
@@ -62,7 +64,8 @@ const EditorFloatBtn: React.FC<EditFloatBtnProps> = (props) => {
handleBackTop
,
handleBackTop
,
handleBackBottom
,
handleBackBottom
,
handleUpScroll
,
handleUpScroll
,
handleDownScroll
handleDownScroll
,
handleDownloadLog
}
=
props
;
}
=
props
;
/**
/**
...
@@ -113,6 +116,11 @@ const EditorFloatBtn: React.FC<EditFloatBtnProps> = (props) => {
...
@@ -113,6 +116,11 @@ const EditorFloatBtn: React.FC<EditFloatBtnProps> = (props) => {
onClick=
{
handleDownScroll
}
onClick=
{
handleDownScroll
}
title=
{
l
(
'button.downScroll'
)
}
title=
{
l
(
'button.downScroll'
)
}
/>
/>
<
CircleBtn
icon=
{
<
CloudDownloadOutlined
/>
}
href=
{
handleDownloadLog
?
handleDownloadLog
()
:
'123 '
}
title=
{
'Download'
}
/>
</
Space
>
</
Space
>
</>
</>
);
);
...
...
dinky-web/src/pages/DevOps/JobList/components/Overview/StatisticsCard.tsx
View file @
3218724e
...
@@ -46,7 +46,7 @@ const StatisticsCard = (props: StatisticsCardParams) => {
...
@@ -46,7 +46,7 @@ const StatisticsCard = (props: StatisticsCardParams) => {
return
(
return
(
<>
<>
<
ProCard
<
ProCard
checked=
{
isChecked
}
//
checked={isChecked}
boxShadow=
{
isChecked
}
boxShadow=
{
isChecked
}
layout=
{
'center'
}
layout=
{
'center'
}
onClick=
{
()
=>
(
atClick
?
atClick
()
:
{})
}
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';
...
@@ -38,18 +38,12 @@ import { l } from '@/utils/intl';
import
{
ProCard
}
from
'@ant-design/pro-components'
;
import
{
ProCard
}
from
'@ant-design/pro-components'
;
import
{
Button
,
Col
,
Row
,
Space
}
from
'antd'
;
import
{
Button
,
Col
,
Row
,
Space
}
from
'antd'
;
import
{
useContext
,
useEffect
,
useState
}
from
'react'
;
import
{
useContext
,
useEffect
,
useState
}
from
'react'
;
import
useHookRequest
from
"@/hooks/useHookRequest"
;
const
JobOverview
=
(
props
:
any
)
=>
{
const
JobOverview
=
(
props
:
any
)
=>
{
const
[
statusCount
,
setStatusCount
]
=
useState
<
StatusCountOverView
>
();
const
{
statusFilter
,
setStatusFilter
}
=
useContext
<
any
>
(
DevopContext
);
const
{
statusFilter
,
setStatusFilter
}
=
useContext
<
any
>
(
DevopContext
);
const
{
data
}
=
useHookRequest
(
getData
,{
defaultParams
:[
API_CONSTANTS
.
GET_STATUS_COUNT
]})
useEffect
(()
=>
{
const
statusCount
=
data
as
StatusCountOverView
;
getData
(
API_CONSTANTS
.
GET_STATUS_COUNT
)
.
then
((
res
)
=>
{
setStatusCount
(
res
.
data
);
})
.
catch
(()
=>
{});
},
[]);
return
(
return
(
<
Row
gutter=
{
[
16
,
8
]
}
>
<
Row
gutter=
{
[
16
,
8
]
}
>
...
@@ -63,7 +57,6 @@ const JobOverview = (props: any) => {
...
@@ -63,7 +57,6 @@ const JobOverview = (props: any) => {
atClick=
{
()
=>
{
atClick=
{
()
=>
{
setStatusFilter
(
undefined
);
setStatusFilter
(
undefined
);
}
}
}
}
isChecked=
{
!
statusFilter
}
extra=
{
extra=
{
<
Space
direction=
'vertical'
>
<
Space
direction=
'vertical'
>
<
Button
type=
{
'text'
}
icon=
{
<
BatchIcons
size=
{
20
}
/>
}
>
<
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>
...
@@ -92,7 +92,7 @@ const FlinkK8s = (props: { type: string; value: any; form: FormInstance<Values>
reader
.
readAsText
(
file
);
reader
.
readAsText
(
file
);
reader
.
onload
=
()
=>
{
reader
.
onload
=
()
=>
{
form
.
setFieldValue
(
name
,
reader
.
result
as
string
);
form
.
setFieldValue
(
name
,
reader
.
result
as
string
);
onChange
(
reader
.
result
as
string
);
onChange
(
reader
.
result
as
string
+
"
\
n"
);
};
};
},
},
showUploadList
:
false
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