Skip to content

Commit e2e95d0

Browse files
committed
plus_button key
1 parent 62c8a09 commit e2e95d0

File tree

5 files changed

+183
-171
lines changed

5 files changed

+183
-171
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ qx.Class.define("osparc.dashboard.NewPlusMenu", {
165165
__addIcon: function(menuButton, resourceInfo, resourceMetadata) {
166166
let source = null;
167167
if (resourceInfo && "icon" in resourceInfo) {
168-
// first the one set in the new_studies
168+
// first the one set in the ui_config
169169
source = resourceInfo["icon"];
170170
} else if (resourceMetadata && "thumbnail" in resourceMetadata) {
171171
// second the one from the resource

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
************************************************************************ */
1717

1818
/**
19-
* @asset(osparc/new_studies.json")
19+
* @asset(osparc/ui_config.json")
2020
*/
2121

2222
/**
@@ -979,7 +979,7 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
979979
this._resourcesContainer.addNonResourceCard(newPlansBtn);
980980
newPlansBtn.setEnabled(false);
981981

982-
osparc.utils.Utils.fetchJSON("/resource/osparc/new_studies.json")
982+
osparc.utils.Utils.fetchJSON("/resource/osparc/ui_config.json")
983983
.then(newStudiesData => {
984984
const product = osparc.product.Utils.getProductName()
985985
if (product in newStudiesData) {
@@ -1042,7 +1042,7 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
10421042

10431043
__addPlusButtonsFromServices: function() {
10441044
// add new plus buttons if key services exists
1045-
osparc.utils.Utils.fetchJSON("/resource/osparc/new_studies.json")
1045+
osparc.utils.Utils.fetchJSON("/resource/osparc/ui_config.json")
10461046
.then(newStudiesData => {
10471047
const product = osparc.product.Utils.getProductName()
10481048
if (product in newStudiesData) {

services/static-webserver/client/source/class/osparc/store/Products.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ qx.Class.define("osparc.store.Products", {
2323
__newStudyConfig: null,
2424

2525
fetchNewStudyConfig: function() {
26-
return osparc.utils.Utils.fetchJSON("/resource/osparc/new_studies.json")
26+
return osparc.utils.Utils.fetchJSON("/resource/osparc/ui_config.json")
2727
.then(newStudiesData => {
2828
const product = osparc.product.Utils.getProductName()
2929
if (product in newStudiesData) {

services/static-webserver/client/source/resource/osparc/new_studies.json

Lines changed: 0 additions & 166 deletions
This file was deleted.
Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
{
2+
"tis": {
3+
"NO_plus_button": {
4+
"categories": [{
5+
"id": "precomputed",
6+
"title": "Precomputed"
7+
}, {
8+
"id": "personalized",
9+
"title": "Personalized",
10+
"description": "In the process, TIP will launch simulations on AWS.<br>The associated resource costs will be deduced from your Credits."
11+
}],
12+
"resources": [{
13+
"resourceType": "template",
14+
"expectedTemplateLabel": "TI Planning Tool",
15+
"title": "Classic TI",
16+
"newStudyLabel": "Classic TI",
17+
"category": "precomputed",
18+
"idToWidget": "newTIPlanButton"
19+
}, {
20+
"resourceType": "template",
21+
"expectedTemplateLabel": "mcTI Planning Tool",
22+
"title": "Multichannel TI",
23+
"newStudyLabel": "Multichannel TI",
24+
"category": "precomputed",
25+
"idToWidget": "newMTIPlanButton"
26+
}, {
27+
"resourceType": "template",
28+
"expectedTemplateLabel": "pmTI Planning Tool",
29+
"title": "Phase-modulation TI",
30+
"newStudyLabel": "Phase-modulation TI",
31+
"category": "precomputed",
32+
"idToWidget": "newPMTIPlanButton"
33+
}, {
34+
"resourceType": "template",
35+
"expectedTemplateLabel": "personalized TI Planning Tool",
36+
"title": "Personalized Classic TI",
37+
"newStudyLabel": "Personalized Classic TI",
38+
"category": "personalized",
39+
"idToWidget": "personalizationNewTIPlanButton"
40+
}, {
41+
"resourceType": "template",
42+
"expectedTemplateLabel": "personalized mcTI Planning Tool",
43+
"title": "Personalized Multichannel TI",
44+
"newStudyLabel": "Personalized Multichannel TI",
45+
"category": "personalized",
46+
"idToWidget": "personalizationNewMTIPlanButton"
47+
}, {
48+
"resourceType": "template",
49+
"expectedTemplateLabel": "personalized pmTI Planning Tool",
50+
"title": "Personalized Phase-modulation TI",
51+
"newStudyLabel": "Personalized Phase-modulation TI",
52+
"category": "personalized",
53+
"idToWidget": "personalizationNewPMTIPlanButton"
54+
}]
55+
}
56+
},
57+
"tiplite": {
58+
"NO_plus_button": {
59+
"categories": [{
60+
"id": "precomputed",
61+
"title": "Precomputed"
62+
}, {
63+
"id": "personalized",
64+
"title": "Personalized",
65+
"description": "In the process, TIP will launch simulations on AWS.<br>The associated resource costs will be deduced from your Credits."
66+
}],
67+
"resources": [{
68+
"resourceType": "template",
69+
"expectedTemplateLabel": "TI Planning Tool",
70+
"title": "Classic TI",
71+
"newStudyLabel": "Classic TI",
72+
"category": "precomputed",
73+
"idToWidget": "newTIPlanButton"
74+
}, {
75+
"showDisabled": true,
76+
"reason": "Not available in ${replace_me_product_name}",
77+
"resourceType": "template",
78+
"expectedTemplateLabel": "mcTI Planning Tool",
79+
"title": "Multichannel TI",
80+
"newStudyLabel": "Multichannel TI",
81+
"category": "precomputed",
82+
"idToWidget": "newMTIPlanButton"
83+
}, {
84+
"showDisabled": true,
85+
"reason": "Not available in ${replace_me_product_name}",
86+
"resourceType": "template",
87+
"expectedTemplateLabel": "pmTI Planning Tool",
88+
"title": "Phase-modulation TI",
89+
"newStudyLabel": "Phase-modulation TI",
90+
"category": "precomputed",
91+
"idToWidget": "newPMTIPlanButton"
92+
}, {
93+
"showDisabled": true,
94+
"reason": "Not available in ${replace_me_product_name}",
95+
"resourceType": "template",
96+
"expectedTemplateLabel": "personalized TI Planning Tool",
97+
"title": "Personalized Classic TI",
98+
"newStudyLabel": "Personalized Classic TI",
99+
"category": "personalized",
100+
"idToWidget": "personalizationNewTIPlanButton"
101+
}, {
102+
"showDisabled": true,
103+
"reason": "Not available in ${replace_me_product_name}",
104+
"resourceType": "template",
105+
"expectedTemplateLabel": "personalized mcTI Planning Tool",
106+
"title": "Personalized Multichannel TI",
107+
"newStudyLabel": "Personalized Multichannel TI",
108+
"category": "personalized",
109+
"idToWidget": "personalizationNewMTIPlanButton"
110+
}, {
111+
"showDisabled": true,
112+
"reason": "Not available in ${replace_me_product_name}",
113+
"resourceType": "template",
114+
"expectedTemplateLabel": "personalized pmTI Planning Tool",
115+
"title": "Personalized Phase-modulation TI",
116+
"newStudyLabel": "Personalized Phase-modulation TI",
117+
"category": "personalized",
118+
"idToWidget": "personalizationNewPMTIPlanButton"
119+
}]
120+
}
121+
},
122+
"s4l": {
123+
"plus_button": {
124+
"resources": [{
125+
"resourceType": "service",
126+
"expectedKey": "simcore/services/dynamic/s4l-ui",
127+
"title": "Sim4Life",
128+
"newStudyLabel": "New S4L project",
129+
"idToWidget": "startS4LButton"
130+
}, {
131+
"resourceType": "service",
132+
"expectedKey": "simcore/services/dynamic/s4l-jupyter",
133+
"title": "Jupyter Lab",
134+
"icon": "https://upload.wikimedia.org/wikipedia/commons/3/38/Jupyter_logo.svg",
135+
"newStudyLabel": "New S4L Jupyter Lab"
136+
}]
137+
}
138+
},
139+
"s4lacad": {
140+
"plus_button": {
141+
"resources": [{
142+
"resourceType": "service",
143+
"expectedKey": "simcore/services/dynamic/s4l-ui",
144+
"title": "Sim4Life",
145+
"newStudyLabel": "New S4L project",
146+
"idToWidget": "startS4LButton"
147+
}, {
148+
"resourceType": "service",
149+
"expectedKey": "simcore/services/dynamic/s4l-jupyter",
150+
"icon": "https://upload.wikimedia.org/wikipedia/commons/3/38/Jupyter_logo.svg",
151+
"title": "Jupyter Lab",
152+
"newStudyLabel": "New S4L Jupyter Lab"
153+
}]
154+
}
155+
},
156+
"s4llite": {
157+
"plus_button": {
158+
"resources": [{
159+
"resourceType": "service",
160+
"expectedKey": "simcore/services/dynamic/s4l-ui-lite",
161+
"title": "${replace_me_product_name}",
162+
"newStudyLabel": "New Project",
163+
"idToWidget": "startS4LButton"
164+
}]
165+
}
166+
},
167+
"osparc": {
168+
"plus_button": {
169+
"resources": [{
170+
"resourceType": "study",
171+
"icon": "@FontAwesome5Solid/file/18",
172+
"title": "Empty Study",
173+
"newStudyLabel": "New Study",
174+
"idToWidget": "emptyStudyBtn"
175+
}]
176+
}
177+
}
178+
}

0 commit comments

Comments
 (0)