Skip to content

Commit

Permalink
merge: merge branch 'THU/add_run_id_dynamic_filter_PROD-14001'
Browse files Browse the repository at this point in the history
  • Loading branch information
csm-thu committed Oct 22, 2024
2 parents 7bb9645 + 16f8fa1 commit 62dbfc9
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 30 deletions.
3 changes: 2 additions & 1 deletion doc/powerBI.md
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,9 @@ scenario, its parent or root scenarios, or even the scenarios available to the u
Here is the list of dynamic filters available:

| Filter name | Description |
|----------------------------------------|------------------------------------------------------------------------|
| -------------------------------------- | ---------------------------------------------------------------------- |
| `id` | _id_ of the current scenario |
| `lastRunId` | _id of the last run_ of the current scenario |
| `csmSimulationRun` | _csm run id_ of the last run of the current scenario |
| `state` | _state_ of the current scenario |
| `name` | _name_ of the current scenario |
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"private": true,
"dependencies": {
"@cosmotech/api-ts": "^3.2.9",
"@cosmotech/azure": "^2.0.0",
"@cosmotech/azure": "^2.0.1",
"@cosmotech/core": "^1.17.0",
"@cosmotech/ui": "^9.5.1",
"@cosmotech/ui": "^9.5.2",
"@emotion/react": "^11.13.0",
"@emotion/styled": "^11.13.0",
"@microsoft/applicationinsights-web": "^3.3.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@
import React from 'react';
import { useTranslation } from 'react-i18next';
import PropTypes from 'prop-types';
import { POWER_BI_FIELD_ENUM } from '@cosmotech/azure';
import { CurrentScenarioPowerBiReport } from '../../../../components';
import { useDashboardsPowerBiReport } from './DashboardsPowerBiReportHook';

const DashboardsPowerBiReport = ({ index }) => {
const { t } = useTranslation();
const { reportsConfig, iframeRatio } = useDashboardsPowerBiReport();
const hasFiltersOnSimulationRun = reportsConfig[index]?.dynamicFilters
?.flatMap((filter) => filter.values)
.includes('csmSimulationRun');
const dynamicFilterValues = reportsConfig[index]?.dynamicFilters?.flatMap((filter) => filter.values);
const hasFiltersOnSimulationRun = dynamicFilterValues?.some(
(value) =>
[POWER_BI_FIELD_ENUM.SCENARIO_CSM_SIMULATION_RUN, POWER_BI_FIELD_ENUM.LAST_RUN_ID].includes(value) ?? false
);

const dashboardsViewSpecificLabels = {
noScenario: {
Expand Down
48 changes: 24 additions & 24 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,12 @@ __metadata:
languageName: node
linkType: hard

"@azure/msal-browser@npm:~3.19.0":
version: 3.19.0
resolution: "@azure/msal-browser@npm:3.19.0"
"@azure/msal-browser@npm:^3.20.0":
version: 3.26.1
resolution: "@azure/msal-browser@npm:3.26.1"
dependencies:
"@azure/msal-common": "npm:14.13.0"
checksum: 10c0/8cbec7f40f68d66e37e28bd0dd1fbfcc437712d30f631d61f40d9ce71219eed1ad46f819cef0b31e33e8d6bda6d7d18dc1d26d4734bc5386265c9f5d6eda8414
languageName: node
linkType: hard

"@azure/msal-common@npm:14.13.0":
version: 14.13.0
resolution: "@azure/msal-common@npm:14.13.0"
checksum: 10c0/7af1eb35aea5c5544007c8380c1bccd420336cff2268de31adc14d3cbb5657500a14c84bb223641e419c588449567eee651af81e2821d3fd46e39f2431c496d1
"@azure/msal-common": "npm:14.15.0"
checksum: 10c0/70f5062969495c6c03bb39f6703e2a02727863758cda5528b4549387f9fa6d54c3b67e790d0fca8487606fdc7339523f9290d6681250dfab87488f98a780071e
languageName: node
linkType: hard

Expand All @@ -65,6 +58,13 @@ __metadata:
languageName: node
linkType: hard

"@azure/msal-common@npm:14.15.0":
version: 14.15.0
resolution: "@azure/msal-common@npm:14.15.0"
checksum: 10c0/a7af0fdd9477055c261ec065f3479b1511ccfc80723029a51737216777f11a536df3b53cf1ec80dd09dfc10e29f7a32c63c1e6b28bf3dcc17dad06e2a54cf43f
languageName: node
linkType: hard

"@azure/msal-node@npm:^2.12.0":
version: 2.12.0
resolution: "@azure/msal-node@npm:2.12.0"
Expand Down Expand Up @@ -1770,12 +1770,12 @@ __metadata:
languageName: node
linkType: hard

"@cosmotech/azure@npm:^2.0.0":
version: 2.0.0
resolution: "@cosmotech/azure@npm:2.0.0"
"@cosmotech/azure@npm:^2.0.1":
version: 2.0.1
resolution: "@cosmotech/azure@npm:2.0.1"
dependencies:
"@azure/msal-browser": "npm:~3.19.0"
checksum: 10c0/66ebf37c797f18ad7baf2101ec164d004d3cb2dde9c45527ab10481da74535ede692460cad263e154d21644924e05d137481a08f5b00b271c6c396192816c590
"@azure/msal-browser": "npm:^3.20.0"
checksum: 10c0/2b979753822da383f5b2d6b78a4289d233154b0f738c4e45e08ec68a6761d9f697e112feb71c7b2d8f29ec0fe886b53b646ee8fa4cbfd828ccd7a68125d70e00
languageName: node
linkType: hard

Expand All @@ -1793,9 +1793,9 @@ __metadata:
languageName: node
linkType: hard

"@cosmotech/ui@npm:^9.5.1":
version: 9.5.1
resolution: "@cosmotech/ui@npm:9.5.1"
"@cosmotech/ui@npm:^9.5.2":
version: 9.5.2
resolution: "@cosmotech/ui@npm:9.5.2"
dependencies:
"@emotion/react": "npm:^11.13.0"
"@emotion/styled": "npm:^11.13.0"
Expand All @@ -1814,7 +1814,7 @@ __metadata:
react-number-format: "npm:^5.4.0"
rfdc: "npm:^1.4.1"
peerDependencies:
"@cosmotech/azure": ^1.1.2
"@cosmotech/azure": ^2.0.1
"@cosmotech/core": ^1.6.3
"@mui/icons-material": ^5.11.0
"@mui/lab": ^5.0.0-alpha.117
Expand All @@ -1824,7 +1824,7 @@ __metadata:
react: ^17.0.1
react-dom: ^17.0.1
react-i18next: ^11.8.13
checksum: 10c0/3e7b967f168937f1b67402c884bdac742597fa48f52c486fb89f48eabda8f33cf46a81593eac9c515074b62abef4482b37d93e8cee2b8adda5282c3badf3abe3
checksum: 10c0/97f5a7bbe73252b1f7a50b17d4b1d9173786ca8d47ea36b2ce70e6d63857eefc3a6d11ce3038b31a5ef0f748ed03ea7c10159c9c2dd826062f6cb97383b981af
languageName: node
linkType: hard

Expand Down Expand Up @@ -5651,9 +5651,9 @@ __metadata:
"@babel/preset-env": "npm:^7.25.2"
"@babel/preset-react": "npm:^7.24.7"
"@cosmotech/api-ts": "npm:^3.2.9"
"@cosmotech/azure": "npm:^2.0.0"
"@cosmotech/azure": "npm:^2.0.1"
"@cosmotech/core": "npm:^1.17.0"
"@cosmotech/ui": "npm:^9.5.1"
"@cosmotech/ui": "npm:^9.5.2"
"@emotion/react": "npm:^11.13.0"
"@emotion/styled": "npm:^11.13.0"
"@microsoft/applicationinsights-web": "npm:^3.3.0"
Expand Down

0 comments on commit 62dbfc9

Please sign in to comment.