Skip to content

Commit 8c713f5

Browse files
Merge pull request #1873 from carbon-design-system/mroio-and-apm-suiteHeader
feat(suiteheader): mroio and apm data
2 parents fc3a0e1 + 890fd3c commit 8c713f5

2 files changed

Lines changed: 30 additions & 0 deletions

File tree

src/components/SuiteHeader/util/suiteHeaderData.fixture.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,14 @@ const fixture = {
347347
url: 'https://myeam.mydomain.com',
348348
creationTimestamp: '2020-08-24T11:56:12-05:00',
349349
},
350+
'/config/mroio': {
351+
url: 'https://mymroio.mydomain.com',
352+
creationTimestamp: '2020-08-24T11:56:12-05:00',
353+
},
354+
'/config/apm': {
355+
dashboard: 'https://myapm.mydomain.com',
356+
creationTimestamp: '2020-08-24T11:56:12-05:00',
357+
},
350358
'/users/mas-admin/surveys/suite': {
351359
id: 'suite',
352360
delayIntervalDays: 30,

src/components/SuiteHeader/util/suiteHeaderData.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,8 @@ const getSuiteHeaderData = async ({
194194
const profileData = await api('GET', '/profile');
195195
const appsData = await api('GET', '/applications');
196196
const eamData = await api('GET', '/config/eam');
197+
const mroioData = await api('GET', '/config/mroio');
198+
const apmData = await api('GET', '/config/apm');
197199
const i18nData = await api('GET', `/i18n/header/${isTest ? 'en' : lang}`);
198200

199201
// Routes
@@ -228,6 +230,26 @@ const getSuiteHeaderData = async ({
228230
},
229231
]
230232
: []),
233+
...(mroioData?.url
234+
? [
235+
{
236+
id: 'mroio',
237+
name: 'MRO Inventory Optimization',
238+
href: mroioData.url,
239+
isExternal: true,
240+
},
241+
]
242+
: []),
243+
...(apmData?.dashboard
244+
? [
245+
{
246+
id: 'apm',
247+
name: 'Asset Performance Management for Energy and Utilities',
248+
href: apmData.dashboard,
249+
isExternal: true,
250+
},
251+
]
252+
: []),
231253
...applications,
232254
],
233255
i18n,

0 commit comments

Comments
 (0)