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

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


The following commit(s) were added to refs/heads/1.3.6-prepare by this push:
     new c4e533b  [1.3.6-prepare][Improvement][UI] Support more file types in 
file detail page #4646 #4683 (#4969)
c4e533b is described below

commit c4e533bd73fd9506cad9d5d3bb85525d9f1a4837
Author: Shiwen Cheng <[email protected]>
AuthorDate: Tue Mar 9 15:57:05 2021 +0800

    [1.3.6-prepare][Improvement][UI] Support more file types in file detail 
page #4646 #4683 (#4969)
---
 .../java/org/apache/dolphinscheduler/common/Constants.java     |  2 +-
 dolphinscheduler-common/src/main/resources/common.properties   |  2 +-
 .../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 +++++-----
 5 files changed, 13 insertions(+), 13 deletions(-)

diff --git 
a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
 
b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
index 5dc6aad..d3faaa2 100644
--- 
a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
+++ 
b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
@@ -141,7 +141,7 @@ public final class Constants {
      */
     public static final String RESOURCE_VIEW_SUFFIXS = "resource.view.suffixs";
 
-    public static final String RESOURCE_VIEW_SUFFIXS_DEFAULT_VALUE = 
"txt,log,sh,conf,cfg,py,java,sql,hql,xml,properties";
+    public static final String RESOURCE_VIEW_SUFFIXS_DEFAULT_VALUE = 
"txt,log,sh,bat,conf,cfg,py,java,sql,xml,hql,properties,json,yml,yaml,ini,js";
 
     /**
      * development.state
diff --git a/dolphinscheduler-common/src/main/resources/common.properties 
b/dolphinscheduler-common/src/main/resources/common.properties
index b916b10..abe4b23 100644
--- a/dolphinscheduler-common/src/main/resources/common.properties
+++ b/dolphinscheduler-common/src/main/resources/common.properties
@@ -37,7 +37,7 @@ [email protected]
 login.user.keytab.path=/opt/hdfs.headless.keytab
 
 #resource.view.suffixs
-#resource.view.suffixs=txt,log,sh,conf,cfg,py,java,sql,hql,xml,properties
+#resource.view.suffixs=txt,log,sh,bat,conf,cfg,py,java,sql,xml,hql,properties,json,yml,yaml,ini,js
 
 # if resource.storage.type=HDFS, the user need to have permission to create 
directories under the HDFS root path
 hdfs.root.user=hdfs
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..9bc68af 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']
 
 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 85cd53d..3e2fa48 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
@@ -25,7 +25,7 @@
             <em>{{size}}</em>
           </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>
@@ -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,
@@ -191,10 +191,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 0290af0..2dedf1e 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()
       }

Reply via email to