mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-22 06:39:41 +02:00
feat: docker volume validation (#1125)
* feat: add api endpoints for volume check * feat: add docker icon * add size prop * feat: add frontend UI for checking docker-volume * update caddy to server validation file * add more extensive documentation around setup req * fix: wrong type on user id #1123 * spelling * refactor: cleanup excessive function calls
This commit is contained in:
parent
ea141832c3
commit
e9bb39c744
16 changed files with 612 additions and 157 deletions
|
@ -1,5 +1,5 @@
|
|||
import { BaseAPI } from "../_base";
|
||||
import { AdminAboutInfo } from "~/types/api-types/admin";
|
||||
import { AdminAboutInfo, DockerVolumeText, CheckAppConfig } from "~/types/api-types/admin";
|
||||
|
||||
const prefix = "/api";
|
||||
|
||||
|
@ -7,25 +7,10 @@ const routes = {
|
|||
about: `${prefix}/admin/about`,
|
||||
aboutStatistics: `${prefix}/admin/about/statistics`,
|
||||
check: `${prefix}/admin/about/check`,
|
||||
docker: `${prefix}/admin/about/docker/validate`,
|
||||
validationFile: `${prefix}/media/docker/validate.txt`,
|
||||
};
|
||||
|
||||
|
||||
export interface AdminStatistics {
|
||||
totalRecipes: number;
|
||||
totalUsers: number;
|
||||
totalGroups: number;
|
||||
uncategorizedRecipes: number;
|
||||
untaggedRecipes: number;
|
||||
}
|
||||
|
||||
export interface CheckAppConfig {
|
||||
emailReady: boolean;
|
||||
baseUrlSet: boolean;
|
||||
isSiteSecure: boolean;
|
||||
isUpToDate: boolean;
|
||||
ldapReady: boolean;
|
||||
}
|
||||
|
||||
export class AdminAboutAPI extends BaseAPI {
|
||||
async about() {
|
||||
return await this.requests.get<AdminAboutInfo>(routes.about);
|
||||
|
@ -38,4 +23,12 @@ export class AdminAboutAPI extends BaseAPI {
|
|||
async checkApp() {
|
||||
return await this.requests.get<CheckAppConfig>(routes.check);
|
||||
}
|
||||
|
||||
async checkDocker() {
|
||||
return await this.requests.get<DockerVolumeText>(routes.docker);
|
||||
}
|
||||
|
||||
async getDockerValidateFileContents() {
|
||||
return await this.requests.get<string>(routes.validationFile);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue