Skip to content

Commit

Permalink
Filter by up & standby nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
zaelgohary committed Jun 5, 2024
1 parent 484c332 commit 95a5305
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/gridproxy_client/src/builders/gateways.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export enum NodeStatus {
Up = "up",
Down = "down",
Standby = "standby",
UpStandby = "up,standby",
}

export interface GatewaysQuery {
Expand Down
2 changes: 1 addition & 1 deletion packages/gridproxy_client/src/builders/nodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ const NODES_VALIDATOR: BuilderValidator<NodesQuery> = {
freeGpu: assertNatural,
freeIps: assertNatural,
status(value) {
assertIn(value, [NodeStatus.Up, NodeStatus.Down, NodeStatus.Standby]);
assertIn(value, [NodeStatus.Up, NodeStatus.Down, NodeStatus.Standby, NodeStatus.UpStandby]);
},
city: assertString,
country: assertString,
Expand Down
2 changes: 2 additions & 0 deletions packages/playground/src/views/nodes.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
{ title: 'Up', value: NodeStatus.Up },
{ title: 'Down', value: NodeStatus.Down },
{ title: 'Standby', value: NodeStatus.Standby },
{ title: 'Up & Standby', value: NodeStatus.UpStandby },
]"
label="Select Nodes Status"
item-title="title"
Expand Down Expand Up @@ -528,6 +529,7 @@ export default {
loading.value = true;
if (retCount) page.value = 1;
try {
console.log("filters.value.status", filters.value.status);
const { count, data } = await requestNodes(
{
page: page.value,
Expand Down

0 comments on commit 95a5305

Please sign in to comment.