Skip to content

Commit 71be9c4

Browse files
committed
createHypertoolsBrowser
1 parent 4a0b1bd commit 71be9c4

File tree

1 file changed

+24
-1
lines changed
  • services/static-webserver/client/source/class/osparc/dashboard

1 file changed

+24
-1
lines changed

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

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ qx.Class.define("osparc.dashboard.Dashboard", {
7979
members: {
8080
__studyBrowser: null,
8181
__templateBrowser: null,
82+
__hypertoolBrowser: null,
8283
__serviceBrowser: null,
8384
__dataBrowser: null,
8485

@@ -90,6 +91,10 @@ qx.Class.define("osparc.dashboard.Dashboard", {
9091
return this.__templateBrowser;
9192
},
9293

94+
getHypertoolBrowser: function() {
95+
return this.__hypertoolBrowser;
96+
},
97+
9398
getServiceBrowser: function() {
9499
return this.__serviceBrowser;
95100
},
@@ -118,6 +123,14 @@ qx.Class.define("osparc.dashboard.Dashboard", {
118123
icon: "@FontAwesome5Solid/copy/"+tabIconSize,
119124
buildLayout: this.__createTemplateBrowser
120125
});
126+
127+
tabs.push({
128+
id: "hypertoolsTab",
129+
buttonId: "hypertoolsTabBtn",
130+
label: this.tr("HYPERTOOLS"),
131+
icon: "@FontAwesome5Solid/copy/"+tabIconSize,
132+
buildLayout: this.__createHypertoolsBrowser
133+
});
121134
}
122135
if (permissions.canDo("dashboard.services.read")) {
123136
tabs.push({
@@ -175,6 +188,8 @@ qx.Class.define("osparc.dashboard.Dashboard", {
175188
scrollerMainView.add(viewLayout);
176189
tabPage.add(scrollerMainView);
177190

191+
viewLayout.bind("visibility", tabPage, "visibility");
192+
178193
this.add(tabPage);
179194
}, this);
180195

@@ -187,6 +202,7 @@ qx.Class.define("osparc.dashboard.Dashboard", {
187202
[
188203
this.__studyBrowser,
189204
this.__templateBrowser,
205+
this.__hypertoolBrowser,
190206
this.__serviceBrowser,
191207
this.__dataBrowser
192208
].forEach(resourceBrowser => {
@@ -204,10 +220,17 @@ qx.Class.define("osparc.dashboard.Dashboard", {
204220
},
205221

206222
__createTemplateBrowser: function() {
207-
const templatesView = this.__templateBrowser = new osparc.dashboard.TemplateBrowser();
223+
const templateType = osparc.utils.DisabledPlugins.isHypertoolsEnabled() ? "tutorial" : null;
224+
const templatesView = this.__templateBrowser = new osparc.dashboard.TemplateBrowser(templateType);
208225
return templatesView;
209226
},
210227

228+
__createHypertoolsBrowser: function() {
229+
const templateType = "Hypertools";
230+
const hypertoolsView = this.__hypertoolBrowser = new osparc.dashboard.TemplateBrowser(templateType);
231+
return hypertoolsView;
232+
},
233+
211234
__createServiceBrowser: function() {
212235
const servicesView = this.__serviceBrowser = new osparc.dashboard.ServiceBrowser();
213236
return servicesView;

0 commit comments

Comments
 (0)