Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development #1272

Merged
merged 73 commits into from
Jan 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
b4f99d4
#1166 Download contents feature , still needs styling to be applied.
jrmartin Jul 31, 2021
99d6208
#1166 eslint fix
jrmartin Jul 31, 2021
6843948
#1173 Downloader instances list
jrmartin Aug 11, 2021
90144d4
Merge remote-tracking branch 'origin/development' into feature/1173
jrmartin Aug 11, 2021
c9ea8fd
Merge remote-tracking branch 'origin/development' into feature/1173
jrmartin Aug 23, 2021
048a54e
#1172 Uploader nblast server functionality
jrmartin Sep 23, 2021
c074b23
#1181 Save styling work in progress
jrmartin Sep 24, 2021
71a8060
#1181 Download component styling. Missing progress bar and error message
jrmartin Sep 24, 2021
8e6e8de
Update term-context-tests-js-vfb-term-context-component-tests-add-med…
Robbie1977 Sep 28, 2021
a5db1b4
Revert "Update term-context-tests-js-vfb-term-context-component-tests…
Robbie1977 Sep 28, 2021
4fef6a9
Cleaning up edge to see if that fixes diff
Robbie1977 Sep 28, 2021
9312711
Merge pull request #1193 from VirtualFlyBrain/alpha
Robbie1977 Oct 3, 2021
040c61d
#1181 Download contents styling
jrmartin Oct 8, 2021
5f475e7
Merge remote-tracking branch 'origin/development' into feature/1181
jrmartin Oct 8, 2021
59c423c
#1181 Merge development. Add script to update snapshots, update snapshot
jrmartin Oct 8, 2021
b627bc8
#1181 Download styling fixes. Adds text to configuration file.
jrmartin Oct 9, 2021
37b752b
#1181 Null checks
jrmartin Oct 10, 2021
94bead0
#1181 update term context tests snapshots
jrmartin Oct 10, 2021
60f4d0c
#1181 snaphot updates for the term context tests
jrmartin Oct 11, 2021
fdb225c
#1181 --updatesnapshots during tests
jrmartin Oct 11, 2021
f72dbc4
#1181 Test with new snapshots
jrmartin Oct 11, 2021
8e0bee1
#1190 id and url generation
ddelpiano Oct 11, 2021
dd997bc
Merge pull request #1194 from VirtualFlyBrain/feature/1181
ddelpiano Oct 11, 2021
5cbfcf6
Merge pull request #1195 from VirtualFlyBrain/feature/1190
jrmartin Oct 11, 2021
3bc9997
Merge remote-tracking branch 'origin/development' into feature/1172
jrmartin Oct 11, 2021
92a3c44
#1172 style vfb uploader and tests for download contents.
jrmartin Oct 22, 2021
d0579af
#1192 update tests
jrmartin Oct 28, 2021
7e8b00d
Merge pull request #1183 from VirtualFlyBrain/feature/1172
ddelpiano Nov 2, 2021
d3204b8
#1238 and #1239 , adds badges to query results and listens to filter
jrmartin Nov 6, 2021
ce282e1
latest snapshot from master
Robbie1977 Nov 8, 2021
8136bab
Merge pull request #1242 from VirtualFlyBrain/development-sync-244a
Robbie1977 Nov 8, 2021
61e1f12
updated snapshot from development
Robbie1977 Nov 8, 2021
a6a05d9
updating client
Robbie1977 Nov 8, 2021
6ca8f61
Merge remote-tracking branch 'origin/development' into feature/1238
jrmartin Nov 17, 2021
969c7d6
#1238 Allow labels to be customized via configuration file
jrmartin Nov 17, 2021
f51149d
#1257 - Tooltip for downloadable types
jrmartin Nov 18, 2021
8282fe0
#1257 fix eslint
jrmartin Nov 19, 2021
463b104
#1259 - FIlters work in progress
jrmartin Nov 19, 2021
ac3235e
#1259 circuit browser filter labels
jrmartin Nov 19, 2021
ea740db
Merge pull request #1252 from VirtualFlyBrain/development-sync-6ec1
Robbie1977 Nov 22, 2021
5ce1d4b
Revert "Revert "Revert "Revert "update snapshot""""
Robbie1977 Nov 22, 2021
0c3aef1
Revert "Revert "Revert "Revert "collecting snapshot""""
Robbie1977 Nov 22, 2021
4aacb37
Revert "Revert "Revert "Revert "Revert "collecting snapshot"""""
Robbie1977 Nov 22, 2021
c7d07f3
Revert "Revert "Revert "Revert "Revert "update snapshot"""""
Robbie1977 Nov 22, 2021
5839ed6
New Snapshots (with upload icon)
Robbie1977 Nov 22, 2021
2059db3
Expanding to all Anatomy
Robbie1977 Nov 23, 2021
4e0cbf8
limiting log as per manual reporting
Robbie1977 Nov 23, 2021
d2f4faf
Merge branch 'development' of https://github.com/VirtualFlyBrain/gepp…
Robbie1977 Nov 23, 2021
442cebd
ranking up expression in search
Robbie1977 Nov 23, 2021
db06ad6
upranking VFBexp in results
Robbie1977 Nov 23, 2021
d34e44a
typo fix
Robbie1977 Nov 23, 2021
3d20af5
Merge pull request #1241 from VirtualFlyBrain/feature/1238
ddelpiano Nov 25, 2021
5a51ed7
Merge pull request #1258 from VirtualFlyBrain/feature/1257
ddelpiano Nov 25, 2021
4876fb2
Merge pull request #1261 from VirtualFlyBrain/feature/1259
ddelpiano Nov 25, 2021
49eb7dd
#1262 Add filter labels for priority list
jrmartin Dec 1, 2021
a77d39c
#1265 revert manipulation of search configuration, now done inside the
jrmartin Dec 1, 2021
fc38b92
#1265 Update material-ui/icons to 4.11.2
jrmartin Dec 2, 2021
1376eb1
#1265 use material-ui/icons 4.0.0
jrmartin Dec 2, 2021
7c0151e
#1265 Updated version of material-ui/icons
jrmartin Dec 2, 2021
118dbdc
#1265 update react-tabs dependency
jrmartin Dec 2, 2021
58a2e27
#1265 update react tabs
jrmartin Dec 2, 2021
cf65506
Fix for labels in the search results
Robbie1977 Dec 3, 2021
80d51bf
fix for labels in search
Robbie1977 Dec 3, 2021
a26c593
Merge pull request #1266 from VirtualFlyBrain/feature/1265
Robbie1977 Dec 3, 2021
6e82b52
Merge pull request #1267 from VirtualFlyBrain/development
Robbie1977 Dec 3, 2021
78e3fb0
Revert "Revert "Revert "Revert "Revert "Revert "update snapshot""""""
Robbie1977 Dec 4, 2021
2e13a28
Revert "Revert "Revert "Revert "Revert "Revert "collecting snapshot""…
Robbie1977 Dec 4, 2021
98da8f7
data & layout fix
Robbie1977 Dec 4, 2021
8207c1f
Revert "Revert "Revert "Revert "Revert "Revert "Revert "collecting sn…
Robbie1977 Dec 4, 2021
0cf6fc8
Revert "Revert "Revert "Revert "Revert "Revert "Revert "update snapsh…
Robbie1977 Dec 4, 2021
8bc58f1
Merge pull request #1264 from VirtualFlyBrain/feature/1262
ddelpiano Dec 6, 2021
b78cb64
adding classification ref for neurons
Robbie1977 Dec 6, 2021
c5ce7c4
removing any potential log4j issues
Robbie1977 Dec 13, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ARG geppettoSimulationRelease=vfb_20200604_a
ARG geppettoDatasourceRelease=vfb_20200604_a
ARG geppettoModelSwcRelease=v1.0.1
ARG geppettoFrontendRelease=development
ARG geppettoClientRelease=VFBv2.2.0.7
ARG geppettoClientRelease=VFBv2.2.0.7-feature/1238
ARG ukAcVfbGeppettoRelease=download

ARG mvnOpt="-Dhttps.protocols=TLSv1.2 -DskipTests --quiet -Pmaster"
Expand All @@ -38,6 +38,7 @@ ENV VFB_OWL_SERVER=${VFB_OWL_SERVER_ARG}
ENV VFB_R_SERVER=${VFB_R_SERVER_ARG}
ENV SOLR_SERVER=${SOLR_SERVER_ARG}
ENV googleAnalyticsSiteCode=${googleAnalyticsSiteCode_ARG}
ENV LOG4J_FORMAT_MSG_NO_LOOKUPS=true

RUN /bin/echo -e "\e[1;35mORIGIN BRANCH ------------ $originBranch\e[0m" &&\
/bin/echo -e "\e[1;35mTARGET BRANCH ------------ $targetBranch\e[0m" &&\
Expand Down
14 changes: 14 additions & 0 deletions components/VFBMain.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import VFBTermInfoWidget from './interface/VFBTermInfo/VFBTermInfo';
import Logo from '@geppettoengine/geppetto-client/components/interface/logo/Logo';
import Canvas from '@geppettoengine/geppetto-client/components/interface/3dCanvas/Canvas';
import QueryBuilder from '@geppettoengine/geppetto-client/components/interface/query/queryBuilder';
import VFBDownloadContents from './interface/VFBDownloadContents/VFBDownloadContents';
import VFBUploader from './interface/VFBUploader/VFBUploader';
import HTMLViewer from '@geppettoengine/geppetto-ui/html-viewer/HTMLViewer';
import VFBListViewer from './interface/VFBListViewer/VFBListViewer';
Expand Down Expand Up @@ -52,6 +53,7 @@ class VFBMain extends React.Component {
quickHelpVisible: undefined,
UIUpdated: true,
wireframeVisible: false,
downloadContentsVisible : true,
uploaderContentsVisible : true
};

Expand Down Expand Up @@ -488,6 +490,12 @@ class VFBMain extends React.Component {
[buttonState]: !this.state[buttonState]
});
break;
case 'downloadContentsVisible':
this.refs.downloadContentsRef?.openDialog();
break;
case 'uploaderContentsVisible':
this.refs.uploaderContentsRef?.openDialog();
break;
case 'quickHelpVisible':
if (this.state[buttonState] === undefined) {
this.setState({
Expand Down Expand Up @@ -527,6 +535,9 @@ class VFBMain extends React.Component {
case 'triggerSetTermInfo':
this.handlerInstanceUpdate(click.value[0]);
break;
case 'downloadContentsVisible':
this.refs.downloadContentsRef?.openDialog();
break;
case 'uploaderContentsVisible':
this.refs.uploaderContentsRef?.openDialog();
break;
Expand Down Expand Up @@ -1752,7 +1763,10 @@ class VFBMain extends React.Component {
searchConfiguration={this.searchConfiguration}
datasourceConfiguration={this.datasourceConfiguration} />

<VFBDownloadContents ref="downloadContentsRef" open={false} />

<VFBUploader ref="uploaderContentsRef" open={false} />

{this.htmlToolbarRender}
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,20 @@ var locationCypherQuery = ( instances, paths, weight ) => ({
+ " WITH * ORDER BY index DESC"
+ " UNWIND relationships(path) as sr"
+ " OPTIONAL MATCH cp=(x:Neuron:has_neuron_connectivity)-[:synapsed_to]-(y:Neuron:has_neuron_connectivity) WHERE x=apoc.rel.startNode(sr) AND y=apoc.rel.endNode(sr) OPTIONAL MATCH fp=(x)-[r:synapsed_to]->(y) WHERE r.weight[0] >= " + weight?.toString()
+ " RETURN distinct a as root, collect(distinct fp) as pp, collect(distinct cp) as p, collect(distinct id(r)) as fr, sourceNode as source, targetNode as target, max(length(path)) as maxHops, collect(distinct toString(id(r))+':'+toString(index)) as relationshipY ",
+ " OPTIONAL MATCH (x)-[xio:INSTANCEOF]->(xpc:Class) OPTIONAL MATCH (y)-[yio:INSTANCEOF]->(ypc:Class) WITH *,'\"'+ x.short_form+'\":{\"'+xpc.short_form+'\":\"' + xpc.label + '\"},\"'+ y.short_form+'\":{\"'+ypc.short_form+'\":\"' + ypc.label + '\"}' as Class"
+ " RETURN distinct a as root, collect(distinct fp) as pp, collect(distinct cp) as p, collect(distinct id(r)) as fr, sourceNode as source, targetNode as target, max(length(path)) as maxHops, collect(distinct toString(id(r))+':'+toString(index)) as relationshipY, "
+ " apoc.convert.fromJsonMap('{' + apoc.text.join(collect(Class),',') + '}') as class ",
"resultDataContents": ["row", "graph"]
}
]
});

var Neo4jLabels = {
FAFB : "FAFB",
L1EM : "L1EM",
FlyEM_HB : "FlyEM_HB"
}

// See query explanation on https://github.com/VirtualFlyBrain/graph_queries/blob/main/weighted_path.md

var configuration = {
Expand Down Expand Up @@ -120,5 +129,6 @@ module.exports = {
configuration,
styling,
restPostConfig,
locationCypherQuery
locationCypherQuery,
Neo4jLabels
};
34 changes: 34 additions & 0 deletions components/configuration/VFBDownloadContents/configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"postURL":"https://zip.virtualflybrain.org/download",
"contentType": "application/json",
"zipName" : "VFB Files.zip",
"options" :{
"obj": {
"label" : "OBJ",
"tooltip" : "Download OBJ"
},
"swc": {
"label" : "SWC",
"tooltip" : "Download SWC"
},
"nrrd": {
"label" : "NRRD",
"tooltip" : "Download NRRD"
},
"reference": {
"label" : "References",
"tooltip" : "Download References"
}
},
"text" : {
"title" : "Download Data",
"typesSubtitle" : "Please select the desired types",
"variablesSubtitle" : "Please select Variables:",
"noVariablesSubtitle" : "No loaded variables",
"errorMessage" : "Something went wrong... We were not able to download the data. Please try again.",
"noEntriesFound" : "No entries found for the types and variables selected.",
"cancelButton" : "Cancel",
"downloadButton" : "Download",
"tryAgainButton" : "Try Again"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added components/configuration/VFBDownloadContents/obj.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 20 additions & 4 deletions components/configuration/VFBMain/searchConfiguration.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ var searchStyle = {
singleResult: {
"color": "white",
"fontSize": "18px",

"whiteSpace" : "normal",
":hover": {
"color": "#11bffe",
"background-color": "#252323",
Expand Down Expand Up @@ -99,17 +99,21 @@ var datasourceConfiguration = {
],
"rows": "100",
"wt": "json",
"bq": "shortform_autosuggest:VFB*^110.0 shortform_autosuggest:FBbt*^100.0 label_s:\"\"^2 synonym_s:\"\" short_form:FBbt_00003982^2 facets_annotation:Deprecated^0.001"
"bq": "shortform_autosuggest:VFBexp*^10.0 shortform_autosuggest:VFB*^100.0 shortform_autosuggest:FBbt*^100.0 label_s:\"\"^2 synonym_s:\"\" short_form:FBbt_00003982^2 facets_annotation:Deprecated^0.001"
}
};

var searchConfiguration = {
"resultsMapping":
{
"name": "label",
"id": "short_form"
"id": "short_form",
"labels" : "facets_annotation"
},
"label_manipulation" : label => label,
"filters_expanded": true,
"filter_positive" : "^100",
"filter_negative" : "^0.001",
"filters": [
{
"key": "facets_annotation",
Expand Down Expand Up @@ -305,6 +309,13 @@ var searchConfiguration = {
if (b.label.toLowerCase().indexOf(InputString.toLowerCase()) > -1 && b.label.toLowerCase().indexOf(InputString.toLowerCase()) < a.label.toLowerCase().indexOf(InputString.toLowerCase())) {
return 1;
}
// move up expression (VFBexp) terms
if (a.id.indexOf("VFBexp") > -1 && b.id.indexOf("VFBexp") < 0) {
return -1;
}
if (b.id.indexOf("VFBexp") > -1 && a.id.indexOf("VFBexp") < 0) {
return 1;
}
// if the match in the id is closer to start then move up
if (a.id.toLowerCase().indexOf(InputString.toLowerCase()) > -1 && a.id.toLowerCase().indexOf(InputString.toLowerCase()) < b.id.toLowerCase().indexOf(InputString.toLowerCase())) {
return -1;
Expand All @@ -323,11 +334,16 @@ var searchConfiguration = {
},
"clickHandler": function (id) {
window.addVfbId(id);
},
"Neo4jLabels" : {
"FAFB" : "FAFB",
"L1EM" : "L1EM",
"FlyEM_HB" : "FlyEM_HB"
}
};

module.exports = {
searchStyle,
searchConfiguration,
datasourceConfiguration,
datasourceConfiguration
};
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,14 @@ var toolbarMenu = {
parameters: ["circuitBrowserVisible"]
}
},
{
label: "Download Contents",
icon: "fa fa-download",
action: {
handlerAction: "downloadContentsVisible",
parameters: []
}
},
{
label: "NBLAST Uploader",
icon: "fa fa-upload",
Expand Down
2 changes: 1 addition & 1 deletion components/configuration/VFBTree/VFBTreeConfiguration.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var treeCypherQuery = instance => ({
{
"statement": "MATCH (root:Class)<-[:INSTANCEOF]-(t:Template {short_form:'" + instance + "'})"
+ "<-[:depicts]-(tc:Template)<-[ie:in_register_with]-(c:Individual)-[:depicts]->(image:"
+ "Individual)-[r:INSTANCEOF]->(anat:Class:Nervous_system) WHERE exists(ie.index) WITH root, anat,r,image"
+ "Individual)-[r:INSTANCEOF]->(anat:Class:Anatomy) WHERE exists(ie.index) WITH root, anat,r,image"
+ " MATCH p=allshortestpaths((root)<-[:SUBCLASSOF|part_of*..]-(anat)) "
+ "UNWIND nodes(p) as n UNWIND nodes(p) as m WITH * WHERE id(n) < id(m) "
+ "MATCH path = allShortestPaths( (n)-[:SUBCLASSOF|part_of*..1]-(m) ) "
Expand Down
33 changes: 24 additions & 9 deletions components/configuration/VFBUploader/configuration.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
{
"nblastURL" : "https://zip.virtualflybrain.org/download",
"contentType" : "",
"templates" : [
{ "VFB_00101567" : "VFB_00101567 Template" },
{ "VFB_00000001" : "VFB_00000001 Template" }
],
"acceptedFiles" : [".swc"],
"filesLimit" : 10,
"nblastURL" : "http://upload.virtualflybrain.org/files/UNIQUE_ID?token=bec3a40f0ab377c39103",
"contentType" : "multipart/form-data",
"templates" : [{"short_form":"VFB_00101567","label":"JRC2018Unisex"},{"short_form":"VFB_00200000","label":"JRC2018UnisexVNC"}] ,
"acceptedFiles" : [".swc", ".nrrd"],
"filesLimit" : 1,
"maxFileSize" : 3000000,
"dropZoneMessage" : "Drag and drop a SWC file here or click"
"queryType": "uploaderQuery",
"cookieStorageDays" : 100,
"cookiesLearnLink" : "https://en.wikipedia.org/wiki/HTTP_cookie",
"text" : {
"dialogTitle" : "Upload Data File",
"dialogSubtitle" : "Generate a nblast query from your own data.",
"selectTemplate" : "1. Select a Template",
"select" : "Select",
"addYourFile" : "2. Add your file (Please use a .swc)",
"dropZoneMessage" : "Click or Drag & Drop your file here",
"agreeTerms" : "I agree to the use of cookies to store the NBLAST QUERY URL. ",
"learnMore" : "Learn More",
"blastButtonText" : "Generate a nblast query link",
"restartButtonText" : "Restart",
"copyButtonText" : "Copy",
"infoMessage" : "Generating a nblast query can take up to 30 min. Save this link to find the result of your query.",
"errorDialog" : "Something went wrong... We were not able to generate a nblast query link from your data. Please try again.",
"errorButtonText" : "Try Again"
}
}
Binary file added components/configuration/VFBUploader/file-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 28 additions & 6 deletions components/interface/ErrorCatcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,44 @@ const styles = {
class ErrorCatcher extends React.Component {
constructor (props) {
super(props);
this.state = {
hasError: false,
this.state = {
hasError: false,
open: true,
error: undefined
};
}

handleClose = () => {
var url = "https://github.com/VirtualFlyBrain/VFB2/issues/new";
var customMessage = "Steps to reproduce the problem: \n\nPlease fill the below with the necessary steps to reproduce the problem\n\n\n\nError Information:\n\n"
var body = customMessage + this.state.error.message + "\n\n" + this.state.error.stack.replace("#",escape("#")) + "\n\n```diff\n" + window.console.logs.slice(-50).join('\n').replace("#",escape("#")) + "\n```\n";
// return as much of the log up to the last 10 events < 1000 characters:
var logLength = -1;
var limitedLog = window.console.logs.slice(logLength).join('%0A').replace(
/\&/g,escape('&')
).replace(
/\#/g,escape('#')
).replace(
/\-/g,'%2D'
).replace(
/\+/g,'%2B'
);
while (limitedLog.length < 1000 && logLength > -50) {
logLength -= 1;
limitedLog = window.console.logs.slice(logLength).join('%0A').replace(
/\&/g,escape('&')
).replace(
/\#/g,escape('#')
).replace(
/\-/g,'%2D'
).replace(
/\+/g,'%2B'
);
}
var body = customMessage + this.state.error.message + "\n\n" + this.state.error.stack.replace("#",escape("#")) + "\n\n```diff\n" + limitedLog + "\n```\n";
var form = document.createElement("form");
form.setAttribute("method", "get");
form.setAttribute("action", url);
form.setAttribute("target", "view");
var hiddenField = document.createElement("input");
var hiddenField = document.createElement("input");
hiddenField.setAttribute("type", "hidden");
hiddenField.setAttribute("name", "body");
hiddenField.setAttribute("value", body);
Expand All @@ -62,7 +84,7 @@ class ErrorCatcher extends React.Component {
window.open('', 'view');
form.submit();
};

componentDidCatch (error, info) {
// Report error to GA
window.ga('vfb.send', 'event', 'error', 'react', error.message + " - " + error.stack.replace("#",escape("#")));
Expand Down
Loading