Skip to content

Commit

Permalink
Merge pull request #5896 from DilshanSenarath/sso-templates
Browse files Browse the repository at this point in the history
Update the application section to support SSO integration templates
  • Loading branch information
DilshanSenarath committed Aug 9, 2024
2 parents e7fde3c + c6364a2 commit bec7f42
Show file tree
Hide file tree
Showing 171 changed files with 13,841 additions and 3,712 deletions.
13 changes: 13 additions & 0 deletions .changeset/fast-rules-complain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
"@wso2is/admin.applications.v1": minor
"@wso2is/console": minor
"@wso2is/admin.application-templates.v1": major
"@wso2is/admin.template-core.v1": major
"@wso2is/admin.connections.v1": patch
"@wso2is/admin.extensions.v1": patch
"@wso2is/admin.core.v1": patch
"@wso2is/unit-testing": patch
"@wso2is/i18n": patch
---

Update the application section to support SSO integration templates
7 changes: 7 additions & 0 deletions .changeset/giant-crabs-worry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@wso2is/react-components": minor
---

- Improve the React Markdown component to have the documentation theme
- Add support for automatic tab redirection based on tab ID
- Enhance the link component to include a title attribute
5 changes: 5 additions & 0 deletions .changeset/rich-buses-matter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@wso2is/form": minor
---

Add a file-picker adapter and update the style of the text field adapter for read-only mode
Original file line number Diff line number Diff line change
Expand Up @@ -1683,6 +1683,13 @@
{% endfor %}
{% endif %}
],
"hiddenApplicationTemplates": [
{% if console.ui.hiddenApplicationTemplates is defined %}
{% for value in console.ui.hiddenApplicationTemplates %}
"{{ value }}"{{ "," if not loop.last }}
{% endfor %}
{% endif %}
],
"hiddenUserStores": [
{% if console.ui.hidden_user_stores is defined %}
{% for value in console.ui.hidden_user_stores %}
Expand Down
4 changes: 3 additions & 1 deletion apps/console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@
"slashes": "^2.0.2",
"styled-components": "^4.4.1",
"swr": "^2.0.0",
"uuid": "^8.3.0"
"uuid": "^8.3.0",
"@wso2is/admin.application-templates.v1": "^1.0.0",
"@wso2is/admin.template-core.v1": "^1.0.0"
},
"devDependencies": {
"@pmmmwh/react-refresh-webpack-plugin": "^0.4.3",
Expand Down
86 changes: 47 additions & 39 deletions apps/console/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import { BasicUserInfo, DecodedIDTokenPayload, useAuthContext } from "@asgardeo/auth-react";
import { AccessControlProvider, AllFeatureInterface, FeatureGateInterface } from "@wso2is/access-control";
import { ApplicationTemplateConstants } from "@wso2is/admin.application-templates.v1/constants/templates";
import { EventPublisher, PreLoader } from "@wso2is/admin.core.v1";
import { ProtectedRoute } from "@wso2is/admin.core.v1/components";
import { Config, DocumentationLinks } from "@wso2is/admin.core.v1/configs";
Expand All @@ -34,6 +35,8 @@ import { AppState } from "@wso2is/admin.core.v1/store";
import { commonConfig } from "@wso2is/admin.extensions.v1";
import { useGetAllFeatures } from "@wso2is/admin.extensions.v1/components/feature-gate/api/feature-gate";
import { featureGateConfig } from "@wso2is/admin.extensions.v1/configs/feature-gate";
import { ResourceTypes } from "@wso2is/admin.template-core.v1/models/templates";
import ExtensionTemplatesProvider from "@wso2is/admin.template-core.v1/provider/extension-templates-provider";
import { AppConstants as CommonAppConstants } from "@wso2is/core/constants";
import { IdentityAppsApiException } from "@wso2is/core/exceptions";
import { CommonHelpers, isPortalAccessGranted } from "@wso2is/core/helpers";
Expand Down Expand Up @@ -466,46 +469,51 @@ export const App: FunctionComponent<Record<string, never>> = (): ReactElement =>
</Trans>)
}
/>
<Switch>
<Redirect
exact
from="/"
to={ AppConstants.getAppHomePath() }
/>
{
baseRoutes.map((route: RouteInterface, index: number) => {
return (
route.protected ?
(
<ProtectedRoute
component={ route.component }
path={ route.path }
key={ index }
exact={ route.exact }
/>
)
:
(
<Route
path={ route.path }
render={
(props: RouteComponentProps<
{ [p: string]: string },
StaticContext, unknown
>) => {
return (<route.component
{ ...props }
/>);
<ExtensionTemplatesProvider
resourceType={ ResourceTypes.APPLICATIONS }
categories={ ApplicationTemplateConstants.SUPPORTED_CATEGORIES_INFO }
>
<Switch>
<Redirect
exact
from="/"
to={ AppConstants.getAppHomePath() }
/>
{
baseRoutes.map((route: RouteInterface, index: number) => {
return (
route.protected ?
(
<ProtectedRoute
component={ route.component }
path={ route.path }
key={ index }
exact={ route.exact }
/>
)
:
(
<Route
path={ route.path }
render={
(props: RouteComponentProps<
{ [p: string]: string },
StaticContext, unknown
>) => {
return (<route.component
{ ...props }
/>);
}
}
}
key={ index }
exact={ route.exact }
/>
)
);
})
}
</Switch>
key={ index }
exact={ route.exact }
/>
)
);
})
}
</Switch>
</ExtensionTemplatesProvider>
</>
</SessionManagementProvider>
</AccessControlProvider>
Expand Down
2 changes: 1 addition & 1 deletion apps/console/src/configs/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ export const getAppViewRoutes = (): RouteInterface[] => {
category: "console:develop.features.sidePanel.categories.application",
children: [
{
component: lazy(() => import("@wso2is/admin.applications.v1/pages/application-template")),
component: lazy(() => import("@wso2is/admin.application-templates.v1/pages/application-template")),
exact: true,
icon: {
icon: getSidePanelIcons().childIcon
Expand Down
1 change: 1 addition & 0 deletions apps/console/src/public/deployment.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -1100,6 +1100,7 @@
"gravatarConfig": {
"fallback": "404"
},
"hiddenApplicationTemplates": [],
"hiddenAuthenticators": [
"BasicAuthRequestPathAuthenticator",
"OAuthRequestPathAuthenticator"
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit bec7f42

Please sign in to comment.