Skip to content

Commit

Permalink
Merge pull request #397 from ahennr/admin-config
Browse files Browse the repository at this point in the history
Integration of SHOGun admin: Introduce form configuration for applications
  • Loading branch information
ahennr authored Oct 8, 2021
2 parents 40f6530 + 917a567 commit 9e2d8a6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
5 changes: 4 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@

<java.version>17</java.version>

<!-- SHOGun admin -->
<shogun-admin.version>2.0.0</shogun-admin.version>

<!-- Plugins -->
<maven-release-plugin.version>2.5.3</maven-release-plugin.version>
<maven-site-plugin.version>3.9.1</maven-site-plugin.version>
Expand Down Expand Up @@ -546,7 +549,7 @@
<dependency>
<groupId>de.terrestris</groupId>
<artifactId>shogun-admin</artifactId>
<version>2.0.0</version>
<version>${shogun-admin.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ public ModelAndView home(ModelAndView modelAndView) {
return modelAndView;
}

@GetMapping(value = "/admin/client-config.js", produces = "application/javascript")
@GetMapping(value = "/config/admin-client-config.js", produces = "application/javascript")
public ModelAndView getAdminClientConfig(ModelAndView modelAndView) {
modelAndView.addObject("KEYCLOAK_HOST", keycloakHost);
modelAndView.setViewName("client-config.js");
modelAndView.setViewName("admin-client-config.js");

return modelAndView;
}
Expand Down
2 changes: 1 addition & 1 deletion shogun-boot/src/main/resources/public/admin/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="app" class="app" style="height:100%;width:100%"></div>
<script src="/admin/client-config.js"></script>
<script src="/config/admin-client-config.js"></script>
<script>if (!window.shogunApplicationConfig) {
console.warn('No SHOGun application config found. Loading fallback.');
document.write('<script src="admin/assets/fallbackConfig.js">\x3C/script>')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ var shogunApplicationConfig = {
appPrefix: '/admin',
path: {
base: 'https://localhost',
configBase: '/formconfigs',
swagger: '/v2/api-docs',
user: '/users',
layer: '/layers',
imageFile: '/imagefiles',
application: '/applications',
appInfo: '/info/app',
auth: {
login: '/auth/login',
Expand All @@ -39,6 +39,9 @@ var shogunApplicationConfig = {
evictCache: '/cache/evict',
metrics: '/actuator/metrics'
},
models: [
'Application'
],
dashboard: {
news: {
visible: false
Expand Down

0 comments on commit 9e2d8a6

Please sign in to comment.