Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

增强js workflow_type_formatter和workflow_status_formatter方法兼容性. #2622

Merged
merged 2 commits into from
May 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions common/static/dist/js/formatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ function sqlworkflowStatus_formatter(value) {
}

function workflow_type_formatter(value) {
// 检查value是否为字符串,并将其转换为整数
if (typeof value === "string") {
value = parseInt(value, 10);
}
if (value === workflow_type.query) {
return workflow_type.query_display
}
Expand All @@ -73,6 +77,10 @@ function workflow_type_formatter(value) {
}

function workflow_status_formatter(value) {
// 检查value是否为字符串,并将其转换为整数
if (typeof value === "string") {
value = parseInt(value, 10);
}
if (value === workflow_status.audit_wait) {
return "<span class='label label-info'>" + workflow_status.audit_wait_display + " </span>"
}
Expand Down
Loading