You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by ki...@apache.org on 2022/03/19 02:19:57 UTC

[dolphinscheduler] branch dev updated: [Fix][UI Next][V1.0.0-Alpha] Fix the scale of the table on the task instance page is out of balance. (#9006)

This is an automated email from the ASF dual-hosted git repository.

kirs 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 2e9740c  [Fix][UI Next][V1.0.0-Alpha] Fix the scale of the table on the task instance page is out of balance. (#9006)
2e9740c is described below

commit 2e9740c39e1252cd4706ec324fdeb1738b259b51
Author: songjianet <17...@qq.com>
AuthorDate: Sat Mar 19 10:19:51 2022 +0800

    [Fix][UI Next][V1.0.0-Alpha] Fix the scale of the table on the task instance page is out of balance. (#9006)
---
 .../src/views/projects/task/instance/index.tsx             |  6 +++++-
 .../src/views/projects/task/instance/use-table.ts          | 14 +++++---------
 .../workflow/components/dag/dag-auto-layout-modal.tsx      |  7 +------
 .../projects/workflow/definition/components/copy-modal.tsx |  5 +----
 .../workflow/definition/components/import-modal.tsx        |  5 +----
 .../src/views/resource/file/folder/index.tsx               |  5 +----
 .../src/views/resource/file/rename/index.tsx               |  5 +----
 .../src/views/resource/file/upload/index.tsx               |  5 +----
 .../resource/udf/function/components/function-modal.tsx    | 10 ++--------
 .../resource/udf/resource/components/folder-modal.tsx      |  5 +----
 .../resource/udf/resource/components/upload-modal.tsx      |  5 +----
 .../src/views/security/alarm-instance-manage/detail.tsx    |  8 +-------
 12 files changed, 21 insertions(+), 59 deletions(-)

diff --git a/dolphinscheduler-ui-next/src/views/projects/task/instance/index.tsx b/dolphinscheduler-ui-next/src/views/projects/task/instance/index.tsx
index 6219fd2..96ba286 100644
--- a/dolphinscheduler-ui-next/src/views/projects/task/instance/index.tsx
+++ b/dolphinscheduler-ui-next/src/views/projects/task/instance/index.tsx
@@ -182,7 +182,11 @@ const TaskInstance = defineComponent({
           </NSpace>
         </NCard>
         <Card class={styles['table-card']}>
-          <NDataTable columns={this.columns} data={this.tableData} />
+          <NDataTable
+            columns={this.columns}
+            data={this.tableData}
+            scrollX={1800}
+          />
           <div class={styles.pagination}>
             <NPagination
               v-model:page={this.page}
diff --git a/dolphinscheduler-ui-next/src/views/projects/task/instance/use-table.ts b/dolphinscheduler-ui-next/src/views/projects/task/instance/use-table.ts
index 6bebea9..3a772fe 100644
--- a/dolphinscheduler-ui-next/src/views/projects/task/instance/use-table.ts
+++ b/dolphinscheduler-ui-next/src/views/projects/task/instance/use-table.ts
@@ -73,7 +73,6 @@ export function useTable() {
       {
         title: t('project.task.workflow_instance'),
         key: 'processInstanceName',
-        width: 250,
         render: (row: {
           processInstanceId: number
           processInstanceName: string
@@ -106,18 +105,15 @@ export function useTable() {
       },
       {
         title: t('project.task.submit_time'),
-        key: 'submitTime',
-        width: 170
+        key: 'submitTime'
       },
       {
         title: t('project.task.start_time'),
-        key: 'startTime',
-        width: 170
+        key: 'startTime'
       },
       {
         title: t('project.task.end_time'),
-        key: 'endTime',
-        width: 170
+        key: 'endTime'
       },
       {
         title: t('project.task.duration'),
@@ -134,13 +130,13 @@ export function useTable() {
       },
       {
         title: t('project.task.host'),
-        key: 'host',
-        width: 160
+        key: 'host'
       },
       {
         title: t('project.task.operation'),
         key: 'operation',
         width: 150,
+        fixed: 'right',
         render(row: any) {
           return h(NSpace, null, {
             default: () => [
diff --git a/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/dag-auto-layout-modal.tsx b/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/dag-auto-layout-modal.tsx
index 427a93d..78e1446 100644
--- a/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/dag-auto-layout-modal.tsx
+++ b/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/dag-auto-layout-modal.tsx
@@ -67,12 +67,7 @@ export default defineComponent({
         onCancel={cancel}
         autoFocus={false}
       >
-        <NForm
-          model={formValue.value}
-          rules={{}}
-          size='medium'
-          ref={formRef}
-        >
+        <NForm model={formValue.value} rules={{}} size='medium' ref={formRef}>
           <NFormItem label={t('project.dag.layout_type')} path='type'>
             <NRadioGroup
               v-model={[formValue.value.type, 'value']}
diff --git a/dolphinscheduler-ui-next/src/views/projects/workflow/definition/components/copy-modal.tsx b/dolphinscheduler-ui-next/src/views/projects/workflow/definition/components/copy-modal.tsx
index c93be0b..c17a4da 100644
--- a/dolphinscheduler-ui-next/src/views/projects/workflow/definition/components/copy-modal.tsx
+++ b/dolphinscheduler-ui-next/src/views/projects/workflow/definition/components/copy-modal.tsx
@@ -92,10 +92,7 @@ export default defineComponent({
         onConfirm={this.handleCopy}
         confirmLoading={this.saving}
       >
-        <NForm
-          rules={this.copyRules}
-          ref='copyFormRef'
-        >
+        <NForm rules={this.copyRules} ref='copyFormRef'>
           <NFormItem
             label={t('project.workflow.project_name')}
             path='projectCode'
diff --git a/dolphinscheduler-ui-next/src/views/projects/workflow/definition/components/import-modal.tsx b/dolphinscheduler-ui-next/src/views/projects/workflow/definition/components/import-modal.tsx
index ffea6ab..9ed0c38 100644
--- a/dolphinscheduler-ui-next/src/views/projects/workflow/definition/components/import-modal.tsx
+++ b/dolphinscheduler-ui-next/src/views/projects/workflow/definition/components/import-modal.tsx
@@ -69,10 +69,7 @@ export default defineComponent({
         onConfirm={this.handleImport}
         confirmLoading={this.saving}
       >
-        <NForm
-          rules={this.importRules}
-          ref='importFormRef'
-        >
+        <NForm rules={this.importRules} ref='importFormRef'>
           <NFormItem label={t('project.workflow.upload_file')} path='file'>
             <NButton>
               <NUpload
diff --git a/dolphinscheduler-ui-next/src/views/resource/file/folder/index.tsx b/dolphinscheduler-ui-next/src/views/resource/file/folder/index.tsx
index 98b4c79..88447ca 100644
--- a/dolphinscheduler-ui-next/src/views/resource/file/folder/index.tsx
+++ b/dolphinscheduler-ui-next/src/views/resource/file/folder/index.tsx
@@ -63,10 +63,7 @@ export default defineComponent({
         cancelClassName='btn-cancel'
         confirmLoading={this.saving}
       >
-        <NForm
-          rules={this.rules}
-          ref='folderFormRef'
-        >
+        <NForm rules={this.rules} ref='folderFormRef'>
           <NFormItem label={t('resource.file.folder_name')} path='name'>
             <NInput
               v-model={[this.folderForm.name, 'value']}
diff --git a/dolphinscheduler-ui-next/src/views/resource/file/rename/index.tsx b/dolphinscheduler-ui-next/src/views/resource/file/rename/index.tsx
index 12358ef..3457883 100644
--- a/dolphinscheduler-ui-next/src/views/resource/file/rename/index.tsx
+++ b/dolphinscheduler-ui-next/src/views/resource/file/rename/index.tsx
@@ -79,10 +79,7 @@ export default defineComponent({
         cancelClassName='btn-cancel'
         confirmLoading={this.saving}
       >
-        <NForm
-          rules={this.rules}
-          ref='renameFormRef'
-        >
+        <NForm rules={this.rules} ref='renameFormRef'>
           <NFormItem label={t('resource.file.name')} path='name'>
             <NInput
               v-model={[this.renameForm.name, 'value']}
diff --git a/dolphinscheduler-ui-next/src/views/resource/file/upload/index.tsx b/dolphinscheduler-ui-next/src/views/resource/file/upload/index.tsx
index ff88afa..035b5a7 100644
--- a/dolphinscheduler-ui-next/src/views/resource/file/upload/index.tsx
+++ b/dolphinscheduler-ui-next/src/views/resource/file/upload/index.tsx
@@ -69,10 +69,7 @@ export default defineComponent({
         cancelClassName='btn-cancel'
         confirmLoading={this.saving}
       >
-        <NForm
-          rules={this.rules}
-          ref='uploadFormRef'
-        >
+        <NForm rules={this.rules} ref='uploadFormRef'>
           <NFormItem label={t('resource.file.file_name')} path='name'>
             <NInput
               v-model={[this.uploadForm.name, 'value']}
diff --git a/dolphinscheduler-ui-next/src/views/resource/udf/function/components/function-modal.tsx b/dolphinscheduler-ui-next/src/views/resource/udf/function/components/function-modal.tsx
index d2000af..1f01421 100644
--- a/dolphinscheduler-ui-next/src/views/resource/udf/function/components/function-modal.tsx
+++ b/dolphinscheduler-ui-next/src/views/resource/udf/function/components/function-modal.tsx
@@ -128,10 +128,7 @@ export default defineComponent({
         cancelClassName='btn-cancel'
         confirmLoading={this.saving}
       >
-        <NForm
-          rules={this.rules}
-          ref='functionFormRef'
-        >
+        <NForm rules={this.rules} ref='functionFormRef'>
           <NFormItem label={t('resource.function.type')} path='type'>
             <NRadioGroup
               v-model={[this.functionForm.type, 'value']}
@@ -189,10 +186,7 @@ export default defineComponent({
             </NInputGroup>
           </NFormItem>
           {this.uploadShow && (
-            <NForm
-              rules={this.uploadRules}
-              ref='uploadFormRef'
-            >
+            <NForm rules={this.uploadRules} ref='uploadFormRef'>
               <NFormItem
                 label={t('resource.function.udf_resources_directory')}
                 path='pid'
diff --git a/dolphinscheduler-ui-next/src/views/resource/udf/resource/components/folder-modal.tsx b/dolphinscheduler-ui-next/src/views/resource/udf/resource/components/folder-modal.tsx
index 3ebf87e..f717c79 100644
--- a/dolphinscheduler-ui-next/src/views/resource/udf/resource/components/folder-modal.tsx
+++ b/dolphinscheduler-ui-next/src/views/resource/udf/resource/components/folder-modal.tsx
@@ -83,10 +83,7 @@ export default defineComponent({
         cancelClassName='btn-cancel'
         confirmLoading={this.saving}
       >
-        <NForm
-          rules={this.rules}
-          ref='folderFormRef'
-        >
+        <NForm rules={this.rules} ref='folderFormRef'>
           <NFormItem label={t('resource.udf.folder_name')} path='name'>
             <NInput
               v-model={[this.folderForm.name, 'value']}
diff --git a/dolphinscheduler-ui-next/src/views/resource/udf/resource/components/upload-modal.tsx b/dolphinscheduler-ui-next/src/views/resource/udf/resource/components/upload-modal.tsx
index 90050db..9c0b571 100644
--- a/dolphinscheduler-ui-next/src/views/resource/udf/resource/components/upload-modal.tsx
+++ b/dolphinscheduler-ui-next/src/views/resource/udf/resource/components/upload-modal.tsx
@@ -70,10 +70,7 @@ export default defineComponent({
         cancelClassName='btn-cancel'
         confirmLoading={this.saving}
       >
-        <NForm
-          rules={this.rules}
-          ref='uploadFormRef'
-        >
+        <NForm rules={this.rules} ref='uploadFormRef'>
           <NFormItem label={t('resource.udf.file_name')} path='name'>
             <NInput
               v-model={[this.uploadForm.name, 'value']}
diff --git a/dolphinscheduler-ui-next/src/views/security/alarm-instance-manage/detail.tsx b/dolphinscheduler-ui-next/src/views/security/alarm-instance-manage/detail.tsx
index 5766f9d..30ec47b 100644
--- a/dolphinscheduler-ui-next/src/views/security/alarm-instance-manage/detail.tsx
+++ b/dolphinscheduler-ui-next/src/views/security/alarm-instance-manage/detail.tsx
@@ -15,13 +15,7 @@
  * limitations under the License.
  */
 
-import {
-  defineComponent,
-  toRefs,
-  watch,
-  onMounted,
-  ref
-} from 'vue'
+import { defineComponent, toRefs, watch, onMounted, ref } from 'vue'
 import { NSelect, NInput } from 'naive-ui'
 import { isFunction } from 'lodash'
 import { useI18n } from 'vue-i18n'