Skip to content

Commit

Permalink
Update: enable/disable style in web page
Browse files Browse the repository at this point in the history
  • Loading branch information
hanc00l committed Apr 15, 2023
1 parent c9d22d4 commit a8d0235
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 3 deletions.
12 changes: 11 additions & 1 deletion web/static/js/server/org-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,17 @@ $(function () {
},
{data: "index", title: "序号", width: "5%"},
{data: "org_name", title: "组织名称", width: "30%"},
{data: "status", title: "状态", width: "5%"},
{
data: "status", title: "状态", width: "5%",
"render": function (data, type, row, meta) {
if (data === "disable") {
return '<span class="badge badge-secondary">Disable</span>';
} else {
return '<span class="badge badge-success">Enable</span>';
}

}
},
{data: "sort_order", title: "排序", width: "8%"},
{data: "create_time", title: "创建时间", width: "15%"},
{data: "update_time", title: "更新时间", width: "15%"},
Expand Down
12 changes: 11 additions & 1 deletion web/static/js/server/user-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,17 @@ $(function () {
},
{data: "user_role", title: "用户类型", width: "8%"},
{data: "user_description", title: "用户描述", width: "15%"},
{data: "state", title: "状态", width: "5%"},
{
data: "state", title: "状态", width: "5%",
"render": function (data, type, row, meta) {
if (data === "disable") {
return '<span class="badge badge-secondary">Disable</span>';
} else {
return '<span class="badge badge-success">Enable</span>';
}

}
},
{data: "sort_order", title: "排序", width: "8%"},
{data: "create_time", title: "创建时间", width: "12%"},
{data: "update_time", title: "更新时间", width: "12%"},
Expand Down
12 changes: 11 additions & 1 deletion web/static/js/server/workspace-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,17 @@ $(function () {
{data: "index", title: "序号", width: "5%"},
{data: "workspace_name", title: "工作空间名称", width: "15%"},
{data: "workspace_guid", title: "GUID", width: "25%"},
{data: "state", title: "状态", width: "5%"},
{
data: "state", title: "状态", width: "5%",
"render": function (data, type, row, meta) {
if (data === "disable") {
return '<span class="badge badge-secondary">Disable</span>';
} else {
return '<span class="badge badge-success">Enable</span>';
}

}
},
{data: "sort_order", title: "排序", width: "8%"},
{data: "create_time", title: "创建时间", width: "15%"},
{data: "update_time", title: "更新时间", width: "15%"},
Expand Down

0 comments on commit a8d0235

Please sign in to comment.