PostgreSQL backup tool with Point-In-Time-Recovery and restore verification
TypeScript backupbackupsdatabasedatabase-backupdevopsdockergolangkubernetesmariadbmongodbmysqlpgpostgrespostgresqls3self-hostedsystem-administrationtoolsweb-ui
FEATURE (databases): Reload databases list once a minute
Rostislav Duginda6ac38ce145
diff --git a/frontend/src/features/databases/ui/DatabasesComponent.tsx b/frontend/src/features/databases/ui/DatabasesComponent.tsxindex e5c4889a..b8757851 100644--- a/frontend/src/features/databases/ui/DatabasesComponent.tsx+++ b/frontend/src/features/databases/ui/DatabasesComponent.tsx@@ -17,8 +17,10 @@ export const DatabasesComponent = ({ contentHeight }: Props) => {const [isShowAddDatabase, setIsShowAddDatabase] = useState(false);const [selectedDatabaseId, setSelectedDatabaseId] = useState<string | undefined>(undefined);- const loadDatabases = () => {- setIsLoading(true);+ const loadDatabases = (isSilent = false) => {+ if (!isSilent) {+ setIsLoading(true);+ }databaseApi.getDatabases()@@ -34,6 +36,12 @@ export const DatabasesComponent = ({ contentHeight }: Props) => {useEffect(() => {loadDatabases();++ const interval = setInterval(() => {+ loadDatabases(true);+ }, 60_000);++ return () => clearInterval(interval);}, []);if (isLoading) {@@ -47,7 +55,10 @@ export const DatabasesComponent = ({ contentHeight }: Props) => {return (<><div className="flex grow">- <div className="mx-3 min-w-[250px] w-[250px] overflow-y-auto" style={{ height: contentHeight }}>+ <div+ className="mx-3 w-[250px] min-w-[250px] overflow-y-auto"+ style={{ height: contentHeight }}+ >{databases.map((database) => (<DatabaseCardComponentkey={database.id}