Skip to content

Commit eb32416

Browse files
Update commons-ui for PR#60 (#61)
1 parent 158aff4 commit eb32416

File tree

3 files changed

+9
-21
lines changed

3 files changed

+9
-21
lines changed

package-lock.json

Lines changed: 4 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"dependencies": {
1717
"@emotion/react": "^11.11.4",
1818
"@emotion/styled": "^11.11.5",
19-
"@gridsuite/commons-ui": "0.67.0",
19+
"@gridsuite/commons-ui": "0.77.0",
2020
"@hookform/resolvers": "^3.3.4",
2121
"@mui/icons-material": "^5.15.14",
2222
"@mui/lab": "5.0.0-alpha.169",

src/services/apps-metadata.ts

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
66
*/
77

8-
import { Env } from '@gridsuite/commons-ui';
8+
import { type Env, type Metadata } from '@gridsuite/commons-ui';
99
import { getErrorMessage } from '../utils/error';
10-
import { Url } from '../utils/api-rest';
1110

1211
// TODO remove when exported in commons-ui (src/utils/AuthService.ts)
1312
type IdpSettings = {
@@ -45,19 +44,9 @@ export function fetchVersion(): Promise<VersionJson> {
4544
});
4645
}
4746

48-
export type MetadataCommon = {
49-
name: string;
50-
url: Url;
51-
appColor: string;
52-
hiddenInAppsMenu: boolean;
53-
};
54-
55-
export type MetadataStudy = MetadataCommon & {
47+
// TODO move & merge into commons-ui's MetadataStudy
48+
export type MetadataStudy = Metadata & {
5649
readonly name: 'Study';
57-
resources?: {
58-
types: string[];
59-
path: string;
60-
}[];
6150
predefinedEquipmentProperties?: {
6251
substation?: {
6352
region?: string[];
@@ -78,7 +67,7 @@ export type MetadataStudy = MetadataCommon & {
7867

7968
// https://github.com/gridsuite/deployment/blob/main/docker-compose/docker-compose.base.yml
8069
// https://github.com/gridsuite/deployment/blob/main/k8s/resources/common/config/apps-metadata.json
81-
export type MetadataJson = MetadataCommon | MetadataStudy;
70+
export type MetadataJson = Metadata | MetadataStudy;
8271

8372
export function fetchAppsAndUrls(): Promise<MetadataJson[]> {
8473
console.debug('Fetching apps and urls...');

0 commit comments

Comments
 (0)