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
|
||||
.pnp.*
|
||||
|
||||
frontend/.tanstack/tmp/2249110e-da91fb0b1b87b6c4cc3e2c2cd25037fd
|
||||
|
||||
@@ -48,7 +48,7 @@ export const Route = createFileRoute("/admin/servers")({
|
||||
const ServerTable = () => {
|
||||
const { data, refetch } = useSuspenseQuery(servers());
|
||||
const columnHelper = createColumnHelper<any>();
|
||||
|
||||
const okToUpdate = ["localhost", "usmcd1olp082"];
|
||||
const columns = [
|
||||
columnHelper.accessor("name", {
|
||||
header: ({ column }) => (
|
||||
@@ -75,6 +75,10 @@ const ServerTable = () => {
|
||||
),
|
||||
cell: (i) => <span>{i.getValue()}</span>,
|
||||
}),
|
||||
];
|
||||
|
||||
if (okToUpdate.includes(window.location.hostname)) {
|
||||
columns.push(
|
||||
columnHelper.accessor("lastUpdated", {
|
||||
header: ({ column }) => (
|
||||
<SearchableHeader column={column} title="Last Update" />
|
||||
@@ -148,7 +152,8 @@ const ServerTable = () => {
|
||||
);
|
||||
},
|
||||
}),
|
||||
];
|
||||
);
|
||||
}
|
||||
|
||||
return <LstTable data={data} columns={columns} />;
|
||||
};
|
||||
@@ -158,6 +163,7 @@ function RouteComponent() {
|
||||
|
||||
const columnHelper = createColumnHelper<any>();
|
||||
|
||||
console.log(window.location);
|
||||
const logColumns = [
|
||||
columnHelper.accessor("timestamp", {
|
||||
header: ({ column }) => (
|
||||
|
||||
Reference in New Issue
Block a user