From 955d7123c7cf17acc0cf27995993e037e129ca13 Mon Sep 17 00:00:00 2001 From: Alejandro De Maria Antolinos Date: Fri, 22 Feb 2019 12:12:37 +0100 Subject: [PATCH] It fixes issue #489 --- csv/example3.csv | 27 ++++----- js/core/controller/sessioncontroller.js | 6 +- js/core/view/managerwelcomemainview.js | 9 +-- .../proposal/sessiondataadapter.js | 5 ++ mx/dev.html | 2 - saxs/dev.html | 2 - test/dev.html | 57 +++---------------- tracking/dev.html | 57 +++---------------- 8 files changed, 40 insertions(+), 125 deletions(-) diff --git a/csv/example3.csv b/csv/example3.csv index 8aaee42ec..7128a7c56 100644 --- a/csv/example3.csv +++ b/csv/example3.csv @@ -1,13 +1,14 @@ -# For more information go to https://github.com/ispyb/EXI/wiki/Fill-shipment-from-CSV -pacelA3,containerA3,SPINEpuck,1,5HT3,testtes2t1,,,,,,,,,Default,1,2,3,4,5,6,P1,100,,30,0,1.6,comments -pacelA3,containerA3,SPINEpuck,2,5HT3,testtes2t1,,,,,,,,,Default,1,2,3,4,5,6,P1,100,,31,0,1.6,comments -pacelA3,containerA3,SPINEpuck,3,5HT3,testtes2t1,,,,,,,,,Default,1,2,3,4,5,6,P1,100,,32,0,1.6,comments -pacelA3,containerA3,SPINEpuck,4,5HT3,testtes2t1,,,,,,,,,Default,1,2,3,4,5,6,P1,100,,33,0,1.6,comments -pacelA3,containerA3,SPINEpuck,5,5HT3,testtes2t1,,,,,,,,,Default,1,2,3,4,5,6,P1,100,,34,0,1.6,comments -pacelA3,containerA3,SPINEpuck,6,5HT3,testtes2t1,,,,,,,,,Default,1,2,3,4,5,6,P1,100,,35,0,1.6,comments -pacelA3,containerA3,SPINEpuck,7,5HT3,testtes2t1,,,,,,,,,Default,1,2,3,4,5,6,P1,100,,36,0,1.6,comments -pacelA3,containerA3,SPINEpuck,8,5HT3,testtes2t1,,,,,,,,,Default,1,2,3,4,5,6,P1,100,,37,0,1.6,comments -pacelA3,containerA3,SPINEpuck,9,5HT3,testtes2t1,,,,,,,,,Default,1,2,3,4,5,6,P1,100,,38,0,1.6,comments -pacelA3,containerA3,SPINEpuck,10,5HT3,testtes2t1,,,,,,,,,Default,1,2,3,4,5,6,P1,100,,39,0,1.6,comments -pacelA3,containerA4,Unipuck,1,5HT3,testtes2t1,,,,,,,,,Default,1,2,3,4,5,6,P1,100,,40,0,1.6,comments -pacelA3,containerA4,Unipuck,2,5HT3,testtes2t1,,,,,,,,,Default,1,2,3,4,5,6,P1,100,,41,0,1.6,comments +# For more information go to https://github.com/ispyb/EXI/wiki/Fill-shipment-from-CSV,,,,,,,,,,,,,,,,,,,,,,,,,,, +#parcel name, container name, container type, container position, protein acronym, sample acronym, pin barcode, SPG, cellA, cellB, cellC, cellAlpha, cellBeta, cellGamma, experimentType, aimed Resolution, required Resolution, beam diameter, number of positions, aimed multiplicity, aimed completeness, forced SPG, radiation sensitivity, smiles, total rot. angle, min osc. angle, observed resolution, comments +parcelA3,containerA3,SPINEpuck,1,5HT3,testtes2t1,,,,,,,,,Default,1,2,3,4,5,6,P1,100,,30,0.2,1.6,comments +parcelA3,containerA3,SPINEpuck,2,5HT3,testtes2t1,,,,,,,,,Default,1,2,3,4,5,6,P1,100,,31,0.2,1.6,comments +parcelA3,containerA3,SPINEpuck,3,5HT3,testtes2t1,,,,,,,,,Default,1,2,3,4,5,6,P1,100,,32,0.2,1.6,comments +parcelA3,containerA3,SPINEpuck,4,5HT3,testtes2t1,,,,,,,,,Default,1,2,3,4,5,6,P1,100,,33,0.2,1.6,comments +parcelA3,containerA3,SPINEpuck,5,5HT3,testtes2t1,,,,,,,,,Default,1,2,3,4,5,6,P1,100,,34,0.2,1.6,comments +parcelA3,containerA3,SPINEpuck,6,5HT3,testtes2t1,,,,,,,,,Default,1,2,3,4,5,6,P1,100,,35,0.2,1.6,comments +parcelA3,containerA3,SPINEpuck,7,5HT3,testtes2t1,,,,,,,,,Default,1,2,3,4,5,6,P1,100,,36,0.2,1.6,comments +parcelA3,containerA3,SPINEpuck,8,5HT3,testtes2t1,,,,,,,,,Default,1,2,3,4,5,6,P1,100,,37,0.2,1.6,comments +parcelA3,containerA3,SPINEpuck,9,5HT3,testtes2t1,,,,,,,,,Default,1,2,3,4,5,6,P1,100,,38,0.2,1.6,comments +parcelA3,containerA3,SPINEpuck,10,5HT3,testtes2t1,,,,,,,,,Default,1,2,3,4,5,6,P1,100,,39,0.2,1.6,comments +parcelA3,containerA4,Unipuck,1,5HT3,testtes2t1,,,,,,,,,Default,1,2,3,4,5,6,P1,100,,40,0.2,1.6,comments +parcelA3,containerA4,Unipuck,2,5HT3,testtes2t1,,,,,,,,,Default,1,2,3,4,5,6,P1,100,,41,0.2,1.6,comments diff --git a/js/core/controller/sessioncontroller.js b/js/core/controller/sessioncontroller.js index e4f52475d..b1c15246b 100644 --- a/js/core/controller/sessioncontroller.js +++ b/js/core/controller/sessioncontroller.js @@ -33,10 +33,8 @@ SessionController.prototype.init = function() { EXI.addMainPanel(mainView); - var onSuccess = function(sender, data){ - - mainView.load(EXI.proposalManager.getSessions()); - + var onSuccess = function(sender, data){ + mainView.load(EXI.proposalManager.getSessions()); EXI.setLoadingMainPanel(false); }; EXI.setLoadingMainPanel(); diff --git a/js/core/view/managerwelcomemainview.js b/js/core/view/managerwelcomemainview.js index 3745d527c..b420943d1 100644 --- a/js/core/view/managerwelcomemainview.js +++ b/js/core/view/managerwelcomemainview.js @@ -291,7 +291,7 @@ ManagerWelcomeMainView.prototype.load = function(username) { this.username = username; /** By default for users we load all the sessions and managers only sessions that occurs today */ if (this.isUser(username)){ - this.loadSessionsByProposal(username); + this.loadSessionsByUsername(username); /** set active proposal */ this.activeProposal(username); } @@ -307,15 +307,16 @@ ManagerWelcomeMainView.prototype.load = function(username) { * * @method loadSessions */ -ManagerWelcomeMainView.prototype.loadSessionsByProposal = function(username) { +ManagerWelcomeMainView.prototype.loadSessionsByUsername = function(username) { this.username = username; var _this = this; this.panel.setLoading(true); function onSuccess(sender, data){ - _this.displaySessions(data, " sessions for proposal " + username); + _this.displaySessions(data, " sessions for user " + username); _this.panel.setLoading(false); } - EXI.getDataAdapter({onSuccess:onSuccess}).proposal.session.getSessionsByProposal(username); + //EXI.getDataAdapter({onSuccess:onSuccess}).proposal.session.getSessionsByProposal(username); + EXI.getDataAdapter({onSuccess:onSuccess}).proposal.session.getSessionsByToken(); }; diff --git a/js/ispyb-client/proposal/sessiondataadapter.js b/js/ispyb-client/proposal/sessiondataadapter.js index 1abd24331..e3af6232d 100644 --- a/js/ispyb-client/proposal/sessiondataadapter.js +++ b/js/ispyb-client/proposal/sessiondataadapter.js @@ -10,6 +10,11 @@ SessionDataAdapter.prototype.getSessions = function(){ this.get('/{token}/proposal/{proposal}/session/list'); }; +SessionDataAdapter.prototype.getSessionsByToken = function(){ + this.get('/{token}/session/list'); +}; + + SessionDataAdapter.prototype.getSessionsByProposal = function(proposal){ this.get('/{token}/proposal/{0}/session/list'.format([proposal])); }; diff --git a/mx/dev.html b/mx/dev.html index 60079886a..59432b903 100644 --- a/mx/dev.html +++ b/mx/dev.html @@ -33,7 +33,6 @@ - @@ -50,7 +49,6 @@ - diff --git a/saxs/dev.html b/saxs/dev.html index b09f490b6..90798544e 100644 --- a/saxs/dev.html +++ b/saxs/dev.html @@ -35,7 +35,6 @@ - @@ -52,7 +51,6 @@ - diff --git a/test/dev.html b/test/dev.html index 3e27eee3c..f331e9362 100644 --- a/test/dev.html +++ b/test/dev.html @@ -35,7 +35,6 @@ - @@ -52,7 +51,6 @@ - @@ -62,57 +60,16 @@ - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - view-source:http://lindemaria:8082/EXI/test/dev.html#/welcome - - - - - - - - - - - - - - - - + + + + + view-source:http://lindemaria:8082/EXI/test/dev.html#/welcome + diff --git a/tracking/dev.html b/tracking/dev.html index b28a1ab7c..3c8b003bd 100644 --- a/tracking/dev.html +++ b/tracking/dev.html @@ -32,7 +32,6 @@ - @@ -49,7 +48,6 @@ - @@ -59,57 +57,16 @@ - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + +