File tree Expand file tree Collapse file tree 5 files changed +65
-7
lines changed Expand file tree Collapse file tree 5 files changed +65
-7
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,12 @@ var shogunApplicationConfig = {
7070 } ,
7171 logs : {
7272 visible : true
73+ } ,
74+ graphiql : {
75+ visible : true
76+ } ,
77+ swagger : {
78+ visible : true
7379 }
7480 }
7581 }
Original file line number Diff line number Diff line change @@ -10,7 +10,8 @@ import {
1010 TeamOutlined ,
1111 FileTextOutlined ,
1212 TagOutlined ,
13- ApiOutlined
13+ ApiOutlined ,
14+ BranchesOutlined
1415} from '@ant-design/icons' ;
1516
1617import {
@@ -222,6 +223,33 @@ export const Navigation: React.FC<NavigationProps> = ({
222223 } ) ;
223224 }
224225
226+ if ( navigationConf ?. settings ?. graphiql ?. visible ) {
227+ settingsChildren . push ( {
228+ key : 'graphiql' ,
229+ icon : < BranchesOutlined /> ,
230+ label : (
231+ < >
232+ < a href = { `${ window . location . origin } /graphiql?path=/graphql` } target = '_blank' rel = 'noopener noreferrer' >
233+ < span > { t ( 'Navigation.graphiql' ) } </ span >
234+ </ a >
235+ </ >
236+ )
237+ } ) ;
238+ }
239+ if ( navigationConf ?. settings ?. swagger ?. visible ) {
240+ settingsChildren . push ( {
241+ key : 'swagger' ,
242+ icon : < ApiOutlined /> ,
243+ label : (
244+ < >
245+ < a href = { `${ window . location . origin } /swagger-ui/index.html` } target = '_blank' rel = 'noopener noreferrer' >
246+ < span > { t ( 'Navigation.swagger' ) } </ span >
247+ </ a >
248+ </ >
249+ )
250+ } ) ;
251+ }
252+
225253 const items : ItemType [ ] = [ ] ;
226254 if ( navigationContentChildren . length > 0 ) {
227255 items . push ( {
Original file line number Diff line number Diff line change @@ -13,8 +13,10 @@ import {
1313 message
1414} from 'antd' ;
1515import _isEqual from 'lodash/isEqual' ;
16- import { Route ,
17- Routes } from 'react-router-dom' ;
16+ import {
17+ Route ,
18+ Routes
19+ } from 'react-router-dom' ;
1820import {
1921 useSetRecoilState
2022} from 'recoil' ;
Original file line number Diff line number Diff line change @@ -197,11 +197,29 @@ declare module 'shogunApplicationConfig' {
197197 visible : boolean ;
198198 } ;
199199 /**
200- * Configuration for the settings->global menu entry.
200+ * Configuration for the settings->logs menu entry.
201201 */
202202 logs : {
203203 /**
204- * Should the menu include the settings->global menu entry.
204+ * Should the menu include the settings->logs menu entry.
205+ */
206+ visible : boolean ;
207+ } ;
208+ /**
209+ * Configuration for the settings->graphQL menu entry.
210+ */
211+ graphiql : {
212+ /**
213+ * Should the menu include the settings->graphQL menu entry.
214+ */
215+ visible : boolean ;
216+ } ;
217+ /**
218+ * Configuration for the settings->swagger menu entry.
219+ */
220+ swagger : {
221+ /**
222+ * Should the menu include the settings->swagger menu entry.
205223 */
206224 visible : boolean ;
207225 } ;
Original file line number Diff line number Diff line change @@ -43,7 +43,9 @@ export default {
4343 logLevels : 'Logging-Level' ,
4444 configuration : 'Einstellungen' ,
4545 global : 'Global' ,
46- image : 'Bilddateien'
46+ image : 'Bilddateien' ,
47+ graphiql : 'GraphiQL' ,
48+ swagger : 'Swagger'
4749 } ,
4850 GeneralEntityRoot : {
4951 save : '{{entity}} speichern' ,
@@ -318,7 +320,9 @@ export default {
318320 logLevels : 'Logging levels' ,
319321 configuration : 'Configuration' ,
320322 global : 'Global' ,
321- image : 'Images'
323+ image : 'Images' ,
324+ graphiql : 'GraphiQL' ,
325+ swagger : 'Swagger'
322326 } ,
323327 GeneralEntityRoot : {
324328 save : 'Save {{entity}}' ,
You can’t perform that action at this time.
0 commit comments