Skip to content

Commit ae588c3

Browse files
Merge pull request #6670 from topcoder-platform/enable_dashboard_on_data_science
Enable dashboard on data science
2 parents 6b6cf11 + 737c6b4 commit ae588c3

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.circleci/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,7 @@ workflows:
349349
filters:
350350
branches:
351351
only:
352+
- enable_dashboard_on_data_science
352353
- free
353354
# This is alternate dev env for parallel testing
354355
- "build-test":

src/shared/components/challenge-detail/Header/TabSelector/index.jsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,12 @@ export default function ChallengeViewSelector(props) {
4242
viewAsTable,
4343
} = props;
4444

45-
const { type, tags } = challenge;
45+
let showDashboard;
46+
const { type, tags, metadata } = challenge;
47+
const dashboardMetadata = _.find(metadata, { name: 'show_data_dashboard' });
48+
if (dashboardMetadata) {
49+
showDashboard = dashboardMetadata.value;
50+
}
4651

4752
const [currentSelected, setCurrentSelected] = useState('Details');
4853
const [isTabClosed, setIsTabClosed] = useState(true);
@@ -300,7 +305,7 @@ export default function ChallengeViewSelector(props) {
300305
return '';
301306
})()}
302307
{
303-
(isMM || challenge.track.toLowerCase() === 'data science') && (
308+
(challenge.track.toLowerCase() === 'data science' && showDashboard) && (
304309
<a
305310
tabIndex="0"
306311
role="tab"
@@ -455,6 +460,7 @@ ChallengeViewSelector.propTypes = {
455460
type: PT.string,
456461
track: PT.string,
457462
tags: PT.arrayOf(PT.shape()),
463+
metadata: PT.arrayOf(PT.string),
458464
submissionViewable: PT.string,
459465
}),
460466
isMM: PT.bool,

0 commit comments

Comments
 (0)