Skip to content

Commit 4037c5e

Browse files
authored
Fixes for alpha tester (#748)
* fake-template-projects.json created. 2 templates moved here * Kember use case added * MattWard use case added * 4x CC 0D added * Provide a way to refetch data from DataManager * connect the kember-model to the kember-viewer * moved null handler to node_ports package * set node ports log level to same as sidecar * removed Unused import logging * New issue: add UX_improvemnts label and asign it to oSPARC Product Backlog project
1 parent 0dfbd40 commit 4037c5e

File tree

6 files changed

+62
-36
lines changed

6 files changed

+62
-36
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1+
import logging
2+
13
from . import config as node_config
24
from . import exceptions
35
from ._item import Item as Port
46
from .nodeports import ports
7+
8+
# nodeports is a library for accessing data linked to the node
9+
# in that sense it should not log stuff unless the application code wants it to be so.
10+
log = logging.getLogger(__name__)
11+
log.addHandler(logging.NullHandler())
12+

packages/simcore-sdk/src/simcore_sdk/node_ports/config.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"""Takes care of the configurations.
22
"""
3-
import logging
43
import os
54

65

@@ -50,7 +49,3 @@
5049
"string":{"type":str, "converter":str}
5150
}
5251
FILE_TYPE_PREFIX = "data:"
53-
54-
# nodeports is a library for accessing data linked to the node
55-
# in that sense it should not log stuff unless the application code wants it to be so.
56-
logging.getLogger(__name__).addHandler(logging.NullHandler())

services/sidecar/src/sidecar/core.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from sqlalchemy import and_, exc
1515

1616
from simcore_sdk import node_ports
17+
from simcore_sdk.node_ports import log as node_port_log
1718
from simcore_sdk.models.pipeline_models import (RUNNING, SUCCESS,
1819
ComputationalPipeline,
1920
ComputationalTask)
@@ -24,6 +25,7 @@
2425

2526
log = get_task_logger(__name__)
2627
log.setLevel(logging.DEBUG) # FIXME: set level via config
28+
node_port_log.setLevel(logging.DEBUG)
2729

2830
@contextmanager
2931
def session_scope(session_factory):
@@ -138,17 +140,17 @@ def _progress(self, channel, progress):
138140
prog_data = {"Channel" : "Progress", "Node": self._task.node_id, "Progress" : progress}
139141
prog_body = json.dumps(prog_data)
140142
channel.basic_publish(exchange=self._pika.progress_channel, routing_key='', body=prog_body)
141-
143+
142144
def _bg_job(self, log_file):
143145
connection = pika.BlockingConnection(self._pika.parameters)
144146

145147
channel = connection.channel()
146148
channel.exchange_declare(exchange=self._pika.log_channel, exchange_type='fanout', auto_delete=True)
147149
channel.exchange_declare(exchange=self._pika.progress_channel, exchange_type='fanout', auto_delete=True)
148-
150+
149151
def _follow(thefile):
150152
thefile.seek(0,2)
151-
while self._executor.run_pool:
153+
while self._executor.run_pool:
152154
line = thefile.readline()
153155
if not line:
154156
time.sleep(1)

services/web/client/source/class/qxapp/component/widget/NewGHIssue.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ qx.Class.define("qxapp.component.widget.NewGHIssue", {
3434
env += JSON.stringify(qxapp.utils.LibVersions.getEnvLibs(), null, 2);
3535
env += "\n```";
3636
const body = encodeURIComponent(temp+env);
37-
const url = "https://github.com/ITISFoundation/osparc-simcore/issues/new?labels=tester_review&body=" + body;
37+
let url = "https://github.com/ITISFoundation/osparc-simcore/issues/new";
38+
url += "?labels=tester_review,UX_improvemnts";
39+
url += "&projects=ITISFoundation/3";
40+
url += "&body=" + body;
3841
return url;
3942
},
4043

services/web/client/source/class/qxapp/desktop/DataManager.js

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ qx.Class.define("qxapp.desktop.DataManager", {
3838
construct: function() {
3939
this.base(arguments);
4040

41-
let prjBrowserLayout = new qx.ui.layout.VBox(10);
41+
const prjBrowserLayout = new qx.ui.layout.VBox(10);
4242
this._setLayout(prjBrowserLayout);
4343

4444
this.__createDataManagerLayout();
@@ -55,37 +55,50 @@ qx.Class.define("qxapp.desktop.DataManager", {
5555
},
5656

5757
__createDataManagerLayout: function() {
58-
let dataManagerMainLayout = new qx.ui.container.Composite(new qx.ui.layout.VBox(20));
58+
const dataManagerMainLayout = new qx.ui.container.Composite(new qx.ui.layout.VBox(20));
5959

60-
let label = new qx.ui.basic.Label(this.tr("Data Manager")).set({
60+
const label = new qx.ui.basic.Label(this.tr("Data Manager")).set({
6161
font: qx.bom.Font.fromConfig(qxapp.theme.Font.fonts["nav-bar-label"]),
6262
minWidth: 150
6363
});
6464
dataManagerMainLayout.add(label);
6565

66-
let toDatCore = new qxapp.ui.form.LinkButton(this.tr("To DAT-Core"), "https://app.blackfynn.io");
67-
dataManagerMainLayout.add(toDatCore);
66+
const dataManagerControl = new qx.ui.container.Composite(new qx.ui.layout.HBox(20));
6867

69-
let dataManagerLayout = new qx.ui.container.Composite(new qx.ui.layout.HBox(20));
68+
// button for refetching data
69+
const reloadBtn = new qx.ui.form.Button().set({
70+
icon: "@FontAwesome5Solid/sync-alt/16"
71+
});
72+
reloadBtn.addListener("execute", function() {
73+
this.__initResources();
74+
}, this);
75+
dataManagerControl.add(reloadBtn);
76+
77+
const toDatCore = new qxapp.ui.form.LinkButton(this.tr("To DAT-Core"), "https://app.blackfynn.io");
78+
dataManagerControl.add(toDatCore);
79+
80+
dataManagerMainLayout.add(dataManagerControl);
81+
82+
const dataManagerLayout = new qx.ui.container.Composite(new qx.ui.layout.HBox(20));
7083
dataManagerMainLayout.add(dataManagerLayout, {
7184
flex: 1
7285
});
7386

74-
let treeLayout = this.__createTreeLayout();
87+
const treeLayout = this.__createTreeLayout();
7588
dataManagerLayout.add(treeLayout, {
7689
flex: 1
7790
});
7891

79-
let chartLayout = this.__createChartLayout();
92+
const chartLayout = this.__createChartLayout();
8093
dataManagerLayout.add(chartLayout);
8194

8295
this._add(dataManagerMainLayout);
8396
},
8497

8598
__createTreeLayout: function() {
86-
let treeLayout = new qx.ui.container.Composite(new qx.ui.layout.VBox(10));
99+
const treeLayout = new qx.ui.container.Composite(new qx.ui.layout.VBox(10));
87100

88-
let filesTree = this.__tree = new qxapp.file.FilesTree().set({
101+
const filesTree = this.__tree = new qxapp.file.FilesTree().set({
89102
dragMechnism: true,
90103
dropMechnism: true,
91104
minHeight: 600
@@ -103,13 +116,13 @@ qx.Class.define("qxapp.desktop.DataManager", {
103116
flex: 1
104117
});
105118

106-
let addBtn = new qxapp.file.FilesAdd(this.tr("Add file(s)"));
119+
const addBtn = new qxapp.file.FilesAdd(this.tr("Add file(s)"));
107120
addBtn.addListener("fileAdded", e => {
108121
this.__initResources();
109122
}, this);
110123
treeLayout.add(addBtn);
111124

112-
let selectedFileLayout = this.__selectedFileLayout = new qxapp.file.FileLabelWithActions();
125+
const selectedFileLayout = this.__selectedFileLayout = new qxapp.file.FileLabelWithActions();
113126
selectedFileLayout.addListener("fileDeleted", () => {
114127
this.__initResources();
115128
}, this);
@@ -121,18 +134,18 @@ qx.Class.define("qxapp.desktop.DataManager", {
121134
__createChartLayout: function() {
122135
let chartLayout = new qx.ui.container.Composite(new qx.ui.layout.VBox(10));
123136

124-
let label = new qx.ui.basic.Label(this.tr("Data Resources")).set({
137+
const label = new qx.ui.basic.Label(this.tr("Data Resources")).set({
125138
font: qx.bom.Font.fromConfig(qxapp.theme.Font.fonts["nav-bar-label"]),
126139
minWidth: 500
127140
});
128141
chartLayout.add(label);
129142

130143
const plotlyDivId = "DataResources";
131-
let plotly = new qxapp.component.widget.PlotlyWidget(plotlyDivId);
144+
const plotly = new qxapp.component.widget.PlotlyWidget(plotlyDivId);
132145
plotly.addListener("plotlyWidgetReady", e => {
133146
if (e.getData()) {
134147
this.__pieChart = plotly;
135-
let myPlot = document.getElementById(plotlyDivId);
148+
const myPlot = document.getElementById(plotlyDivId);
136149
myPlot.on("plotly_click", data => {
137150
this.__reloadChartData(data["points"][0]["id"][0]);
138151
}, this);
@@ -148,7 +161,7 @@ qx.Class.define("qxapp.desktop.DataManager", {
148161

149162
__selectionChanged: function() {
150163
this.__tree.resetSelection();
151-
let selectionData = this.__tree.getSelectedFile();
164+
const selectionData = this.__tree.getSelectedFile();
152165
if (selectionData) {
153166
this.__selectedFileLayout.itemSelected(selectionData["selectedItem"], selectionData["isFile"]);
154167
}

services/web/server/src/simcore_service_webserver/data/fake-template-projects.isan.json

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"NBeats": 5,
3636
"Ligand": 0,
3737
"cAMKII": "WT",
38-
"initFile": {
38+
"initfile": {
3939
"nodeUuid": "template-uuid-4674-b758-946151cae351",
4040
"output": "outFile"
4141
}
@@ -274,7 +274,12 @@
274274
"key": "simcore/services/dynamic/kember-viewer",
275275
"version": "2.9.0",
276276
"label": "kember-viewer",
277-
"inputs": {},
277+
"inputs": {
278+
"outputController": {
279+
"nodeUuid": "template-uuid-43dd-8d87-9969d380df53",
280+
"output": "out_1"
281+
}
282+
},
278283
"inputNodes": [
279284
"template-uuid-43dd-8d87-9969d380df53"
280285
],
@@ -316,7 +321,7 @@
316321
}
317322
}
318323
}, {
319-
"uuid": "b9f00712-0088-40e1-bb95-c68f6358bfe2",
324+
"uuid": "template-uuid-40e1-bb95-c68f6358bfe2",
320325
"name": "ISAN: 4x CC 0D",
321326
"description": "4 Colleen Clancy solvers with different configuration and the same input file",
322327
"notes": "",
@@ -600,7 +605,7 @@
600605
"template-uuid-47c3-a39b-36e4bedadca5": {
601606
"key": "simcore/services/dynamic/raw-graphs",
602607
"version": "2.8.0",
603-
"label": "GKr 1.00",
608+
"label": "MP GKr 1.00",
604609
"inputs": {
605610
"input_1": {
606611
"nodeUuid": "template-uuid-4083-a798-8fe114647ca5",
@@ -638,7 +643,7 @@
638643
"template-uuid-4e79-9670-46d38e433234": {
639644
"key": "simcore/services/dynamic/raw-graphs",
640645
"version": "2.8.0",
641-
"label": "GKr 0.75",
646+
"label": "MP GKr 0.75",
642647
"inputs": {
643648
"input_1": {
644649
"nodeUuid": "template-uuid-4083-a798-8fe114647ca5",
@@ -676,7 +681,7 @@
676681
"template-uuid-4979-81e9-35cfdbefcc85": {
677682
"key": "simcore/services/dynamic/raw-graphs",
678683
"version": "2.8.0",
679-
"label": "GKr 0.50",
684+
"label": "MP GKr 0.50",
680685
"inputs": {
681686
"input_1": {
682687
"nodeUuid": "template-uuid-4083-a798-8fe114647ca5",
@@ -714,7 +719,7 @@
714719
"template-uuid-42da-ae03-1bb50a4c2728": {
715720
"key": "simcore/services/dynamic/raw-graphs",
716721
"version": "2.8.0",
717-
"label": "GKr 0.25",
722+
"label": "MP GKr 0.25",
718723
"inputs": {
719724
"input_1": {
720725
"nodeUuid": "template-uuid-4083-a798-8fe114647ca5",
@@ -752,7 +757,7 @@
752757
"template-uuid-4c8a-8f8d-7d8baf6a3604": {
753758
"key": "simcore/services/dynamic/raw-graphs",
754759
"version": "2.8.0",
755-
"label": "GKr 1.00",
760+
"label": "LCC GKr 1.00",
756761
"inputs": {
757762
"input_1": {
758763
"nodeUuid": "template-uuid-4083-a798-8fe114647ca5",
@@ -790,7 +795,7 @@
790795
"template-uuid-456b-b5fc-bc3ee7c257a2": {
791796
"key": "simcore/services/dynamic/raw-graphs",
792797
"version": "2.8.0",
793-
"label": "GKr 0.75",
798+
"label": "LCC GKr 0.75",
794799
"inputs": {
795800
"input_1": {
796801
"nodeUuid": "template-uuid-4083-a798-8fe114647ca5",
@@ -828,7 +833,7 @@
828833
"template-uuid-4d66-b9af-f8a3153f8d24": {
829834
"key": "simcore/services/dynamic/raw-graphs",
830835
"version": "2.8.0",
831-
"label": "GKr 0.50",
836+
"label": "LCC GKr 0.50",
832837
"inputs": {
833838
"input_1": {
834839
"nodeUuid": "template-uuid-4083-a798-8fe114647ca5",
@@ -866,7 +871,7 @@
866871
"template-uuid-49f1-9ecf-eff08693074a": {
867872
"key": "simcore/services/dynamic/raw-graphs",
868873
"version": "2.8.0",
869-
"label": "GKr 0.25",
874+
"label": "LCC GKr 0.25",
870875
"inputs": {
871876
"input_1": {
872877
"nodeUuid": "template-uuid-4083-a798-8fe114647ca5",

0 commit comments

Comments
 (0)