Skip to content

Commit ac03f26

Browse files
committed
getNoResourcesFoundLabel
1 parent a24edd9 commit ac03f26

File tree

4 files changed

+27
-0
lines changed

4 files changed

+27
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,11 @@ qx.Class.define("osparc.dashboard.AppBrowser", {
129129
this._populateCardMenu(card);
130130
});
131131
osparc.filter.UIFilterController.dispatch("searchBarFilter");
132+
133+
this._resourcesContainer.getNoResourcesFoundLabel().set({
134+
value: this.tr("No Apps found"),
135+
visibility: this._resourcesList.length === 0 ? "visible" : "excluded",
136+
});
132137
},
133138

134139
__itemClicked: function(card) {

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ qx.Class.define("osparc.dashboard.ResourceContainerManager", {
4242
this._add(foldersContainer);
4343
}
4444

45+
const noResourcesFound = this.__noResourcesFound = new qx.ui.basic.Label("No resources found").set({
46+
visibility: "excluded",
47+
font: "text-14"
48+
});
49+
noResourcesFound.exclude();
50+
this._add(noResourcesFound);
51+
4552
const nonGroupedContainer = this.__nonGroupedContainer = this.__createFlatList();
4653
this._add(nonGroupedContainer);
4754

@@ -128,9 +135,14 @@ qx.Class.define("osparc.dashboard.ResourceContainerManager", {
128135
__groupedContainersList: null,
129136
__foldersContainer: null,
130137
__workspacesContainer: null,
138+
__noResourcesFound: null,
131139
__nonGroupedContainer: null,
132140
__groupedContainers: null,
133141

142+
getNoResourcesFoundLabel: function() {
143+
return this.__noResourcesFound;
144+
},
145+
134146
addNonResourceCard: function(card) {
135147
if (osparc.dashboard.CardContainer.isValidCard(card)) {
136148
let groupContainer = null;

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,11 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
418418
this._resourcesContainer.addNonResourceCard(loadMoreBtn);
419419

420420
osparc.filter.UIFilterController.dispatch("searchBarFilter");
421+
422+
this._resourcesContainer.getNoResourcesFoundLabel().set({
423+
value: this.tr("No Projects found"),
424+
visibility: this._resourcesList.length === 0 ? "visible" : "excluded"
425+
});
421426
},
422427

423428
__reloadNewCards: function() {

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,11 @@ qx.Class.define("osparc.dashboard.TutorialBrowser", {
116116
});
117117
this.__evaluateUpdateAllButton();
118118
osparc.filter.UIFilterController.dispatch("searchBarFilter");
119+
120+
this._resourcesContainer.getNoResourcesFoundLabel().set({
121+
value: this.tr("No Tutorials found"),
122+
visibility: this._resourcesList.length === 0 ? "visible" : "excluded"
123+
});
119124
},
120125

121126
__itemClicked: function(card) {

0 commit comments

Comments
 (0)