feat: connection info icons in footer

This commit is contained in:
Fabio Di Stasio 2023-01-05 17:21:22 +01:00
parent b4e1e9ac26
commit ff4bc6c39b
6 changed files with 1684 additions and 6039 deletions

7699
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -208,7 +208,7 @@
},
"overrides": {
"ssh2-promise": {
"ssh2": "~1.11.0"
"ssh2": "github:Fabio286/ssh2"
}
}
}

View File

@ -148,10 +148,11 @@ export class MySQLClient extends AntaresCore {
if (this._params.ssh) {
try {
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._params.ssh,
keepaliveInterval: 20000,
keepaliveInterval: 30*60*1000,
debug: process.env.NODE_ENV !== 'production' ? (s) => console.log(s) : null
});

View File

@ -164,7 +164,7 @@ export class PostgreSQLClient extends AntaresCore {
try {
this._ssh = new SSH2Promise({
...this._params.ssh,
keepaliveInterval: 20000,
keepaliveInterval: 30*60*1000,
debug: process.env.NODE_ENV !== 'production' ? (s) => console.log(s) : null
});

View File

@ -99,7 +99,7 @@
</div>
<div class="panel-footer text-center py-0">
<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
</div>
<div v-if="connection.ssh" class="chip bg-success mt-2">

View File

@ -10,6 +10,18 @@
<i class="mdi mdi-18px mdi-database mr-1" />
<small>{{ versionString }}</small>
</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>
</div>
@ -76,10 +88,11 @@ const { toggleConsole } = useConsoleStore();
const { showSettingModal } = applicationStore;
const { getWorkspace } = workspacesStore;
const { getConnectionFolder } = connectionsStore;
const { getConnectionFolder, getConnectionByUid } = connectionsStore;
const workspace = computed(() => getWorkspace(workspaceUid.value));
const footerColor = computed(() => getConnectionFolder(workspaceUid.value)?.color || '#E36929');
const connectionInfos = computed(() => getConnectionByUid(workspaceUid.value));
const version: ComputedRef<DatabaseInfos> = computed(() => {
return getWorkspace(workspaceUid.value) ? workspace.value.version : null;
});