diff --git a/app/routes/machines/components/machine-row.tsx b/app/routes/machines/components/machine-row.tsx index 4d2da34..77e0087 100644 --- a/app/routes/machines/components/machine-row.tsx +++ b/app/routes/machines/components/machine-row.tsx @@ -71,7 +71,7 @@ export default function MachineRow({

{mapTagsToComponents(node, uiTags)} - {node.validTags.map((tag) => ( + {node.tags.map((tag) => ( ))}
diff --git a/app/routes/machines/dialogs/tags.tsx b/app/routes/machines/dialogs/tags.tsx index bbc280f..e36156f 100644 --- a/app/routes/machines/dialogs/tags.tsx +++ b/app/routes/machines/dialogs/tags.tsx @@ -21,7 +21,7 @@ export default function Tags({ setIsOpen, existingTags, }: TagsProps) { - const [tags, setTags] = useState(machine.forcedTags); + const [tags, setTags] = useState(machine.tags); const [tag, setTag] = useState('tag:'); const tagIsInvalid = useMemo(() => { return tag.length === 0 || !tag.startsWith('tag:') || tags.includes(tag); diff --git a/app/routes/machines/machine.tsx b/app/routes/machines/machine.tsx index 0b751f0..cf17bba 100644 --- a/app/routes/machines/machine.tsx +++ b/app/routes/machines/machine.tsx @@ -41,7 +41,7 @@ export async function loader({ request, params, context }: Route.LoaderArgs) { const lookup = await context.agents?.lookup([node.nodeKey]); const [enhancedNode] = mapNodes([node], lookup); const tags = Array.from( - new Set([...node.validTags, ...node.forcedTags]), + new Set([...node.tags]), ).sort(); return { diff --git a/app/types/Machine.ts b/app/types/Machine.ts index 5d3e27d..3281d67 100644 --- a/app/types/Machine.ts +++ b/app/types/Machine.ts @@ -22,9 +22,7 @@ export interface Machine { | 'REGISTER_METHOD_CLI' | 'REGISTER_METHOD_OIDC'; - forcedTags: string[]; - invalidTags: string[]; - validTags: string[]; + tags: string[]; givenName: string; online: boolean; diff --git a/app/utils/node-info.ts b/app/utils/node-info.ts index 3e54f3c..e41deca 100644 --- a/app/utils/node-info.ts +++ b/app/utils/node-info.ts @@ -56,10 +56,7 @@ export function mapNodes( export function sortNodeTags(nodes: Machine[]): string[] { return Array.from( new Set( - nodes.flatMap(({ validTags, forcedTags }) => [ - ...validTags, - ...forcedTags, - ]), + nodes.flatMap((node) => node.tags), ), ).sort(); }