feat(ui): humanize workflow run logs level

This commit is contained in:
Fu Diwei 2025-11-25 10:22:06 +08:00
parent 2df3ab70f5
commit dac169fabf
5 changed files with 12 additions and 5 deletions

View File

@ -96,7 +96,7 @@ func (d *Deployer) Deploy(ctx context.Context, certPEM, privkeyPEM string) (*dep
default:
{
// 遍历更新域名证书
// 遍历更新站点证书
var errs []error
for _, siteName := range d.config.SiteNames {
select {

View File

@ -73,7 +73,7 @@ func (d *Deployer) Deploy(ctx context.Context, certPEM, privkeyPEM string) (*dep
return nil, errors.New("config `siteNames` is required")
}
// 遍历更新域名证书
// 遍历更新站点证书
var errs []error
for _, siteName := range d.config.SiteNames {
select {

View File

@ -65,7 +65,7 @@ func (d *Deployer) Deploy(ctx context.Context, certPEM, privkeyPEM string) (*dep
return nil, errors.New("config `siteNames` is required")
}
// 遍历更新域名证书
// 遍历更新站点证书
var errs []error
for _, siteName := range d.config.SiteNames {
select {

View File

@ -62,7 +62,7 @@ func (d *Deployer) Deploy(ctx context.Context, certPEM, privkeyPEM string) (*dep
return nil, errors.New("config `siteNames` is required")
}
// 遍历更新域名证书
// 遍历更新站点证书
var errs []error
for _, siteName := range d.config.SiteNames {
select {

View File

@ -287,7 +287,14 @@ const WorkflowRunLogs = ({ runId, runStatus }: { runId: string; runStatus: strin
group.records
.map((record) => {
const datetime = dayjs(record.timestamp).format("YYYY-MM-DDTHH:mm:ss.SSSZ");
const level = record.level;
const level =
record.level < WorkflowLogLevel.Info
? "DBUG"
: record.level < WorkflowLogLevel.Warn
? "INFO"
: record.level < WorkflowLogLevel.Error
? "WARN"
: "ERRO";
const message = record.message;
const data = record.data && Object.keys(record.data).length > 0 ? JSON.stringify(record.data) : "";
return `[${datetime}] [${level}] ${escape(message)} ${escape(data)}`.trim();