@@ -14,14 +14,11 @@ const DEFAULT_LABELS = {
1414 inProgress : { label : 'Scenario run in progress...' } ,
1515 hasErrors : { label : 'An error occured during the scenario run' } ,
1616 hasUnknownStatus : {
17- label : 'This scenario has an unknown state, if the problem persists, please, contact your administrator' ,
17+ label : 'This scenario has an unknown state. If the problem persists, please contact your administrator. ' ,
1818 } ,
1919 resultsDisplayDisabled : 'Display of results is disabled' ,
2020 downloadButton : 'Download logs' ,
21- errors : {
22- unknown : 'Unknown error' ,
23- details : 'Something went wrong when fetching PowerBI reports info' ,
24- } ,
21+ noTokenForBI : 'Authentication failed. If the problem persists, please contact your administrator.' ,
2522} ;
2623
2724const forgeDashboardPlaceholder = ( {
@@ -32,6 +29,7 @@ const forgeDashboardPlaceholder = ({
3229 labels : tmpLabels ,
3330 scenario,
3431 scenarioDTO,
32+ hasTokenForBI,
3533} ) => {
3634 const labels = { ...DEFAULT_LABELS , ...tmpLabels } ;
3735
@@ -44,21 +42,20 @@ const forgeDashboardPlaceholder = ({
4442
4543 if ( alwaysShowReports && ! disabled ) return null ;
4644 if ( noScenario ) return < DashboardPlaceholderLayout label = { labels . noScenario . label } title = { labels . noScenario . title } /> ;
47- if ( noRun ) return < DashboardPlaceholderLayout label = { labels . noRun . label } title = { labels . noRun . title } /> ;
48- if ( runInProgress )
49- return < DashboardPlaceholderLayout label = { labels . inProgress . label } title = { labels . inProgress . title } inProgress /> ;
45+ if ( noRun ) return < DashboardPlaceholderLayout label = { labels . noRun . label } /> ;
46+ if ( runInProgress ) return < DashboardPlaceholderLayout label = { labels . inProgress . label } inProgress /> ;
5047 if ( hasError )
5148 return (
5249 < DashboardPlaceholderLayout
5350 label = { labels . hasErrors . label }
54- title = { labels . hasErrors . title }
5551 downloadLogsFile = { downloadLogsFile }
5652 downloadLabel = { labels . downloadButton }
5753 />
5854 ) ;
5955 if ( hasUnknownStatus ) return < DashboardPlaceholderLayout label = { labels . hasUnknownStatus . label } /> ;
6056 if ( disabled ) return < DashboardPlaceholderLayout label = { labels . resultsDisplayDisabled } /> ;
6157 if ( noDashboardConfigured ) return < DashboardPlaceholderLayout label = { labels . noDashboard . label } /> ;
58+ if ( ! hasTokenForBI ) return < DashboardPlaceholderLayout label = { labels . noTokenForBI } /> ;
6259 return null ;
6360} ;
6461
0 commit comments