Skip to content

Commit aa13d80

Browse files
committed
WIP for #77
1 parent 0f4f94b commit aa13d80

2 files changed

Lines changed: 18 additions & 2 deletions

File tree

client/src/connection/Testing.jsx

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ export const Testing = ({
146146
getConnectionById(connectionId).then(res => {
147147
const convertedConnection = convertServerConnectionToClient(res, protocolOptions, profileOptions, arpInfo);
148148
const originalName = convertedConnection.name;
149-
convertedConnection.name = "";
149+
convertedConnection.name = originalName + " COPY";
150150
//Filter out all unknown entityIDs
151151
convertedConnection.allowedEntities = convertedConnection.allowedEntities
152152
.filter(entityID => identityProviders.some(idp => idp.data.entityid === entityID));
@@ -227,6 +227,17 @@ export const Testing = ({
227227
setConnection({...connection, grantTypes: newGrantTypes});
228228
}
229229

230+
const gotoSLLLabs = () => {
231+
const link = document.createElement("a");
232+
link.href = "https://www.ssllabs.com/ssltest/";
233+
link.target = "_blank";
234+
link.style.display = "none";
235+
document.body.appendChild(link);
236+
link.click();
237+
document.body.removeChild(link);
238+
239+
}
240+
230241
const addRedirectURL = e => {
231242
stopEvent(e);
232243
setConnection({...connection, redirectUrls: [...connection.redirectUrls, ""]});
@@ -474,6 +485,7 @@ export const Testing = ({
474485
onRef={el => redirectUrlRefs.current[index] = el}
475486
/>
476487
<Button type={ButtonType.Delete} onClick={() => removeRedirectURL(index)}/>
488+
<Button txt={I18n.t("connection.testSection")} onClick={() => gotoSLLLabs()}/>
477489
</div>
478490
{invalidRedirects[index.toString()] &&
479491
<ErrorIndicator msg={I18n.t("forms.invalidURL",
@@ -1036,7 +1048,7 @@ export const Testing = ({
10361048
<>
10371049
<div className="testing-header">
10381050
<h2>{I18n.t(`connection.${isComplete ? "existing" : "new"}Connection${isProduction ? "Prod" : ""}`)}</h2>
1039-
{(!isEmpty(application.connections) &&
1051+
{(!isEmpty(application.connections) && !isComplete &&
10401052
(application.connections.length > 1 ||
10411053
(isEmpty(connection.id) && application.connections.length === 1))) &&
10421054
<div className="copy-connection"

client/src/connection/Testing.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,10 @@ $width-percentage: 75%;
286286
cursor: pointer;
287287
margin-left: 15px;
288288
}
289+
290+
button.sds--btn--primary {
291+
margin-left: 15px;
292+
}
289293
}
290294
}
291295

0 commit comments

Comments
 (0)