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