-
Notifications
You must be signed in to change notification settings - Fork 32
✨ [Frontend] Request services access #7897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
mergify
merged 18 commits into
ITISFoundation:master
from
odeimaiz:enh/request-services-access
Jun 16, 2025
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
d2f2cec
request access button
odeimaiz ccfe5ad
__addToolbarButtons
odeimaiz 9c3f33b
minor
odeimaiz b64e424
Merge branch 'master' into enh/request-services-access
odeimaiz 753b0cd
Merge branch 'master' into enh/request-services-access
odeimaiz 10a55a6
refactor
odeimaiz 5b5b49d
comment
odeimaiz 066fc4f
renamings
odeimaiz 464e86a
minor
odeimaiz f39e4bf
RequestServiceAccess
odeimaiz e4154d5
display grid info
odeimaiz 0275590
Merge branch 'master' into enh/request-services-access
odeimaiz 963f495
aesthetics
odeimaiz 7509abe
minor
odeimaiz f436674
minor
odeimaiz d15d7ee
minor
odeimaiz 691a6da
minor
odeimaiz 7a3d66b
Merge branch 'master' into enh/request-services-access
mergify[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
92 changes: 92 additions & 0 deletions
92
services/static-webserver/client/source/class/osparc/share/RequestServiceAccess.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,92 @@ | ||
| /* | ||
| * oSPARC - The SIMCORE frontend - https://osparc.io | ||
| * Copyright: 2025 IT'IS Foundation - https://itis.swiss | ||
| * License: MIT - https://opensource.org/licenses/MIT | ||
| * Authors: Odei Maiz (odeimaiz) | ||
| */ | ||
|
|
||
| qx.Class.define("osparc.share.RequestServiceAccess", { | ||
| extend: qx.ui.core.Widget, | ||
|
|
||
| construct: function(cantReadServicesData) { | ||
| this.base(arguments); | ||
|
|
||
| this._setLayout(new qx.ui.layout.VBox(25)); | ||
|
|
||
| this.__populateLayout(cantReadServicesData); | ||
| }, | ||
|
|
||
| statics: { | ||
| openRequestAccess: function(cantReadServicesData) { | ||
| const requestServiceAccess = new osparc.share.RequestServiceAccess(cantReadServicesData); | ||
| const caption = qx.locale.Manager.tr("Request Apps Access"); | ||
| osparc.ui.window.Window.popUpInWindow(requestServiceAccess, caption, 600, 400).set({ | ||
| clickAwayClose: false, | ||
| resizable: true, | ||
| showClose: true | ||
| }); | ||
| } | ||
| }, | ||
|
|
||
| members: { | ||
| __populateLayout: function(cantReadServicesData) { | ||
| const text = this.tr("In order to open the project, the following users/groups need to give you access to some apps. Please contact the app owner:"); | ||
| this._add(new qx.ui.basic.Label().set({ | ||
| value: text, | ||
| font: "text-14", | ||
| rich: true, | ||
| wrap: true | ||
| })); | ||
|
|
||
| const grid = new qx.ui.layout.Grid(20, 10); | ||
| const layout = new qx.ui.container.Composite(grid); | ||
| this._add(layout); | ||
|
|
||
| // Header | ||
| layout.add(new qx.ui.basic.Label(this.tr("Owner")), { | ||
| row: 0, | ||
| column: 0 | ||
| }); | ||
| layout.add(new qx.ui.basic.Label(this.tr("Email")), { | ||
| row: 0, | ||
| column: 1 | ||
| }); | ||
| layout.add(new qx.ui.basic.Label(this.tr("App")), { | ||
| row: 0, | ||
| column: 2 | ||
| }); | ||
|
|
||
| // Populate the grid with the cantReadServicesData | ||
| cantReadServicesData.forEach((cantReadServiceData, idx) => { | ||
| const group = osparc.store.Groups.getInstance().getGroup(cantReadServiceData["owner"]); | ||
| if (group) { | ||
| const username = new qx.ui.basic.Label(group.getLabel()).set({ | ||
| rich: true, | ||
| selectable: true, | ||
| }); | ||
| layout.add(username, { | ||
| row: idx+1, | ||
| column: 0 | ||
| }); | ||
| const email = new qx.ui.basic.Label(group.getEmail()).set({ | ||
| rich: true, | ||
| selectable: true, | ||
| }); | ||
| layout.add(email, { | ||
| row: idx+1, | ||
| column: 1 | ||
| }); | ||
| const appLabel = new qx.ui.basic.Label().set({ | ||
| value: `${cantReadServiceData["key"]}:${osparc.service.Utils.extractVersionDisplay(cantReadServiceData["release"])}`, | ||
| rich: true, | ||
| selectable: true, | ||
| }); | ||
| layout.add(appLabel, { | ||
| row: idx+1, | ||
| column: 2 | ||
| }); | ||
| } | ||
| }); | ||
| } | ||
| } | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.