mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-21 08:03:13 +09:00
Add hook to add extra content to Web UI pages
Allow plugins to extend Web UI pages provided by Clusterio by adding components in the componentExtra property of the plugin.
This commit is contained in:
1 parent
68b8ac6b8c
commit
5319ff3907
11 files changed
+73
-1
No files matched your search
@@ -1,6 +1,7 @@
|
||||
import React from "react";
|
||||
import { Typography } from "antd";
|
||||
|
||||
import PluginExtra from "./PluginExtra";
|
||||
import LogConsole from "./LogConsole";
|
||||
import { useAccount } from "../model/account";
|
||||
import MasterConfigTree from "./MasterConfigTree";
|
||||
@@ -9,7 +10,7 @@ import PageLayout from "./PageLayout";
|
||||
const { Title } = Typography;
|
||||
|
||||
|
||||
export default function SlavesPage() {
|
||||
export default function MasterPage() {
|
||||
let account = useAccount();
|
||||
|
||||
return <PageLayout nav={[{ name: "Master" }]}>
|
||||
@@ -19,5 +20,6 @@ export default function SlavesPage() {
|
||||
<LogConsole master={true} />
|
||||
</>}
|
||||
{account.hasPermission("core.master.get_config") && <MasterConfigTree />}
|
||||
<PluginExtra component="MasterPage" />
|
||||
</PageLayout>;
|
||||
};
|
||||
Reference in new issue
Block a user