Skip to content

Commit

Permalink
SHIBUI-2394
Browse files Browse the repository at this point in the history
fixed issue with version not displaying
  • Loading branch information
chasegawa committed Nov 3, 2022
1 parent 5c20b23 commit 09bccca
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
package edu.internet2.tier.shibboleth.admin.ui.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.actuate.info.InfoEndpoint;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
Expand All @@ -15,6 +19,13 @@
@Controller
public class RootUiViewController {

@Autowired InfoEndpoint infoEndpoint;

@GetMapping(value = "/info")
public ResponseEntity<?> getInfo() {
return ResponseEntity.ok(infoEndpoint.info());
}

@RequestMapping("/")
public String index() {
return "redirect:/index.html";
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/App.constant.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const getActuatorPath = () => {

export const BASE_PATH = getBasePath();
export const API_BASE_PATH = `${BASE_PATH}api`;
export const ACTUATOR_PATH = getActuatorPath();
export const ACTUATOR_PATH = getBasePath();

export const FILTER_PLUGIN_TYPES = ['RequiredValidUntil', 'SignatureValidation', 'EntityRoleWhiteList'];

Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/core/components/VersionInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export function VersionInfo () {
'mode':'no-cors'
}
}
const { data = {} } = useFetch(`${ACTUATOR_PATH}actuator/info`, opts, []);
const { data = {} } = useFetch(`${ACTUATOR_PATH}/info`, opts, []);

const [ versionData, setVersionData ] = React.useState('');

Expand Down

0 comments on commit 09bccca

Please sign in to comment.