Skip to content

Commit

Permalink
Merge pull request #7189 from pavinduLakshan/enable_saml_info_urls
Browse files Browse the repository at this point in the history
  • Loading branch information
pavinduLakshan authored Dec 10, 2024
2 parents 50f44f8 + 956a9db commit b011654
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 58 deletions.
5 changes: 5 additions & 0 deletions .changeset/healthy-poems-serve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@wso2is/admin.applications.v1": patch
---

Enable destination URL and artifact resolution URL for all tenants
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@
* under the License.
*/
import { ArrowRightToBracketIcon, CirclesOverlapIcon, DocumentIcon } from "@oxygen-ui/react-icons";
import { AppState, FeatureConfigInterface, store } from "@wso2is/admin.core.v1";
import { store } from "@wso2is/admin.core.v1/store";
import { TestableComponentInterface } from "@wso2is/core/models";
import { CertificateManagementUtils } from "@wso2is/core/utils";
import { CopyInputField, GenericIcon } from "@wso2is/react-components";
import { saveAs } from "file-saver";
import React, { FunctionComponent, ReactElement } from "react";
import { useTranslation } from "react-i18next";
import { useSelector } from "react-redux";
import { Button, Form, Grid, Icon } from "semantic-ui-react";
import { getHelpPanelIcons } from "../../configs/ui";
import { SAMLApplicationConfigurationInterface } from "../../models";
Expand Down Expand Up @@ -54,8 +53,6 @@ export const SAMLConfigurations: FunctionComponent<SAMLConfigurationsPropsInterf
const { t } = useTranslation();

const tenantName: string = store.getState().config.deployment.tenant;
const featureConfig: FeatureConfigInterface = useSelector(
(state: AppState) => state.config.ui.features);

const exportMetadataFile = () => {
const blob: Blob = new Blob([ samlConfigurations?.metadata ], {
Expand Down Expand Up @@ -140,60 +137,56 @@ export const SAMLConfigurations: FunctionComponent<SAMLConfigurationsPropsInterf
/>
</Grid.Column>
</Grid.Row>
{
featureConfig?.server?.enabled && (
<>
<Grid.Row columns={ 2 }>
<Grid.Column mobile={ 8 } tablet={ 8 } computer={ 5 }>
<GenericIcon
icon={ getHelpPanelIcons().endpoints.destination }
size="micro"
square
transparent
inline
className="left-icon"
verticalAlign="middle"
spaced="right"
/>
<label data-testid={ `${ testId }-destination-url-label` }>
{ t("applications:helpPanel.tabs.start.content." +
"samlConfigurations.labels.destinationURL") }
</label>
</Grid.Column>
<Grid.Column mobile={ 8 } tablet={ 8 } computer={ 11 }>
<CopyInputField
value={ samlConfigurations?.destinationURLs?.toString()?.replace(/,/g, ", ") }
data-testid={ `${ testId }-destination-url-readonly-input` }
/>
</Grid.Column>
</Grid.Row>
<Grid.Row columns={ 2 }>
<Grid.Column mobile={ 8 } tablet={ 8 } computer={ 5 }>
<GenericIcon
icon={ <CirclesOverlapIcon className="icon" /> }
size="micro"
square
transparent
inline
className="left-icon"
verticalAlign="middle"
spaced="right"
/>
<label data-testid={ `${ testId }-artifact-resolution-url-label` }>
{ t("applications:helpPanel.tabs.start.content." +
"samlConfigurations.labels.artifactResolutionUrl") }
</label>
</Grid.Column>
<Grid.Column mobile={ 8 } tablet={ 8 } computer={ 11 }>
<CopyInputField
value={ samlConfigurations?.artifactResolutionUrl }
data-testid={ `${ testId }-artifact-resolution-url-readonly-input` }
/>
</Grid.Column>
</Grid.Row>
</>
)
}

<Grid.Row columns={ 2 }>
<Grid.Column mobile={ 8 } tablet={ 8 } computer={ 5 }>
<GenericIcon
icon={ getHelpPanelIcons().endpoints.destination }
size="micro"
square
transparent
inline
className="left-icon"
verticalAlign="middle"
spaced="right"
/>
<label data-testid={ `${ testId }-destination-url-label` }>
{ t("applications:helpPanel.tabs.start.content." +
"samlConfigurations.labels.destinationURL") }
</label>
</Grid.Column>
<Grid.Column mobile={ 8 } tablet={ 8 } computer={ 11 }>
<CopyInputField
value={ samlConfigurations?.destinationURLs?.toString()?.replace(/,/g, ", ") }
data-testid={ `${ testId }-destination-url-readonly-input` }
/>
</Grid.Column>
</Grid.Row>
<Grid.Row columns={ 2 }>
<Grid.Column mobile={ 8 } tablet={ 8 } computer={ 5 }>
<GenericIcon
icon={ <CirclesOverlapIcon className="icon" /> }
size="micro"
square
transparent
inline
className="left-icon"
verticalAlign="middle"
spaced="right"
/>
<label data-testid={ `${ testId }-artifact-resolution-url-label` }>
{ t("applications:helpPanel.tabs.start.content." +
"samlConfigurations.labels.artifactResolutionUrl") }
</label>
</Grid.Column>
<Grid.Column mobile={ 8 } tablet={ 8 } computer={ 11 }>
<CopyInputField
value={ samlConfigurations?.artifactResolutionUrl }
data-testid={ `${ testId }-artifact-resolution-url-readonly-input` }
/>
</Grid.Column>
</Grid.Row>

<Grid.Row columns={ 2 }>
<Grid.Column mobile={ 8 } tablet={ 8 } computer={ 5 }>
<GenericIcon
Expand Down

0 comments on commit b011654

Please sign in to comment.