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