mirror of
https://github.com/Fabio286/antares.git
synced 2025-06-05 21:59:22 +02:00
feat: connection info icons in footer
This commit is contained in:
7693
package-lock.json
generated
7693
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -208,7 +208,7 @@
|
|||||||
},
|
},
|
||||||
"overrides": {
|
"overrides": {
|
||||||
"ssh2-promise": {
|
"ssh2-promise": {
|
||||||
"ssh2": "~1.11.0"
|
"ssh2": "github:Fabio286/ssh2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -148,10 +148,11 @@ export class MySQLClient extends AntaresCore {
|
|||||||
if (this._params.ssh) {
|
if (this._params.ssh) {
|
||||||
try {
|
try {
|
||||||
if (this._params.ssh.password === '') delete this._params.ssh.password;
|
if (this._params.ssh.password === '') delete this._params.ssh.password;
|
||||||
|
if (this._params.ssh.passphrase === '') delete this._params.ssh.passphrase;
|
||||||
|
|
||||||
this._ssh = new SSH2Promise({
|
this._ssh = new SSH2Promise({
|
||||||
...this._params.ssh,
|
...this._params.ssh,
|
||||||
keepaliveInterval: 20000,
|
keepaliveInterval: 30*60*1000,
|
||||||
debug: process.env.NODE_ENV !== 'production' ? (s) => console.log(s) : null
|
debug: process.env.NODE_ENV !== 'production' ? (s) => console.log(s) : null
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -164,7 +164,7 @@ export class PostgreSQLClient extends AntaresCore {
|
|||||||
try {
|
try {
|
||||||
this._ssh = new SSH2Promise({
|
this._ssh = new SSH2Promise({
|
||||||
...this._params.ssh,
|
...this._params.ssh,
|
||||||
keepaliveInterval: 20000,
|
keepaliveInterval: 30*60*1000,
|
||||||
debug: process.env.NODE_ENV !== 'production' ? (s) => console.log(s) : null
|
debug: process.env.NODE_ENV !== 'production' ? (s) => console.log(s) : null
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="panel-footer text-center py-0">
|
<div class="panel-footer text-center py-0">
|
||||||
<div v-if="connection.ssl" class="chip bg-success mt-2">
|
<div v-if="connection.ssl" class="chip bg-success mt-2">
|
||||||
<i class="mdi mdi-lock mdi-18px mr-1" />
|
<i class="mdi mdi-shield-key mdi-18px mr-1" />
|
||||||
SSL
|
SSL
|
||||||
</div>
|
</div>
|
||||||
<div v-if="connection.ssh" class="chip bg-success mt-2">
|
<div v-if="connection.ssh" class="chip bg-success mt-2">
|
||||||
|
@ -10,6 +10,18 @@
|
|||||||
<i class="mdi mdi-18px mdi-database mr-1" />
|
<i class="mdi mdi-18px mdi-database mr-1" />
|
||||||
<small>{{ versionString }}</small>
|
<small>{{ versionString }}</small>
|
||||||
</li>
|
</li>
|
||||||
|
<li v-if="connectionInfos && connectionInfos.readonly" class="footer-element">
|
||||||
|
<i class="mdi mdi-18px mdi-lock mr-1" />
|
||||||
|
<small>{{ t('message.readOnlyMode') }}</small>
|
||||||
|
</li>
|
||||||
|
<li v-if="connectionInfos && connectionInfos.ssl" class="footer-element">
|
||||||
|
<i class="mdi mdi-18px mdi-shield-key mr-1" />
|
||||||
|
<small>SSL</small>
|
||||||
|
</li>
|
||||||
|
<li v-if="connectionInfos && connectionInfos.ssh" class="footer-element">
|
||||||
|
<i class="mdi mdi-18px mdi-console-network mr-1" />
|
||||||
|
<small>SSH</small>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -76,10 +88,11 @@ const { toggleConsole } = useConsoleStore();
|
|||||||
|
|
||||||
const { showSettingModal } = applicationStore;
|
const { showSettingModal } = applicationStore;
|
||||||
const { getWorkspace } = workspacesStore;
|
const { getWorkspace } = workspacesStore;
|
||||||
const { getConnectionFolder } = connectionsStore;
|
const { getConnectionFolder, getConnectionByUid } = connectionsStore;
|
||||||
|
|
||||||
const workspace = computed(() => getWorkspace(workspaceUid.value));
|
const workspace = computed(() => getWorkspace(workspaceUid.value));
|
||||||
const footerColor = computed(() => getConnectionFolder(workspaceUid.value)?.color || '#E36929');
|
const footerColor = computed(() => getConnectionFolder(workspaceUid.value)?.color || '#E36929');
|
||||||
|
const connectionInfos = computed(() => getConnectionByUid(workspaceUid.value));
|
||||||
const version: ComputedRef<DatabaseInfos> = computed(() => {
|
const version: ComputedRef<DatabaseInfos> = computed(() => {
|
||||||
return getWorkspace(workspaceUid.value) ? workspace.value.version : null;
|
return getWorkspace(workspaceUid.value) ? workspace.value.version : null;
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user