diff --git a/frontend/src/components/resources/stack/index.tsx b/frontend/src/components/resources/stack/index.tsx
index 46f4da65b..b33557059 100644
--- a/frontend/src/components/resources/stack/index.tsx
+++ b/frontend/src/components/resources/stack/index.tsx
@@ -2,6 +2,7 @@ import { useInvalidate, useLocalStorage, useRead, useWrite } from "@lib/hooks";
import { RequiredResourceComponents } from "@types";
import { Card } from "@ui/card";
import {
+ CircleArrowUp,
FolderGit,
Layers,
Loader2,
@@ -271,44 +272,7 @@ export const StackComponents: RequiredResourceComponents = {
);
},
- UpdateAvailable: ({ id }) => {
- const info = useStack(id)?.info;
- const state = info?.state ?? Types.StackState.Unknown;
- if (
- !info ||
- !!info?.services.every((service) => !service.update_available) ||
- [Types.StackState.Down, Types.StackState.Unknown].includes(state)
- ) {
- return null;
- }
- return (
-
-
-
-
- Update
- {(info?.services.filter((s) => s.update_available).length ??
- 0) > 0
- ? "s"
- : ""}{" "}
- Available
-
-
-
-
- {info?.services
- .filter((service) => service.update_available)
- .map((s) => (
-
-
{s.service}
-
-
-
{s.image}
-
- ))}
-
-
- );
- },
+ UpdateAvailable: ({ id }) => ,
Hash: ({ id }) => {
const info = useStack(id)?.info;
const fullInfo = useFullStack(id)?.info;
@@ -484,3 +448,48 @@ export const StackComponents: RequiredResourceComponents = {
);
},
};
+
+export const UpdateAvailable = ({
+ id,
+ small = false,
+}: {
+ id: string;
+ small?: boolean;
+}) => {
+ const info = useStack(id)?.info;
+ const state = info?.state ?? Types.StackState.Unknown;
+ if (
+ !info ||
+ !!info?.services.every((service) => !service.update_available) ||
+ [Types.StackState.Down, Types.StackState.Unknown].includes(state)
+ ) {
+ return null;
+ }
+ return (
+
+
+
+
+
+ Update
+ {(info?.services.filter((s) => s.update_available).length ?? 0) > 1
+ ? "s"
+ : ""}{" "}
+ {!small && "Available"}
+
+
+
+
+ {info?.services
+ .filter((service) => service.update_available)
+ .map((s) => (
+
+
{s.service}
+
-
+
{s.image}
+
+ ))}
+
+
+ );
+};
diff --git a/frontend/src/components/resources/stack/table.tsx b/frontend/src/components/resources/stack/table.tsx
index a7776bb93..bec69b601 100644
--- a/frontend/src/components/resources/stack/table.tsx
+++ b/frontend/src/components/resources/stack/table.tsx
@@ -2,7 +2,7 @@ import { useRead, useSelectedResources } from "@lib/hooks";
import { DataTable, SortableHeader } from "@ui/data-table";
import { ResourceLink } from "../common";
import { TableTags } from "@components/tags";
-import { StackComponents } from ".";
+import { StackComponents, UpdateAvailable } from ".";
import { Types } from "komodo_client";
import { useCallback } from "react";
@@ -29,7 +29,14 @@ export const StackTable = ({ stacks }: { stacks: Types.StackListItem[] }) => {
header: ({ column }) => (
),
- cell: ({ row }) => ,
+ cell: ({ row }) => {
+ return (
+
+
+
+
+ );
+ },
size: 200,
},
{