This is an automated email from the ASF dual-hosted git repository.
wenjun pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/dev by this push:
new 2b4edb3815 [Improvement][Resource Center] Display brief file name in
file-details page (#15137) (#15175)
2b4edb3815 is described below
commit 2b4edb3815035e75cd4189ebb9e81be6eee7085b
Author: arlendp <[email protected]>
AuthorDate: Sun Nov 19 11:50:53 2023 +0800
[Improvement][Resource Center] Display brief file name in file-details page
(#15137) (#15175)
---
.../src/views/resource/components/resource/edit/index.tsx | 4 +++-
.../resource/components/resource/table/table-action.tsx | 15 ++++++++++++---
.../src/views/resource/components/resource/types.ts | 1 +
3 files changed, 16 insertions(+), 4 deletions(-)
diff --git
a/dolphinscheduler-ui/src/views/resource/components/resource/edit/index.tsx
b/dolphinscheduler-ui/src/views/resource/components/resource/edit/index.tsx
index 7170e7376a..47dd07593b 100644
--- a/dolphinscheduler-ui/src/views/resource/components/resource/edit/index.tsx
+++ b/dolphinscheduler-ui/src/views/resource/components/resource/edit/index.tsx
@@ -37,6 +37,7 @@ export default defineComponent({
// fullname is now the id of resources
const fullName = String(router.currentRoute.value.query.prefix || '')
const tenantCode = String(router.currentRoute.value.query.tenantCode || '')
+ const alias = String(router.currentRoute.value.query.alias || '')
const { state } = useForm()
const { getResourceView, handleUpdateContent } = useEdit(state)
@@ -61,6 +62,7 @@ export default defineComponent({
return {
componentName,
resourceViewRef,
+ alias,
handleReturn,
handleFileContent,
...toRefs(state)
@@ -73,7 +75,7 @@ export default defineComponent({
{this.resourceViewRef.isReady.value ? (
<div class={styles['file-edit-content']}>
<h2>
- <span>{this.resourceViewRef.state.value.alias}</span>
+ <span>{this.alias}</span>
</h2>
<NForm
rules={this.rules}
diff --git
a/dolphinscheduler-ui/src/views/resource/components/resource/table/table-action.tsx
b/dolphinscheduler-ui/src/views/resource/components/resource/table/table-action.tsx
index 9efe255996..d1d0576429 100644
---
a/dolphinscheduler-ui/src/views/resource/components/resource/table/table-action.tsx
+++
b/dolphinscheduler-ui/src/views/resource/components/resource/table/table-action.tsx
@@ -67,10 +67,18 @@ export default defineComponent({
return !(flag && size < 1000000)
}
- const handleEditFile = (item: { fullName: string; user_name: string }) => {
+ const handleEditFile = (item: {
+ fullName: string
+ user_name: string
+ alias: string
+ }) => {
router.push({
name: 'resource-file-edit',
- query: { prefix: item.fullName, tenantCode: item.user_name }
+ query: {
+ prefix: item.fullName,
+ tenantCode: item.user_name,
+ alias: item.alias
+ }
})
}
@@ -126,7 +134,8 @@ export default defineComponent({
onClick={() => {
this.handleEditFile({
fullName: this.row.fullName,
- user_name: this.row.user_name
+ user_name: this.row.user_name,
+ alias: this.row.alias
})
}}
style={{ marginRight: '-5px' }}
diff --git
a/dolphinscheduler-ui/src/views/resource/components/resource/types.ts
b/dolphinscheduler-ui/src/views/resource/components/resource/types.ts
index f063e1783c..e33af74686 100644
--- a/dolphinscheduler-ui/src/views/resource/components/resource/types.ts
+++ b/dolphinscheduler-ui/src/views/resource/components/resource/types.ts
@@ -23,6 +23,7 @@ export interface ResourceFileTableData {
user_name: string
directory: string
file_name: string
+ alias: string
description: string
size: number
type: ResourceType