pull/409/head
xiaojunnuo 2025-05-28 23:01:55 +08:00
parent a06ef07178
commit 442f9647a2
6 changed files with 63 additions and 3 deletions

View File

@ -51,7 +51,7 @@ export function createRemoteSelectInputDefine(opts?: {
const watches = opts?.watches || []; const watches = opts?.watches || [];
const helper = opts?.helper || "请选择"; const helper = opts?.helper || "请选择";
const search = opts?.search ?? false; const search = opts?.search ?? false;
const pager = opts?.pager ?? true; const pager = opts?.pager ?? false;
let mode = "tags"; let mode = "tags";
if (opts.multi === false) { if (opts.multi === false) {
mode = undefined; mode = undefined;

View File

@ -20,7 +20,7 @@
</template> </template>
<v-nodes :vnodes="menu" /> <v-nodes :vnodes="menu" />
<div v-if="pager" class="pager text-center p-5"> <div v-if="pager === true" class="pager text-center p-5">
<a-pagination v-model:current="pagerRef.current" simple :total="pagerRef.total" :page-size="pagerRef.limit" /> <a-pagination v-model:current="pagerRef.current" simple :total="pagerRef.total" :page-size="pagerRef.limit" />
</div> </div>
</template> </template>

View File

@ -0,0 +1,29 @@
ALTER TABLE cd_site_info ADD COLUMN `ip_check` boolean;
ALTER TABLE cd_site_info ADD COLUMN `ip_count` bigint;
ALTER TABLE cd_site_info ADD COLUMN `ip_error_count` bigint;
ALTER TABLE cd_site_info MODIFY COLUMN `error` longtext NULL;
CREATE TABLE `cd_site_ip`
(
`id` bigint PRIMARY KEY AUTO_INCREMENT NOT NULL,
`user_id` bigint,
`site_id` bigint,
`ip_address` varchar(100),
`cert_domains` varchar(10240),
`cert_provider` varchar(100),
`cert_status` varchar(100),
`cert_expires_time` bigint,
`last_check_time` bigint,
`check_status` varchar(100),
`error` longtext,
`remark` varchar(4096),
`from` varchar(100),
`disabled` boolean NOT NULL DEFAULT false,
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
);
CREATE INDEX `index_site_ip_user_id` ON `cd_site_ip` (`user_id`);
CREATE INDEX `index_site_ip_site_id` ON `cd_site_ip` (`site_id`);

View File

@ -0,0 +1,28 @@
ALTER TABLE cd_site_info ADD COLUMN "ip_check" boolean;
ALTER TABLE cd_site_info ADD COLUMN "ip_count" bigint;
ALTER TABLE cd_site_info ADD COLUMN "ip_error_count" bigint;
alter table cd_site_info alter column error type text using error::text;
CREATE TABLE "cd_site_ip"
(
"id" bigint PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY NOT NULL,
"user_id" bigint,
"site_id" bigint,
"ip_address" varchar(100),
"cert_domains" varchar(10240),
"cert_provider" varchar(100),
"cert_status" varchar(100),
"cert_expires_time" bigint,
"last_check_time" bigint,
"check_status" varchar(100),
"error" text,
"remark" varchar(4096),
"from" varchar(100),
"disabled" boolean NOT NULL DEFAULT (false),
"create_time" timestamp NOT NULL DEFAULT (CURRENT_TIMESTAMP),
"update_time" timestamp NOT NULL DEFAULT (CURRENT_TIMESTAMP)
);
CREATE INDEX "index_site_ip_user_id" ON "cd_site_ip" ("user_id");
CREATE INDEX "index_site_ip_site_id" ON "cd_site_ip" ("site_id");

View File

@ -173,6 +173,9 @@ export class SiteInfoService extends BaseService<SiteInfoEntity> {
let errorCount = 0 let errorCount = 0
let errorMessage = "" let errorMessage = ""
for (const item of list) { for (const item of list) {
if (!item) {
continue;
}
errorCount++ errorCount++
if(item.error){ if(item.error){
errorMessage += `${item.ipAddress}${item.error} \n` errorMessage += `${item.ipAddress}${item.error} \n`

View File

@ -180,7 +180,7 @@ export class SiteIpService extends BaseService<SiteIpEntity> {
} }
Promise.all(promiseList).then((res)=>{ Promise.all(promiseList).then((res)=>{
const finished = res.filter(item=>{ const finished = res.filter(item=>{
return item return item!=null
}) })
if (finished.length > 0) { if (finished.length > 0) {
onFinish && onFinish(finished) onFinish && onFinish(finished)