mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-11-11 12:10:45 +08:00
feat: 网站增加列
This commit is contained in:
parent
bd082d4e08
commit
9f7c6b07e2
5 changed files with 16 additions and 3 deletions
|
|
@ -15,6 +15,7 @@ type WebSite struct {
|
||||||
WebSiteGroupID uint `gorm:"type:integer" json:"webSiteGroupId"`
|
WebSiteGroupID uint `gorm:"type:integer" json:"webSiteGroupId"`
|
||||||
WebSiteSSLID uint `gorm:"type:integer" json:"webSiteSSLId"`
|
WebSiteSSLID uint `gorm:"type:integer" json:"webSiteSSLId"`
|
||||||
Domains []WebSiteDomain `json:"domains"`
|
Domains []WebSiteDomain `json:"domains"`
|
||||||
|
WebSiteSSL WebSiteSSL `json:"webSiteSSL"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (w WebSite) TableName() string {
|
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{})
|
db := getDb(opts...).Model(&model.WebSite{})
|
||||||
count := int64(0)
|
count := int64(0)
|
||||||
db = db.Count(&count)
|
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
|
return count, websites, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ export namespace WebSite {
|
||||||
webSiteGroupId: number;
|
webSiteGroupId: number;
|
||||||
otherDomains: string;
|
otherDomains: string;
|
||||||
appinstall?: NewAppInstall;
|
appinstall?: NewAppInstall;
|
||||||
|
webSiteSSL: SSL;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface WebSiteDTO extends CommonModel {
|
export interface WebSiteDTO extends CommonModel {
|
||||||
|
|
|
||||||
|
|
@ -738,7 +738,7 @@ export default {
|
||||||
acmeAccount: 'Acme 账户',
|
acmeAccount: 'Acme 账户',
|
||||||
provider: '验证方式',
|
provider: '验证方式',
|
||||||
dnsCommon: '手动解析',
|
dnsCommon: '手动解析',
|
||||||
expireDate: '到期时间',
|
expireDate: '过期时间',
|
||||||
brand: '品牌',
|
brand: '品牌',
|
||||||
deploySSL: '部署',
|
deploySSL: '部署',
|
||||||
deploySSLHelper: '确定部署证书?',
|
deploySSLHelper: '确定部署证书?',
|
||||||
|
|
@ -760,6 +760,8 @@ export default {
|
||||||
backup: '备份',
|
backup: '备份',
|
||||||
log: '日志',
|
log: '日志',
|
||||||
nginxPer: '性能调整',
|
nginxPer: '性能调整',
|
||||||
|
neverExpire: '永不过期',
|
||||||
|
protocol: '协议',
|
||||||
},
|
},
|
||||||
nginx: {
|
nginx: {
|
||||||
serverNamesHashBucketSizeHelper: '服务器名字的hash表大小',
|
serverNamesHashBucketSizeHelper: '服务器名字的hash表大小',
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,15 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('commons.table.status')" prop="status"></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="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> -->
|
<!-- <el-table-column :label="'SSL证书'" prop="ssl"></el-table-column> -->
|
||||||
<fu-table-operations
|
<fu-table-operations
|
||||||
:ellipsis="1"
|
:ellipsis="1"
|
||||||
|
|
@ -60,6 +68,7 @@ import { SearchWebSites } from '@/api/modules/website';
|
||||||
import { WebSite } from '@/api/interface/website';
|
import { WebSite } from '@/api/interface/website';
|
||||||
import AppStatus from '@/components/app-status/index.vue';
|
import AppStatus from '@/components/app-status/index.vue';
|
||||||
import NginxConfig from './nginx/index.vue';
|
import NginxConfig from './nginx/index.vue';
|
||||||
|
import { dateFromat } from '@/utils/util';
|
||||||
|
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import router from '@/routers';
|
import router from '@/routers';
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue