@redhat-cloud-services/frontend-components-config-utilities 1.4.10 → 1.4.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cookieTransform.js +2 -1
- package/federated-modules.js +1 -0
- package/package.json +1 -1
- package/proxy.js +10 -7
- package/standalone/services/default/keycloak/realm_export.json +568 -371
package/cookieTransform.js
CHANGED
|
@@ -8,7 +8,8 @@ const defaultEntitlements = {
|
|
|
8
8
|
openshift: { is_entitled: true },
|
|
9
9
|
hybrid: { is_entitled: true },
|
|
10
10
|
migrations: { is_entitled: true },
|
|
11
|
-
ansible: { is_entitled: true }
|
|
11
|
+
ansible: { is_entitled: true },
|
|
12
|
+
cost_management: { is_entitled: true }
|
|
12
13
|
};
|
|
13
14
|
|
|
14
15
|
function cookieTransform(proxyReq, req, _res, { entitlements = defaultEntitlements, user, internal, identity: customIdentity }) {
|
package/federated-modules.js
CHANGED
|
@@ -8,6 +8,7 @@ const include = {
|
|
|
8
8
|
'@patternfly/react-table': {},
|
|
9
9
|
'@patternfly/react-tokens': {},
|
|
10
10
|
'@patternfly/react-icons': {},
|
|
11
|
+
'@patternfly/quickstarts': { singleton: true },
|
|
11
12
|
'@redhat-cloud-services/frontend-components': {},
|
|
12
13
|
'@redhat-cloud-services/frontend-components-utilities': {},
|
|
13
14
|
'@redhat-cloud-services/frontend-components-notifications': {},
|
package/package.json
CHANGED
package/proxy.js
CHANGED
|
@@ -30,6 +30,7 @@ module.exports = ({
|
|
|
30
30
|
proxyVerbose,
|
|
31
31
|
useCloud = false,
|
|
32
32
|
target = '',
|
|
33
|
+
keycloakUri = '',
|
|
33
34
|
registry = []
|
|
34
35
|
}) => {
|
|
35
36
|
const proxy = [];
|
|
@@ -83,8 +84,7 @@ module.exports = ({
|
|
|
83
84
|
ws: true,
|
|
84
85
|
onProxyReq: cookieTransform,
|
|
85
86
|
...(currTarget === 'PORTAL_BACKEND_MARKER' && { router }),
|
|
86
|
-
...typeof redirect === 'object' ? redirect : {}
|
|
87
|
-
...(agent && { agent })
|
|
87
|
+
...typeof redirect === 'object' ? redirect : {}
|
|
88
88
|
};
|
|
89
89
|
})
|
|
90
90
|
);
|
|
@@ -209,11 +209,14 @@ module.exports = ({
|
|
|
209
209
|
console.log('\u001b[0m');
|
|
210
210
|
}
|
|
211
211
|
},
|
|
212
|
-
|
|
212
|
+
onBeforeSetupMiddleware({ app, compiler, options }) {
|
|
213
213
|
app.enable('strict routing'); // trailing slashes are mean
|
|
214
214
|
let chromePath = localChrome;
|
|
215
215
|
if (standaloneConfig) {
|
|
216
|
-
|
|
216
|
+
if (standaloneConfig.chrome) {
|
|
217
|
+
chromePath = resolvePath(reposDir, standaloneConfig.chrome.path);
|
|
218
|
+
keycloakUri = standaloneConfig.chrome.keycloakUri;
|
|
219
|
+
}
|
|
217
220
|
} else if (!localChrome && useProxy) {
|
|
218
221
|
if (typeof defaultServices.chrome === 'function') {
|
|
219
222
|
defaultServices.chrome = defaultServices.chrome({});
|
|
@@ -230,15 +233,15 @@ module.exports = ({
|
|
|
230
233
|
registerChrome({
|
|
231
234
|
app,
|
|
232
235
|
chromePath,
|
|
233
|
-
keycloakUri
|
|
234
|
-
https: Boolean(
|
|
236
|
+
keycloakUri,
|
|
237
|
+
https: Boolean(options.https),
|
|
235
238
|
proxyVerbose
|
|
236
239
|
});
|
|
237
240
|
}
|
|
238
241
|
|
|
239
242
|
registry.forEach(cb => cb({
|
|
240
243
|
app,
|
|
241
|
-
|
|
244
|
+
options,
|
|
242
245
|
compiler,
|
|
243
246
|
config: standaloneConfig
|
|
244
247
|
}));
|