mirror of https://github.com/1Panel-dev/1Panel
feat: 网站增加列
parent
bd082d4e08
commit
9f7c6b07e2
|
@ -15,6 +15,7 @@ type WebSite struct {
|
|||
WebSiteGroupID uint `gorm:"type:integer" json:"webSiteGroupId"`
|
||||
WebSiteSSLID uint `gorm:"type:integer" json:"webSiteSSLId"`
|
||||
Domains []WebSiteDomain `json:"domains"`
|
||||
WebSiteSSL WebSiteSSL `json:"webSiteSSL"`
|
||||
}
|
||||
|
||||
func (w WebSite) TableName() string {
|
||||
|
|
|
@ -21,7 +21,7 @@ func (w WebSiteRepo) Page(page, size int, opts ...DBOption) (int64, []model.WebS
|
|||
db := getDb(opts...).Model(&model.WebSite{})
|
||||
count := int64(0)
|
||||
db = db.Count(&count)
|
||||
err := db.Debug().Limit(size).Offset(size * (page - 1)).Find(&websites).Error
|
||||
err := db.Debug().Limit(size).Offset(size * (page - 1)).Preload("WebSiteSSL").Find(&websites).Error
|
||||
return count, websites, err
|
||||
}
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ export namespace WebSite {
|
|||
webSiteGroupId: number;
|
||||
otherDomains: string;
|
||||
appinstall?: NewAppInstall;
|
||||
webSiteSSL: SSL;
|
||||
}
|
||||
|
||||
export interface WebSiteDTO extends CommonModel {
|
||||
|
|
|
@ -738,7 +738,7 @@ export default {
|
|||
acmeAccount: 'Acme 账户',
|
||||
provider: '验证方式',
|
||||
dnsCommon: '手动解析',
|
||||
expireDate: '到期时间',
|
||||
expireDate: '过期时间',
|
||||
brand: '品牌',
|
||||
deploySSL: '部署',
|
||||
deploySSLHelper: '确定部署证书?',
|
||||
|
@ -760,6 +760,8 @@ export default {
|
|||
backup: '备份',
|
||||
log: '日志',
|
||||
nginxPer: '性能调整',
|
||||
neverExpire: '永不过期',
|
||||
protocol: '协议',
|
||||
},
|
||||
nginx: {
|
||||
serverNamesHashBucketSizeHelper: '服务器名字的hash表大小',
|
||||
|
|
|
@ -26,7 +26,15 @@
|
|||
</el-table-column>
|
||||
<el-table-column :label="$t('commons.table.status')" prop="status"></el-table-column>
|
||||
<!-- <el-table-column :label="'备份'" prop="backup"></el-table-column> -->
|
||||
<el-table-column :label="'备注'" prop="remark"></el-table-column>
|
||||
<el-table-column :label="$t('website.remark')" prop="remark"></el-table-column>
|
||||
<el-table-column :label="$t('website.protocol')" prop="protocol"></el-table-column>
|
||||
<el-table-column :label="$t('website.expireDate')">
|
||||
<template #default="{ row }">
|
||||
<span v-if="row.protocol === 'HTTP'">{{ $t('website.neverExpire') }}</span>
|
||||
<!-- <span v-else>{{ row.webSiteSSL.id }}</span> -->
|
||||
<span v-else>{{ dateFromat(1, 1, row.webSiteSSL.expireDate) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column :label="'SSL证书'" prop="ssl"></el-table-column> -->
|
||||
<fu-table-operations
|
||||
:ellipsis="1"
|
||||
|
@ -60,6 +68,7 @@ import { SearchWebSites } from '@/api/modules/website';
|
|||
import { WebSite } from '@/api/interface/website';
|
||||
import AppStatus from '@/components/app-status/index.vue';
|
||||
import NginxConfig from './nginx/index.vue';
|
||||
import { dateFromat } from '@/utils/util';
|
||||
|
||||
import i18n from '@/lang';
|
||||
import router from '@/routers';
|
||||
|
|
Loading…
Reference in New Issue