Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 77 additions & 0 deletions frontend/@types/console/console.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
declare interface Window {
SERVER_FLAGS: {
copiedCSVsDisabled: boolean;
alertManagerBaseURL: string;
alertmanagerUserWorkloadBaseURL: string;
authDisabled: boolean;
basePath: string;
branding: string;
consoleVersion: string;
customLogoURL: string;
customLogosConfigured: boolean;
customFaviconsConfigured: boolean;
customProductName: string;
documentationBaseURL: string;
kubeAdminLogoutURL: string;
kubeAPIServerURL: string;
loadTestFactor: number;
loginErrorURL: string;
loginSuccessURL: string;
loginURL: string;
logoutRedirect: string;
logoutURL: string;
prometheusBaseURL: string;
prometheusTenancyBaseURL: string;
quickStarts: string;
releaseVersion: string;
inactivityTimeout: number;
statuspageID: string;
GOARCH: string;
GOOS: string;
graphqlBaseURL: string;
developerCatalogCategories: string;
perspectives: string;
developerCatalogTypes: string;
userSettingsLocation: string;
addPage: string; // JSON encoded configuration
consolePlugins: string[]; // Console dynamic plugins enabled on the cluster
i18nNamespaces: string[]; // Available i18n namespaces
quickStarts: string;
projectAccessClusterRoles: string;
controlPlaneTopology: string;
telemetry?: Partial<{
// All of the following should be always available on prod env.
SEGMENT_API_HOST: string;
SEGMENT_JS_HOST: string;
// One of the following should be always available on prod env.
SEGMENT_API_KEY: string;
SEGMENT_PUBLIC_API_KEY: string;
DEVSANDBOX_SEGMENT_API_KEY: string;
// Optional override for analytics.min.js script URL
SEGMENT_JS_URL: string;
// Additional telemetry options passed to Console frontend
DEBUG: 'true' | 'false';
DISABLED: 'true' | 'false';
[name: string]: string;
}>;
nodeArchitectures: string[];
nodeOperatingSystems: string[];
hubConsoleURL: string;
k8sMode: string;
techPreview: boolean;
capabilities: {
name: string;
visibility: { state: 'Enabled' | 'Disabled' };
}[];
};
/** (OCPBUGS-46415) Do not override this string! To add new errors please append to windowError if it exists*/
windowError?: string;
__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?: Function;
i18n?: {}; // i18next instance, only available in development builds for debugging
store?: {}; // Redux store, only available in development builds for debugging
pluginStore?: {}; // Console plugin store
loadPluginEntry?: Function; // Console plugin entry callback, used to load dynamic plugins
webpackSharedScope?: {}; // webpack shared scope object
Cypress?: {};
monaco?: {};
}
81 changes: 1 addition & 80 deletions frontend/@types/console/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/// <reference path="./i18next.d.ts" />
/// <reference path="./dynamic-plugin-sdk.d.ts" />
/// <reference path="./console.d.ts" />
/// <reference path="./generated/graphql-queries.d.ts" />

declare module '*.svg' {
Expand All @@ -11,83 +12,3 @@ declare module '*.png' {
const value: any;
export default value;
}

declare interface Window {
SERVER_FLAGS: {
copiedCSVsDisabled: boolean;
alertManagerBaseURL: string;
alertmanagerUserWorkloadBaseURL: string;
authDisabled: boolean;
basePath: string;
branding: string;
consoleVersion: string;
customLogoURL: string;
customLogosConfigured: boolean;
customFaviconsConfigured: boolean;
customProductName: string;
documentationBaseURL: string;
kubeAPIServerURL: string;
loadTestFactor: number;
loginErrorURL: string;
loginSuccessURL: string;
loginURL: string;
logoutRedirect: string;
logoutURL: string;
prometheusBaseURL: string;
prometheusTenancyBaseURL: string;
quickStarts: string;
releaseVersion: string;
inactivityTimeout: number;
statuspageID: string;
GOARCH: string;
GOOS: string;
graphqlBaseURL: string;
developerCatalogCategories: string;
perspectives: string;
developerCatalogTypes: string;
userSettingsLocation: string;
addPage: string; // JSON encoded configuration
consolePlugins: string[]; // Console dynamic plugins enabled on the cluster
i18nNamespaces: string[]; // Available i18n namespaces
quickStarts: string;
projectAccessClusterRoles: string;
controlPlaneTopology: string;
telemetry?: Partial<{
// All of the following should be always available on prod env.
SEGMENT_API_HOST: string;
SEGMENT_JS_HOST: string;
// One of the following should be always available on prod env.
SEGMENT_API_KEY: string;
SEGMENT_PUBLIC_API_KEY: string;
DEVSANDBOX_SEGMENT_API_KEY: string;
// Optional override for analytics.min.js script URL
SEGMENT_JS_URL: string;
// Additional telemetry options passed to Console frontend
DEBUG: 'true' | 'false';
DISABLED: 'true' | 'false';
[name: string]: string;
}>;
nodeArchitectures: string[];
nodeOperatingSystems: string[];
hubConsoleURL: string;
k8sMode: string;
techPreview: boolean;
capabilities: {
name: string;
visibility: { state: 'Enabled' | 'Disabled' };
}[];
};
/** (OCPBUGS-46415) Do not override this string! To add new errors please append to windowError if it exists*/
windowError?: string;
__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?: Function;
i18n?: {}; // i18next instance, only available in development builds for debugging
store?: {}; // Redux store, only available in development builds for debugging
pluginStore?: {}; // Console plugin store
loadPluginEntry?: Function; // Console plugin entry callback, used to load dynamic plugins
webpackSharedScope?: {}; // webpack shared scope object
Cypress?: {};
monaco?: {};
}

// From https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-8.html
declare type Diff<T, K> = Omit<T, keyof K>;
Original file line number Diff line number Diff line change
@@ -1,8 +1 @@
declare interface Window {
SERVER_FLAGS: {
basePath: string;
};
/** (OCPBUGS-46415) Do not override this string! To add new errors please append to windowError if it exists*/
windowError?: string;
__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?: Function;
}
/// <reference path="../../../../@types/console/console.d.ts" />
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ table in [Console dynamic plugins README](./README.md).
## 4.22.0-prerelease.2 - TBD

- **Breaking**: Removed `pluginID` from the result in `useResolvedExtensions` hook ([CONSOLE-3769], [#15904])
- **Breaking**: Removed `AppInitSDK` and `useReduxStore` in `app` directory ([CONSOLE-5063], [#16019])
- The following types are now re-exported from `@openshift/dynamic-plugin-sdk` instead of being defined
by Console: `CodeRef`, `EncodedCodeRef`, `LoadedExtension`, and `ResolvedExtension` ([CONSOLE-3769], [#15904])

Expand Down Expand Up @@ -250,3 +251,4 @@ table in [Console dynamic plugins README](./README.md).
[#15893]: https://github.com/openshift/console/pull/15893
[#15904]: https://github.com/openshift/console/pull/15904
[#15934]: https://github.com/openshift/console/pull/15934
[#16019]: https://github.com/openshift/console/pull/16019

This file was deleted.

This file was deleted.

This file was deleted.

Loading