Skip to content

Commit 02c920b

Browse files
committed
modify some code to adopt dss1.1.0.
1 parent ad805d4 commit 02c920b

File tree

4 files changed

+21
-34
lines changed

4 files changed

+21
-34
lines changed

db/ddl.sql

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,21 @@ CREATE TABLE `visualis_project` (
3131

3232
---- visualis使用这个表做权限管理
3333
--DROP TABLE IF EXISTS `linkis_user`;
34-
--CREATE TABLE `linkis_user` (
35-
-- `id` bigint(20) NOT NULL AUTO_INCREMENT,
36-
-- `email` varchar(255) DEFAULT NULL,
37-
-- `username` varchar(255) NOT NULL,
38-
-- `password` varchar(255) DEFAULT NULL,
39-
-- `admin` tinyint(1) DEFAULT NULL COMMENT 'If it is an administrator',
40-
-- `active` tinyint(1) DEFAULT NULL COMMENT 'If it is active',
41-
-- `name` varchar(255) DEFAULT NULL COMMENT 'User name',
42-
-- `description` varchar(255) DEFAULT NULL,
43-
-- `department` varchar(255) DEFAULT NULL,
44-
-- `avatar` varchar(255) DEFAULT NULL COMMENT 'Path of the avator',
45-
-- `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
46-
-- `create_by` bigint(20) DEFAULT '0',
47-
-- `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
48-
-- `update_by` bigint(20) DEFAULT '0',
49-
-- `is_first_login` bit(1) DEFAULT NULL COMMENT 'If it is the first time to log in',
50-
-- PRIMARY KEY (`id`)
51-
--) ENGINE=InnoDB DEFAULT CHARSET=utf8;
34+
CREATE TABLE `linkis_user` (
35+
`id` bigint(20) NOT NULL AUTO_INCREMENT,
36+
`email` varchar(255) DEFAULT NULL,
37+
`username` varchar(255) NOT NULL,
38+
`password` varchar(255) DEFAULT NULL,
39+
`admin` tinyint(1) DEFAULT NULL COMMENT 'If it is an administrator',
40+
`active` tinyint(1) DEFAULT NULL COMMENT 'If it is active',
41+
`name` varchar(255) DEFAULT NULL COMMENT 'User name',
42+
`description` varchar(255) DEFAULT NULL,
43+
`department` varchar(255) DEFAULT NULL,
44+
`avatar` varchar(255) DEFAULT NULL COMMENT 'Path of the avator',
45+
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
46+
`create_by` bigint(20) DEFAULT '0',
47+
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
48+
`update_by` bigint(20) DEFAULT '0',
49+
`is_first_login` bit(1) DEFAULT NULL COMMENT 'If it is the first time to log in',
50+
PRIMARY KEY (`id`)
51+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

server/src/main/java/com/webank/wedatasphere/dss/visualis/utils/HttpUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import org.apache.http.impl.client.HttpClientBuilder;
1111
import org.apache.http.impl.cookie.BasicClientCookie;
1212
import org.apache.http.util.EntityUtils;
13+
import org.apache.linkis.errorcode.client.ClientConfiguration;
1314
import org.slf4j.Logger;
1415
import org.slf4j.LoggerFactory;
1516

@@ -20,8 +21,7 @@
2021
import java.util.Date;
2122

2223
public class HttpUtils {
23-
private static final String GATEWAY_URL = CommonConfig.GATEWAY_PROTOCOL().getValue() +
24-
CommonConfig.GATEWAY_IP().getValue() + ":" + CommonConfig.GATEWAY_PORT().getValue();
24+
private static final String GATEWAY_URL = ClientConfiguration.getGatewayUrl();
2525
private static final String DATABASE_URL = GATEWAY_URL + CommonConfig.DB_URL_SUFFIX().getValue();
2626
private static final String TABLE_URL = GATEWAY_URL + CommonConfig.TABLE_URL_SUFFIX().getValue();
2727
private static final String COLUMN_URL = GATEWAY_URL + CommonConfig.COLUMN_URL_SUFFIX().getValue();

server/src/main/scala/com/webank/wedatasphere/dss/visualis/configuration/CommonConfig.scala

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,14 @@ package com.webank.wedatasphere.dss.visualis.configuration
22

33
import org.apache.linkis.common.conf.CommonVars
44

5-
/**
6-
* Created by allenlliu on 2019/1/26.
7-
*/
5+
86
object CommonConfig {
97
/**
108
* 接口越权检测
119
* */
1210
val CHECK_PROJECT_USER = CommonVars("wds.dss.visualis.check.project.user", false)
1311

1412
val ENGINE_DEFAULT_LIMIT = CommonVars("wds.dss.engine.default.limit", 5000)
15-
/**
16-
* this is the configuration to get the hive database source
17-
*/
18-
val GATEWAY_IP = CommonVars("wds.dss.visualis.gateway.ip", "")
19-
20-
val GATEWAY_PORT = CommonVars("wds.dss.visualis.gateway.port", "")
21-
22-
val GATEWAY_PROTOCOL = CommonVars("wds.dss.visualis.gateway.protocol", "http://")
2313

2414
val DB_URL_SUFFIX = CommonVars("wds.dss.visualis.database.url", "/api/rest_j/v1/datasource/dbs")
2515

server/src/main/scala/com/webank/wedatasphere/dss/visualis/utils/VisualisUtils.scala

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ import edp.core.model.{BaseSource, PaginateWithQueryColumns}
1616
import edp.davinci.model.View
1717
import org.apache.linkis.adapt.LinkisUtils
1818

19-
/**
20-
* Created by johnnwang on 2019/1/23.
21-
*/
2219
object VisualisUtils {
2320

2421
val sender = Sender.getSender(EntranceConfiguration.QUERY_PERSISTENCE_SPRING_APPLICATION_NAME.getValue)

0 commit comments

Comments
 (0)