Remove health page for now

This commit is contained in:
Nassim Jahnke 2023-04-30 10:13:00 +02:00
parent a9aa992369
commit 4dfae08947
No known key found for this signature in database
GPG Key ID: 6BE3B555EBC5982B
2 changed files with 7 additions and 1 deletions

View File

@ -156,6 +156,11 @@ public class AdminController extends HangarComponent {
@PermissionRequired(NamedPermission.VIEW_HEALTH)
@GetMapping(path = "/health", produces = MediaType.APPLICATION_JSON_VALUE)
public HealthReport getHealthReport() {
if (true) {
//TODO
throw new HangarApiException(HttpStatus.INTERNAL_SERVER_ERROR, "Health report is disabled");
}
final List<UnhealthyProject> staleProjects = this.healthService.getStaleProjects();
final List<MissingFileCheck> missingFiles = this.healthService.getVersionsWithMissingFiles();
final List<JobTable> erroredJobs = this.jobService.getErroredJobs();

View File

@ -353,7 +353,8 @@ function isRecent(date: string): boolean {
<span v-if="authStore.user.headerData.reviewQueueCount !== 0">{{ "(" + authStore.user?.headerData.reviewQueueCount + ")" }}</span>
</DropdownItem>
<DropdownItem v-if="hasPerms(NamedPermission.VIEW_STATS)" to="/admin/stats">{{ t("nav.user.stats") }}</DropdownItem>
<DropdownItem v-if="hasPerms(NamedPermission.VIEW_HEALTH)" to="/admin/health">{{ t("nav.user.health") }}</DropdownItem>
<!-- todo -->
<!--<DropdownItem v-if="hasPerms(NamedPermission.VIEW_HEALTH)" to="/admin/health">{{ t("nav.user.health") }}</DropdownItem>-->
<DropdownItem v-if="hasPerms(NamedPermission.VIEW_LOGS)" to="/admin/log">{{ t("nav.user.log") }}</DropdownItem>
<DropdownItem v-if="hasPerms(NamedPermission.MANUAL_VALUE_CHANGES)" to="/admin/settings">
{{ t("nav.user.adminSettings") }}