Skip to content

Commit

Permalink
Merge pull request #1500 from Ontotext-AD/GDB-10621-Remove-Auth-Types…
Browse files Browse the repository at this point in the history
…-In-Add-Location-Cluster-Dialog

GDB-10621 Remove the Authentication options in add GDB modal in cluster
  • Loading branch information
sava-savov-ontotext authored Aug 8, 2024
2 parents 46b931c + cc0ac27 commit 51dba8a
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/i18n/locale-en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1524,6 +1524,7 @@
"password.required": "Password*",
"my.password.placeholder": "my-password",
"signature.auth.info": "Signature authentication uses the token secret, which must be the same on all GraphDB instances. For more information on configuring the token secret, please refer to ",
"signature.cluster.auth.info": "The token secret must be the same on all GraphDB instances. For more information on configuring the token secret, please refer to ",
"signature.auth.info.last": " in the documentation.",
"update.file.content.header": "Update file contents",
"update.file.edit.content.header": "Edit \"{{fileName}}\" contents",
Expand Down
3 changes: 2 additions & 1 deletion src/i18n/locale-fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -1534,7 +1534,8 @@
"my.user.placeholder": "mon-utilisateur",
"password.required": "Mot de passe*",
"my.password.placeholder": "mon-mot-de-passe",
"signature.auth.info": "L'authentification par signature utilise le secret du jeton, qui doit être le même sur les deux instances de GraphDB. Pour plus d'informations sur la configuration du secret du jeton, veuillez vous référer à ",
"signature.auth.info": "L'authentification par signature utilise le token secret, qui doit être le même sur les deux instances de GraphDB. Pour plus d'informations sur la configuration du token secret, veuillez vous référer à ",
"signature.cluster.auth.info": "Le token secret doit être le même sur toutes les instances de GraphDB. Pour plus d'informations sur la configuration du token secret, veuillez vous référer à ",
"signature.auth.info.last": "dans la documentation.",
"update.file.content.header": "Mise à jour du contenu du fichier",
"update.file.edit.content.header": "Modifier le contenu du \"{{fileName}}\"",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ function AddLocationFromClusterCtrl($scope, $uibModalInstance, toastr, productIn
'authType': 'signature',
'username': '',
'password': '',
'active': false
'active': false,
'clusterMode': true
};
$scope.docBase = getDocBase(productInfo);

Expand Down
15 changes: 11 additions & 4 deletions src/js/angular/templates/modal/add-location.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ <h3 class="modal-title">{{'attach.remote.gdb.instance' | translate}}</h3>
{{'valid.remote.location.warning' | translate}} http://server.example.com:7200/.
</div>

<div class="form-group row">
<div ng-if="!newLocation.clusterMode" class="form-group row">
<label class="col-md-4 col-form-label">{{'auth.type.header' | translate}}</label>
<div class="col-md-8">
<label class="col-form-label" gdb-tooltip="{{'remote.location.no.auth.used.tooltip' | translate}}">
Expand Down Expand Up @@ -60,9 +60,16 @@ <h3 class="modal-title">{{'attach.remote.gdb.instance' | translate}}</h3>
</div>
<div class="form-group row" ng-if="newLocation.authType === 'signature'">
<div class="col-md-12">
{{'signature.auth.info' | translate}}<a href="{{docBase}}/access-control.html#gdb-authentication"
rel="noopener" target="_blank">Access Control / GDB authentication</a>{{'signature.auth.info.last' | translate}}
</div>
<a ng-if="newLocation.clusterMode">
{{'signature.cluster.auth.info' | translate}}
</a>
<a ng-if="!newLocation.clusterMode">
{{'signature.auth.info' | translate}}
</a>
<a href="{{docBase}}/access-control.html#gdb-authentication"
rel="noopener" target="_blank">Access Control / GDB authentication</a>{{'signature.auth.info.last' |
translate}}
</div>
</div>
</form>
</div>
Expand Down
1 change: 1 addition & 0 deletions test-cypress/fixtures/locale-en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1522,6 +1522,7 @@
"password.required": "Password*",
"my.password.placeholder": "my-password",
"signature.auth.info": "Signature authentication uses the token secret, which must be the same on all GraphDB instances. For more information on configuring the token secret, please refer to ",
"signature.cluster.auth.info": "The token secret must be the same on all GraphDB instances. For more information on configuring the token secret, please refer to ",
"signature.auth.info.last": " in the documentation.",
"update.file.content.header": "Update file contents",
"update.file.edit.content.header": "Edit \"{{fileName}}\" contents",
Expand Down
22 changes: 22 additions & 0 deletions test-cypress/integration/cluster/cluster-management.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,28 @@ describe('Cluster management', () => {
ReplaceNodesDialogSteps.getDialog().should('not.exist');
ApplicationSteps.getSuccessNotifications().should('be.visible');
});

it('Should not see "Authentication type" while attaching remote GDB node in cluster view', () => {
// Given I have opened the cluster management page
ClusterPageSteps.visit();

// When there is no cluster configured yet
ClusterStubs.stubNoClusterGroupStatus();
ClusterStubs.stubNoClusterNodeStatus();
ClusterStubs.stubNoClusterConfig();
RemoteLocationStubs.stubAddRemoteLocation();
RemoteLocationStubs.stubGetRemoteLocations(0);

// When I open the create cluster dialog
ClusterPageSteps.getClusterPage().should('be.visible');
ClusterPageSteps.createCluster();
CreateClusterDialogSteps.getDialog().should('be.visible');
// And I add a remote location
RemoteLocationStubs.stubRemoteLocationCheck();
CreateClusterDialogSteps.openAddRemoteLocationDialog();
AddRemoteLocationDialogSteps.getDialog().should('be.visible');
AddRemoteLocationDialogSteps.verifyDialogBody("The token secret must be the same on all GraphDB instances. For more information on configuring the token secret, please refer to ");
});
});

function addRemoteLocation(location, locationsCount) {
Expand Down

0 comments on commit 51dba8a

Please sign in to comment.