From 2f681351e78436d7c8732ae9e33e6cba4a6326e0 Mon Sep 17 00:00:00 2001 From: Roel van der Wegen Date: Wed, 19 Jul 2023 22:21:28 +0200 Subject: [PATCH 1/2] Create portals.json --- src/data/portals.json | 66 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 src/data/portals.json diff --git a/src/data/portals.json b/src/data/portals.json new file mode 100644 index 000000000000..264b8a4aaab0 --- /dev/null +++ b/src/data/portals.json @@ -0,0 +1,66 @@ +[ + { + "label" : "M365 Portal", + "name" : "M365_Portal", + "url" : "https://portal.office.com/Partner/BeginClientSession.aspx?CTID=${row.customerId}&CSDEST=o365admincenter", + "variable" : "${row.customerId}", + "target" : "_blank", + "external" : true + }, + { + "label" : "Exchange Portal", + "name" : "Exchange_Portal", + "url" : "https://admin.exchange.microsoft.com/?landingpage=homepage&form=mac_sidebar&delegatedOrg=${row.defaultDomainName}#", + "variable" : "${row.defaultDomainName}", + "target" : "_blank", + "external" : true + }, + { + "label" : "Entra Portal", + "name" : "Entra_Portal", + "url" : "https://entra.microsoft.com/${row.defaultDomainName}", + "variable" : "${row.defaultDomainName}", + "target" : "_blank", + "external" : true + }, + { + "label" : "Teams Portal", + "name" : "Teams_Portal", + "url" : "https://admin.teams.microsoft.com/?delegatedOrg=${row.defaultDomainName}", + "variable" : "${row.defaultDomainName}", + "target" : "_blank", + "external" : true + }, + { + "label" : "Azure Portal", + "name" : "Azure_Portal", + "url" : "https://portal.azure.com/${row.defaultDomainName}", + "variable" : "${row.defaultDomainName}", + "target" : "_blank", + "external" : true + }, + { + "label" : "Intune Portal", + "name" : "Intune_Portal", + "url" : "https://intune.microsoft.com/${row.defaultDomainName}", + "variable" : "${row.defaultDomainName}", + "target" : "_blank", + "external" : true + }, + { + "label" : "Security Portal", + "name" : "Security_Portal", + "url" : "https://security.microsoft.com/?tid=${row.customerId}", + "variable" : "${row.customerId}", + "target" : "_blank", + "external" : true + }, + { + "label" : "Sharepoint Admin", + "name" : "Sharepoint_Admin", + "url" : "https://admin.microsoft.com/Partner/beginclientsession.aspx?CTID=${row.customerId}&CSDEST=SharePoint", + "variable" : "${row.customerId}", + "target" : "_blank", + "external" : true + } +] From a005d17034f26610ccd6aae15b748d25533669f6 Mon Sep 17 00:00:00 2001 From: Roel van der Wegen Date: Wed, 19 Jul 2023 22:22:18 +0200 Subject: [PATCH 2/2] Update Tenants.js --- src/views/tenant/administration/Tenants.js | 127 ++++++++++++++------- 1 file changed, 88 insertions(+), 39 deletions(-) diff --git a/src/views/tenant/administration/Tenants.js b/src/views/tenant/administration/Tenants.js index f3431c1a8eb7..45f6d7769a5e 100644 --- a/src/views/tenant/administration/Tenants.js +++ b/src/views/tenant/administration/Tenants.js @@ -15,6 +15,7 @@ import { CippActionsOffcanvas } from 'src/components/utilities' import { useLazyGenericGetRequestQuery } from 'src/store/api/app' import Skeleton from 'react-loading-skeleton' import { TitleButton } from 'src/components/buttons' +import Portals from 'src/data/portals' const Offcanvas = (row, rowIndex, formatExtraData) => { const [getTenantDetails, tenantDetails] = useLazyGenericGetRequestQuery() @@ -86,59 +87,83 @@ const Offcanvas = (row, rowIndex, formatExtraData) => { }, { icon: , - label: 'M365 Portal', - link: `https://portal.office.com/Partner/BeginClientSession.aspx?CTID=${row.customerId}&CSDEST=o365admincenter`, + label: Portals.find((obj) => obj.name === 'M365_Portal').label, external: true, color: 'info', + link: Portals.find((obj) => obj.name === 'M365_Portal').url.replace( + '${row.customerId}', + row.customerId, + ), }, { icon: , - label: 'Exchange Portal', - color: 'info', + label: Portals.find((obj) => obj.name === 'Exchange_Portal').label, external: true, - link: `https://admin.exchange.microsoft.com/?landingpage=homepage&form=mac_sidebar&delegatedOrg=${row.defaultDomainName}#`, + color: 'info', + link: Portals.find((obj) => obj.name === 'Exchange_Portal').url.replace( + '${row.customerId}', + row.customerId, + ), }, { icon: , - label: 'Entra Portal', - color: 'info', + label: Portals.find((obj) => obj.name === 'Entra_Portal').label, external: true, - link: `https://entra.microsoft.com/${row.defaultDomainName}`, + color: 'info', + link: Portals.find((obj) => obj.name === 'Entra_Portal').url.replace( + '${row.customerId}', + row.customerId, + ), }, { icon: , - label: 'Teams Portal', - color: 'info', + label: Portals.find((obj) => obj.name === 'Teams_Portal').label, external: true, - link: `https://admin.teams.microsoft.com/?delegatedOrg=${row.defaultDomainName}`, + color: 'info', + link: Portals.find((obj) => obj.name === 'Teams_Portal').url.replace( + '${row.customerId}', + row.customerId, + ), }, { icon: , - label: 'Azure Portal', - color: 'info', + label: Portals.find((obj) => obj.name === 'Azure_Portal').label, external: true, - link: `https://portal.azure.com/${row.defaultDomainName}`, + color: 'info', + link: Portals.find((obj) => obj.name === 'Azure_Portal').url.replace( + '${row.customerId}', + row.customerId, + ), }, { icon: , - label: 'MEM (Intune) Portal', - color: 'info', + label: Portals.find((obj) => obj.name === 'Intune_Portal').label, external: true, - link: `https://intune.microsoft.com/${row.defaultDomainName}`, + color: 'info', + link: Portals.find((obj) => obj.name === 'Intune_Portal').url.replace( + '${row.customerId}', + row.customerId, + ), }, { icon: , - label: 'Security Portal (GDAP)', - color: 'info', + label: Portals.find((obj) => obj.name === 'Security_Portal').label, external: true, - link: `https://security.microsoft.com/?tid=${row.customerId}`, + color: 'info', + link: Portals.find((obj) => obj.name === 'Security_Portal').url.replace( + '${row.customerId}', + row.customerId, + ), }, { icon: , - label: 'Sharepoint Admin', - color: 'info', + label: Portals.find((obj) => obj.name === 'Sharepoint_Admin').label, external: true, - link: `https://admin.microsoft.com/Partner/beginclientsession.aspx?CTID=${row.customerId}&CSDEST=SharePoint`, + color: 'info', + link: Portals.find((obj) => obj.name === 'Sharepoint_Admin').url.replace( + '${row.customerId}', + row.customerId, + ), }, ]} placement="end" @@ -189,13 +214,16 @@ const TenantsList = () => { minWidth: '200px', }, { - name: 'M365 Portal', + name: Portals.find((obj) => obj.name === 'M365_Portal').label, omit: columnOmits, selector: (row) => row['customerId'], center: true, cell: (row) => ( obj.name === 'M365_Portal').url.replace( + '${row.customerId}', + row.customerId, + )} target="_blank" className="dlink" rel="noreferrer" @@ -205,13 +233,16 @@ const TenantsList = () => { ), }, { - name: 'Exchange Portal', + name: Portals.find((obj) => obj.name === 'Exchange_Portal').label, omit: columnOmits, selector: (row) => row['defaultDomainName'], center: true, cell: (row) => ( obj.name === 'Exchange_Portal').url.replace( + '${row.defaultDomainName}', + row.defaultDomainName, + )} target="_blank" className="dlink" rel="noreferrer" @@ -221,13 +252,16 @@ const TenantsList = () => { ), }, { - name: 'Entra Portal', + name: Portals.find((obj) => obj.name === 'Entra_Portal').label, omit: columnOmits, selector: (row) => row['defaultDomainName'], center: true, cell: (row) => ( obj.name === 'Entra_Portal').url.replace( + '${row.defaultDomainName}', + row.defaultDomainName, + )} target="_blank" className="dlink" rel="noreferrer" @@ -237,13 +271,16 @@ const TenantsList = () => { ), }, { - name: 'Teams Portal', + name: Portals.find((obj) => obj.name === 'Teams_Portal').label, omit: columnOmits, selector: (row) => row['defaultDomainName'], center: true, cell: (row) => ( obj.name === 'Teams_Portal').url.replace( + '${row.defaultDomainName}', + row.defaultDomainName, + )} target="_blank" className="dlink" rel="noreferrer" @@ -253,13 +290,16 @@ const TenantsList = () => { ), }, { - name: 'Azure Portal', + name: Portals.find((obj) => obj.name === 'Azure_Portal').label, omit: columnOmits, selector: (row) => row['defaultDomainName'], center: true, cell: (row) => ( obj.name === 'Azure_Portal').url.replace( + '${row.defaultDomainName}', + row.defaultDomainName, + )} target="_blank" className="dlink" rel="noreferrer" @@ -269,13 +309,16 @@ const TenantsList = () => { ), }, { - name: 'MEM (Intune) Portal', + name: Portals.find((obj) => obj.name === 'Intune_Portal').label, omit: columnOmits, selector: (row) => row['defaultDomainName'], center: true, cell: (row) => ( obj.name === 'Intune_Portal').url.replace( + '${row.defaultDomainName}', + row.defaultDomainName, + )} target="_blank" className="dlink" rel="noreferrer" @@ -285,13 +328,16 @@ const TenantsList = () => { ), }, { - name: 'Security Portal (GDAP)', + name: Portals.find((obj) => obj.name === 'Security_Portal').label, selector: (row) => row['defaultDomainName'], center: true, omit: columnOmits, cell: (row) => ( obj.name === 'Security_Portal').url.replace( + '${row.customerId}', + row.customerId, + )} target="_blank" className="dlink" rel="noreferrer" @@ -301,13 +347,16 @@ const TenantsList = () => { ), }, { - name: 'SharePoint Admin', + name: Portals.find((obj) => obj.name === 'Sharepoint_Admin').label, selector: (row) => row['defaultDomainName'], center: true, omit: columnOmits, cell: (row) => ( obj.name === 'Sharepoint_Admin').url.replace( + '${row.customerId}', + row.customerId, + )} target="_blank" className="dlink" rel="noreferrer"