mirror of
https://github.com/certimate-go/certimate.git
synced 2026-06-30 21:05:12 +08:00
feat(ui): humanize workflow run logs level
This commit is contained in:
parent
2df3ab70f5
commit
dac169fabf
@ -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 {
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user