This commit is contained in:
fit2-zhao 2020-09-17 11:36:43 +08:00
commit 8ca36bd18f
6 changed files with 14 additions and 6 deletions

View File

@ -171,6 +171,13 @@
<version>${jmeter.version}</version>
</dependency>
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>7.4.1.jre8</version>
</dependency>
<!-- Zookeeper -->
<dependency>
<groupId>org.apache.dubbo</groupId>

View File

@ -9,7 +9,7 @@
<el-select :disabled="isReadOnly" v-model="scenario.environmentId" class="environment-select"
@change="environmentChange" clearable>
<el-option v-for="(environment, index) in environments" :key="index"
:label="environment.name + ': ' + environment.protocol + '://' + environment.socket"
:label="environment.name + (environment.config.httpConfig.socket ? (': ' + environment.config.httpConfig.protocol + '://' + environment.config.httpConfig.socket) : '')"
:value="environment.id"/>
<el-button class="environment-button" size="mini" type="primary" @click="openEnvironmentConfig">
{{ $t('api_test.environment.environment_config') }}

View File

@ -148,7 +148,7 @@ export default {
if (!this.request.path) return;
let url = this.getURL(this.displayUrl);
let urlStr = url.origin + url.pathname;
let envUrl = this.request.environment.protocol + '://' + this.request.environment.socket;
let envUrl = this.request.environment.config.httpConfig.protocol + '://' + this.request.environment.config.httpConfig.socket;
this.request.path = decodeURIComponent(urlStr.substring(envUrl.length, urlStr.length));
},
getURL(urlStr) {
@ -194,7 +194,8 @@ export default {
return this.request.method !== "GET";
},
displayUrl() {
return this.request.environment ? this.request.environment.protocol + '://' + this.request.environment.socket + (this.request.path ? this.request.path : '') : '';
return this.request.environment.config.httpConfig.socket ? this.request.environment.config.httpConfig.protocol + '://'
+ this.request.environment.config.httpConfig.socket + (this.request.path ? this.request.path : '') : '';
}
}
}

View File

@ -546,7 +546,7 @@ export class ConfigCenter extends BaseConfig {
}
export class DatabaseConfig extends BaseConfig {
static DRIVER_CLASS = ["com.mysql.jdbc.Driver"];
static DRIVER_CLASS = ["com.mysql.jdbc.Driver","com.microsoft.sqlserver.jdbc.SQLServerDriver"];
constructor(options) {
super();

View File

@ -536,7 +536,7 @@ export default {
form_description: "如果当前配置项无值,则取场景配置项的值",
},
sql: {
dataSource: "数据源",
dataSource: "数据源名称",
sql_script: "SQL脚本",
timeout: "超时时间(ms)",
database_driver: "数据库驱动",

View File

@ -536,7 +536,7 @@ export default {
form_description: "如果當前配置項無值,則取場景配置項的值",
},
sql: {
dataSource: "數據源",
dataSource: "數據源名稱",
sql_script: "SQL腳本",
timeout: "超時時間(ms)",
database_driver: "數據庫驅動",