Skip to content
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

🎨 Frontend: Rename Service Autostart #5736

Merged
merged 9 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,6 @@ qx.Class.define("osparc.Application", {
e.returnValue = "";
}
});
if (qx.core.Environment.get("dev.enableFakeSrv")) {
console.debug("Fake server enabled");
osparc.dev.fake.srv.restapi.User;
osparc.dev.fake.srv.restapi.Authentication;
}

// Setting up auth manager
osparc.auth.Manager.getInstance().addListener("logout", () => this.__restart(), this);
Expand Down Expand Up @@ -275,11 +270,6 @@ qx.Class.define("osparc.Application", {
__restart: function() {
let isLogged = osparc.auth.Manager.getInstance().isLoggedIn();

if (qx.core.Environment.get("dev.disableLogin")) {
console.warn("Login page was disabled", "Starting main application ...");
isLogged = true;
}

if (isLogged) {
this.__loadMainPage();
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,9 @@ qx.Class.define("osparc.dashboard.ResourceDetails", {
if (osparc.utils.Resources.isStudy(resourceData) || osparc.utils.Resources.isTemplate(resourceData)) {
if (osparc.product.Utils.showDisableServiceAutoStart()) {
const study = new osparc.data.model.Study(resourceData);
const autoStartButton = osparc.info.StudyUtils.createDisableServiceAutoStart(study);
const autoStartButton = osparc.info.StudyUtils.createDisableServiceAutoStart(study).set({
enabled: osparc.data.model.Study.canIWrite(this.__resourceData["accessRights"])
});
// eslint-disable-next-line no-underscore-dangle
servicesBootOpts._add(new qx.ui.core.Spacer(null, 15));
// eslint-disable-next-line no-underscore-dangle
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ qx.Class.define("osparc.desktop.credits.Usage", {
selectBoxContainer.add(this.__fetchingImg);
container.add(selectBoxContainer);

const filterContainer = new qx.ui.container.Composite(new qx.ui.layout.HBox())
const filterContainer = new qx.ui.container.Composite(new qx.ui.layout.HBox(5))
this.__dateFilters = new osparc.desktop.credits.DateFilters();
this.__dateFilters.addListener("change", e => {
this.__table.getTableModel().setFilters(e.getData())
Expand All @@ -73,6 +73,12 @@ qx.Class.define("osparc.desktop.credits.Usage", {
this.__handleExport()
});
filterContainer.add(this.__exportButton);
const refreshButton = new qx.ui.form.Button(this.tr("Reload"), "@FontAwesome5Solid/sync-alt/14").set({
allowStretchY: false,
alignY: "bottom"
});
refreshButton.addListener("execute", () => this.__table && this.__table.getTableModel().reloadData());
filterContainer.add(refreshButton)
container.add(filterContainer);

this._add(container);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,22 @@ qx.Class.define("osparc.desktop.wallets.WalletsList", {

this._setLayout(new qx.ui.layout.VBox(10));

this.__addHeader("Personal")
this.__addHeader(this.tr("Personal"), true);
this.__noPersonalWalletsLabel = new qx.ui.basic.Label().set({
value: this.tr("No personal Credit Account found"),
font: "text-13",
marginLeft: 10
});
this._add(this.__noPersonalWalletsLabel);
this.__personalWalletsModel = this.__addWalletsList()

this.__sharedHeader = this.__addHeader("Shared with me")
this.__addHeader(this.tr("Shared with me"), false);
this.__noSharedWalletsLabel = new qx.ui.basic.Label().set({
value: this.tr("No shared Credit Accounts found"),
font: "text-13",
marginLeft: 10
});
this._add(this.__noSharedWalletsLabel);
this.__sharedWalletsModel = this.__addWalletsList({ flex: 1 })

this.loadWallets();
Expand All @@ -47,6 +59,8 @@ qx.Class.define("osparc.desktop.wallets.WalletsList", {
},

members: {
__noPersonalWalletsLabel: null,
__noSharedWalletsLabel: null,
__personalWalletsModel: null,
__sharedWalletsModel: null,

Expand Down Expand Up @@ -125,11 +139,13 @@ qx.Class.define("osparc.desktop.wallets.WalletsList", {
}
});
this.setWalletsLoaded(true);
if (this.__sharedWalletsModel.getLength() === 0) {
this.__sharedHeader.exclude()
} else {
this.__sharedHeader.show()
}

this.__noPersonalWalletsLabel.set({
visibility: this.__personalWalletsModel.getLength() ? "excluded" : "visible"
});
this.__noSharedWalletsLabel.set({
visibility: this.__sharedWalletsModel.getLength() ? "excluded" : "visible"
});
},

__openEditWallet: function(walletId) {
Expand Down Expand Up @@ -187,24 +203,25 @@ qx.Class.define("osparc.desktop.wallets.WalletsList", {
win.close();
},

__addHeader: function(label) {
const header = new qx.ui.container.Composite(new qx.ui.layout.HBox())
__addHeader: function(label, showCurrently) {
const header = new qx.ui.container.Composite(new qx.ui.layout.HBox());
const userWallets = new qx.ui.basic.Label().set({
value: this.tr(label),
value: label,
alignX: "left",
rich: true,
font: "text-14"
});
header.add(userWallets)
header.add(userWallets);
header.add(new qx.ui.core.Spacer(), {
flex: 1
});
const selectColumn = new qx.ui.basic.Label("Currently in use").set({
marginRight: 18
});
header.add(selectColumn)
if (showCurrently) {
const selectColumn = new qx.ui.basic.Label(this.tr("Currently in use")).set({
marginRight: 18
});
header.add(selectColumn)
}
this._add(header);
return header
}
}
});

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading