Browse Source

[Improvement][Common] Add more resource suffix (#4683)

Shiwen Cheng 4 years ago
parent
commit
773909efe2

+ 1 - 1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java

@@ -146,7 +146,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

+ 1 - 1
dolphinscheduler-common/src/main/resources/common.properties

@@ -37,7 +37,7 @@ login.user.keytab.username=hdfs-mycluster@ESZ.COM
 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

+ 1 - 1
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', 'bat', 'conf', 'cfg', 'py', 'java', 'sql', 'xml', 'hql', 'properties', 'json', 'yml', 'yaml', 'ini', 'js', 'css', 'html']
+const filtTypeArr = ['txt', 'log', 'sh', 'bat', 'conf', 'cfg', 'py', 'java', 'sql', 'xml', 'hql', 'properties', 'json', 'yml', 'yaml', 'ini', 'js']
 
 export { filtTypeArr }