Skip to content

PostgreSQL backup tool with Point-In-Time-Recovery and restore verification

FIX (storages): Do not prefill 445 port for NAS as default value just in UI

Rostislav Dugin13f2d3938fe5
diff --git a/frontend/src/features/storages/ui/edit/EditStorageComponent.tsx b/frontend/src/features/storages/ui/edit/EditStorageComponent.tsx
index d9787e83..bacc08b3 100644
--- a/frontend/src/features/storages/ui/edit/EditStorageComponent.tsx
+++ b/frontend/src/features/storages/ui/edit/EditStorageComponent.tsx
@@ -102,7 +102,7 @@ export function EditStorageComponent({
if (type === StorageType.NAS) {
storage.nasStorage = {
host: '',
- port: 0,
+ port: 445,
share: '',
username: '',
password: '',
@@ -138,9 +138,13 @@ export function EditStorageComponent({
}, [editingStorage]);
const isAllDataFilled = () => {
- if (!storage) return false;
+ if (!storage) {
+ return false;
+ }
- if (!storage.name) return false;
+ if (!storage.name) {
+ return false;
+ }
if (storage.type === StorageType.LOCAL) {
return true; // No additional settings required for local storage
diff --git a/frontend/src/features/storages/ui/edit/storages/EditNASStorageComponent.tsx b/frontend/src/features/storages/ui/edit/storages/EditNASStorageComponent.tsx
index f2ac7d08..3cd4cca4 100644
--- a/frontend/src/features/storages/ui/edit/storages/EditNASStorageComponent.tsx
+++ b/frontend/src/features/storages/ui/edit/storages/EditNASStorageComponent.tsx
@@ -12,16 +12,6 @@ interface Props {
export function EditNASStorageComponent({ storage, setStorage, setIsUnsaved }: Props) {
return (
<>
- <div className="mb-2 flex items-center">
- <div className="min-w-[110px]" />
-
- <div className="text-xs text-blue-600">
- <a href="https://postgresus.com/nas-storage" target="_blank" rel="noreferrer">
- How to connect NAS storage?
- </a>
- </div>
- </div>
-
<div className="mb-1 flex items-center">
<div className="min-w-[110px]">Host</div>
<Input
@@ -47,7 +37,7 @@ export function EditNASStorageComponent({ storage, setStorage, setIsUnsaved }: P
<div className="mb-1 flex items-center">
<div className="min-w-[110px]">Port</div>
<InputNumber
- value={storage?.nasStorage?.port || 445}
+ value={storage?.nasStorage?.port}
onChange={(value) => {
if (!storage?.nasStorage || !value) return;