Settings
+ ) +} diff --git a/plc4j/tools/ui/frontend/frontend/src/pages/Inspect.tsx b/plc4j/tools/ui/frontend/frontend/src/pages/Inspect.tsx new file mode 100644 index 00000000000..f00735425b6 --- /dev/null +++ b/plc4j/tools/ui/frontend/frontend/src/pages/Inspect.tsx @@ -0,0 +1,140 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import {TabPanel, TabView} from "primereact/tabview"; +import {Splitter, SplitterPanel} from "primereact/splitter"; +import {ScrollPanel} from "primereact/scrollpanel"; +import NavigationTree from "../components/NavigationTree.tsx"; +import PlcConnection from "../components/PlcConnection.tsx"; +import { useSelector } from "react-redux"; +import {Device, Driver} from "../generated/plc4j-tools-ui-frontend.ts"; +import {TreeItemData} from "../model/TreeItemData.ts"; +import {RootState} from "../store"; + +function getByDriverTree(driverList: Driver[], deviceList: Device[]):TreeItemData[] { + console.log("getByDriverTree " + JSON.stringify(driverList) + " " + JSON.stringify(deviceList)) + if(driverList && deviceList) { + const driverMap = new MapMQTT
+ ) +} diff --git a/plc4j/tools/ui/frontend/frontend/src/pages/OpcUa.tsx b/plc4j/tools/ui/frontend/frontend/src/pages/OpcUa.tsx new file mode 100644 index 00000000000..9f75a32fb8e --- /dev/null +++ b/plc4j/tools/ui/frontend/frontend/src/pages/OpcUa.tsx @@ -0,0 +1,24 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +export default function Inspect() { + return ( +OPC-UA
+ ) +} diff --git a/plc4j/tools/ui/frontend/frontend/src/pages/Settings.tsx b/plc4j/tools/ui/frontend/frontend/src/pages/Settings.tsx new file mode 100644 index 00000000000..e786aa5694c --- /dev/null +++ b/plc4j/tools/ui/frontend/frontend/src/pages/Settings.tsx @@ -0,0 +1,24 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +export default function Inspect() { + return ( +Settings
+ ) +} diff --git a/plc4j/tools/ui/frontend/frontend/src/store/index.ts b/plc4j/tools/ui/frontend/frontend/src/store/index.ts new file mode 100644 index 00000000000..b9823c9c585 --- /dev/null +++ b/plc4j/tools/ui/frontend/frontend/src/store/index.ts @@ -0,0 +1,91 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import {configureStore, createSlice, PayloadAction} from '@reduxjs/toolkit' +import {Device, Driver} from "../generated/plc4j-tools-ui-frontend.ts"; +import {useDispatch} from "react-redux"; + +export type InitializeConnectionsAction = { + driverList: Driver[] + deviceList: Device[] +} + +export type DeviceAction = { + device: Device +} + +export interface ConnectionsState { + driverList: Driver[] + deviceList: Device[] +} + +const connectionsInitialState: ConnectionsState = { + driverList: [] as Driver[], + deviceList: [] as Device[], +} + +const connectionsSlice = createSlice({ + name: 'connections', + initialState: connectionsInitialState, + reducers: { + initializeLists: (state, action: PayloadAction