Skip to content

Commit e18088a

Browse files
committed
Merge branch 'master' into 1973-add-celery-worker-to-api-server
2 parents 1230692 + 1ea4e10 commit e18088a

File tree

22 files changed

+518
-89
lines changed

22 files changed

+518
-89
lines changed

.env-devel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ DYNAMIC_SCHEDULER_UI_STORAGE_SECRET=adminadmin
141141
FUNCTION_SERVICES_AUTHORS='{"UN": {"name": "Unknown", "email": "[email protected]", "affiliation": "unknown"}}'
142142

143143
WEBSERVER_LICENSES={}
144+
WEBSERVER_FOGBUGZ={}
144145
LICENSES_ITIS_VIP_SYNCER_ENABLED=false
145146
LICENSES_ITIS_VIP_SYNCER_PERIODICITY=1D00:00:00
146147
LICENSES_ITIS_VIP_API_URL=https://replace-with-itis-api/{category}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
"""add support fogbugz fields
2+
3+
Revision ID: ec4f62595e0c
4+
Revises: b566f1b29012
5+
Create Date: 2025-08-26 13:06:10.879081+00:00
6+
7+
"""
8+
9+
import sqlalchemy as sa
10+
from alembic import op
11+
12+
# revision identifiers, used by Alembic.
13+
revision = "ec4f62595e0c"
14+
down_revision = "b566f1b29012"
15+
branch_labels = None
16+
depends_on = None
17+
18+
19+
def upgrade():
20+
# ### commands auto generated by Alembic - please adjust! ###
21+
op.add_column(
22+
"products",
23+
sa.Column("support_assigned_fogbugz_person_id", sa.BigInteger(), nullable=True),
24+
)
25+
op.add_column(
26+
"products",
27+
sa.Column(
28+
"support_assigned_fogbugz_project_id", sa.BigInteger(), nullable=True
29+
),
30+
)
31+
# ### end Alembic commands ###
32+
33+
34+
def downgrade():
35+
# ### commands auto generated by Alembic - please adjust! ###
36+
op.drop_column("products", "support_assigned_fogbugz_project_id")
37+
op.drop_column("products", "support_assigned_fogbugz_person_id")
38+
# ### end Alembic commands ###

packages/postgres-database/src/simcore_postgres_database/models/products.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,5 +282,19 @@ class ProductLoginSettingsDict(TypedDict, total=False):
282282
nullable=True,
283283
doc="Group associated to this product support",
284284
),
285+
sa.Column(
286+
"support_assigned_fogbugz_person_id",
287+
sa.BigInteger,
288+
unique=False,
289+
nullable=True,
290+
doc="Fogbugz person ID to assign support case",
291+
),
292+
sa.Column(
293+
"support_assigned_fogbugz_project_id",
294+
sa.BigInteger,
295+
unique=False,
296+
nullable=True,
297+
doc="Fogbugz project ID to assign support case",
298+
),
285299
sa.PrimaryKeyConstraint("name", name="products_pk"),
286300
)

services/docker-compose.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -784,6 +784,7 @@ services:
784784
INVITATIONS_USERNAME: ${INVITATIONS_USERNAME}
785785

786786
WEBSERVER_LICENSES: ${WEBSERVER_LICENSES}
787+
WEBSERVER_FOGBUGZ: ${WEBSERVER_FOGBUGZ}
787788
LICENSES_ITIS_VIP_SYNCER_ENABLED: ${LICENSES_ITIS_VIP_SYNCER_ENABLED}
788789
LICENSES_ITIS_VIP_SYNCER_PERIODICITY: ${LICENSES_ITIS_VIP_SYNCER_PERIODICITY}
789790
LICENSES_ITIS_VIP_API_URL: ${LICENSES_ITIS_VIP_API_URL}
@@ -1007,6 +1008,7 @@ services:
10071008
WEBSERVER_GROUPS: ${WB_DB_EL_GROUPS}
10081009
WEBSERVER_INVITATIONS: ${WB_DB_EL_INVITATIONS}
10091010
WEBSERVER_LICENSES: "null"
1011+
WEBSERVER_FOGBUGZ: "null"
10101012
WEBSERVER_LOGIN: ${WB_DB_EL_LOGIN}
10111013
WEBSERVER_PAYMENTS: ${WB_DB_EL_PAYMENTS}
10121014
WEBSERVER_NOTIFICATIONS: ${WB_DB_EL_NOTIFICATIONS}
@@ -1125,6 +1127,7 @@ services:
11251127
WEBSERVER_HOST: ${WEBSERVER_HOST}
11261128
WEBSERVER_INVITATIONS: ${WB_GC_INVITATIONS}
11271129
WEBSERVER_LICENSES: "null"
1130+
WEBSERVER_FOGBUGZ: "null"
11281131
WEBSERVER_LOGIN: ${WB_GC_LOGIN}
11291132
WEBSERVER_LOGLEVEL: ${WB_GC_LOGLEVEL}
11301133
WEBSERVER_NOTIFICATIONS: ${WB_GC_NOTIFICATIONS}
@@ -1204,6 +1207,7 @@ services:
12041207
WEBSERVER_GROUPS: 0
12051208
WEBSERVER_INVITATIONS: "null"
12061209
WEBSERVER_LICENSES: "null"
1210+
WEBSERVER_FOGBUGZ: "null"
12071211
WEBSERVER_LOGIN: "null"
12081212
WEBSERVER_NOTIFICATIONS: 0
12091213
WEBSERVER_PAYMENTS: "null"

services/static-webserver/client/source/class/osparc/dashboard/SearchBarFilterExtended.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,18 @@ qx.Class.define("osparc.dashboard.SearchBarFilterExtended", {
177177

178178
const contextDropDown = this.getChildControl("context-drop-down");
179179
this.getChildControl("my-projects-button");
180-
this.getChildControl("templates-button");
181-
this.getChildControl("public-projects-button");
182-
this.getChildControl("functions-button");
180+
if (osparc.product.Utils.showTemplates()) {
181+
this.getChildControl("templates-button");
182+
}
183+
if (osparc.product.Utils.showPublicProjects()) {
184+
this.getChildControl("public-projects-button");
185+
}
186+
if (osparc.product.Utils.showFunctions()) {
187+
this.getChildControl("functions-button");
188+
}
189+
if (contextDropDown.getChildren().length === 1) {
190+
contextDropDown.hide();
191+
}
183192
contextDropDown.addListener("changeSelection", e => {
184193
const selection = e.getData();
185194
if (selection.length) {

services/static-webserver/client/source/class/osparc/dashboard/SortedByMenuButton.js

Lines changed: 27 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -34,38 +34,21 @@ qx.Class.define("osparc.dashboard.SortedByMenuButton", {
3434
this.setMenu(sortedByMenu);
3535

3636
const options = this.self().getSortByOptions();
37-
3837
options.forEach((option, idx) => {
39-
const btn = new qx.ui.menu.Button();
40-
btn.btnId = option.id;
41-
btn.set({
42-
label: option.label,
43-
icon: null
44-
});
38+
const btn = new qx.ui.menu.Button(option.label);
39+
btn.field = option.id;
4540
// Sort by last modified date
4641
if (idx === options.length -1) {
47-
this.__menuButton = btn;
42+
this.__selectedMenuButton = btn;
4843
btn.setIcon("@FontAwesome5Solid/arrow-down/14");
4944
}
5045
sortedByMenu.add(btn);
5146

52-
btn.addListener("execute", () => {
53-
this.__buttonExecuted(btn)
54-
});
47+
btn.addListener("execute", () => this.__buttonExecuted(btn));
5548
});
56-
57-
this.addListener("changeSort", e => {
58-
const sort = e.getData();
59-
this.__handelSortEvent(sort)
60-
}, this);
6149
},
6250

6351
statics: {
64-
DefaultSorting: {
65-
field: "last_change_date",
66-
direction: "desc"
67-
},
68-
6952
getSortByOptions: function() {
7053
return [{
7154
id: "name",
@@ -96,45 +79,40 @@ qx.Class.define("osparc.dashboard.SortedByMenuButton", {
9679
},
9780
nullable: false,
9881
event: "changeSort",
99-
apply: "__applySort"
82+
apply: "__handelSortEvent",
10083
}
10184
},
10285

10386
members: {
104-
__menuButton: null,
87+
__selectedMenuButton: null,
88+
10589
__buttonExecuted: function(btn) {
106-
if (this.__menuButton) {
107-
this.__menuButton.setIcon(null);
90+
if (this.__selectedMenuButton) {
91+
this.__selectedMenuButton.setIcon(null);
10892
}
109-
this.__menuButton = btn;
93+
this.__selectedMenuButton = btn;
11094
this.set({
11195
label: btn.getLabel(),
11296
icon: "@FontAwesome5Solid/chevron-down/10"
11397
});
11498

115-
const data = {
116-
"id": btn.btnId,
117-
};
118-
this.__handelSort(data.id);
119-
},
120-
121-
__handelSort: function(field) {
99+
const field = btn.field;
122100
if (field === this.getSort().field) {
123101
const { direction } = this.getSort();
124102
this.setSort({
125103
field,
126104
direction: !direction
127-
})
128-
return;
105+
});
106+
} else {
107+
this.setSort({
108+
field,
109+
direction: true
110+
});
129111
}
130-
this.setSort({
131-
field,
132-
direction: true
133-
})
134112
},
135113

136114
__handelSortEvent: function({field, direction}) {
137-
this.__menuButton.setIcon(direction ? "@FontAwesome5Solid/arrow-down/14" : "@FontAwesome5Solid/arrow-up/14")
115+
this.__selectedMenuButton.setIcon(direction ? "@FontAwesome5Solid/arrow-down/14" : "@FontAwesome5Solid/arrow-up/14")
138116
this.setIcon(direction ? "@FontAwesome5Solid/arrow-down/14" : "@FontAwesome5Solid/arrow-up/14")
139117
const sort = {
140118
field: field,
@@ -143,8 +121,15 @@ qx.Class.define("osparc.dashboard.SortedByMenuButton", {
143121
this.fireDataEvent("sortByChanged", sort);
144122
},
145123

146-
__applySort: function(value, old) {
124+
hideOptionButton: function(field) {
125+
const btn = this.getMenu().getChildren().find(btn => btn.field === field);
126+
if (btn) {
127+
btn.exclude();
128+
}
129+
},
147130

148-
}
131+
showAllOptions: function() {
132+
this.getMenu().getChildren().forEach(btn => btn.show());
133+
},
149134
}
150135
});

services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -806,6 +806,12 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
806806
currentParams[key] = value;
807807
}
808808
});
809+
if ([
810+
osparc.dashboard.StudyBrowser.CONTEXT.FUNCTIONS,
811+
osparc.dashboard.StudyBrowser.CONTEXT.SEARCH_FUNCTIONS,
812+
].includes(this.getCurrentContext())) {
813+
currentParams.orderBy = osparc.store.Functions.curateOrderBy(currentParams.orderBy);
814+
}
809815

810816
// check the entries in currentParams are the same as the reqParams
811817
let sameContext = true;
@@ -890,7 +896,6 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
890896
break;
891897
case osparc.dashboard.StudyBrowser.CONTEXT.FUNCTIONS:
892898
case osparc.dashboard.StudyBrowser.CONTEXT.SEARCH_FUNCTIONS:
893-
delete requestParams.orderBy; // functions do not support ordering yet
894899
requestParams.includeExtras = "true";
895900
break;
896901
case osparc.dashboard.StudyBrowser.CONTEXT.SEARCH_PROJECTS: {
@@ -972,7 +977,6 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
972977
},
973978

974979
invalidateFunctions: function() {
975-
osparc.store.Functions.invalidateFunctions();
976980
this.__resetStudiesList();
977981
if (this._resourcesContainer.getFlatList()) {
978982
this._resourcesContainer.getFlatList().nextRequest = null;
@@ -1360,8 +1364,8 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
13601364
this._searchBarFilter.setEnabled(true);
13611365
// workspaces will exclude it
13621366
this._toolbar.show();
1363-
// functions will exclude it
1364-
this.__sortByButton.show();
1367+
// functions will hide some option
1368+
this.__sortByButton.showAllOptions();
13651369

13661370
switch (this.getCurrentContext()) {
13671371
case osparc.dashboard.StudyBrowser.CONTEXT.PROJECTS:
@@ -1413,8 +1417,9 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
14131417
this._searchBarFilter.resetFilters();
14141418
}
14151419
this._searchBarFilter.getChildControl("text-field").setPlaceholder("Search in Functions");
1416-
// functions can't be sorted yet
1417-
this.__sortByButton.exclude();
1420+
// functions don't support all options yet
1421+
this.__sortByButton.hideOptionButton("name");
1422+
this.__sortByButton.hideOptionButton("prj_owner");
14181423
this._loadingResourcesBtn.setFetching(false);
14191424
this.invalidateFunctions();
14201425
this.__reloadStudies();

services/static-webserver/client/source/class/osparc/data/Resources.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -634,11 +634,11 @@ qx.Class.define("osparc.data.Resources", {
634634
},
635635
getPage: {
636636
method: "GET",
637-
url: statics.API + "/functions?include_extras=true&offset={offset}&limit={limit}"
637+
url: statics.API + "/functions?include_extras=true&offset={offset}&limit={limit}&order_by={orderBy}"
638638
},
639639
getPageSearch: {
640640
method: "GET",
641-
url: statics.API + "/functions?include_extras=true&offset={offset}&limit={limit}&search={text}"
641+
url: statics.API + "/functions?include_extras=true&offset={offset}&limit={limit}&search={text}&order_by={orderBy}"
642642
},
643643
create: {
644644
method: "POST",

services/static-webserver/client/source/class/osparc/navigation/NavigationBar.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,11 +378,11 @@ qx.Class.define("osparc.navigation.NavigationBar", {
378378
// quick starts and manuals
379379
osparc.store.Support.addQuickStartToMenu(menu);
380380
osparc.store.Support.addGuidedToursToMenu(menu);
381-
osparc.store.Support.addManualButtonsToMenu(menu, menuButton);
381+
osparc.store.Support.addManualsToMenu(menu);
382382
menu.addSeparator();
383383

384384
// feedback
385-
osparc.store.Support.addSupportButtonsToMenu(menu, menuButton);
385+
osparc.store.Support.addSupportButtonsToMenu(menu);
386386
osparc.store.Support.addReleaseNotesToMenu(menu);
387387

388388
return menuButton;

services/static-webserver/client/source/class/osparc/navigation/UserMenu.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ qx.Class.define("osparc.navigation.UserMenu", {
215215
// quick starts and manuals
216216
osparc.store.Support.addQuickStartToMenu(this);
217217
osparc.store.Support.addGuidedToursToMenu(this);
218-
osparc.store.Support.addManualButtonsToMenu(this);
218+
osparc.store.Support.addManualsToMenu(this);
219219
this.addSeparator();
220220

221221
// feedbacks

0 commit comments

Comments
 (0)