Datenbank Reiter in der Einstellungen-Seite
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
// /apiMockData/SERVICE/SystemMockData.js
|
// /apiMockData/SERVICE/SystemMockData.js
|
||||||
var win_appVersion = "0.02";
|
var win_appVersion = "0.02";
|
||||||
var win_deviceName = "CPLV4_Maschen";
|
var win_deviceName = "CPLV4_Ismail_Mockup";
|
||||||
var win_mac1 = "0 48 86 81 46 143";
|
var win_mac1 = "0 48 86 81 46 143";
|
||||||
var win_ip = "10.10.0.243";
|
var win_ip = "10.10.0.243";
|
||||||
var win_subnet = "255.255.255.0";
|
var win_subnet = "255.255.255.0";
|
||||||
|
|||||||
32
components/main/settingsPageComponents/DatabaseSettings.tsx
Normal file
32
components/main/settingsPageComponents/DatabaseSettings.tsx
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
// /components/main/settingsPageComponents/DatabaseSettings.tsx
|
||||||
|
"use client";
|
||||||
|
import React from "react";
|
||||||
|
import handleClearDatabase from "./handlers/handleClearDatabase";
|
||||||
|
|
||||||
|
const DatabaseSettings: React.FC = () => {
|
||||||
|
return (
|
||||||
|
<div className="p-6 md:p-3 bg-gray-100 max-w-5xl mr-auto">
|
||||||
|
<h2 className="text-sm md:text-md font-bold mb-2">
|
||||||
|
Datenbank Einstellungen
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<div className="mb-3">
|
||||||
|
<p className="text-xs text-gray-700 mb-2">
|
||||||
|
Datenbankfunktionen wie Löschen, Export oder Reset. Weitere Funktionen
|
||||||
|
folgen.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
{/* ✅ Button: Datenbank leeren */}
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
onClick={handleClearDatabase}
|
||||||
|
className="bg-red-500 text-white px-3 py-1 rounded text-xs"
|
||||||
|
>
|
||||||
|
Datenbank leeren
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default DatabaseSettings;
|
||||||
@@ -256,13 +256,7 @@ const GeneralSettings: React.FC = () => {
|
|||||||
>
|
>
|
||||||
Neustart CPL
|
Neustart CPL
|
||||||
</button>
|
</button>
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
className="bg-littwin-blue text-white px-2 py-1 rounded text-xs w-full md:w-auto"
|
|
||||||
onClick={() => handleClearDatabase()}
|
|
||||||
>
|
|
||||||
Datenbank leeren
|
|
||||||
</button>
|
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className="bg-littwin-blue text-white px-2 py-1 rounded text-xs w-full md:w-auto"
|
className="bg-littwin-blue text-white px-2 py-1 rounded text-xs w-full md:w-auto"
|
||||||
|
|||||||
@@ -6,5 +6,5 @@
|
|||||||
2: Patch oder Hotfix (Bugfixes oder kleine Änderungen).
|
2: Patch oder Hotfix (Bugfixes oder kleine Änderungen).
|
||||||
|
|
||||||
*/
|
*/
|
||||||
const webVersion = "1.6.274";
|
const webVersion = "1.6.275";
|
||||||
export default webVersion;
|
export default webVersion;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import { useAppDispatch } from "../redux/store";
|
|||||||
import { fetchSystemSettingsThunk } from "../redux/thunks/fetchSystemSettingsThunk";
|
import { fetchSystemSettingsThunk } from "../redux/thunks/fetchSystemSettingsThunk";
|
||||||
import GeneralSettings from "../components/main/settingsPageComponents/GeneralSettings";
|
import GeneralSettings from "../components/main/settingsPageComponents/GeneralSettings";
|
||||||
import OPCUAInterfaceSettings from "../components/main/settingsPageComponents/OPCUAInterfaceSettings";
|
import OPCUAInterfaceSettings from "../components/main/settingsPageComponents/OPCUAInterfaceSettings";
|
||||||
|
import DatabaseSettings from "../components/main/settingsPageComponents/DatabaseSettings";
|
||||||
|
|
||||||
export default function Settings() {
|
export default function Settings() {
|
||||||
const [activeTab, setActiveTab] = useState("tab1");
|
const [activeTab, setActiveTab] = useState("tab1");
|
||||||
@@ -37,12 +38,23 @@ export default function Settings() {
|
|||||||
>
|
>
|
||||||
OPCUA
|
OPCUA
|
||||||
</button>
|
</button>
|
||||||
|
<button
|
||||||
|
className={`px-4 py-2 ${
|
||||||
|
activeTab === "tab3"
|
||||||
|
? "border-b-2 border-blue-500 text-blue-500"
|
||||||
|
: ""
|
||||||
|
}`}
|
||||||
|
onClick={() => setActiveTab("tab3")}
|
||||||
|
>
|
||||||
|
Datenbank
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Tab-Inhalt */}
|
{/* Tab-Inhalt */}
|
||||||
<div className="mt-4">
|
<div className="mt-4">
|
||||||
{activeTab === "tab1" && <GeneralSettings />}
|
{activeTab === "tab1" && <GeneralSettings />}
|
||||||
{activeTab === "tab2" && <OPCUAInterfaceSettings />}
|
{activeTab === "tab2" && <OPCUAInterfaceSettings />}
|
||||||
|
{activeTab === "tab3" && <DatabaseSettings />}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user