> {
- WrappedComponent: C;
-}
-
-// There is a known issue in TypeScript, which doesn't allow decorators to change the signature of the classes
-// they are decorating. Due to this, if you are using @withRouter decorator in your code,
-// you will see a bunch of errors from TypeScript. The current workaround is to use withRouter() as a function call
-// on a separate line instead of as a decorator.
-export function withRouter, C extends React.ComponentType
>(
- component: C & React.ComponentType
,
-): React.ComponentClass> & WithRouterProps> & WithRouterStatics;
-
-export const __RouterContext: React.Context;
-
-export function useHistory(): H.History;
-
-export function useLocation(): H.Location;
-
-export function useParams(): Params;
-
-export function useRouteMatch(): match;
-export function useRouteMatch(
- path: string | string[] | RouteProps,
-): match | null;
diff --git a/ui/@mf-types/shell/node_modules/@types/react-router/package.json b/ui/@mf-types/shell/node_modules/@types/react-router/package.json
deleted file mode 100644
index 62529f517a..0000000000
--- a/ui/@mf-types/shell/node_modules/@types/react-router/package.json
+++ /dev/null
@@ -1,130 +0,0 @@
-{
- "name": "@types/react-router",
- "version": "5.1.20",
- "description": "TypeScript definitions for React Router",
- "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-router",
- "license": "MIT",
- "contributors": [
- {
- "name": "Sergey Buturlakin",
- "url": "https://github.com/sergey-buturlakin",
- "githubUsername": "sergey-buturlakin"
- },
- {
- "name": "Yuichi Murata",
- "url": "https://github.com/mrk21",
- "githubUsername": "mrk21"
- },
- {
- "name": "Václav Ostrožlík",
- "url": "https://github.com/vasek17",
- "githubUsername": "vasek17"
- },
- {
- "name": "Nathan Brown",
- "url": "https://github.com/ngbrown",
- "githubUsername": "ngbrown"
- },
- {
- "name": "Alex Wendland",
- "url": "https://github.com/awendland",
- "githubUsername": "awendland"
- },
- {
- "name": "Kostya Esmukov",
- "url": "https://github.com/KostyaEsmukov",
- "githubUsername": "KostyaEsmukov"
- },
- {
- "name": "John Reilly",
- "url": "https://github.com/johnnyreilly",
- "githubUsername": "johnnyreilly"
- },
- {
- "name": "Karol Janyst",
- "url": "https://github.com/LKay",
- "githubUsername": "LKay"
- },
- {
- "name": "Dovydas Navickas",
- "url": "https://github.com/DovydasNavickas",
- "githubUsername": "DovydasNavickas"
- },
- {
- "name": "Huy Nguyen",
- "url": "https://github.com/huy-nguyen",
- "githubUsername": "huy-nguyen"
- },
- {
- "name": "Jérémy Fauvel",
- "url": "https://github.com/grmiade",
- "githubUsername": "grmiade"
- },
- {
- "name": "Daniel Roth",
- "url": "https://github.com/DaIgeb",
- "githubUsername": "DaIgeb"
- },
- {
- "name": "Egor Shulga",
- "url": "https://github.com/egorshulga",
- "githubUsername": "egorshulga"
- },
- {
- "name": "Rahul Raina",
- "url": "https://github.com/rraina",
- "githubUsername": "rraina"
- },
- {
- "name": "Duong Tran",
- "url": "https://github.com/t49tran",
- "githubUsername": "t49tran"
- },
- {
- "name": "Ben Smith",
- "url": "https://github.com/8enSmith",
- "githubUsername": "8enSmith"
- },
- {
- "name": "Wesley Tsai",
- "url": "https://github.com/wezleytsai",
- "githubUsername": "wezleytsai"
- },
- {
- "name": "Sebastian Silbermann",
- "url": "https://github.com/eps1lon",
- "githubUsername": "eps1lon"
- },
- {
- "name": "Nicholas Hehr",
- "url": "https://github.com/HipsterBrown",
- "githubUsername": "HipsterBrown"
- },
- {
- "name": "Pawel Fajfer",
- "url": "https://github.com/pawfa",
- "githubUsername": "pawfa"
- }
- ],
- "main": "",
- "types": "index.d.ts",
- "typesVersions": {
- "<=4.6": {
- "*": [
- "ts4.6/*"
- ]
- }
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
- "directory": "types/react-router"
- },
- "scripts": {},
- "dependencies": {
- "@types/history": "^4.7.11",
- "@types/react": "*"
- },
- "typesPublisherContentHash": "471509be13705fc944e92092c64b94ac19712efd46cd3b0bfe38faefb539955f",
- "typeScriptVersion": "4.2"
-}
\ No newline at end of file
diff --git a/ui/@mf-types/shell/node_modules/@types/react-router/ts4.6/index.d.ts b/ui/@mf-types/shell/node_modules/@types/react-router/ts4.6/index.d.ts
deleted file mode 100644
index 88c2bfe1f6..0000000000
--- a/ui/@mf-types/shell/node_modules/@types/react-router/ts4.6/index.d.ts
+++ /dev/null
@@ -1,173 +0,0 @@
-import * as React from 'react';
-import * as H from 'history';
-
-// This is the type of the context object that will be passed down to all children of
-// a `Router` component:
-export interface RouterChildContext {
- router: {
- history: H.History;
- route: {
- location: H.Location;
- match: match;
- };
- };
-}
-export interface MemoryRouterProps {
- children?: React.ReactNode;
- initialEntries?: H.LocationDescriptor[] | undefined;
- initialIndex?: number | undefined;
- getUserConfirmation?: ((message: string, callback: (ok: boolean) => void) => void) | undefined;
- keyLength?: number | undefined;
-}
-
-export class MemoryRouter extends React.Component {}
-
-export interface PromptProps {
- message: string | ((location: H.Location, action: H.Action) => string | boolean);
- when?: boolean | undefined;
-}
-export class Prompt extends React.Component {}
-
-export interface RedirectProps {
- to: H.LocationDescriptor;
- push?: boolean | undefined;
- from?: string | undefined;
- path?: string | undefined;
- exact?: boolean | undefined;
- strict?: boolean | undefined;
-}
-export class Redirect extends React.Component {}
-
-export interface StaticContext {
- statusCode?: number | undefined;
-}
-
-export interface RouteComponentProps<
- Params extends { [K in keyof Params]?: string } = {},
- C extends StaticContext = StaticContext,
- S = H.LocationState,
-> {
- history: H.History;
- location: H.Location;
- match: match;
- staticContext?: C | undefined;
-}
-
-export interface RouteChildrenProps {
- history: H.History;
- location: H.Location;
- match: match | null;
-}
-
-export interface RouteProps<
- Path extends string = string,
- Params extends { [K: string]: string | undefined } = ExtractRouteParams,
-> {
- location?: H.Location | undefined;
- component?: React.ComponentType> | React.ComponentType | undefined;
- render?: ((props: RouteComponentProps) => React.ReactNode) | undefined;
- children?: ((props: RouteChildrenProps) => React.ReactNode) | React.ReactNode | undefined;
- path?: Path | readonly Path[] | undefined;
- exact?: boolean | undefined;
- sensitive?: boolean | undefined;
- strict?: boolean | undefined;
-}
-export class Route extends React.Component<
- RouteProps & OmitNative,
- any
-> {}
-
-export interface RouterProps {
- children?: React.ReactNode;
- history: H.History;
-}
-export class Router extends React.Component {}
-
-export interface StaticRouterContext extends StaticContext {
- url?: string | undefined;
- action?: 'PUSH' | 'REPLACE' | undefined;
- location?: object | undefined;
-}
-export interface StaticRouterProps {
- basename?: string | undefined;
- children?: React.ReactNode;
- location?: string | object | undefined;
- context?: StaticRouterContext | undefined;
-}
-
-export class StaticRouter extends React.Component {}
-export interface SwitchProps {
- children?: React.ReactNode | undefined;
- location?: H.Location | undefined;
-}
-export class Switch extends React.Component {}
-
-export interface match {
- params: Params;
- isExact: boolean;
- path: string;
- url: string;
-}
-
-// Omit taken from https://github.com/Microsoft/TypeScript/issues/28339#issuecomment-467220238
-export type Omit = T extends any ? Pick> : never;
-
-// Newer Omit type: as the previous one is being exported, removing it would be a breaking change
-export type OmitNative = { [P in Exclude]: T[P] };
-
-export function matchPath(
- pathname: string,
- props: string | string[] | RouteProps,
- parent?: match | null,
-): match | null;
-
-export type ExtractRouteOptionalParam = T extends `${infer Param}?`
- ? { [k in Param]?: U }
- : T extends `${infer Param}*`
- ? { [k in Param]?: U }
- : T extends `${infer Param}+`
- ? { [k in Param]: U }
- : { [k in T]: U };
-
-export type ExtractRouteParams = string extends T
- ? { [k in string]?: U }
- : T extends `${infer _Start}:${infer ParamWithOptionalRegExp}/${infer Rest}`
- ? ParamWithOptionalRegExp extends `${infer Param}(${infer _RegExp})`
- ? ExtractRouteOptionalParam & ExtractRouteParams
- : ExtractRouteOptionalParam & ExtractRouteParams
- : T extends `${infer _Start}:${infer ParamWithOptionalRegExp}`
- ? ParamWithOptionalRegExp extends `${infer Param}(${infer _RegExp})`
- ? ExtractRouteOptionalParam
- : ExtractRouteOptionalParam
- : {};
-
-export function generatePath(path: S, params?: ExtractRouteParams): string;
-
-export type WithRouterProps> = C extends React.ComponentClass
- ? { wrappedComponentRef?: React.Ref> | undefined }
- : {};
-
-export interface WithRouterStatics> {
- WrappedComponent: C;
-}
-
-// There is a known issue in TypeScript, which doesn't allow decorators to change the signature of the classes
-// they are decorating. Due to this, if you are using @withRouter decorator in your code,
-// you will see a bunch of errors from TypeScript. The current workaround is to use withRouter() as a function call
-// on a separate line instead of as a decorator.
-export function withRouter, C extends React.ComponentType
>(
- component: C & React.ComponentType
,
-): React.ComponentClass> & WithRouterProps> & WithRouterStatics;
-
-export const __RouterContext: React.Context;
-
-export function useHistory(): H.History;
-
-export function useLocation(): H.Location;
-
-export function useParams(): Params;
-
-export function useRouteMatch(): match;
-export function useRouteMatch(
- path: string | string[] | RouteProps,
-): match | null;
diff --git a/ui/@mf-types/shell/node_modules/@types/react/jsx-dev-runtime.d.ts b/ui/@mf-types/shell/node_modules/@types/react/jsx-dev-runtime.d.ts
index c7bb3e9050..d28644c6ce 100644
--- a/ui/@mf-types/shell/node_modules/@types/react/jsx-dev-runtime.d.ts
+++ b/ui/@mf-types/shell/node_modules/@types/react/jsx-dev-runtime.d.ts
@@ -1,2 +1,45 @@
-// Expose `JSX` namespace in `global` namespace
-import './';
+import * as React from "./";
+export { Fragment } from "./";
+
+export namespace JSX {
+ type ElementType = React.JSX.ElementType;
+ interface Element extends React.JSX.Element {}
+ interface ElementClass extends React.JSX.ElementClass {}
+ interface ElementAttributesProperty extends React.JSX.ElementAttributesProperty {}
+ interface ElementChildrenAttribute extends React.JSX.ElementChildrenAttribute {}
+ type LibraryManagedAttributes = React.JSX.LibraryManagedAttributes;
+ interface IntrinsicAttributes extends React.JSX.IntrinsicAttributes {}
+ interface IntrinsicClassAttributes extends React.JSX.IntrinsicClassAttributes {}
+ interface IntrinsicElements extends React.JSX.IntrinsicElements {}
+}
+
+export interface JSXSource {
+ /**
+ * The source file where the element originates from.
+ */
+ fileName?: string | undefined;
+
+ /**
+ * The line number where the element was created.
+ */
+ lineNumber?: number | undefined;
+
+ /**
+ * The column number where the element was created.
+ */
+ columnNumber?: number | undefined;
+}
+
+/**
+ * Create a React element.
+ *
+ * You should not use this function directly. Use JSX and a transpiler instead.
+ */
+export function jsxDEV(
+ type: React.ElementType,
+ props: unknown,
+ key: React.Key | undefined,
+ isStatic: boolean,
+ source?: JSXSource,
+ self?: unknown,
+): React.ReactElement;
diff --git a/ui/@mf-types/shell/node_modules/@types/react/jsx-runtime.d.ts b/ui/@mf-types/shell/node_modules/@types/react/jsx-runtime.d.ts
index c7bb3e9050..e9fea27d74 100644
--- a/ui/@mf-types/shell/node_modules/@types/react/jsx-runtime.d.ts
+++ b/ui/@mf-types/shell/node_modules/@types/react/jsx-runtime.d.ts
@@ -1,2 +1,36 @@
-// Expose `JSX` namespace in `global` namespace
-import './';
+import * as React from "./";
+export { Fragment } from "./";
+
+export namespace JSX {
+ type ElementType = React.JSX.ElementType;
+ interface Element extends React.JSX.Element {}
+ interface ElementClass extends React.JSX.ElementClass {}
+ interface ElementAttributesProperty extends React.JSX.ElementAttributesProperty {}
+ interface ElementChildrenAttribute extends React.JSX.ElementChildrenAttribute {}
+ type LibraryManagedAttributes = React.JSX.LibraryManagedAttributes;
+ interface IntrinsicAttributes extends React.JSX.IntrinsicAttributes {}
+ interface IntrinsicClassAttributes extends React.JSX.IntrinsicClassAttributes {}
+ interface IntrinsicElements extends React.JSX.IntrinsicElements {}
+}
+
+/**
+ * Create a React element.
+ *
+ * You should not use this function directly. Use JSX and a transpiler instead.
+ */
+export function jsx(
+ type: React.ElementType,
+ props: unknown,
+ key?: React.Key,
+): React.ReactElement;
+
+/**
+ * Create a React element.
+ *
+ * You should not use this function directly. Use JSX and a transpiler instead.
+ */
+export function jsxs(
+ type: React.ElementType,
+ props: unknown,
+ key?: React.Key,
+): React.ReactElement;
diff --git a/ui/@mf-types/shell/node_modules/@types/react/package.json b/ui/@mf-types/shell/node_modules/@types/react/package.json
index 0c96325bb0..b7b8c61dac 100644
--- a/ui/@mf-types/shell/node_modules/@types/react/package.json
+++ b/ui/@mf-types/shell/node_modules/@types/react/package.json
@@ -1,7 +1,8 @@
{
"name": "@types/react",
- "version": "17.0.2",
- "description": "TypeScript definitions for React",
+ "version": "18.3.12",
+ "description": "TypeScript definitions for react",
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react",
"license": "MIT",
"contributors": [
{
@@ -18,122 +19,177 @@
},
{
"name": "John Reilly",
- "url": "https://github.com/johnnyreilly",
- "githubUsername": "johnnyreilly"
+ "githubUsername": "johnnyreilly",
+ "url": "https://github.com/johnnyreilly"
},
{
"name": "Benoit Benezech",
- "url": "https://github.com/bbenezech",
- "githubUsername": "bbenezech"
+ "githubUsername": "bbenezech",
+ "url": "https://github.com/bbenezech"
},
{
"name": "Patricio Zavolinsky",
- "url": "https://github.com/pzavolinsky",
- "githubUsername": "pzavolinsky"
- },
- {
- "name": "Digiguru",
- "url": "https://github.com/digiguru",
- "githubUsername": "digiguru"
+ "githubUsername": "pzavolinsky",
+ "url": "https://github.com/pzavolinsky"
},
{
"name": "Eric Anderson",
- "url": "https://github.com/ericanderson",
- "githubUsername": "ericanderson"
+ "githubUsername": "ericanderson",
+ "url": "https://github.com/ericanderson"
},
{
"name": "Dovydas Navickas",
- "url": "https://github.com/DovydasNavickas",
- "githubUsername": "DovydasNavickas"
+ "githubUsername": "DovydasNavickas",
+ "url": "https://github.com/DovydasNavickas"
},
{
"name": "Josh Rutherford",
- "url": "https://github.com/theruther4d",
- "githubUsername": "theruther4d"
+ "githubUsername": "theruther4d",
+ "url": "https://github.com/theruther4d"
},
{
"name": "Guilherme Hübner",
- "url": "https://github.com/guilhermehubner",
- "githubUsername": "guilhermehubner"
+ "githubUsername": "guilhermehubner",
+ "url": "https://github.com/guilhermehubner"
},
{
"name": "Ferdy Budhidharma",
- "url": "https://github.com/ferdaber",
- "githubUsername": "ferdaber"
+ "githubUsername": "ferdaber",
+ "url": "https://github.com/ferdaber"
},
{
"name": "Johann Rakotoharisoa",
- "url": "https://github.com/jrakotoharisoa",
- "githubUsername": "jrakotoharisoa"
+ "githubUsername": "jrakotoharisoa",
+ "url": "https://github.com/jrakotoharisoa"
},
{
"name": "Olivier Pascal",
- "url": "https://github.com/pascaloliv",
- "githubUsername": "pascaloliv"
+ "githubUsername": "pascaloliv",
+ "url": "https://github.com/pascaloliv"
},
{
"name": "Martin Hochel",
- "url": "https://github.com/hotell",
- "githubUsername": "hotell"
+ "githubUsername": "hotell",
+ "url": "https://github.com/hotell"
},
{
"name": "Frank Li",
- "url": "https://github.com/franklixuefei",
- "githubUsername": "franklixuefei"
+ "githubUsername": "franklixuefei",
+ "url": "https://github.com/franklixuefei"
},
{
"name": "Jessica Franco",
- "url": "https://github.com/Jessidhia",
- "githubUsername": "Jessidhia"
+ "githubUsername": "Jessidhia",
+ "url": "https://github.com/Jessidhia"
},
{
"name": "Saransh Kataria",
- "url": "https://github.com/saranshkataria",
- "githubUsername": "saranshkataria"
+ "githubUsername": "saranshkataria",
+ "url": "https://github.com/saranshkataria"
},
{
"name": "Kanitkorn Sujautra",
- "url": "https://github.com/lukyth",
- "githubUsername": "lukyth"
+ "githubUsername": "lukyth",
+ "url": "https://github.com/lukyth"
},
{
"name": "Sebastian Silbermann",
- "url": "https://github.com/eps1lon",
- "githubUsername": "eps1lon"
+ "githubUsername": "eps1lon",
+ "url": "https://github.com/eps1lon"
},
{
"name": "Kyle Scully",
- "url": "https://github.com/zieka",
- "githubUsername": "zieka"
+ "githubUsername": "zieka",
+ "url": "https://github.com/zieka"
},
{
"name": "Cong Zhang",
- "url": "https://github.com/dancerphil",
- "githubUsername": "dancerphil"
+ "githubUsername": "dancerphil",
+ "url": "https://github.com/dancerphil"
},
{
"name": "Dimitri Mitropoulos",
- "url": "https://github.com/dimitropoulos",
- "githubUsername": "dimitropoulos"
+ "githubUsername": "dimitropoulos",
+ "url": "https://github.com/dimitropoulos"
},
{
"name": "JongChan Choi",
- "url": "https://github.com/disjukr",
- "githubUsername": "disjukr"
+ "githubUsername": "disjukr",
+ "url": "https://github.com/disjukr"
},
{
"name": "Victor Magalhães",
- "url": "https://github.com/vhfmag",
- "githubUsername": "vhfmag"
+ "githubUsername": "vhfmag",
+ "url": "https://github.com/vhfmag"
},
{
- "name": "Dale Tan",
- "url": "https://github.com/hellatan",
- "githubUsername": "hellatan"
+ "name": "Priyanshu Rav",
+ "githubUsername": "priyanshurav",
+ "url": "https://github.com/priyanshurav"
+ },
+ {
+ "name": "Dmitry Semigradsky",
+ "githubUsername": "Semigradsky",
+ "url": "https://github.com/Semigradsky"
+ },
+ {
+ "name": "Matt Pocock",
+ "githubUsername": "mattpocock",
+ "url": "https://github.com/mattpocock"
}
],
"main": "",
"types": "index.d.ts",
+ "typesVersions": {
+ "<=5.0": {
+ "*": [
+ "ts5.0/*"
+ ]
+ }
+ },
+ "exports": {
+ ".": {
+ "types@<=5.0": {
+ "default": "./ts5.0/index.d.ts"
+ },
+ "types": {
+ "default": "./index.d.ts"
+ }
+ },
+ "./canary": {
+ "types@<=5.0": {
+ "default": "./ts5.0/canary.d.ts"
+ },
+ "types": {
+ "default": "./canary.d.ts"
+ }
+ },
+ "./experimental": {
+ "types@<=5.0": {
+ "default": "./ts5.0/experimental.d.ts"
+ },
+ "types": {
+ "default": "./experimental.d.ts"
+ }
+ },
+ "./jsx-runtime": {
+ "types@<=5.0": {
+ "default": "./ts5.0/jsx-runtime.d.ts"
+ },
+ "types": {
+ "default": "./jsx-runtime.d.ts"
+ }
+ },
+ "./jsx-dev-runtime": {
+ "types@<=5.0": {
+ "default": "./ts5.0/jsx-dev-runtime.d.ts"
+ },
+ "types": {
+ "default": "./jsx-dev-runtime.d.ts"
+ }
+ },
+ "./package.json": "./package.json"
+ },
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
@@ -144,6 +200,7 @@
"@types/prop-types": "*",
"csstype": "^3.0.2"
},
- "typesPublisherContentHash": "b4bc71e5ae8e6467bc315f57f8e7b98e248d5994ecaaf51bd4e674de77bfb6fc",
- "typeScriptVersion": "3.4"
+ "peerDependencies": {},
+ "typesPublisherContentHash": "d59942da5433cf6c9d66442070074fa48ef9c823a4175da6e4d183d0a70ccc72",
+ "typeScriptVersion": "4.8"
}
\ No newline at end of file
diff --git a/ui/@mf-types/shell/node_modules/@types/react/ts5.0/jsx-dev-runtime.d.ts b/ui/@mf-types/shell/node_modules/@types/react/ts5.0/jsx-dev-runtime.d.ts
new file mode 100644
index 0000000000..87d1dfe383
--- /dev/null
+++ b/ui/@mf-types/shell/node_modules/@types/react/ts5.0/jsx-dev-runtime.d.ts
@@ -0,0 +1,44 @@
+import * as React from "./";
+export { Fragment } from "./";
+
+export namespace JSX {
+ interface Element extends React.JSX.Element {}
+ interface ElementClass extends React.JSX.ElementClass {}
+ interface ElementAttributesProperty extends React.JSX.ElementAttributesProperty {}
+ interface ElementChildrenAttribute extends React.JSX.ElementChildrenAttribute {}
+ type LibraryManagedAttributes = React.JSX.LibraryManagedAttributes;
+ interface IntrinsicAttributes extends React.JSX.IntrinsicAttributes {}
+ interface IntrinsicClassAttributes extends React.JSX.IntrinsicClassAttributes {}
+ interface IntrinsicElements extends React.JSX.IntrinsicElements {}
+}
+
+export interface JSXSource {
+ /**
+ * The source file where the element originates from.
+ */
+ fileName?: string | undefined;
+
+ /**
+ * The line number where the element was created.
+ */
+ lineNumber?: number | undefined;
+
+ /**
+ * The column number where the element was created.
+ */
+ columnNumber?: number | undefined;
+}
+
+/**
+ * Create a React element.
+ *
+ * You should not use this function directly. Use JSX and a transpiler instead.
+ */
+export function jsxDEV(
+ type: React.ElementType,
+ props: unknown,
+ key: React.Key | undefined,
+ isStatic: boolean,
+ source?: JSXSource,
+ self?: unknown,
+): React.ReactElement;
diff --git a/ui/@mf-types/shell/node_modules/@types/react/ts5.0/jsx-runtime.d.ts b/ui/@mf-types/shell/node_modules/@types/react/ts5.0/jsx-runtime.d.ts
new file mode 100644
index 0000000000..8cc3b97452
--- /dev/null
+++ b/ui/@mf-types/shell/node_modules/@types/react/ts5.0/jsx-runtime.d.ts
@@ -0,0 +1,35 @@
+import * as React from "./";
+export { Fragment } from "./";
+
+export namespace JSX {
+ interface Element extends React.JSX.Element {}
+ interface ElementClass extends React.JSX.ElementClass {}
+ interface ElementAttributesProperty extends React.JSX.ElementAttributesProperty {}
+ interface ElementChildrenAttribute extends React.JSX.ElementChildrenAttribute {}
+ type LibraryManagedAttributes = React.JSX.LibraryManagedAttributes;
+ interface IntrinsicAttributes extends React.JSX.IntrinsicAttributes {}
+ interface IntrinsicClassAttributes extends React.JSX.IntrinsicClassAttributes {}
+ interface IntrinsicElements extends React.JSX.IntrinsicElements {}
+}
+
+/**
+ * Create a React element.
+ *
+ * You should not use this function directly. Use JSX and a transpiler instead.
+ */
+export function jsx(
+ type: React.ElementType,
+ props: unknown,
+ key?: React.Key,
+): React.ReactElement;
+
+/**
+ * Create a React element.
+ *
+ * You should not use this function directly. Use JSX and a transpiler instead.
+ */
+export function jsxs(
+ type: React.ElementType,
+ props: unknown,
+ key?: React.Key,
+): React.ReactElement;
diff --git a/ui/@mf-types/shell/node_modules/oidc-client-ts/dist/esm/package.json b/ui/@mf-types/shell/node_modules/oidc-client-ts/dist/esm/package.json
index 162dccbcf9..b61a65f636 100644
--- a/ui/@mf-types/shell/node_modules/oidc-client-ts/dist/esm/package.json
+++ b/ui/@mf-types/shell/node_modules/oidc-client-ts/dist/esm/package.json
@@ -1,4 +1,4 @@
{
"type": "module",
- "version": "3.0.1"
+ "version": "3.1.0"
}
diff --git a/ui/@mf-types/shell/node_modules/oidc-client-ts/package.json b/ui/@mf-types/shell/node_modules/oidc-client-ts/package.json
index 529c19c59d..992f20fd26 100644
--- a/ui/@mf-types/shell/node_modules/oidc-client-ts/package.json
+++ b/ui/@mf-types/shell/node_modules/oidc-client-ts/package.json
@@ -1,6 +1,6 @@
{
"name": "oidc-client-ts",
- "version": "3.0.1",
+ "version": "3.1.0",
"description": "OpenID Connect (OIDC) & OAuth2 client library",
"repository": {
"type": "git",
@@ -36,30 +36,32 @@
"test": "tsc && jest",
"typedoc": "typedoc",
"lint": "eslint --max-warnings=0 --cache .",
- "prepare": "husky install"
+ "prepare": "husky"
},
"dependencies": {
"jwt-decode": "^4.0.0"
},
"devDependencies": {
- "@microsoft/api-extractor": "^7.35.0",
- "@testing-library/jest-dom": "^6.0.0",
- "@types/jest": "^29.2.3",
- "@types/node": "^20.8.2",
- "@typescript-eslint/eslint-plugin": "^6.4.1",
- "@typescript-eslint/parser": "^6.4.1",
- "esbuild": "^0.20.0",
- "eslint": "^8.5.0",
- "eslint-plugin-testing-library": "^6.0.0",
- "http-proxy-middleware": "^2.0.1",
- "husky": "^9.0.6",
- "jest": "^29.3.1",
- "jest-environment-jsdom": "^29.3.1",
- "jest-mock": "^29.3.1",
- "lint-staged": "^15.0.1",
- "ts-jest": "^29.0.3",
- "typedoc": "^0.25.0",
- "typescript": "~5.3.3",
+ "@microsoft/api-extractor": "^7.47.2",
+ "@testing-library/jest-dom": "^6.4.6",
+ "@types/jest": "^29.5.12",
+ "@types/node": "^22.4.1",
+ "@typescript-eslint/eslint-plugin": "^7.16.1",
+ "@typescript-eslint/parser": "^7.16.1",
+ "esbuild": "^0.24.0",
+ "eslint": "^8.57.0",
+ "eslint-plugin-testing-library": "^6.2.2",
+ "http-proxy-middleware": "^3.0.0",
+ "fake-indexeddb": "^6.0.0",
+ "husky": "^9.0.11",
+ "jest": "^29.7.0",
+ "jest-environment-jsdom": "^29.7.0",
+ "jest-mock": "^29.7.0",
+ "jose": "^5.6.3",
+ "lint-staged": "^15.2.7",
+ "ts-jest": "^29.2.2",
+ "typedoc": "^0.26.4",
+ "typescript": "~5.4.2",
"yn": "^5.0.0"
},
"engines": {
diff --git a/ui/@mf-types/shell/node_modules/react-query/package.json b/ui/@mf-types/shell/node_modules/react-query/package.json
index 203edf3351..5d6e6d2358 100644
--- a/ui/@mf-types/shell/node_modules/react-query/package.json
+++ b/ui/@mf-types/shell/node_modules/react-query/package.json
@@ -1,6 +1,6 @@
{
"name": "react-query",
- "version": "3.34.0",
+ "version": "3.39.3",
"description": "Hooks for managing, caching and syncing asynchronous and remote data in React",
"author": "tannerlinsley",
"license": "MIT",
@@ -70,7 +70,7 @@
"match-sorter": "^6.0.2"
},
"peerDependencies": {
- "react": "^16.8.0 || ^17.0.0"
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0"
},
"peerDependenciesMeta": {
"react-dom": {
@@ -81,11 +81,7 @@
}
},
"typesVersions": {
- "<4.1": {
- "types/*": [
- "types/ts3.8/*"
- ]
- }
+ "<4.1": { "types/*": ["types/ts3.8/*"] }
},
"devDependencies": {
"@babel/cli": "^7.11.6",
@@ -148,6 +144,9 @@
"@types/react": "^16.9.41",
"@types/react-dom": "^16.9.8"
},
+ "release": {
+ "branches": ["main"]
+ },
"bundlewatch": {
"files": [
{
diff --git a/ui/@mf-types/shell/node_modules/react-router/package.json b/ui/@mf-types/shell/node_modules/react-router/package.json
new file mode 100644
index 0000000000..1fbd582bc3
--- /dev/null
+++ b/ui/@mf-types/shell/node_modules/react-router/package.json
@@ -0,0 +1,127 @@
+{
+ "name": "react-router",
+ "version": "7.0.1",
+ "description": "Declarative routing for React",
+ "keywords": [
+ "react",
+ "router",
+ "route",
+ "routing",
+ "history",
+ "link"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/remix-run/react-router",
+ "directory": "packages/react-router"
+ },
+ "license": "MIT",
+ "author": "Remix Software ",
+ "sideEffects": false,
+ "types": "./dist/production/index.d.ts",
+ "main": "./dist/production/index.js",
+ "module": "./dist/production/index.mjs",
+ "exports": {
+ ".": {
+ "node": {
+ "types": "./dist/production/index.d.ts",
+ "development": {
+ "module-sync": "./dist/development/index.mjs",
+ "default": "./dist/development/index.js"
+ },
+ "module-sync": "./dist/production/index.mjs",
+ "default": "./dist/production/index.js"
+ },
+ "import": {
+ "types": "./dist/production/index.d.mts",
+ "development": "./dist/development/index.mjs",
+ "default": "./dist/production/index.mjs"
+ },
+ "default": {
+ "types": "./dist/production/index.d.ts",
+ "development": "./dist/development/index.js",
+ "default": "./dist/production/index.js"
+ }
+ },
+ "./route-module": {
+ "import": {
+ "types": "./dist/production/lib/types/route-module.d.mts"
+ },
+ "default": {
+ "types": "./dist/production/lib/types/route-module.d.ts"
+ }
+ },
+ "./dom": {
+ "node": {
+ "types": "./dist/production/dom-export.d.ts",
+ "development": {
+ "module-sync": "./dist/development/dom-export.mjs",
+ "default": "./dist/development/dom-export.js"
+ },
+ "module-sync": "./dist/production/dom-export.mjs",
+ "default": "./dist/production/dom-export.js"
+ },
+ "import": {
+ "types": "./dist/production/dom-export.d.mts",
+ "development": "./dist/development/dom-export.mjs",
+ "default": "./dist/production/dom-export.mjs"
+ },
+ "default": {
+ "types": "./dist/production/dom-export.d.ts",
+ "development": "./dist/development/dom-export.js",
+ "default": "./dist/production/dom-export.js"
+ }
+ },
+ "./package.json": "./package.json"
+ },
+ "wireit": {
+ "build": {
+ "command": "rimraf dist && tsup",
+ "files": [
+ "lib/**",
+ "*.ts",
+ "tsconfig.json",
+ "package.json"
+ ],
+ "output": [
+ "dist/**"
+ ]
+ }
+ },
+ "dependencies": {
+ "@types/cookie": "^0.6.0",
+ "cookie": "^1.0.1",
+ "set-cookie-parser": "^2.6.0",
+ "turbo-stream": "2.4.0"
+ },
+ "devDependencies": {
+ "@types/set-cookie-parser": "^2.4.1",
+ "react": "^18.2.0",
+ "react-dom": "^18.2.0",
+ "rimraf": "^6.0.1",
+ "tsup": "^8.3.0",
+ "typescript": "^5.1.6",
+ "wireit": "0.14.9"
+ },
+ "peerDependencies": {
+ "react": ">=18",
+ "react-dom": ">=18"
+ },
+ "peerDependenciesMeta": {
+ "react-dom": {
+ "optional": true
+ }
+ },
+ "files": [
+ "dist/",
+ "CHANGELOG.md",
+ "LICENSE.md",
+ "README.md"
+ ],
+ "engines": {
+ "node": ">=20.0.0"
+ },
+ "scripts": {
+ "build": "wireit"
+ }
+}
\ No newline at end of file
diff --git a/ui/package-lock.json b/ui/package-lock.json
index c9e540f2c3..2874c5896a 100644
--- a/ui/package-lock.json
+++ b/ui/package-lock.json
@@ -12,7 +12,7 @@
"@hookform/resolvers": "^3.1.0",
"@js-temporal/polyfill": "^0.4.4",
"@kubernetes/client-node": "github:scality/kubernetes-client-javascript.git#browser-0.10.4-64-ge7c6721",
- "@scality/core-ui": "git+https://github.com/scality/core-ui#33e22729ee7317f5afecb79f06b4f873dc3e376d",
+ "@scality/core-ui": "git+https://github.com/scality/core-ui#62aef0b544c50e47c5a8ceb3697fe090eb3c6a9f",
"@scality/module-federation": "git+https://github.com/scality/module-federation#c571388783a2a51ae3bf5d36ae66753c8b014bb5",
"axios": "^0.21.1",
"formik": "2.2.5",
@@ -29,8 +29,8 @@
"react-json-view": "^1.21.3",
"react-query": "^3.34.0",
"react-redux": "^7.1.0",
- "react-router": "^6.28.0",
- "react-router-dom": "^6.28.0",
+ "react-router": "^7.0.1",
+ "react-router-dom": "^7.0.1",
"redux": "^4.0.1",
"redux-saga": "^1.0.2",
"reselect": "^2.5.4",
@@ -5545,8 +5545,8 @@
},
"node_modules/@scality/core-ui": {
"version": "0.151.0",
- "resolved": "git+ssh://git@github.com/scality/core-ui.git#33e22729ee7317f5afecb79f06b4f873dc3e376d",
- "integrity": "sha512-OFdbDWjVWBxnSuWYlWcyX2w8KtvTNNfb1tWABUe2wxGQwcLetbvZCaLCnpGg2+HPysrB+Uzd1ol6t4yLLdpzrg==",
+ "resolved": "git+ssh://git@github.com/scality/core-ui.git#62aef0b544c50e47c5a8ceb3697fe090eb3c6a9f",
+ "integrity": "sha512-J1k8BtcEPGbzyFexYXkDdS/6sk1jBY+gN/QeljvuloMRr29OlVqTaoUtOgr6C8i0OvcanNx2OiWcWfw8za2Q7Q==",
"license": "SEE LICENSE IN LICENSE",
"dependencies": {
"@floating-ui/dom": "^1.6.3",
@@ -5600,6 +5600,36 @@
"@floating-ui/utils": "^0.2.0"
}
},
+ "node_modules/@scality/core-ui/node_modules/react-router": {
+ "version": "6.28.0",
+ "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.28.0.tgz",
+ "integrity": "sha512-HrYdIFqdrnhDw0PqG/AKjAqEqM7AvxCz0DQ4h2W8k6nqmc5uRBYDag0SBxx9iYz5G8gnuNVLzUe13wl9eAsXXg==",
+ "dependencies": {
+ "@remix-run/router": "1.21.0"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ },
+ "peerDependencies": {
+ "react": ">=16.8"
+ }
+ },
+ "node_modules/@scality/core-ui/node_modules/react-router-dom": {
+ "version": "6.28.0",
+ "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.28.0.tgz",
+ "integrity": "sha512-kQ7Unsl5YdyOltsPGl31zOjLrDv+m2VcIEcIHqYYD3Lp0UppLjrzcfJqDJwXxFw3TH/yvapbnUvPlAj7Kx5nbg==",
+ "dependencies": {
+ "@remix-run/router": "1.21.0",
+ "react-router": "6.28.0"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ },
+ "peerDependencies": {
+ "react": ">=16.8",
+ "react-dom": ">=16.8"
+ }
+ },
"node_modules/@scality/module-federation": {
"version": "1.3.4",
"resolved": "git+ssh://git@github.com/scality/module-federation.git#c571388783a2a51ae3bf5d36ae66753c8b014bb5",
@@ -23167,33 +23197,54 @@
}
},
"node_modules/react-router": {
- "version": "6.28.0",
- "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.28.0.tgz",
- "integrity": "sha512-HrYdIFqdrnhDw0PqG/AKjAqEqM7AvxCz0DQ4h2W8k6nqmc5uRBYDag0SBxx9iYz5G8gnuNVLzUe13wl9eAsXXg==",
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/react-router/-/react-router-7.0.1.tgz",
+ "integrity": "sha512-WVAhv9oWCNsja5AkK6KLpXJDSJCQizOIyOd4vvB/+eHGbYx5vkhcmcmwWjQ9yqkRClogi+xjEg9fNEOd5EX/tw==",
"dependencies": {
- "@remix-run/router": "1.21.0"
+ "@types/cookie": "^0.6.0",
+ "cookie": "^1.0.1",
+ "set-cookie-parser": "^2.6.0",
+ "turbo-stream": "2.4.0"
},
"engines": {
- "node": ">=14.0.0"
+ "node": ">=20.0.0"
},
"peerDependencies": {
- "react": ">=16.8"
+ "react": ">=18",
+ "react-dom": ">=18"
+ },
+ "peerDependenciesMeta": {
+ "react-dom": {
+ "optional": true
+ }
}
},
"node_modules/react-router-dom": {
- "version": "6.28.0",
- "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.28.0.tgz",
- "integrity": "sha512-kQ7Unsl5YdyOltsPGl31zOjLrDv+m2VcIEcIHqYYD3Lp0UppLjrzcfJqDJwXxFw3TH/yvapbnUvPlAj7Kx5nbg==",
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.0.1.tgz",
+ "integrity": "sha512-duBzwAAiIabhFPZfDjcYpJ+f08TMbPMETgq254GWne2NW1ZwRHhZLj7tpSp8KGb7JvZzlLcjGUnqLxpZQVEPng==",
"dependencies": {
- "@remix-run/router": "1.21.0",
- "react-router": "6.28.0"
+ "react-router": "7.0.1"
},
"engines": {
- "node": ">=14.0.0"
+ "node": ">=20.0.0"
},
"peerDependencies": {
- "react": ">=16.8",
- "react-dom": ">=16.8"
+ "react": ">=18",
+ "react-dom": ">=18"
+ }
+ },
+ "node_modules/react-router/node_modules/@types/cookie": {
+ "version": "0.6.0",
+ "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.6.0.tgz",
+ "integrity": "sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA=="
+ },
+ "node_modules/react-router/node_modules/cookie": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.0.2.tgz",
+ "integrity": "sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA==",
+ "engines": {
+ "node": ">=18"
}
},
"node_modules/react-select": {
@@ -24305,9 +24356,9 @@
}
},
"node_modules/set-cookie-parser": {
- "version": "2.4.8",
- "dev": true,
- "license": "MIT"
+ "version": "2.7.1",
+ "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.1.tgz",
+ "integrity": "sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ=="
},
"node_modules/set-value": {
"version": "2.0.1",
@@ -25869,6 +25920,11 @@
"node": "*"
}
},
+ "node_modules/turbo-stream": {
+ "version": "2.4.0",
+ "resolved": "https://registry.npmjs.org/turbo-stream/-/turbo-stream-2.4.0.tgz",
+ "integrity": "sha512-FHncC10WpBd2eOmGwpmQsWLDoK4cqsA/UT/GqNoaKOQnT8uzhtCbg3EoUDMvqpOSAI0S26mr0rkjzbOO6S3v1g=="
+ },
"node_modules/tweetnacl": {
"version": "0.14.5",
"license": "Unlicense"
@@ -32170,9 +32226,9 @@
}
},
"@scality/core-ui": {
- "version": "git+ssh://git@github.com/scality/core-ui.git#33e22729ee7317f5afecb79f06b4f873dc3e376d",
- "integrity": "sha512-OFdbDWjVWBxnSuWYlWcyX2w8KtvTNNfb1tWABUe2wxGQwcLetbvZCaLCnpGg2+HPysrB+Uzd1ol6t4yLLdpzrg==",
- "from": "@scality/core-ui@git+https://github.com/scality/core-ui#33e22729ee7317f5afecb79f06b4f873dc3e376d",
+ "version": "git+ssh://git@github.com/scality/core-ui.git#62aef0b544c50e47c5a8ceb3697fe090eb3c6a9f",
+ "integrity": "sha512-J1k8BtcEPGbzyFexYXkDdS/6sk1jBY+gN/QeljvuloMRr29OlVqTaoUtOgr6C8i0OvcanNx2OiWcWfw8za2Q7Q==",
+ "from": "@scality/core-ui@git+https://github.com/scality/core-ui#62aef0b544c50e47c5a8ceb3697fe090eb3c6a9f",
"requires": {
"@floating-ui/dom": "^1.6.3",
"@fortawesome/fontawesome-free": "^5.10.2",
@@ -32224,6 +32280,23 @@
"@floating-ui/core": "^1.0.0",
"@floating-ui/utils": "^0.2.0"
}
+ },
+ "react-router": {
+ "version": "6.28.0",
+ "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.28.0.tgz",
+ "integrity": "sha512-HrYdIFqdrnhDw0PqG/AKjAqEqM7AvxCz0DQ4h2W8k6nqmc5uRBYDag0SBxx9iYz5G8gnuNVLzUe13wl9eAsXXg==",
+ "requires": {
+ "@remix-run/router": "1.21.0"
+ }
+ },
+ "react-router-dom": {
+ "version": "6.28.0",
+ "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.28.0.tgz",
+ "integrity": "sha512-kQ7Unsl5YdyOltsPGl31zOjLrDv+m2VcIEcIHqYYD3Lp0UppLjrzcfJqDJwXxFw3TH/yvapbnUvPlAj7Kx5nbg==",
+ "requires": {
+ "@remix-run/router": "1.21.0",
+ "react-router": "6.28.0"
+ }
}
}
},
@@ -44995,20 +45068,34 @@
}
},
"react-router": {
- "version": "6.28.0",
- "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.28.0.tgz",
- "integrity": "sha512-HrYdIFqdrnhDw0PqG/AKjAqEqM7AvxCz0DQ4h2W8k6nqmc5uRBYDag0SBxx9iYz5G8gnuNVLzUe13wl9eAsXXg==",
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/react-router/-/react-router-7.0.1.tgz",
+ "integrity": "sha512-WVAhv9oWCNsja5AkK6KLpXJDSJCQizOIyOd4vvB/+eHGbYx5vkhcmcmwWjQ9yqkRClogi+xjEg9fNEOd5EX/tw==",
"requires": {
- "@remix-run/router": "1.21.0"
+ "@types/cookie": "^0.6.0",
+ "cookie": "^1.0.1",
+ "set-cookie-parser": "^2.6.0",
+ "turbo-stream": "2.4.0"
+ },
+ "dependencies": {
+ "@types/cookie": {
+ "version": "0.6.0",
+ "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.6.0.tgz",
+ "integrity": "sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA=="
+ },
+ "cookie": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.0.2.tgz",
+ "integrity": "sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA=="
+ }
}
},
"react-router-dom": {
- "version": "6.28.0",
- "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.28.0.tgz",
- "integrity": "sha512-kQ7Unsl5YdyOltsPGl31zOjLrDv+m2VcIEcIHqYYD3Lp0UppLjrzcfJqDJwXxFw3TH/yvapbnUvPlAj7Kx5nbg==",
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.0.1.tgz",
+ "integrity": "sha512-duBzwAAiIabhFPZfDjcYpJ+f08TMbPMETgq254GWne2NW1ZwRHhZLj7tpSp8KGb7JvZzlLcjGUnqLxpZQVEPng==",
"requires": {
- "@remix-run/router": "1.21.0",
- "react-router": "6.28.0"
+ "react-router": "7.0.1"
}
},
"react-select": {
@@ -45832,8 +45919,9 @@
}
},
"set-cookie-parser": {
- "version": "2.4.8",
- "dev": true
+ "version": "2.7.1",
+ "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.1.tgz",
+ "integrity": "sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ=="
},
"set-value": {
"version": "2.0.1",
@@ -47009,6 +47097,11 @@
"safe-buffer": "^5.0.1"
}
},
+ "turbo-stream": {
+ "version": "2.4.0",
+ "resolved": "https://registry.npmjs.org/turbo-stream/-/turbo-stream-2.4.0.tgz",
+ "integrity": "sha512-FHncC10WpBd2eOmGwpmQsWLDoK4cqsA/UT/GqNoaKOQnT8uzhtCbg3EoUDMvqpOSAI0S26mr0rkjzbOO6S3v1g=="
+ },
"tweetnacl": {
"version": "0.14.5"
},
diff --git a/ui/package.json b/ui/package.json
index adbcd0dcd3..556d13e533 100644
--- a/ui/package.json
+++ b/ui/package.json
@@ -7,7 +7,7 @@
"@hookform/resolvers": "^3.1.0",
"@js-temporal/polyfill": "^0.4.4",
"@kubernetes/client-node": "github:scality/kubernetes-client-javascript.git#browser-0.10.4-64-ge7c6721",
- "@scality/core-ui": "git+https://github.com/scality/core-ui#33e22729ee7317f5afecb79f06b4f873dc3e376d",
+ "@scality/core-ui": "git+https://github.com/scality/core-ui#62aef0b544c50e47c5a8ceb3697fe090eb3c6a9f",
"@scality/module-federation": "git+https://github.com/scality/module-federation#c571388783a2a51ae3bf5d36ae66753c8b014bb5",
"axios": "^0.21.1",
"formik": "2.2.5",
@@ -24,8 +24,8 @@
"react-json-view": "^1.21.3",
"react-query": "^3.34.0",
"react-redux": "^7.1.0",
- "react-router": "^6.28.0",
- "react-router-dom": "^6.28.0",
+ "react-router": "^7.0.1",
+ "react-router-dom": "^7.0.1",
"redux": "^4.0.1",
"redux-saga": "^1.0.2",
"reselect": "^2.5.4",
diff --git a/ui/src/FederableApp.tsx b/ui/src/FederableApp.tsx
index dda7b7a147..c766c79596 100644
--- a/ui/src/FederableApp.tsx
+++ b/ui/src/FederableApp.tsx
@@ -1,18 +1,6 @@
-import {
- ErrorPage404,
- ErrorPage500,
- Loader,
- ToastProvider,
-} from '@scality/core-ui';
+import { ErrorPage500, Loader, ToastProvider } from '@scality/core-ui';
import { useCurrentApp } from '@scality/module-federation';
-import {
- lazy,
- PropsWithChildren,
- ReactNode,
- Suspense,
- useEffect,
- useMemo,
-} from 'react';
+import { PropsWithChildren, ReactNode, useEffect, useMemo } from 'react';
import { Provider, useDispatch } from 'react-redux';
import { applyMiddleware, compose, createStore, Store } from 'redux';
import createSagaMiddleware from 'redux-saga';
@@ -26,22 +14,6 @@ import sagas from './ducks/sagas';
import { useTypedSelector } from './hooks';
import { AuthError } from './services/errorhandler';
import { ShellHooksProvider, useShellHooks } from './ShellHooksContext';
-import { Route, Routes } from 'react-router-dom';
-
-import CreateVolume from './containers/CreateVolume';
-import { PrivateRouteWrapper } from './containers/PrivateRoute';
-import { useIntl } from 'react-intl';
-
-const ConfigureAlerting = lazy(
- () => import('./alert-configuration/ConfigureAlerting'),
-);
-const NodeCreateForm = lazy(() => import('./containers/NodeCreateForm'));
-const NodePage = lazy(() => import('./containers/NodePage'));
-const About = lazy(() => import('./containers/About'));
-const PrivateRoute = lazy(() => import('./containers/PrivateRoute'));
-const VolumePage = lazy(() => import('./containers/VolumePage'));
-const DashboardPage = lazy(() => import('./containers/DashboardPage'));
-const AlertPage = lazy(() => import('./containers/AlertPage'));
const composeEnhancers =
// @ts-expect-error - FIXME when you are working on it
@@ -86,6 +58,7 @@ const RouterWithBaseName = ({ children }: { children: ReactNode }) => {
if (configStatus === 'idle' || configStatus === 'loading') {
return <>{children}>;
}
+
return <>{children}>;
};
type Config = {
diff --git a/ui/src/components/NodeListTable.tsx b/ui/src/components/NodeListTable.tsx
index 4937f12f56..2862f3939c 100644
--- a/ui/src/components/NodeListTable.tsx
+++ b/ui/src/components/NodeListTable.tsx
@@ -12,6 +12,7 @@ import { useIntl } from 'react-intl';
import { useNavigate, useResolvedPath } from 'react-router';
import { useLocation } from 'react-router-dom';
import styled from 'styled-components';
+import { useTypedSelector } from '../hooks';
import { useURLQuery } from '../services/utils';
import CircleStatus from './CircleStatus';
const StatusText = styled.div`
@@ -26,7 +27,11 @@ const NodeListTable = ({ nodeTableData }) => {
const query = useURLQuery();
const intl = useIntl();
const path = useResolvedPath('');
- const selectedNodeName = location?.pathname?.split('/')?.slice(2)[0] || '';
+
+ const basename = useTypedSelector((state) => state.config.api?.ui_base_path);
+
+ const selectedNodeName = location?.pathname.split('/')?.slice(2)[1] || '';
+
const columns = React.useMemo(
() => [
{
@@ -127,14 +132,14 @@ const NodeListTable = ({ nodeTableData }) => {
location.pathname.endsWith('partitions') ||
location.pathname.endsWith('details');
+ const newPath = location.pathname.replace(
+ /\/nodes\/[^/]*\//,
+ `/nodes/${nodeName}/`,
+ );
if (isTabSelected) {
- const newPath = location.pathname.replace(
- /\/nodes\/[^/]*\//,
- `/nodes/${nodeName}/`,
- );
- navigate(`${newPath}?${query.toString()}`);
+ navigate(newPath);
} else {
- navigate(`${path}/${nodeName}/overview?${query.toString()}`);
+ navigate(`${newPath}/overview?${query.toString()}`);
}
},
[navigate, location.pathname, path, query],
@@ -162,7 +167,7 @@ const NodeListTable = ({ nodeTableData }) => {
})}
icon={}
onClick={() => {
- navigate('/nodes/create');
+ navigate(basename + '/nodes/create');
}}
data-cy="create_node_button"
/>
diff --git a/ui/src/components/VolumeListTable.tsx b/ui/src/components/VolumeListTable.tsx
index bbf72e0ddb..90eb1f21d2 100644
--- a/ui/src/components/VolumeListTable.tsx
+++ b/ui/src/components/VolumeListTable.tsx
@@ -8,6 +8,7 @@ import { useTheme } from 'styled-components';
import CircleStatus from './CircleStatus';
import { Latency } from './Latency';
import { TooltipContent, UnknownIcon } from './TableRow';
+import { useTypedSelector } from '../hooks';
const VolumeListTable = (props) => {
const { volumeListData, volumeName } = props;
@@ -15,6 +16,8 @@ const VolumeListTable = (props) => {
const location = useLocation();
const intl = useIntl();
const theme = useTheme();
+ const basename = useTypedSelector((state) => state.config.api?.ui_base_path);
+
const columns = React.useMemo(() => {
return [
{
@@ -173,7 +176,7 @@ const VolumeListTable = (props) => {
});
} else {
navigate({
- pathname: `/volumes/${row.values.name}/overview`,
+ pathname: basename + `/volumes/${row.values.name}/overview`,
search: query.toString(),
});
}
@@ -202,7 +205,7 @@ const VolumeListTable = (props) => {
})}
icon={}
onClick={() => {
- navigate('/volumes/createVolume');
+ navigate(basename + '/volumes/createVolume');
}}
data-cy="create_volume_button"
/>
diff --git a/ui/src/containers/Layout.tsx b/ui/src/containers/Layout.tsx
index f8388b75d5..7ae8bf7205 100644
--- a/ui/src/containers/Layout.tsx
+++ b/ui/src/containers/Layout.tsx
@@ -2,26 +2,19 @@ import {
AppContainer,
ErrorPage404,
Icon,
- Loader,
Notifications,
Sidebar,
} from '@scality/core-ui';
-import React, { lazy, Suspense, useCallback, useEffect, useState } from 'react';
+import { lazy, useCallback, useEffect, useState } from 'react';
import { useIntl } from 'react-intl';
import { useDispatch } from 'react-redux';
-import { matchPath, MemoryRouter, Navigate, Outlet, Route } from 'react-router';
-import {
- BrowserRouter,
- Routes,
- useLocation,
- useNavigate,
-} from 'react-router-dom';
+import { matchPath, Navigate, Route } from 'react-router';
+import { Routes, useLocation, useNavigate } from 'react-router-dom';
import { removeNotificationAction } from '../ducks/app/notifications';
import { setIntlAction } from '../ducks/config';
import { useTypedSelector } from '../hooks';
import CreateVolume from './CreateVolume';
-import { PrivateRouteWrapper } from './PrivateRoute';
const ConfigureAlerting = lazy(
() => import('../alert-configuration/ConfigureAlerting'),
@@ -72,17 +65,19 @@ const Layout = () => {
};
const navigate = useNavigate();
+
const location = useLocation();
+ const basename = useTypedSelector((state) => state.config.api?.ui_base_path);
const doesRouteMatch = useCallback(
(paths: string | string[]) => {
if (Array.isArray(paths)) {
const foundMatchingRoute = paths.find(
- (path) => !!matchPath({ path, end: false }, location.pathname),
+ (path) => !!matchPath(basename + path + '*', location.pathname),
);
return !!foundMatchingRoute;
} else {
- return !!matchPath({ path: paths, end: false }, location.pathname);
+ return !!matchPath(basename + paths + '*', location.pathname);
}
},
[location.pathname],
@@ -109,7 +104,7 @@ const Layout = () => {
}),
icon: ,
onClick: () => {
- navigate('dashboard');
+ navigate(basename + '/dashboard');
},
active: doesRouteMatch('/dashboard'),
'data-cy': 'sidebar_item_dashboard',
@@ -120,7 +115,7 @@ const Layout = () => {
}),
icon: ,
onClick: () => {
- navigate('nodes');
+ navigate(basename + '/nodes');
},
active: doesRouteMatch('/nodes'),
'data-cy': 'sidebar_item_nodes',
@@ -131,7 +126,7 @@ const Layout = () => {
}),
icon: ,
onClick: () => {
- navigate('volumes');
+ navigate(basename + '/volumes');
},
active: doesRouteMatch('/volumes'),
'data-cy': 'sidebar_item_volumes',
@@ -149,103 +144,91 @@ const Layout = () => {
>
-
- <>
-
-
-
- }
- />
-
-
-
- }
- />
-
-
-
- }
- />
-
-
-
- }
- />
-
-
-
- }
- />
-
-
-
- }
- />
-
-
-
- }
- />
-
-
-
- }
- />
-
+
+
+ }
+ />
+
+
+
+ }
+ />
+
+
+
+ }
+ />
+
+
+
+ }
+ />
+
+
+
+ }
+ />
+
+
+
+ }
+ />
+
+
+
+ }
+ />
+
+
+
+ }
+ />
+ {
- return userAccessRight.canConfigureEmailNotification;
- }}
- >
-
-
- }
- />
-
-
-
- }
- />
-
- }
- />
- >
-
+ canAccess={(_, userAccessRight) => {
+ return userAccessRight.canConfigureEmailNotification;
+ }}
+ >
+
+
+ }
+ />
+ } />
+
+ }
+ />
-
);
};
diff --git a/ui/src/containers/NodePage.tsx b/ui/src/containers/NodePage.tsx
index da7df13dab..b67961d02b 100644
--- a/ui/src/containers/NodePage.tsx
+++ b/ui/src/containers/NodePage.tsx
@@ -1,12 +1,11 @@
-import React from 'react';
import { useSelector } from 'react-redux';
+import { useTheme } from 'styled-components';
import { refreshNodesAction, stopRefreshNodesAction } from '../ducks/app/nodes';
-import { useRefreshEffect } from '../services/utils';
-import NodePageContent from './NodePageContent';
+import { useTypedSelector } from '../hooks';
import { getNodeListData } from '../services/NodeUtils';
+import { useRefreshEffect } from '../services/utils';
import { useAlerts } from './AlertProvider';
-import { useTheme } from 'styled-components';
-import { useTypedSelector } from '../hooks';
+import NodePageContent from './NodePageContent';
const NodePage = (props) => {
useRefreshEffect(refreshNodesAction, stopRefreshNodesAction);
diff --git a/ui/src/containers/NodePageContent.tsx b/ui/src/containers/NodePageContent.tsx
index de5f27afd9..814f4d56e7 100644
--- a/ui/src/containers/NodePageContent.tsx
+++ b/ui/src/containers/NodePageContent.tsx
@@ -1,7 +1,7 @@
/* eslint no-unused-vars: 0 */
import { AppContainer, EmptyState, TwoPanelLayout } from '@scality/core-ui';
import { useEffect, useState } from 'react';
-import { Navigate, Route, Routes, useResolvedPath } from 'react-router-dom';
+import { Route, Routes, useNavigate, useResolvedPath } from 'react-router-dom';
import NodeListTable from '../components/NodeListTable';
import { LeftSideInstanceList } from '../components/style/CommonLayoutStyle';
import { usePrevious } from '../services/utils';
@@ -11,10 +11,9 @@ import NodePageRSP from './NodePageRSP';
const NodePageContent = (props) => {
const { nodeTableData, loading } = props;
const path = useResolvedPath('').pathname;
- console.log('NodePageContent: Rendering', path);
- const [defaultSelectNodeName, setDefaultSelectNodeName] = useState(null);
const [isFirstLoadingDone, setIsFirstLoadingDone] = useState(false);
const previousLoading = usePrevious(loading);
+ const navigate = useNavigate();
/*
** Used to determine if a first loading has happened
@@ -25,10 +24,13 @@ const NodePageContent = (props) => {
setIsFirstLoadingDone(true);
}, [previousLoading, loading, isFirstLoadingDone]);
useEffect(() => {
- if (!defaultSelectNodeName && nodeTableData[0]?.name?.name) {
- setDefaultSelectNodeName(nodeTableData[0]?.name?.name);
+ if (nodeTableData.length > 0) {
+ const firstNodeName = nodeTableData[0]?.name?.name;
+ if (firstNodeName && !path.includes(firstNodeName)) {
+ navigate(`${firstNodeName}/overview`, { replace: true });
+ }
} // eslint-disable-next-line react-hooks/exhaustive-deps
- }, [JSON.stringify(nodeTableData), defaultSelectNodeName]);
+ }, [JSON.stringify(nodeTableData)]);
if (!nodeTableData.length && isFirstLoadingDone) {
return (
@@ -57,19 +59,8 @@ const NodePageContent = (props) => {
rightPanel={{
children: (
- {/* Auto select the first node in the list */}
- ) : null
- }
- />
- }
/>
diff --git a/ui/src/containers/NodePageRSP.tsx b/ui/src/containers/NodePageRSP.tsx
index 3867e64546..ad47e4998b 100644
--- a/ui/src/containers/NodePageRSP.tsx
+++ b/ui/src/containers/NodePageRSP.tsx
@@ -105,6 +105,7 @@ const NodePageRSP = (props) => {
const workloadPlaneInterface =
nodesIPsInfo[name]?.workloadPlane?.interface ?? '';
const currentNode = nodeTableData?.find((node) => node.name.name === name);
+
useEffect(() => {
dispatch(
updateNodeStatsFetchArgumentAction({
@@ -164,7 +165,7 @@ const NodePageRSP = (props) => {
{
/>
{
{
{
{
@@ -247,7 +248,7 @@ const NodePageRSP = (props) => {
label={intl.formatMessage({
id: 'details',
})}
- path={`${url}/details`}
+ path={url.includes('/details') ? url : `${url}/details`}
>
diff --git a/ui/src/containers/PrivateRoute.tsx b/ui/src/containers/PrivateRoute.tsx
index 0c22deaf53..d887245906 100644
--- a/ui/src/containers/PrivateRoute.tsx
+++ b/ui/src/containers/PrivateRoute.tsx
@@ -1,13 +1,7 @@
import { ErrorPage401, ErrorPageAuth } from '@scality/core-ui';
import { ReactNode, useMemo } from 'react';
import { useDispatch } from 'react-redux';
-import {
- Navigate,
- Route,
- Routes,
- useLocation,
- useNavigate,
-} from 'react-router-dom';
+import { useNavigate } from 'react-router-dom';
import { updateAPIConfigAction } from '../ducks/config';
import {
UserAccessRight,
@@ -42,12 +36,16 @@ const AccessRouteGuard = ({
if (!canAccess) {
return ;
}
- console.log('AccessRouteGuard: Rendering children');
return <>{children}>;
};
+type PrivateRouteProps = {
+ children: ReactNode;
+ path?: string;
+ canAccess?: (roles: UserRoles, userAccessRight: UserAccessRight) => boolean;
+};
+
const PrivateRoute = ({ children, ...rest }: PrivateRouteProps) => {
- const location = useLocation();
const canAccess = rest.canAccess ? rest.canAccess : () => true;
const { language, api } = useTypedSelector((state) => state.config);
const { isAuthError } = useTypedSelector(
@@ -76,11 +74,6 @@ const PrivateRoute = ({ children, ...rest }: PrivateRouteProps) => {
/>
);
} else if (userData.token && userData.username) {
- if (location.pathname === '/') {
- console.log('Redirecting to /dashboard');
- return ;
- }
- console.log('Rendering children');
return (
{children}
);
@@ -95,21 +88,4 @@ const PrivateRoute = ({ children, ...rest }: PrivateRouteProps) => {
}
};
-type PrivateRouteProps = {
- children: ReactNode;
- path?: string;
- canAccess?: (roles: UserRoles, userAccessRight: UserAccessRight) => boolean;
-};
-
-export const PrivateRouteWrapper = ({
- path,
- ...props
-}: PrivateRouteProps & { path: string }) => {
- return (
-
- } />
-
- );
-};
-
export default PrivateRoute;
diff --git a/ui/src/containers/VolumePageContent.tsx b/ui/src/containers/VolumePageContent.tsx
index 35d9b6485a..423662a4bb 100644
--- a/ui/src/containers/VolumePageContent.tsx
+++ b/ui/src/containers/VolumePageContent.tsx
@@ -1,109 +1,33 @@
/* eslint-disable react-hooks/exhaustive-deps */
-import {
- AppContainer,
- EmptyState,
- TextBadge,
- TwoPanelLayout,
- spacing,
-} from '@scality/core-ui';
-import { Tabs } from '@scality/core-ui/dist/next';
+import { AppContainer, EmptyState, TwoPanelLayout } from '@scality/core-ui';
import { useEffect, useState } from 'react';
-import { useIntl } from 'react-intl';
-import { useLocation, useNavigate, useParams } from 'react-router';
-import AlertsTab from '../components/AlertsTab';
-import VolumeDetailsTab from '../components/VolumeDetailsTab';
+import { Route, Routes, useLocation, useNavigate } from 'react-router';
import VolumeListTable from '../components/VolumeListTable';
-import VolumeMetricsTab from '../components/VolumeMetricsTab';
-import VolumeOverviewTab from '../components/VolumeOverviewTab';
-import {
- LeftSideInstanceList,
- NoInstanceSelected,
- NoInstanceSelectedContainer,
- NotBoundContainer,
- RightSidePanel,
-} from '../components/style/CommonLayoutStyle';
-import {
- LVM_LOGICAL_VOLUME,
- RAW_BLOCK_DEVICE,
- SPARSE_LOOP_DEVICE,
-} from '../constants';
-import { computeVolumeGlobalStatus } from '../services/NodeVolumesUtils';
+import { LeftSideInstanceList } from '../components/style/CommonLayoutStyle';
import { usePrevious } from '../services/utils';
-import { useAlerts } from './AlertProvider';
+import { VolumePageRSP } from './VolumePageRSP';
// component extracts volume name from URL and holds the volume-specific data.
// The three components in RightSidePanel ( / / ) are dumb components,
// so that with the implementation of Tabs no re-render should happen during the switch.
const VolumePageContent = (props) => {
- const {
- volumes,
- nodes,
- volumeListData,
- pVList,
- pVCList,
- pods,
- currentVolumeObject,
- loading,
- } = props;
+ const { volumeListData, loading } = props;
const navigate = useNavigate();
const location = useLocation();
- const params = useParams();
- const query = new URLSearchParams(location.search);
const [isFirstLoadingDone, setIsFirstLoadingDone] = useState(false);
const previousLoading = usePrevious(loading);
- const intl = useIntl();
- const currentVolumeName = params.name;
+ const currentVolumeName = location?.pathname.split('/')?.slice(2)[1] || '';
+
// If data has been retrieved and no volume is selected yet we select the first one
useEffect(() => {
- if (volumeListData[0]?.name && pVCList.length && !currentVolumeName) {
- navigate(
- `/volumes/${volumeListData[0]?.name}/overview?${query.toString()}`,
- { replace: true },
- );
+ if (volumeListData.length > 0) {
+ const firstVolumeName = volumeListData[0]?.name;
+ if (firstVolumeName && !location.pathname.includes(firstVolumeName)) {
+ navigate(`${firstVolumeName}/overview`, { replace: true });
+ }
}
- }, [
- JSON.stringify(volumeListData),
- currentVolumeName,
- query.toString(),
- navigate,
- JSON.stringify(pVCList),
- ]);
- const volume = volumes?.find(
- (volume) => volume.metadata.name === currentVolumeName,
- );
- const currentVolume = volumeListData?.find(
- (vol) => vol.name === currentVolumeName,
- );
- const pV = pVList?.find((pv) => pv.metadata.name === currentVolumeName);
- const volumeStatus = computeVolumeGlobalStatus(
- volume?.metadata?.name,
- volume?.status,
- );
- // get the used pod(s)
- const PVCName = pV?.spec?.claimRef?.name;
- const PVCNamespace = pV?.spec?.claimRef?.namespace;
- // we need to make sure that `PVCName` is exist otherwise may return undefined `persistentVolumeClaim` pod
- const UsedPod =
- PVCName &&
- pods?.find((pod) =>
- pod.volumes.find((volume) => volume.persistentVolumeClaim === PVCName),
- );
- const alertsVolume = useAlerts({
- persistentvolumeclaim: PVCName,
- });
- const alertlist = alertsVolume && alertsVolume.alerts;
- const criticalAlerts = alertlist.filter(
- (alert) => alert.severity === 'critical',
- );
- // prepare the data for
- const deviceName = volume?.status?.deviceName;
- const instanceIp = nodes.find(
- (node) => node.name === volume?.spec?.nodeName,
- )?.internalIP;
- /*
- ** Used to determine if a first loading has happened
- ** This allow us to check if we need to display EmptyState or not
- */
+ }, [JSON.stringify(volumeListData)]);
+
useEffect(() => {
if (previousLoading && !loading && !isFirstLoadingDone)
setIsFirstLoadingDone(true);
@@ -122,148 +46,6 @@ const VolumePageContent = (props) => {
);
}
- const rightSidePanel =
- currentVolumeName && volume ? (
-
-
-
- vol.name === currentVolumeName)
- ?.storageCapacity
- }
- health={
- volumeListData?.find((vol) => vol.name === currentVolumeName)
- ?.health
- }
- condition={currentVolume?.status} // the delete button inside the volume detail card should know that which volume is the first one
- volumeListData={volumeListData}
- pVList={pVList}
- alertlist={alertlist}
- />
-
- 0
- ? 'statusCritical'
- : 'statusWarning'
- }
- text={`${alertlist.length}`}
- />
- ) : null
- }
- data-cy="alerts_tab_volume_page"
- withoutPadding
- >
- {PVCName ? (
-
- ) : (
-
- {intl.formatMessage({
- id: 'volume_is_not_bound',
- })}
-
- )}
-
-
-
-
-
-
-
-
-
- ) : (
-
-
- {currentVolumeName
- ? `Volume ${currentVolumeName} ${intl.formatMessage({
- id: 'not_found',
- })}`
- : intl.formatMessage({
- id: 'no_volume_selected',
- })}
-
-
- );
return (
{
),
}}
rightPanel={{
- children: rightSidePanel,
+ children: (
+
+ } />
+
+ ),
}}
/>
diff --git a/ui/src/containers/VolumePageRSP.tsx b/ui/src/containers/VolumePageRSP.tsx
new file mode 100644
index 0000000000..51e76a0c55
--- /dev/null
+++ b/ui/src/containers/VolumePageRSP.tsx
@@ -0,0 +1,205 @@
+import { useIntl } from 'react-intl';
+import { useLocation, useParams } from 'react-router';
+import { computeVolumeGlobalStatus } from '../services/NodeVolumesUtils';
+import {
+ LVM_LOGICAL_VOLUME,
+ RAW_BLOCK_DEVICE,
+ SPARSE_LOOP_DEVICE,
+} from '../constants';
+import { useAlerts } from './AlertProvider';
+import { TextBadge, spacing } from '@scality/core-ui';
+import AlertsTab from '../components/AlertsTab';
+import {
+ RightSidePanel,
+ NotBoundContainer,
+ NoInstanceSelectedContainer,
+ NoInstanceSelected,
+} from '../components/style/CommonLayoutStyle';
+import VolumeDetailsTab from '../components/VolumeDetailsTab';
+import VolumeMetricsTab from '../components/VolumeMetricsTab';
+import VolumeOverviewTab from '../components/VolumeOverviewTab';
+import { Tabs } from '@scality/core-ui/dist/next';
+
+export const VolumePageRSP = (props) => {
+ const { volumes, nodes, volumeListData, pVList, pods, currentVolumeObject } =
+ props;
+
+ const { name } = useParams();
+ const location = useLocation();
+ const intl = useIntl();
+
+ const currentVolumeName = name;
+ const volume = volumes?.find(
+ (volume) => volume.metadata.name === currentVolumeName,
+ );
+ const currentVolume = volumeListData?.find(
+ (vol) => vol.name === currentVolumeName,
+ );
+ const volumeStatus = computeVolumeGlobalStatus(
+ volume?.metadata?.name,
+ volume?.status,
+ );
+
+ const pV = pVList?.find((pv) => pv.metadata.name === currentVolumeName);
+
+ const PVCName = pV?.spec?.claimRef?.name;
+ const PVCNamespace = pV?.spec?.claimRef?.namespace;
+ const UsedPod =
+ PVCName &&
+ pods?.find((pod) =>
+ pod.volumes.find((volume) => volume.persistentVolumeClaim === PVCName),
+ );
+
+ const alertsVolume = useAlerts({
+ persistentvolumeclaim: PVCName,
+ });
+ const alertlist = alertsVolume && alertsVolume.alerts;
+ const criticalAlerts = alertlist.filter(
+ (alert) => alert.severity === 'critical',
+ );
+
+ const deviceName = volume?.status?.deviceName;
+ const instanceIp = nodes.find(
+ (node) => node.name === volume?.spec?.nodeName,
+ )?.internalIP;
+
+ return currentVolumeName && volume ? (
+
+
+
+ vol.name === currentVolumeName)
+ ?.storageCapacity
+ }
+ health={
+ volumeListData?.find((vol) => vol.name === currentVolumeName)
+ ?.health
+ }
+ condition={currentVolume?.status} // the delete button inside the volume detail card should know that which volume is the first one
+ volumeListData={volumeListData}
+ pVList={pVList}
+ alertlist={alertlist}
+ />
+
+ 0 ? 'statusCritical' : 'statusWarning'
+ }
+ text={`${alertlist.length}`}
+ />
+ ) : null
+ }
+ data-cy="alerts_tab_volume_page"
+ withoutPadding
+ >
+ {PVCName ? (
+
+ ) : (
+
+ {intl.formatMessage({
+ id: 'volume_is_not_bound',
+ })}
+
+ )}
+
+
+
+
+
+
+
+
+
+ ) : (
+
+
+ {currentVolumeName
+ ? `Volume ${currentVolumeName} ${intl.formatMessage({
+ id: 'not_found',
+ })}`
+ : intl.formatMessage({
+ id: 'no_volume_selected',
+ })}
+
+
+ );
+};