Skip to content

Commit 4934237

Browse files
lizardKantleblanc
authored andcommitted
fix(server.sidebar): change exchange config (#1020)
1 parent 441fa15 commit 4934237

File tree

2 files changed

+4
-74
lines changed

2 files changed

+4
-74
lines changed

packages/manager/modules/server-sidebar/src/sidebar.constants.js

Lines changed: 3 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import get from 'lodash/get';
12
import { DEDICATED, CLOUD } from './constants';
23

34
export const DEDICATED_SERVER_CONFIG = {
@@ -108,41 +109,6 @@ export const NETWORKS_CONFIG = {
108109
regions: ['EU', 'CA'],
109110
};
110111

111-
export const OLD_MICROSOFT_CONFIG = {
112-
id: 'microsoft',
113-
children: [
114-
{
115-
id: 'exchange',
116-
types: [
117-
{
118-
path: '/email/exchange',
119-
icon: 'ms-Icon ms-Icon--ExchangeLogo',
120-
loadOnState: 'app.microsoft.exchange',
121-
stateParams: ['organizationId'],
122-
app: [DEDICATED],
123-
types: [
124-
{
125-
path: '/email/exchange/:organizationId/service',
126-
icon: 'ms-Icon ms-Icon--ExchangeLogo',
127-
state: 'app.microsoft.exchange',
128-
stateParams: ['organizationId', 'productId'], // TODO: state
129-
app: [DEDICATED],
130-
},
131-
],
132-
},
133-
],
134-
loadOnState: 'app.microsoft.exchange',
135-
icon: 'ms-Icon ms-Icon--ExchangeLogo',
136-
app: [DEDICATED],
137-
},
138-
],
139-
forceDisplaySearch: true,
140-
loadOnState: 'app.microsoft',
141-
icon: 'ms-Icon ms-Icon--WindowsLogo',
142-
app: [DEDICATED],
143-
regions: ['CA'],
144-
};
145-
146112
export const MICROSOFT_CONFIG = {
147113
id: 'microsoft_exchange',
148114
types: [
@@ -154,7 +120,7 @@ export const MICROSOFT_CONFIG = {
154120
app: [DEDICATED],
155121
types: [
156122
{
157-
path: '/email/exchange/:organization/service',
123+
path: '/email/exchange',
158124
icon: 'ms-Icon ms-Icon--ExchangeLogo',
159125
getState: ({ offer }) => {
160126
const states = {
@@ -163,8 +129,7 @@ export const MICROSOFT_CONFIG = {
163129
dedicatedCluster: 'app.microsoft.exchange.dedicatedCluster',
164130
hosted: 'app.microsoft.exchange.hosted',
165131
};
166-
167-
return states[offer];
132+
return get(states, offer);
168133
},
169134
stateParams: ['organization', 'productId'],
170135
app: [DEDICATED],

packages/manager/modules/server-sidebar/src/web.constants.js

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ export const MICROSOFT_CONFIG = {
167167
id: 'exchange',
168168
types: [
169169
{
170-
path: '/email/exchange/*/service',
170+
path: '/email/exchange',
171171
icon: 'ms-Icon ms-Icon--ExchangeLogo',
172172
getState: ({ offer }) => {
173173
const states = {
@@ -224,41 +224,6 @@ export const MICROSOFT_CONFIG = {
224224
regions: ['EU'],
225225
};
226226

227-
/* export const MICROSOFT_CONFIG = {
228-
id: 'microsoft_exchange',
229-
types: [
230-
{
231-
path: '/email/exchange',
232-
icon: 'ms-Icon ms-Icon--ExchangeLogo',
233-
loadOnState: 'app.microsoft.exchange',
234-
stateParams: ['organization'],
235-
app: [WEB],
236-
types: [
237-
{
238-
path: '/email/exchange/:organization/service',
239-
icon: 'ms-Icon ms-Icon--ExchangeLogo',
240-
getState: ({ offer }) => {
241-
const states = {
242-
provider: 'app.microsoft.exchange.provider',
243-
dedicated: 'app.microsoft.exchange.dedicated',
244-
dedicatedCluster: 'app.microsoft.exchange.dedicatedCluster',
245-
hosted: 'app.microsoft.exchange.hosted',
246-
};
247-
248-
return states[offer];
249-
},
250-
stateParams: ['organization', 'productId'],
251-
app: [WEB],
252-
},
253-
],
254-
},
255-
],
256-
loadOnState: 'app.microsoft.exchange',
257-
icon: 'ms-Icon ms-Icon--ExchangeLogo',
258-
app: [WEB],
259-
regions: ['CA'],
260-
};
261-
*/
262227
export const WEB_SIDEBAR_CONFIG = [
263228
DOMAIN_CONFIG,
264229
HOSTING_CONFIG,

0 commit comments

Comments
 (0)