Skip to content

GDB-6329 - add new license is expired message#618

Closed
DesislavaBorisova wants to merge 34 commits into
masterfrom
GDB-6329-add_expired_license_msg
Closed

GDB-6329 - add new license is expired message#618
DesislavaBorisova wants to merge 34 commits into
masterfrom
GDB-6329-add_expired_license_msg

Conversation

@DesislavaBorisova

Copy link
Copy Markdown
Contributor

What?

Added a new "license is expired message" to the views that need SPARQL queries to work. Removed toastr message from views where it was not needed.

Why?

A few of the views were not showing the proper message in the case of expired GDB license. There were others, which showed both the new message and the old one, so I hid the old one where necessary.

How?

I used the new licenseService for validations in html and js files.

…t-AD/graphdb-workbench into GDB-6329-add_expired_license_msg

� Conflicts:
�	src/js/angular/explore/controllers.js
�	src/js/angular/jdbc/controllers.js
�	src/js/angular/namespaces/controllers.js
�	src/pages/jdbc-create.html
Comment thread test/namespaces/controllers.spec.js Outdated
@sava-savov-ontotext sava-savov-ontotext dismissed their stale review May 10, 2022 12:51

Made by mistake

DesislavaBorisova and others added 8 commits May 12, 2022 15:45
…w message visible. Code formatting corrections.
…' into GDB-6329-add_expired_license_msg

# Conflicts:
#	src/js/angular/explore/controllers.js
#	src/js/angular/graphexplore/directives/rdf-class-hierarchy.directive.js
#	src/js/angular/jdbc/controllers.js
#	src/js/angular/namespaces/controllers.js
#	test/namespaces/controllers.spec.js
#	test/resource/controllers.spec.js
Comment thread src/js/angular/explore/controllers.js Outdated
Comment thread src/js/angular/graphexplore/controllers/dependencies-chord.controller.js Outdated
@sava-savov-ontotext

Copy link
Copy Markdown
Contributor

Jenkins retry build

… rdf-class-hierarchy.directive.js, because latter has concurrency issues with the
@sonarqubecloud

Copy link
Copy Markdown

SonarCloud Quality Gate failed.    Quality Gate failed

Bug C 4 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

29.8% 29.8% Coverage
1.1% 1.1% Duplication

that.loadingLicense = false;
updateProductType(that.license);
});
}). finally(function () {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the extra space before finally


window.addEventListener('load', function () {
that.repository = {
id: localStorage.getItem(that.repositoryStorageName) || '',

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use the adapter from src/js/angular/utils/local-storage-adapter.js! You can also move the keys in there as constants.

const initView = function () {
if (!$scope.getActiveRepository()) {
if (!$scope.getActiveRepository() ||
!$licenseService.isLicenseValid()) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the method above

}
});

$scope.isLicenseValid = function() {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like this method. As far as I can see the license status is loaded once and is stored in the license service, so in each $licenseService.isLicenseValid() call you get the same status. That being said, this additional method in each controller where you need to check the status is just meaningless and also using it in directive templates is quite overwhelming than using a plain variable binding.
So, can you consider resolving the license status in a boolean flag where you need it and use it instead of this method. @sava-savov-ontotext what do you think?

let repositoryId;

beforeEach(() => {
before(() => {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see why you changed beforeEach and afterEach hooks here and in the rest of the tests?

ClassViewsSteps.verifyGraphIsDisplayed(NEWS_GRAPH);
verifyCounterValue(CLASS_COUNT_OF_NEWS_GRAPH);
ClassViewsSteps.clickGraphBtn()
.then(() => {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why you chain here?

// Close the menu to avoid overlapping other elements
cy.get('.dropdown-toggle').click();
.click()
.then(() => {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I strongly would suggest you to avoid this chaining approach.

@DesislavaBorisova

Copy link
Copy Markdown
Contributor Author

@sava-savov-ontotext will take over the PR and move it forward.

@svilenvelikov

Copy link
Copy Markdown
Collaborator

@sava-savov-ontotext Is this still valid? Can we close this MR?

@DesiBorisova

Copy link
Copy Markdown
Contributor

Closing this MR due to outdated changes. New one opened: #1380

@svilenvelikov svilenvelikov deleted the GDB-6329-add_expired_license_msg branch April 14, 2025 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants