Skip to content

Commit 5e8c177

Browse files
committed
api_base_url
1 parent 5b64d0c commit 5e8c177

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

services/static-webserver/client/source/class/osparc/desktop/preferences/pages/TokensPage.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ qx.Class.define("osparc.desktop.preferences.pages.TokensPage", {
9292

9393
const key = data["api_key"];
9494
const secret = data["api_secret"];
95-
const showAPIKeyWindow = new osparc.desktop.preferences.window.ShowAPIKey(key, secret);
95+
const baseUrl = data["api_base_url"];
96+
const showAPIKeyWindow = new osparc.desktop.preferences.window.ShowAPIKey(key, secret, baseUrl);
9697
showAPIKeyWindow.center();
9798
showAPIKeyWindow.open();
9899
})

services/static-webserver/client/source/class/osparc/desktop/preferences/window/ShowAPIKey.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
qx.Class.define("osparc.desktop.preferences.window.ShowAPIKey", {
1717
extend: osparc.desktop.preferences.window.APIKeyBase,
1818

19-
construct: function(key, secret) {
19+
construct: function(key, secret, baseUrl) {
2020
const caption = this.tr("API Key");
2121
const infoText = this.tr("For your protection, store your access keys securely and do not share them. You will not be able to access the key again once this window is closed.");
2222
this.base(arguments, caption, infoText);
@@ -25,18 +25,21 @@ qx.Class.define("osparc.desktop.preferences.window.ShowAPIKey", {
2525
clickAwayClose: false
2626
});
2727

28-
this.__populateTokens(key, secret);
28+
this.__populateTokens(key, secret, baseUrl);
2929
},
3030

3131
members: {
32-
__populateTokens: function(key, secret) {
32+
__populateTokens: function(key, secret, baseUrl) {
3333
const hBox1 = this.__createEntry(this.tr("<b>Key:</b>"), key);
3434
this._add(hBox1);
3535

3636
const hBox2 = this.__createEntry(this.tr("<b>Secret:</b>"), secret);
3737
this._add(hBox2);
3838

39-
const hBox3 = new qx.ui.container.Composite(new qx.ui.layout.HBox(10)).set({
39+
const hBox3 = this.__createEntry(this.tr("<b>Base url:</b>"), baseUrl);
40+
this._add(hBox3);
41+
42+
const buttonsLayout = new qx.ui.container.Composite(new qx.ui.layout.HBox(10)).set({
4043
appearance: "margined-layout"
4144
});
4245
const copyAPIKeyBtn = new qx.ui.form.Button(this.tr("Copy API Key"));
@@ -45,7 +48,7 @@ qx.Class.define("osparc.desktop.preferences.window.ShowAPIKey", {
4548
copyAPIKeyBtn.setIcon("@FontAwesome5Solid/check/12");
4649
}
4750
});
48-
hBox3.add(copyAPIKeyBtn, {
51+
buttonsLayout.add(copyAPIKeyBtn, {
4952
width: "50%"
5053
});
5154
const copyAPISecretBtn = new qx.ui.form.Button(this.tr("Copy API Secret"));
@@ -54,10 +57,10 @@ qx.Class.define("osparc.desktop.preferences.window.ShowAPIKey", {
5457
copyAPISecretBtn.setIcon("@FontAwesome5Solid/check/12");
5558
}
5659
});
57-
hBox3.add(copyAPISecretBtn, {
60+
buttonsLayout.add(copyAPISecretBtn, {
5861
width: "50%"
5962
});
60-
this._add(hBox3);
63+
this._add(buttonsLayout);
6164
},
6265

6366
__createEntry: function(title, label) {

0 commit comments

Comments
 (0)