in gui/frontend/src/modules/db-editor/DocumentSideBar/DocumentSideBar.tsx [868:1146]
private renderMrsTreeContextMenus(): ComponentChild {
return (
<>
<Menu
id="mrsRootContextMenu"
ref={this.cdmTypeToMenuRefMap.get(CdmEntityType.MrsRoot)}
placement={ComponentPlacement.BottomLeft}
onItemClick={this.handleMrsContextMenuItemClick}
>
<MenuItem
command={{
title: "Configure MySQL REST Service",
command: "msg.mrs.configureMySQLRestService",
}}
/>
<MenuItem command={{ title: "-", command: "" }} disabled />
<MenuItem command={{ title: "Add REST Service...", command: "msg.mrs.addService" }} />
<MenuItem command={{ title: "-", command: "" }} disabled />
<MenuItem
command={{ title: "Enable MySQL REST Service", command: "msg.mrs.enableMySQLRestService" }}
/>
<MenuItem
command={{ title: "Disable MySQL REST Service", command: "msg.mrs.disableMySQLRestService" }}
/>
<MenuItem command={{ title: "-", command: "" }} disabled />
<MenuItem
command={{ title: "Show Private Items", command: "msg.mrs.showPrivateItems" }}
altCommand={{ title: "Hide Private Items", command: "msg.mrs.hidePrivateItems" }}
/>
<MenuItem command={{ title: "-", command: "" }} disabled />
<MenuItem
command={{
title: "Bootstrap Local MySQL Router Instance", command: "msg.mrs.bootstrapLocalRouter",
}}
disabled
/>
<MenuItem
command={{ title: "Start Local MySQL Router Instance", command: "msg.mrs.startLocalRouter" }}
disabled
/>
<MenuItem
command={{ title: "Stop Local MySQL Router Instance", command: "msg.mrs.stopLocalRouter" }}
disabled
/>
<MenuItem
command={{ title: "Kill Local MySQL Router Instances", command: "msg.mrs.killLocalRouters" }}
disabled
/>
<MenuItem command={{ title: "-", command: "" }} disabled />
<MenuItem
command={{ title: "Browse the MySQL REST Service Documentation", command: "msg.mrs.docs" }}
/>
</Menu>
<Menu
id="mrsServiceMenu"
ref={this.cdmTypeToMenuRefMap.get(CdmEntityType.MrsService)}
placement={ComponentPlacement.BottomLeft}
onItemClick={this.handleMrsContextMenuItemClick}
>
<MenuItem command={{ title: "Edit REST Service...", command: "msg.mrs.editService" }} />
<MenuItem
command={{ title: "Set as Current REST Service", command: "msg.mrs.setCurrentService" }}
/>
<MenuItem command={{ title: "-", command: "" }} disabled />
<MenuItem command={{ title: "Load from Disk", command: "" }} >
<MenuItem
command={{
title: "REST Schema From JSON File...",
command: "msg.mrs.loadSchemaFromJSONFile",
}}
disabled
/>
</MenuItem>
<MenuItem command={{ title: "Dump to Disk", command: "" }}>
<MenuItem
command={{ title: "REST Client SDK Files...", command: "msg.mrs.exportServiceSdk" }}
disabled
/>
<MenuItem command={{ title: "-", command: "" }} disabled />
</MenuItem>
<MenuItem command={{ title: "Copy to Clipboard", command: "" }}>
<MenuItem
command={{
title: "Copy CREATE REST SERVICE Statement",
command: "msg.mrs.copyCreateServiceSql",
}}
/>
<MenuItem
command={{
title: "Copy CREATE REST SERVICE Statement Including Database Objects",
command: "msg.mrs.copyCreateServiceSqlIncludeDatabaseEndpoints",
}}
/>
</MenuItem>
<MenuItem command={{ title: "-", command: "" }} disabled />
<MenuItem command={{
title: "Add and Link REST Authentication App...",
command: "msg.mrs.addAuthApp",
}} />
<MenuItem command={{ title: "Link REST Authentication App...", command: "msg.mrs.linkAuthApp" }} />
<MenuItem command={{ title: "-", command: "" }} disabled />
<MenuItem command={{ title: "Delete REST Service...", command: "msg.mrs.deleteService" }} />
<MenuItem command={{ title: "-", command: "" }} disabled />
<MenuItem command={{ title: "MRS Service Documentation", command: "msg.mrs.docs.service" }} />
</Menu>
<Menu
id="mrsRouterMenu"
ref={this.cdmTypeToMenuRefMap.get(CdmEntityType.MrsRouter)}
placement={ComponentPlacement.BottomLeft}
onItemClick={this.handleMrsContextMenuItemClick}
>
<MenuItem command={{ title: "Delete Router...", command: "msg.mrs.deleteRouter" }} />
</Menu>
<Menu
id="mrsSchemaMenu"
ref={this.cdmTypeToMenuRefMap.get(CdmEntityType.MrsSchema)}
placement={ComponentPlacement.BottomLeft}
onItemClick={this.handleMrsContextMenuItemClick}
>
<MenuItem command={{ title: "Edit REST Schema...", command: "msg.mrs.editSchema" }} />
<MenuItem command={{ title: "-", command: "" }} disabled />
<MenuItem command={{ title: "Load from Disk", command: "" }} >
<MenuItem
command={{
title: "REST Object From JSON File...",
command: "msg.mrs.loadObjectFromJSONFile",
}}
disabled
/>
</MenuItem>
<MenuItem command={{ title: "Dump to Disk", command: "" }}>
<MenuItem
command={{
title: "Dump REST Schema To JSON File...",
command: "msg.mrs.dumpSchemaToJSONFile",
}}
disabled
/>
<MenuItem command={{ title: "-", command: "" }} disabled />
<MenuItem
command={{
title: "Dump CREATE REST SCHEMA Statement...",
command: "msg.mrs.dumpCreateSchemaSql",
}}
disabled
/>
<MenuItem
command={{
title: "Dump CREATE REST SCHEMA Statement Including Database Objects...",
command: "msg.mrs.dumpCreateSchemaSqlIncludeDatabaseEndpoints",
}}
disabled
/>
</MenuItem>
<MenuItem command={{ title: "Copy to Clipboard", command: "" }}>
<MenuItem
command={{
title: "Copy CREATE REST SCHEMA Statement",
command: "msg.mrs.copyCreateSchemaSql",
}}
/>
<MenuItem
command={{
title: "Copy CREATE REST SCHEMA Statement Including Database Objects",
command: "msg.mrs.copyCreateSchemaSqlIncludeDatabaseEndpoints",
}}
/>
</MenuItem>
<MenuItem command={{ title: "-", command: "" }} disabled />
<MenuItem command={{ title: "Delete REST Schema...", command: "msg.mrs.deleteSchema" }} />
</Menu>
<Menu
id="mrsAuthAppGroupMenu"
ref={this.cdmTypeToMenuRefMap.get(CdmEntityType.MrsAuthAppGroup)}
placement={ComponentPlacement.BottomLeft}
onItemClick={this.handleMrsContextMenuItemClick}
>
<MenuItem command={{ title: "Add New Authentication App", command: "msg.mrs.addAuthApp" }} />
</Menu>
<Menu
id="mrsAuthAppMenu"
ref={this.cdmTypeToMenuRefMap.get(CdmEntityType.MrsAuthApp)}
placement={ComponentPlacement.BottomLeft}
onItemClick={this.handleMrsContextMenuItemClick}
>
<MenuItem command={{ title: "Edit REST Authentication App...", command: "msg.mrs.editAuthApp" }} />
<MenuItem command={{ title: "-", command: "" }} disabled />
<MenuItem command={{
title: "Link REST Authentication App to REST Service...",
command: "msg.mrs.linkToService",
}} />
<MenuItem command={{ title: "Add REST User...", command: "msg.mrs.addUser" }} />
<MenuItem command={{ title: "-", command: "" }} disabled />
<MenuItem command={{
title: "Delete REST Authentication App...",
command: "msg.mrs.deleteAuthApp",
}} />
</Menu>
<Menu
id="mrsServiceAuthAppMenu"
ref={this.cdmTypeToMenuRefMap.get(CdmEntityType.MrsServiceAuthApp)}
placement={ComponentPlacement.BottomLeft}
onItemClick={this.handleMrsContextMenuItemClick}
>
<MenuItem command={{
title: "Unlink REST Authentication App...",
command: "msg.mrs.unlinkAuthApp",
}} />
</Menu>
<Menu
id="mrsUserMenu"
ref={this.cdmTypeToMenuRefMap.get(CdmEntityType.MrsUser)}
placement={ComponentPlacement.BottomLeft}
onItemClick={this.handleMrsContextMenuItemClick}
>
<MenuItem command={{ title: "Edit User...", command: "msg.mrs.editUser" }} />
<MenuItem command={{ title: "-", command: "" }} disabled />
<MenuItem command={{ title: "Delete User...", command: "msg.mrs.deleteUser" }} />
</Menu>
<Menu
id="mrsDbObjectMenu"
ref={this.cdmTypeToMenuRefMap.get(CdmEntityType.MrsDbObject)}
placement={ComponentPlacement.BottomLeft}
onItemClick={this.handleMrsContextMenuItemClick}
>
<MenuItem command={{ title: "Edit REST Object...", command: "msg.mrs.editDbObject" }} />
<MenuItem command={{ title: "-", command: "" }} disabled />
<MenuItem
command={{
title: "Open REST Object Request Path in Web Browser",
command: "msg.mrs.openDbObjectRequestPath",
}}
/>
<MenuItem command={{ title: "Dump to Disk", command: "" }}>
<MenuItem
command={{
title: "Export REST Object To JSON File...",
command: "msg.mrs.dumpObjectToJSONFile",
}}
disabled
/>
<MenuItem command={{ title: "-", command: "" }} disabled />
<MenuItem
command={{
title: "Export CREATE REST OBJECT Statement...",
command: "msg.mrs.exportCreateDbObjectSql",
}}
disabled
/>
</MenuItem>
<MenuItem command={{ title: "Copy to Clipboard", command: "" }}>
<MenuItem
command={{
title: "Copy REST Object Request Path",
command: "msg.mrs.copyDbObjectRequestPath",
}}
/>
<MenuItem command={{ title: "-", command: "" }} disabled />
<MenuItem
command={{
title: "Copy CREATE REST Object Statement",
command: "msg.mrs.copyCreateDbObjectSql",
}}
/>
</MenuItem>
<MenuItem command={{ title: "-", command: "" }} disabled />
<MenuItem command={{ title: "Delete REST Object...", command: "msg.mrs.deleteDbObject" }} />
</Menu>
</>
);
}