mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-19 08:19:15 +08:00
feat: 修改一些样式
This commit is contained in:
parent
0d5d01fffc
commit
706a1a198f
@ -9,6 +9,7 @@ type WebsiteDTO struct {
|
|||||||
ErrorLogPath string `json:"errorLogPath"`
|
ErrorLogPath string `json:"errorLogPath"`
|
||||||
AccessLogPath string `json:"accessLogPath"`
|
AccessLogPath string `json:"accessLogPath"`
|
||||||
SitePath string `json:"sitePath"`
|
SitePath string `json:"sitePath"`
|
||||||
|
AppName string `json:"appName"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type WebsitePreInstallCheck struct {
|
type WebsitePreInstallCheck struct {
|
||||||
|
@ -73,8 +73,17 @@ func (w WebsiteService) PageWebsite(req request.WebsiteSearch) (int64, []respons
|
|||||||
return 0, nil, err
|
return 0, nil, err
|
||||||
}
|
}
|
||||||
for _, web := range websites {
|
for _, web := range websites {
|
||||||
|
var appName string
|
||||||
|
if web.Type == constant.Deployment {
|
||||||
|
appInstall, err := appInstallRepo.GetFirst(commonRepo.WithByID(web.AppInstallID))
|
||||||
|
if err != nil {
|
||||||
|
return 0, nil, err
|
||||||
|
}
|
||||||
|
appName = appInstall.Name
|
||||||
|
}
|
||||||
websiteDTOs = append(websiteDTOs, response.WebsiteDTO{
|
websiteDTOs = append(websiteDTOs, response.WebsiteDTO{
|
||||||
Website: web,
|
Website: web,
|
||||||
|
AppName: appName,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return total, websiteDTOs, nil
|
return total, websiteDTOs, nil
|
||||||
|
@ -12,6 +12,7 @@ export namespace Website {
|
|||||||
webSiteGroupId: number;
|
webSiteGroupId: number;
|
||||||
otherDomains: string;
|
otherDomains: string;
|
||||||
defaultServer: boolean;
|
defaultServer: boolean;
|
||||||
|
protocol: string;
|
||||||
autoRenew: boolean;
|
autoRenew: boolean;
|
||||||
appinstall?: NewAppInstall;
|
appinstall?: NewAppInstall;
|
||||||
webSiteSSL: SSL;
|
webSiteSSL: SSL;
|
||||||
@ -21,6 +22,7 @@ export namespace Website {
|
|||||||
errorLogPath: string;
|
errorLogPath: string;
|
||||||
accessLogPath: string;
|
accessLogPath: string;
|
||||||
sitePath: string;
|
sitePath: string;
|
||||||
|
appName: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface NewAppInstall {
|
export interface NewAppInstall {
|
||||||
|
@ -4,7 +4,7 @@ import { Website } from '../interface/Website';
|
|||||||
import { File } from '../interface/file';
|
import { File } from '../interface/file';
|
||||||
|
|
||||||
export const SearchWebsites = (req: Website.WebSiteSearch) => {
|
export const SearchWebsites = (req: Website.WebSiteSearch) => {
|
||||||
return http.post<ResPage<Website.Website>>(`/websites/search`, req);
|
return http.post<ResPage<Website.WebsiteDTO>>(`/websites/search`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const ListWebsites = () => {
|
export const ListWebsites = () => {
|
||||||
|
@ -275,3 +275,7 @@
|
|||||||
height: 8px;
|
height: 8px;
|
||||||
background-color: #000000;
|
background-color: #000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.middle-center {
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
@ -233,7 +233,6 @@ const changeEnable = (enable: boolean) => {
|
|||||||
done();
|
done();
|
||||||
} else {
|
} else {
|
||||||
instance.confirmButtonLoading = true;
|
instance.confirmButtonLoading = true;
|
||||||
instance.cancelButtonLoading = true;
|
|
||||||
form.enable = false;
|
form.enable = false;
|
||||||
form.websiteId = id.value;
|
form.websiteId = id.value;
|
||||||
UpdateHTTPSConfig(form).then(() => {
|
UpdateHTTPSConfig(form).then(() => {
|
||||||
|
@ -66,16 +66,26 @@
|
|||||||
@search="search()"
|
@search="search()"
|
||||||
:class="{ mask: nginxStatus != 'Running' }"
|
:class="{ mask: nginxStatus != 'Running' }"
|
||||||
>
|
>
|
||||||
<el-table-column :label="$t('commons.table.name')" fix show-overflow-tooltip prop="primaryDomain">
|
<el-table-column
|
||||||
|
:label="$t('commons.table.name')"
|
||||||
|
fix
|
||||||
|
show-overflow-tooltip
|
||||||
|
prop="primaryDomain"
|
||||||
|
min-width="120px"
|
||||||
|
>
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
|
<el-button link :icon="Promotion" @click="openUrl(row)"></el-button>
|
||||||
|
<span>
|
||||||
<el-link type="primary" :underline="false" @click="openConfig(row.id)">
|
<el-link type="primary" :underline="false" @click="openConfig(row.id)">
|
||||||
{{ row.primaryDomain }}
|
<span style="margin-left: 10px">{{ row.primaryDomain }}</span>
|
||||||
</el-link>
|
</el-link>
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('commons.table.type')" fix prop="type">
|
<el-table-column :label="$t('commons.table.type')" fix prop="type">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
{{ $t('website.' + row.type) }}
|
{{ $t('website.' + row.type) }}
|
||||||
|
<span v-if="row.type === 'deployment'">[{{ row.appName }}]</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('commons.table.status')" prop="status">
|
<el-table-column :label="$t('commons.table.status')" prop="status">
|
||||||
@ -175,6 +185,7 @@ import { ElMessageBox } from 'element-plus';
|
|||||||
import { dateFormatSimple } from '@/utils/util';
|
import { dateFormatSimple } from '@/utils/util';
|
||||||
import { MsgSuccess } from '@/utils/message';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import { Promotion } from '@element-plus/icons-vue';
|
||||||
|
|
||||||
const shortcuts = [
|
const shortcuts = [
|
||||||
{
|
{
|
||||||
@ -221,6 +232,11 @@ let req = reactive({
|
|||||||
websiteGroupId: 0,
|
websiteGroupId: 0,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const openUrl = (row: Website.WebsiteDTO) => {
|
||||||
|
const url = row.protocol.toLowerCase() + '://' + row.primaryDomain;
|
||||||
|
window.open(url);
|
||||||
|
};
|
||||||
|
|
||||||
const search = async () => {
|
const search = async () => {
|
||||||
req.page = paginationConfig.currentPage;
|
req.page = paginationConfig.currentPage;
|
||||||
req.pageSize = paginationConfig.pageSize;
|
req.pageSize = paginationConfig.pageSize;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user