fix: redis-command、phpmyadmin 未安装跳转问题修复

This commit is contained in:
ssongliu 2023-02-13 17:28:26 +08:00 committed by ssongliu
parent 920b5b9452
commit bce1995969
7 changed files with 13 additions and 15 deletions

View File

@ -162,7 +162,7 @@ import { reactive, ref } from 'vue';
import { Rules } from '@/global/form-rules';
import { loadBackupName } from '@/views/setting/helper';
import FileList from '@/components/file-list/index.vue';
import { getBackupList } from '@/api/modules/backup';
import { getBackupList } from '@/api/modules/setting';
import i18n from '@/lang';
import { ElForm, ElMessage } from 'element-plus';
import { Cronjob } from '@/api/interface/cronjob';

View File

@ -38,7 +38,7 @@ import { backup, recover } from '@/api/modules/database';
import i18n from '@/lang';
import { ElMessage } from 'element-plus';
import DrawerHeader from '@/components/drawer-header/index.vue';
import { deleteBackupRecord, downloadBackupRecord, searchBackupRecords } from '@/api/modules/backup';
import { deleteBackupRecord, downloadBackupRecord, searchBackupRecords } from '@/api/modules/setting';
import { Backup } from '@/api/interface/backup';
const selects = ref<any>([]);

View File

@ -124,7 +124,7 @@
:destroy-on-close="true"
>
<el-alert :closable="false" :title="$t('app.checkInstalledWarn', ['phpMyAdmin'])" type="info">
<el-link icon="Position" @click="goRouter('/apps/installed')" type="primary">
<el-link icon="Position" @click="getAppDetail('phpmyadmin')" type="primary">
{{ $t('database.goInstall') }}
</el-link>
</el-alert>
@ -258,10 +258,6 @@ const onChange = async (info: any) => {
}
};
const goRouter = async (path: string) => {
router.push({ path: path });
};
const goDashboard = async () => {
if (phpadminPort.value === 0) {
phpVisiable.value = true;
@ -271,6 +267,9 @@ const goDashboard = async () => {
let ipLocal = href.split('//')[1].split(':')[0];
window.open(`http://${ipLocal}:${phpadminPort.value}`, '_blank');
};
const getAppDetail = (key: string) => {
router.push({ name: 'AppDetail', params: { appKey: key } });
};
const loadDashboardPort = async () => {
const res = await GetAppPort('phpmyadmin');

View File

@ -37,7 +37,7 @@
:destroy-on-close="true"
>
<el-alert :closable="false" :title="$t('app.checkInstalledWarn', ['Redis-Commander'])" type="info">
<el-link icon="Position" @click="goRouter('/apps')" type="primary">
<el-link icon="Position" @click="getAppDetail('redis-commander')" type="primary">
{{ $t('database.goInstall') }}
</el-link>
</el-alert>
@ -81,10 +81,6 @@ const onSetting = async () => {
settingRef.value!.acceptParams({ status: redisStatus.value, redisName: redisName.value });
};
const goRouter = async (path: string) => {
router.push({ path: path });
};
const goDashboard = async () => {
if (redisCommandPort.value === 0) {
commandVisiable.value = true;
@ -94,6 +90,9 @@ const goDashboard = async () => {
let ipLocal = href.split('//')[1].split(':')[0];
window.open(`http://${ipLocal}:${redisCommandPort.value}`, '_blank');
};
const getAppDetail = (key: string) => {
router.push({ name: 'AppDetail', params: { appKey: key } });
};
const loadDashboardPort = async () => {
const res = await GetAppPort('redis-commander');

View File

@ -48,7 +48,7 @@ import { ElMessage, FormInstance } from 'element-plus';
import i18n from '@/lang';
import DrawerHeader from '@/components/drawer-header/index.vue';
import { snapshotImport } from '@/api/modules/setting';
import { getBackupList, getFilesFromBackup } from '@/api/modules/backup';
import { getBackupList, getFilesFromBackup } from '@/api/modules/setting';
import { loadBackupName } from '../../helper';
import { Rules } from '@/global/form-rules';

View File

@ -157,7 +157,7 @@ import { Setting } from '@/api/interface/setting';
import LayoutContent from '@/layout/layout-content.vue';
import RecoverStatus from '@/views/setting/snapshot/status/index.vue';
import SnapshotImport from '@/views/setting/snapshot/import/index.vue';
import { getBackupList } from '@/api/modules/backup';
import { getBackupList } from '@/api/modules/setting';
import { loadBackupName } from '../helper';
const loading = ref(false);

View File

@ -40,7 +40,7 @@ import { dateFormat } from '@/utils/util';
import { useDeleteData } from '@/hooks/use-delete-data';
import i18n from '@/lang';
import { ElMessage } from 'element-plus';
import { deleteBackupRecord, downloadBackupRecord, searchBackupRecords } from '@/api/modules/backup';
import { deleteBackupRecord, downloadBackupRecord, searchBackupRecords } from '@/api/modules/setting';
import { Backup } from '@/api/interface/backup';
import { BackupWebsite, RecoverWebsite } from '@/api/modules/website';