mirror of https://github.com/rancher/dashboard.git
FIrst version of dynamic content
This commit is contained in:
parent
2c1b32e60c
commit
0ce6800090
|
|
@ -41,6 +41,7 @@ import { markRaw } from 'vue';
|
||||||
import paginationUtils from '@shell/utils/pagination-utils';
|
import paginationUtils from '@shell/utils/pagination-utils';
|
||||||
import { addReleaseNotesNotification } from '@shell/utils/release-notes';
|
import { addReleaseNotesNotification } from '@shell/utils/release-notes';
|
||||||
import sideNavService from '@shell/components/nav/TopLevelMenu.helper';
|
import sideNavService from '@shell/components/nav/TopLevelMenu.helper';
|
||||||
|
import { fetchAndProcessDynamicContent } from '@shell/utils/dynamic-content/index';
|
||||||
import { fetchAndProcessDynamicContent } from '@shell/utils/dynamic-content';
|
import { fetchAndProcessDynamicContent } from '@shell/utils/dynamic-content';
|
||||||
|
|
||||||
// Disables strict mode for all store instances to prevent warning about changing state outside of mutations
|
// Disables strict mode for all store instances to prevent warning about changing state outside of mutations
|
||||||
|
|
|
||||||
|
|
@ -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,
|
||||||
|
};
|
||||||
Loading…
Reference in New Issue