FIrst version of dynamic content

This commit is contained in:
Neil MacDougall 2025-09-05 11:53:18 +01:00
parent 2c1b32e60c
commit 0ce6800090
2 changed files with 63 additions and 0 deletions

View File

@ -41,6 +41,7 @@ import { markRaw } from 'vue';
import paginationUtils from '@shell/utils/pagination-utils';
import { addReleaseNotesNotification } from '@shell/utils/release-notes';
import sideNavService from '@shell/components/nav/TopLevelMenu.helper';
import { fetchAndProcessDynamicContent } from '@shell/utils/dynamic-content/index';
import { fetchAndProcessDynamicContent } from '@shell/utils/dynamic-content';
// Disables strict mode for all store instances to prevent warning about changing state outside of mutations

View File

@ -0,0 +1,62 @@
import { SemVer } from 'semver';
export type Logger = {
error: Function,
info: Function,
debug: Function,
};
export type Distribution = 'community' | 'prime';
export type Configuration = {
enabled: boolean;
debug: boolean;
log: boolean;
endpoint: string;
prime: boolean;
distribution: Distribution;
};
/**
* Common context passed through various functions
*/
export type Context = {
dispatch: Function,
getters: any,
axios: any,
logger: Logger,
isAdmin: boolean,
config: Configuration,
};
export type VersionInfo = {
version: SemVer;
isPrime: boolean;
};
export type ReleaseInfo = any;
export type SupportInfo = any;
export type UpcomingSupportInfo = {
version: string,
date: Date,
noticeDays?: number,
};
export type SettingsInfo = {
status: {
eom: string,
eol: string,
},
upcoming: {
eom: UpcomingSupportInfo,
eol: UpcomingSupportInfo,
}
};
export type DynamicContent = {
version: string;
releases: ReleaseInfo,
support: SupportInfo,
settings: SettingsInfo,
};