mirror of
https://github.com/usual2970/certimate.git
synced 2025-07-21 02:18:00 +00:00
feat(ui): enhance workflow logs display
This commit is contained in:
@@ -42,7 +42,7 @@ func (n *applyNode) Process(ctx context.Context) error {
|
||||
|
||||
// 检测是否可以跳过本次执行
|
||||
if skippable, skipReason := n.checkCanSkip(ctx, lastOutput); skippable {
|
||||
n.logger.Warn(fmt.Sprintf("skip this application, because %s", skipReason))
|
||||
n.logger.Info(fmt.Sprintf("skip this application, because %s", skipReason))
|
||||
return nil
|
||||
} else if skipReason != "" {
|
||||
n.logger.Info(fmt.Sprintf("continue to apply, because %s", skipReason))
|
||||
@@ -124,7 +124,7 @@ func (n *applyNode) checkCanSkip(ctx context.Context, lastOutput *domain.Workflo
|
||||
renewalInterval := time.Duration(currentNodeConfig.SkipBeforeExpiryDays) * time.Hour * 24
|
||||
expirationTime := time.Until(lastCertificate.ExpireAt)
|
||||
if expirationTime > renewalInterval {
|
||||
return true, fmt.Sprintf("the certificate has already been issued (expires in %dD, next renewal in %dD)", int(expirationTime.Hours()/24), currentNodeConfig.SkipBeforeExpiryDays)
|
||||
return true, fmt.Sprintf("the certificate has already been issued (expires in %dd, next renewal in %dd)", int(expirationTime.Hours()/24), currentNodeConfig.SkipBeforeExpiryDays)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -55,7 +55,7 @@ func (n *deployNode) Process(ctx context.Context) error {
|
||||
// 检测是否可以跳过本次执行
|
||||
if lastOutput != nil && certificate.CreatedAt.Before(lastOutput.UpdatedAt) {
|
||||
if skippable, skipReason := n.checkCanSkip(ctx, lastOutput); skippable {
|
||||
n.logger.Warn(fmt.Sprintf("skip this deployment, because %s", skipReason))
|
||||
n.logger.Info(fmt.Sprintf("skip this deployment, because %s", skipReason))
|
||||
return nil
|
||||
} else if skipReason != "" {
|
||||
n.logger.Info(fmt.Sprintf("continue to deploy, because %s", skipReason))
|
||||
|
@@ -40,7 +40,7 @@ func (n *uploadNode) Process(ctx context.Context) error {
|
||||
|
||||
// 检测是否可以跳过本次执行
|
||||
if skippable, skipReason := n.checkCanSkip(ctx, lastOutput); skippable {
|
||||
n.logger.Warn(fmt.Sprintf("skip this upload, because %s", skipReason))
|
||||
n.logger.Info(fmt.Sprintf("skip this upload, because %s", skipReason))
|
||||
return nil
|
||||
} else if skipReason != "" {
|
||||
n.logger.Info(fmt.Sprintf("continue to upload, because %s", skipReason))
|
||||
|
Reference in New Issue
Block a user