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
dbd3c017
Unverified
Commit
dbd3c017
authored
Jan 24, 2024
by
Zzm0809
Committed by
GitHub
Jan 24, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HotFix i18n file (#3060)
Co-authored-by:
Zzm0809
<
Zzm0809@users.noreply.github.com
>
parent
79107117
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
90 additions
and
89 deletions
+90
-89
messages_zh_CN.properties
...-common/src/main/resources/i18n/messages_zh_CN.properties
+0
-0
index.tsx
dinky-web/src/pages/DevOps/JobDetail/index.tsx
+90
-89
No files found.
dinky-common/src/main/resources/i18n/messages_zh_CN.properties
View file @
dbd3c017
This diff is collapsed.
Click to expand it.
dinky-web/src/pages/DevOps/JobDetail/index.tsx
View file @
dbd3c017
...
@@ -28,27 +28,27 @@ import JobMetrics from '@/pages/DevOps/JobDetail/JobMetrics';
...
@@ -28,27 +28,27 @@ import JobMetrics from '@/pages/DevOps/JobDetail/JobMetrics';
import
JobOperator
from
'@/pages/DevOps/JobDetail/JobOperator/JobOperator'
;
import
JobOperator
from
'@/pages/DevOps/JobDetail/JobOperator/JobOperator'
;
import
JobConfigTab
from
'@/pages/DevOps/JobDetail/JobOverview/JobOverview'
;
import
JobConfigTab
from
'@/pages/DevOps/JobDetail/JobOverview/JobOverview'
;
import
JobVersionTab
from
'@/pages/DevOps/JobDetail/JobVersion/JobVersionTab'
;
import
JobVersionTab
from
'@/pages/DevOps/JobDetail/JobVersion/JobVersionTab'
;
import
{
refeshJobInstance
}
from
'@/pages/DevOps/JobDetail/srvice'
;
import
{
refeshJobInstance
}
from
'@/pages/DevOps/JobDetail/srvice'
;
import
{
Jobs
}
from
'@/types/DevOps/data'
;
import
{
Jobs
}
from
'@/types/DevOps/data'
;
import
{
l
}
from
'@/utils/intl'
;
import
{
l
}
from
'@/utils/intl'
;
import
{
ClusterOutlined
,
FireOutlined
,
RocketOutlined
}
from
'@ant-design/icons
'
;
import
{
history
}
from
'@@/core/history
'
;
import
{
PageContainer
}
from
'@ant-design/pro-component
s'
;
import
{
ClusterOutlined
,
FireOutlined
,
RocketOutlined
}
from
'@ant-design/icon
s'
;
import
{
Tag
}
from
'antd
'
;
import
{
PageContainer
}
from
'@ant-design/pro-components
'
;
import
{
useState
}
from
'react
'
;
import
{
Tag
}
from
'antd
'
;
import
{
useLocation
}
from
'umi
'
;
import
{
useState
}
from
'react
'
;
import
{
history
}
from
"@@/core/history"
;
import
{
useLocation
}
from
'umi'
;
/**
/**
* Enum defining different operators for the JobDetail component.
* Enum defining different operators for the JobDetail component.
*/
*/
const
OperatorEnum
=
{
const
OperatorEnum
=
{
JOB_BASE_INFO
:
'job_base_info'
,
JOB_BASE_INFO
:
'job_base_info'
,
JOB_LOGS
:
'job_logs'
,
JOB_LOGS
:
'job_logs'
,
JOB_VERSION
:
'job_version'
,
JOB_VERSION
:
'job_version'
,
JOB_CHECKPOINTS
:
'job_checkpoints'
,
JOB_CHECKPOINTS
:
'job_checkpoints'
,
JOB_ALERT
:
'job_alert'
,
JOB_ALERT
:
'job_alert'
,
JOB_METRICS
:
'job_monitor'
,
JOB_METRICS
:
'job_monitor'
,
JOB_LINEAGE
:
'job_lineage'
JOB_LINEAGE
:
'job_lineage'
};
};
/**
/**
...
@@ -58,85 +58,86 @@ const OperatorEnum = {
...
@@ -58,85 +58,86 @@ const OperatorEnum = {
* @returns {JSX.Element} - The rendered JobDetail component.
* @returns {JSX.Element} - The rendered JobDetail component.
*/
*/
const
JobDetail
=
(
props
:
any
)
=>
{
const
JobDetail
=
(
props
:
any
)
=>
{
const
params
=
useLocation
();
const
params
=
useLocation
();
const
id
=
params
.
search
.
split
(
'='
)[
1
];
const
id
=
params
.
search
.
split
(
'='
)[
1
];
if
(
!
id
)
{
if
(
!
id
)
{
history
.
push
(
`/devops/`
);
history
.
push
(
`/devops/`
);
}
}
const
{
data
,
run
}
=
useHookRequest
(
refeshJobInstance
,
{
const
{
data
,
run
}
=
useHookRequest
(
refeshJobInstance
,
{
defaultParams
:
[
id
,
false
],
defaultParams
:
[
id
,
false
],
pollingInterval
:
3000
pollingInterval
:
3000
});
});
const
jobInfoDetail
=
data
as
Jobs
.
JobInfoDetail
;
const
jobInfoDetail
=
data
as
Jobs
.
JobInfoDetail
;
const
[
tabKey
,
setTabKey
]
=
useState
<
string
>
(
OperatorEnum
.
JOB_BASE_INFO
);
const
[
tabKey
,
setTabKey
]
=
useState
<
string
>
(
OperatorEnum
.
JOB_BASE_INFO
);
// Define the components for each job operator
// Define the components for each job operator
const
JobOperatorItems
=
{
const
JobOperatorItems
=
{
[
OperatorEnum
.
JOB_BASE_INFO
]:
<
JobConfigTab
jobDetail
=
{
jobInfoDetail
}
/>
,
[
OperatorEnum
.
JOB_BASE_INFO
]:
<
JobConfigTab
jobDetail
=
{
jobInfoDetail
}
/>
,
[
OperatorEnum
.
JOB_LOGS
]:
<
JobLogsTab
jobDetail
=
{
jobInfoDetail
}
/>
,
[
OperatorEnum
.
JOB_LOGS
]:
<
JobLogsTab
jobDetail
=
{
jobInfoDetail
}
/>
,
[
OperatorEnum
.
JOB_VERSION
]:
<
JobVersionTab
jobDetail
=
{
jobInfoDetail
}
/>
,
[
OperatorEnum
.
JOB_VERSION
]:
<
JobVersionTab
jobDetail
=
{
jobInfoDetail
}
/>
,
[
OperatorEnum
.
JOB_CHECKPOINTS
]:
<
CheckPoints
jobDetail
=
{
jobInfoDetail
}
/>
,
[
OperatorEnum
.
JOB_CHECKPOINTS
]:
<
CheckPoints
jobDetail
=
{
jobInfoDetail
}
/>
,
[
OperatorEnum
.
JOB_METRICS
]:
<
JobMetrics
jobDetail
=
{
jobInfoDetail
}
/>
,
[
OperatorEnum
.
JOB_METRICS
]:
<
JobMetrics
jobDetail
=
{
jobInfoDetail
}
/>
,
[
OperatorEnum
.
JOB_LINEAGE
]:
<
JobLineage
jobDetail
=
{
jobInfoDetail
}
/>
,
[
OperatorEnum
.
JOB_LINEAGE
]:
<
JobLineage
jobDetail
=
{
jobInfoDetail
}
/>
,
[
OperatorEnum
.
JOB_ALERT
]:
<
AlertHistory
jobDetail
=
{
jobInfoDetail
}
/
>
[
OperatorEnum
.
JOB_ALERT
]:
<
AlertHistory
jobDetail
=
{
jobInfoDetail
}
/
>
};
};
// Define the tabs config for job operators
// Define the tabs config for job operators
const
JobOperatorTabs
=
[
const
JobOperatorTabs
=
[
{
{
tab
:
l
(
'devops.jobinfo.config.JobInfo'
),
tab
:
l
(
'devops.jobinfo.config.JobInfo'
),
key
:
OperatorEnum
.
JOB_BASE_INFO
key
:
OperatorEnum
.
JOB_BASE_INFO
},
},
{
tab
:
l
(
'devops.jobinfo.config.JobLogs'
),
key
:
OperatorEnum
.
JOB_LOGS
},
{
tab
:
l
(
'devops.jobinfo.config.JobLogs'
),
key
:
OperatorEnum
.
JOB_LOGS
},
{
{
tab
:
l
(
'devops.jobinfo.config.JobVersion'
),
tab
:
l
(
'devops.jobinfo.config.JobVersion'
),
key
:
OperatorEnum
.
JOB_VERSION
key
:
OperatorEnum
.
JOB_VERSION
},
},
{
{
tab
:
l
(
'devops.jobinfo.config.JobCheckpoints'
),
tab
:
l
(
'devops.jobinfo.config.JobCheckpoints'
),
key
:
OperatorEnum
.
JOB_CHECKPOINTS
key
:
OperatorEnum
.
JOB_CHECKPOINTS
},
},
{
{
tab
:
l
(
'devops.jobinfo.config.JobMonitor'
),
tab
:
l
(
'devops.jobinfo.config.JobMonitor'
),
key
:
OperatorEnum
.
JOB_METRICS
key
:
OperatorEnum
.
JOB_METRICS
},
},
{
{
tab
:
l
(
'devops.jobinfo.config.JobLineage'
),
tab
:
l
(
'devops.jobinfo.config.JobLineage'
),
key
:
OperatorEnum
.
JOB_LINEAGE
key
:
OperatorEnum
.
JOB_LINEAGE
},
},
{
tab
:
l
(
'devops.jobinfo.config.JobAlert'
),
key
:
OperatorEnum
.
JOB_ALERT
}
{
tab
:
l
(
'devops.jobinfo.config.JobAlert'
),
key
:
OperatorEnum
.
JOB_ALERT
}
];
];
console
.
log
(
!!
data
)
console
.
log
(
!!
data
);
return
(
return
(
<
PageContainer
loading=
{
!
data
}
<
PageContainer
title=
{
jobInfoDetail
?.
instance
?.
name
}
loading=
{
!
data
}
subTitle=
{
<
JobLifeCycleTag
status=
{
jobInfoDetail
?.
instance
?.
step
}
/>
}
title=
{
jobInfoDetail
?.
instance
?.
name
}
ghost=
{
false
}
subTitle=
{
<
JobLifeCycleTag
status=
{
jobInfoDetail
?.
instance
?.
step
}
/>
}
extra=
{
<
JobOperator
jobDetail=
{
jobInfoDetail
}
refesh=
{
(
isForce
)
=>
run
(
id
,
isForce
)
}
/>
}
ghost=
{
false
}
onBack=
{
()
=>
window
.
history
.
back
()
}
extra=
{
<
JobOperator
jobDetail=
{
jobInfoDetail
}
refesh=
{
(
isForce
)
=>
run
(
id
,
isForce
)
}
/>
}
breadcrumb=
{
{}
}
onBack=
{
()
=>
window
.
history
.
back
()
}
tabList=
{
JobOperatorTabs
}
breadcrumb=
{
{}
}
onTabChange=
{
(
key
)
=>
setTabKey
(
key
)
}
tabList=
{
JobOperatorTabs
}
tags=
{
[
onTabChange=
{
(
key
)
=>
setTabKey
(
key
)
}
<
StatusTag
status=
{
jobInfoDetail
?.
instance
?.
status
}
/>,
tags=
{
[
<
Tag
key=
{
'tg1'
}
color=
'blue'
>
<
StatusTag
status=
{
jobInfoDetail
?.
instance
?.
status
}
/>,
<
FireOutlined
/>
{
jobInfoDetail
?.
instance
?.
jid
}
<
Tag
key=
{
'tg1'
}
color=
'blue'
>
</
Tag
>,
<
FireOutlined
/>
{
jobInfoDetail
?.
instance
?.
jid
}
<
Tag
key=
{
'tg2'
}
color=
'blue'
>
</
Tag
>,
<
RocketOutlined
/>
{
jobInfoDetail
?.
history
?.
type
}
<
Tag
key=
{
'tg2'
}
color=
'blue'
>
</
Tag
>,
<
RocketOutlined
/>
{
jobInfoDetail
?.
history
?.
type
}
<
Tag
key=
{
'tg3'
}
color=
'green'
>
</
Tag
>,
<
ClusterOutlined
/>
{
jobInfoDetail
?.
clusterInstance
?.
alias
}
<
Tag
key=
{
'tg3'
}
color=
'green'
>
</
Tag
>
<
ClusterOutlined
/>
{
jobInfoDetail
?.
clusterInstance
?.
alias
}
]
}
</
Tag
>
>
]
}
{
JobOperatorItems
[
tabKey
]
}
>
</
PageContainer
>
{
JobOperatorItems
[
tabKey
]
}
);
</
PageContainer
>
);
};
};
export
default
JobDetail
;
export
default
JobDetail
;
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