mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: use is-dormant instead of dormant_at (#10191)
This commit is contained in:
@@ -88,10 +88,7 @@ export const DormantWorkspaceBanner = ({
|
||||
) : (
|
||||
<>
|
||||
<span>There are</span>{" "}
|
||||
<Link
|
||||
component={RouterLink}
|
||||
to="/workspaces?filter=dormant_at:1970-01-01"
|
||||
>
|
||||
<Link component={RouterLink} to="/workspaces?filter=is-dormant:true">
|
||||
workspaces
|
||||
</Link>{" "}
|
||||
that may be deleted soon due to inactivity. Activate the workspaces
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@ export const useWorkspacesToBeDeleted = (
|
||||
const { data } = useWorkspacesData({
|
||||
page: 0,
|
||||
limit: 0,
|
||||
query: "template:" + template.name + " dormant_at:1970-01-01",
|
||||
query: "template:" + template.name + " is-dormant:true",
|
||||
});
|
||||
return data?.workspaces?.filter((workspace: Workspace) => {
|
||||
if (!workspace.dormant_at || !formValues.time_til_dormant_autodelete_ms) {
|
||||
|
||||
@@ -68,10 +68,10 @@ const WorkspacesPage: FC = () => {
|
||||
// are at risk of being deleted.
|
||||
useEffect(() => {
|
||||
if (schedulingEnabled) {
|
||||
const includesDormant = filterProps.filter.query.includes("dormant_at");
|
||||
const includesDormant = filterProps.filter.query.includes("is-dormant");
|
||||
const dormantQuery = includesDormant
|
||||
? filterProps.filter.query
|
||||
: filterProps.filter.query + " dormant_at:1970-01-01";
|
||||
: filterProps.filter.query + " is-dormant:true";
|
||||
|
||||
if (includesDormant && data) {
|
||||
setDormantWorkspaces(data.workspaces);
|
||||
|
||||
@@ -17,7 +17,7 @@ export const workspaceFilterQuery = {
|
||||
all: "",
|
||||
running: "status:running",
|
||||
failed: "status:failed",
|
||||
dormant: "dormant_at:1970-01-01",
|
||||
dormant: "is-dormant:true",
|
||||
};
|
||||
|
||||
export const userFilterQuery = {
|
||||
|
||||
Reference in New Issue
Block a user