-
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #81 from sinamics/rework_fetching
Reduce reliance on the database
- Loading branch information
Showing
41 changed files
with
542 additions
and
442 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
Warnings: | ||
- You are about to drop the column `ipAssignments` on the `network` table. All the data in the column will be lost. | ||
- You are about to drop the column `activeBridge` on the `network_members` table. All the data in the column will be lost. | ||
- You are about to drop the column `authorized` on the `network_members` table. All the data in the column will be lost. | ||
- You are about to drop the column `capabilities` on the `network_members` table. All the data in the column will be lost. | ||
- You are about to drop the column `conStatus` on the `network_members` table. All the data in the column will be lost. | ||
- You are about to drop the column `identity` on the `network_members` table. All the data in the column will be lost. | ||
- You are about to drop the column `ipAssignments` on the `network_members` table. All the data in the column will be lost. | ||
- You are about to drop the column `lastAuthorizedTime` on the `network_members` table. All the data in the column will be lost. | ||
- You are about to drop the column `lastDeauthorizedTime` on the `network_members` table. All the data in the column will be lost. | ||
- You are about to drop the column `noAutoAssignIps` on the `network_members` table. All the data in the column will be lost. | ||
- You are about to drop the column `objtype` on the `network_members` table. All the data in the column will be lost. | ||
- You are about to drop the column `revision` on the `network_members` table. All the data in the column will be lost. | ||
- You are about to drop the column `tags` on the `network_members` table. All the data in the column will be lost. | ||
- You are about to drop the column `vRev` on the `network_members` table. All the data in the column will be lost. | ||
*/ | ||
-- AlterTable | ||
ALTER TABLE "network" DROP COLUMN "ipAssignments"; | ||
|
||
-- AlterTable | ||
ALTER TABLE "network_members" DROP COLUMN "activeBridge", | ||
DROP COLUMN "authorized", | ||
DROP COLUMN "capabilities", | ||
DROP COLUMN "conStatus", | ||
DROP COLUMN "identity", | ||
DROP COLUMN "ipAssignments", | ||
DROP COLUMN "lastAuthorizedTime", | ||
DROP COLUMN "lastDeauthorizedTime", | ||
DROP COLUMN "noAutoAssignIps", | ||
DROP COLUMN "objtype", | ||
DROP COLUMN "revision", | ||
DROP COLUMN "tags", | ||
DROP COLUMN "vRev"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { useState } from "react"; | ||
import CodeMirror from "@uiw/react-codemirror"; | ||
import { okaidia } from "@uiw/codemirror-theme-okaidia"; | ||
import { python } from "@codemirror/lang-python"; | ||
|
||
interface Idata { | ||
data: unknown; | ||
title: string; | ||
isOpen?: () => void; | ||
} | ||
|
||
const DebugMirror = ({ data, title }: Idata) => { | ||
const [isOpen, setIsOpen] = useState(false); | ||
|
||
if (!data) return null; | ||
|
||
return ( | ||
<div | ||
tabIndex={0} | ||
onClick={() => setIsOpen(!isOpen)} | ||
className="collapse-arrow collapse w-full border border-base-300 bg-base-200" | ||
> | ||
<input type="checkbox" /> | ||
<div className="collapse-title">{title}</div> | ||
<div className="collapse-content" style={{ width: "100%" }}> | ||
<CodeMirror | ||
tabIndex={0} | ||
value={JSON.stringify(data, null, 2)} | ||
maxHeight="1500px" | ||
width="100%" | ||
theme={okaidia} | ||
extensions={[python()]} | ||
basicSetup={{ | ||
lineNumbers: true, | ||
highlightActiveLineGutter: false, | ||
highlightActiveLine: false, | ||
}} | ||
/> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default DebugMirror; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.