You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by ch...@apache.org on 2021/02/01 10:04:44 UTC

[incubator-dolphinscheduler] branch dev updated: [Improvement][UI] Support more file types in file detail page

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

chenxingchun pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new 3c461fb  [Improvement][UI] Support more file types in file detail page
     new 6a40b75  Merge pull request #4646 from chengshiwen/improve-file-type
3c461fb is described below

commit 3c461fb785a9583ff948f3f8b237417234a3a204
Author: chengshiwen <ch...@gmail.com>
AuthorDate: Mon Feb 1 17:20:22 2021 +0800

    [Improvement][UI] Support more file types in file detail page
---
 .../home/pages/resource/pages/file/pages/_source/common.js     |  2 +-
 .../home/pages/resource/pages/file/pages/details/index.vue     | 10 +++++-----
 .../conf/home/pages/resource/pages/file/pages/edit/index.vue   | 10 +++++-----
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/_source/common.js b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/_source/common.js
index 5952173..8ddb75f 100755
--- a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/_source/common.js
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/_source/common.js
@@ -18,6 +18,6 @@
 /**
  * Create file type
  */
-const filtTypeArr = ['txt', 'log', 'sh', 'conf', 'cfg', 'py', 'java', 'sql', 'xml', 'hql', 'properties']
+const filtTypeArr = ['txt', 'log', 'sh', 'bat', 'conf', 'cfg', 'py', 'java', 'sql', 'xml', 'hql', 'properties', 'json', 'yml', 'yaml', 'ini', 'js', 'css', 'html']
 
 export { filtTypeArr }
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/details/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/details/index.vue
index e3df62b..c91b555 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/details/index.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/details/index.vue
@@ -28,7 +28,7 @@
             &nbsp;&nbsp;
           </div>
         </h2>
-        <template v-if="isNoType">
+        <template v-if="isViewType">
 
           <div class="code-mirror-model" v-if="!msg">
             <textarea id="code-details-mirror" name="code-details-mirror"></textarea>
@@ -37,7 +37,7 @@
           <m-no-data :msg="msg" v-if="msg"></m-no-data>
 
         </template>
-        <template v-if="!isNoType">
+        <template v-if="!isViewType">
           <m-no-type></m-no-type>
         </template>
       </div>
@@ -67,7 +67,7 @@
     data () {
       return {
         name: '',
-        isNoType: true,
+        isViewType: true,
         isLoading: false,
         filtTypeArr: filtTypeArr,
         loadingIndex: 0,
@@ -197,10 +197,10 @@
       let a = fileName.substring(i, fileName.length)
       this.mode = handlerSuffix[a]
       this.size = bytesToSize(parseInt(fileSize))
-      this.isNoType = _.includes(this.filtTypeArr, _.trimStart(a, '.'))
+      this.isViewType = _.includes(this.filtTypeArr, _.trimStart(a, '.'))
     },
     mounted () {
-      if (this.isNoType) {
+      if (this.isViewType) {
         // get data
         this._getViewResources()
       }
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/edit/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/edit/index.vue
index 428d7aa..e4c7586 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/edit/index.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/edit/index.vue
@@ -21,7 +21,7 @@
         <h2>
           <span>{{name}}</span>
         </h2>
-        <template v-show="isNoType">
+        <template v-show="isViewType">
           <template v-if="!msg">
             <div class="code-mirror-model">
               <textarea id="code-edit-mirror" name="code-edit-mirror"></textarea>
@@ -34,7 +34,7 @@
           <m-no-data :msg="msg" v-if="msg"></m-no-data>
 
         </template>
-        <template v-if="!isNoType">
+        <template v-if="!isViewType">
           <m-no-type></m-no-type>
         </template>
       </div>
@@ -64,7 +64,7 @@
     data () {
       return {
         name: '',
-        isNoType: true,
+        isViewType: true,
         isLoading: false,
         filtTypeArr: filtTypeArr,
         loadingIndex: 0,
@@ -165,10 +165,10 @@
       let a = fileName.substring(i, fileName.length)
       this.mode = handlerSuffix[a]
       this.size = bytesToSize(parseInt(fileSize))
-      this.isNoType = _.includes(this.filtTypeArr, _.trimStart(a, '.'))
+      this.isViewType = _.includes(this.filtTypeArr, _.trimStart(a, '.'))
     },
     mounted () {
-      if (this.isNoType) {
+      if (this.isViewType) {
         // get data
         this._getViewResources()
       }