mirror of
https://github.com/Fabio286/antares.git
synced 2025-02-16 19:50:37 +01:00
refactor(PostgreSQL): minor refactor on UI and code for pg connection string
This commit is contained in:
parent
6305752ad1
commit
8e983ad2cb
@ -142,7 +142,6 @@
|
||||
"electron": "^17.0.1",
|
||||
"electron-builder": "^22.14.11",
|
||||
"electron-devtools-installer": "^3.2.0",
|
||||
"electron-rebuild": "^3.2.7",
|
||||
"eslint": "^7.32.0",
|
||||
"eslint-config-standard": "^16.0.3",
|
||||
"eslint-plugin-import": "^2.24.2",
|
||||
|
@ -45,19 +45,6 @@
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="connection.client === 'pg'" class="form-group columns">
|
||||
<div class="column col-4 col-sm-12">
|
||||
<label class="form-label">{{ $t('word.connectionString') }}</label>
|
||||
</div>
|
||||
<div class="column col-8 col-sm-12">
|
||||
<input
|
||||
ref="pgString"
|
||||
v-model="connection.pgConnString"
|
||||
class="form-input"
|
||||
type="text"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group columns">
|
||||
<div class="column col-4 col-sm-12">
|
||||
<label class="form-label">{{ $t('word.client') }}</label>
|
||||
@ -74,6 +61,19 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="connection.client === 'pg'" class="form-group columns">
|
||||
<div class="column col-4 col-sm-12">
|
||||
<label class="form-label">{{ $t('word.connectionString') }}</label>
|
||||
</div>
|
||||
<div class="column col-8 col-sm-12">
|
||||
<input
|
||||
ref="pgString"
|
||||
v-model="connection.pgConnString"
|
||||
class="form-input"
|
||||
type="text"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!customizations.fileConnection" class="form-group columns">
|
||||
<div class="column col-4 col-sm-12">
|
||||
<label class="form-label">{{ $t('word.hostName') }}/IP</label>
|
||||
|
@ -45,19 +45,6 @@
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="connection.client === 'pg'" class="form-group columns">
|
||||
<div class="column col-4 col-sm-12">
|
||||
<label class="form-label">{{ $t('word.connectionString') }}</label>
|
||||
</div>
|
||||
<div class="column col-8 col-sm-12">
|
||||
<input
|
||||
ref="pgString"
|
||||
v-model="localConnection.pgConnString"
|
||||
class="form-input"
|
||||
type="text"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group columns">
|
||||
<div class="column col-4 col-sm-12">
|
||||
<label class="form-label">{{ $t('word.client') }}</label>
|
||||
@ -74,6 +61,19 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="connection.client === 'pg'" class="form-group columns">
|
||||
<div class="column col-4 col-sm-12">
|
||||
<label class="form-label">{{ $t('word.connectionString') }}</label>
|
||||
</div>
|
||||
<div class="column col-8 col-sm-12">
|
||||
<input
|
||||
ref="pgString"
|
||||
v-model="localConnection.pgConnString"
|
||||
class="form-input"
|
||||
type="text"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!customizations.fileConnection" class="form-group columns">
|
||||
<div class="column col-4 col-sm-12">
|
||||
<label class="form-label">{{ $t('word.hostName') }}/IP</label>
|
||||
|
@ -127,7 +127,7 @@ module.exports = {
|
||||
disable: 'Disable',
|
||||
commit: 'Commit',
|
||||
rollback: 'Rollback',
|
||||
connectionString: 'Conn String'
|
||||
connectionString: 'Connection string'
|
||||
},
|
||||
message: {
|
||||
appWelcome: 'Welcome to Antares SQL Client!',
|
||||
|
@ -4,22 +4,21 @@ import { ipcRenderer } from 'electron';
|
||||
import connStringConstruct from '../libs/connStringDecode';
|
||||
|
||||
export default class {
|
||||
static makeTest(params) {
|
||||
static makeTest (params) {
|
||||
params = connStringConstruct(params);
|
||||
return ipcRenderer.invoke('test-connection', params);
|
||||
}
|
||||
|
||||
static checkConnection(params) {
|
||||
params = connStringConstruct(params);
|
||||
return ipcRenderer.invoke('check-connection', params);
|
||||
}
|
||||
|
||||
static connect(params) {
|
||||
static connect (params) {
|
||||
params = connStringConstruct(params);
|
||||
return ipcRenderer.invoke('connect', params);
|
||||
}
|
||||
|
||||
static disconnect(uid) {
|
||||
static checkConnection (uid) {
|
||||
return ipcRenderer.invoke('check-connection', uid);
|
||||
}
|
||||
|
||||
static disconnect (uid) {
|
||||
return ipcRenderer.invoke('disconnect', uid);
|
||||
}
|
||||
}
|
||||
|
@ -68,8 +68,6 @@ const onlineConnectionString = (stringArgs, args) => {
|
||||
|
||||
const port = defaultPort;
|
||||
|
||||
console.log(userName, password, host, dbName, port);
|
||||
|
||||
const client = args.client ? args.client : scheme;
|
||||
|
||||
args.client = client;
|
||||
|
Loading…
x
Reference in New Issue
Block a user