feat: 添加爬虫状态监控功能
新增爬虫统计信息展示组件,包括后端数据查询接口和前端展示界面。同时简化日期显示格式并添加刷新提示功能。
This commit is contained in:
@@ -4,6 +4,8 @@ import {main} from '../models';
|
||||
|
||||
export function GetAiRecommendations():Promise<Array<main.AiRecommendation>>;
|
||||
|
||||
export function GetCrawlInfoStats():Promise<Array<main.CrawlInfoStat>>;
|
||||
|
||||
export function GetDatabaseConfig():Promise<main.DatabaseConfig>;
|
||||
|
||||
export function GetDatabaseDSN():Promise<string>;
|
||||
|
||||
@@ -6,6 +6,10 @@ export function GetAiRecommendations() {
|
||||
return window['go']['main']['App']['GetAiRecommendations']();
|
||||
}
|
||||
|
||||
export function GetCrawlInfoStats() {
|
||||
return window['go']['main']['App']['GetCrawlInfoStats']();
|
||||
}
|
||||
|
||||
export function GetDatabaseConfig() {
|
||||
return window['go']['main']['App']['GetDatabaseConfig']();
|
||||
}
|
||||
|
||||
@@ -44,6 +44,26 @@ export namespace main {
|
||||
this.updatedAt = source["updatedAt"];
|
||||
}
|
||||
}
|
||||
export class CrawlInfoStat {
|
||||
source: string;
|
||||
count: number;
|
||||
latestUpdate: string;
|
||||
latestPublishDate: string;
|
||||
error: string;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new CrawlInfoStat(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.source = source["source"];
|
||||
this.count = source["count"];
|
||||
this.latestUpdate = source["latestUpdate"];
|
||||
this.latestPublishDate = source["latestPublishDate"];
|
||||
this.error = source["error"];
|
||||
}
|
||||
}
|
||||
export class DatabaseConfig {
|
||||
Type: string;
|
||||
Host: string;
|
||||
|
||||
Reference in New Issue
Block a user