refactor(server): server updates can now only be done from a dev pc
All checks were successful
Build and Push LST Docker Image / docker (push) Successful in 1m54s
All checks were successful
Build and Push LST Docker Image / docker (push) Successful in 1m54s
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -149,3 +149,4 @@ dist
|
|||||||
.yarn/install-state.gz
|
.yarn/install-state.gz
|
||||||
.pnp.*
|
.pnp.*
|
||||||
|
|
||||||
|
frontend/.tanstack/tmp/2249110e-da91fb0b1b87b6c4cc3e2c2cd25037fd
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ export const Route = createFileRoute("/admin/servers")({
|
|||||||
const ServerTable = () => {
|
const ServerTable = () => {
|
||||||
const { data, refetch } = useSuspenseQuery(servers());
|
const { data, refetch } = useSuspenseQuery(servers());
|
||||||
const columnHelper = createColumnHelper<any>();
|
const columnHelper = createColumnHelper<any>();
|
||||||
|
const okToUpdate = ["localhost", "usmcd1olp082"];
|
||||||
const columns = [
|
const columns = [
|
||||||
columnHelper.accessor("name", {
|
columnHelper.accessor("name", {
|
||||||
header: ({ column }) => (
|
header: ({ column }) => (
|
||||||
@@ -75,6 +75,10 @@ const ServerTable = () => {
|
|||||||
),
|
),
|
||||||
cell: (i) => <span>{i.getValue()}</span>,
|
cell: (i) => <span>{i.getValue()}</span>,
|
||||||
}),
|
}),
|
||||||
|
];
|
||||||
|
|
||||||
|
if (okToUpdate.includes(window.location.hostname)) {
|
||||||
|
columns.push(
|
||||||
columnHelper.accessor("lastUpdated", {
|
columnHelper.accessor("lastUpdated", {
|
||||||
header: ({ column }) => (
|
header: ({ column }) => (
|
||||||
<SearchableHeader column={column} title="Last Update" />
|
<SearchableHeader column={column} title="Last Update" />
|
||||||
@@ -148,7 +152,8 @@ const ServerTable = () => {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
];
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return <LstTable data={data} columns={columns} />;
|
return <LstTable data={data} columns={columns} />;
|
||||||
};
|
};
|
||||||
@@ -158,6 +163,7 @@ function RouteComponent() {
|
|||||||
|
|
||||||
const columnHelper = createColumnHelper<any>();
|
const columnHelper = createColumnHelper<any>();
|
||||||
|
|
||||||
|
console.log(window.location);
|
||||||
const logColumns = [
|
const logColumns = [
|
||||||
columnHelper.accessor("timestamp", {
|
columnHelper.accessor("timestamp", {
|
||||||
header: ({ column }) => (
|
header: ({ column }) => (
|
||||||
|
|||||||
Reference in New Issue
Block a user