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

sync: pipeline2 with pipeline2-sync-39f5 #852

Merged
merged 64 commits into from
Dec 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
e9eb2ff
Fix scroll bar issues for some of the components, and null pointer
jrmartin Nov 14, 2020
d97f08c
Fix instances deletion
jrmartin Nov 18, 2020
ea1b3e6
cleaning code
jrmartin Nov 18, 2020
5a7aaad
Merge pull request #801 from VirtualFlyBrain/development-sync-10a6
Robbie1977 Nov 20, 2020
7b58f15
Merge pull request #808 from VirtualFlyBrain/debug-sync-1b2e
Robbie1977 Nov 24, 2020
19aaf02
Merge pull request #807 from VirtualFlyBrain/development-sync-1b2e
Robbie1977 Nov 24, 2020
36d93d3
adding neuron_region_connectivity_query
Robbie1977 Nov 25, 2020
635c3c2
Replace color picker with chromepicker, adds ButtonBarComponent to
jrmartin Nov 28, 2020
8c2c0dc
Merge pull request #777 from VirtualFlyBrain/feature/729_776
ddelpiano Nov 30, 2020
95bc1e8
Merge pull request #783 from VirtualFlyBrain/feature/781
ddelpiano Nov 30, 2020
55deba6
#823 getting tags from label and not type
ddelpiano Nov 30, 2020
7dae75a
testing dynamic setting or page meta
Robbie1977 Nov 30, 2020
d94cfcb
syntax fix
Robbie1977 Nov 30, 2020
4699500
pulling page meta from json pages
Robbie1977 Nov 30, 2020
1eba350
syntax fix
Robbie1977 Nov 30, 2020
956b827
adding amp reciprical links to json versions
Robbie1977 Dec 1, 2020
ccd523c
Merge branch 'development' into feature/780
Robbie1977 Dec 1, 2020
f5bc540
Merge pull request #822 from VirtualFlyBrain/feature/780
Robbie1977 Dec 1, 2020
3546b4a
Merge pull request #817 from VirtualFlyBrain/development-sync-2453
Robbie1977 Dec 1, 2020
2ae2c8c
Merge pull request #818 from VirtualFlyBrain/debug-sync-2453
Robbie1977 Dec 1, 2020
ce11f20
lint fix
Robbie1977 Dec 1, 2020
0d93742
Merge branch 'debug' of https://github.com/VirtualFlyBrain/geppetto-v…
Robbie1977 Dec 1, 2020
f171702
typo fix
Robbie1977 Dec 1, 2020
26d616f
adding template loaded timeout
Robbie1977 Dec 1, 2020
a92043f
lint fix
Robbie1977 Dec 1, 2020
e4ebec9
increasing timeout
Robbie1977 Dec 1, 2020
18d3e72
double is needed
Robbie1977 Dec 1, 2020
42c9390
catching errors
Robbie1977 Dec 1, 2020
049b9e8
Merge pull request #824 from VirtualFlyBrain/feature/823
Robbie1977 Dec 1, 2020
3cbdc7e
forcing hard reload
Robbie1977 Dec 1, 2020
c25d24e
adding loading watchdog
Robbie1977 Dec 1, 2020
cade487
removing override
Robbie1977 Dec 2, 2020
4865d7f
removing override
Robbie1977 Dec 2, 2020
f218e6f
test fix for lint
Robbie1977 Dec 4, 2020
e352545
fix to catch all processes
Robbie1977 Dec 7, 2020
8b2e751
removing redundant call
Robbie1977 Dec 7, 2020
9d9b0b3
fix for amphtml link
Robbie1977 Dec 7, 2020
2a6b1d0
cleaning
Robbie1977 Dec 8, 2020
8c47f9b
moving out as medulla is failing again
Robbie1977 Dec 8, 2020
5f901f4
Merge branch 'development' into debug
Robbie1977 Dec 8, 2020
b6e3a08
titles have changed
Robbie1977 Dec 8, 2020
28e32db
syntax fix
Robbie1977 Dec 8, 2020
48fa807
syntax fix
Robbie1977 Dec 8, 2020
b8da2ff
simpler syntax
Robbie1977 Dec 8, 2020
4ca3d1a
adding connectomics query
Robbie1977 Dec 8, 2020
bf7a7ac
fix for title
Robbie1977 Dec 8, 2020
525e75b
title fix
Robbie1977 Dec 8, 2020
cf53a3e
title fix
Robbie1977 Dec 8, 2020
85550c1
adding new columns
Robbie1977 Dec 9, 2020
7104319
New neuron_region_connectivity_query
Robbie1977 Dec 10, 2020
5131c0f
add neuron_neuron_connectivity_query
Robbie1977 Dec 10, 2020
417a183
sorting by downstream
Robbie1977 Dec 10, 2020
4b2699c
adding new labels
Robbie1977 Dec 10, 2020
08edf96
adding has_image
Robbie1977 Dec 10, 2020
d65d590
limiting the connectivity queries
Robbie1977 Dec 10, 2020
a130fd2
reverting to object
Robbie1977 Dec 14, 2020
a2d3630
adding new columns
Robbie1977 Dec 14, 2020
dd8f703
typo fix
Robbie1977 Dec 17, 2020
fe7e08e
Customising target title
Robbie1977 Dec 17, 2020
7f49658
tidying
Robbie1977 Dec 17, 2020
caa1b16
sorting order
Robbie1977 Dec 17, 2020
0fe62d8
fix for order
Robbie1977 Dec 17, 2020
7aa38fd
Merge branch 'master' into debug
Robbie1977 Dec 18, 2020
577681f
Merge pull request #847 from VirtualFlyBrain/debug
Robbie1977 Dec 18, 2020
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
4 changes: 2 additions & 2 deletions actions/generals.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ export const instanceAdded = instance => ({
data: instance
});

export const instanceDeleted = (type, instance) => ({
export const instanceDeleted = (type, id) => ({
type: type,
data: instance
data: id
});

export const instanceSelected = instance => ({
Expand Down
43 changes: 42 additions & 1 deletion components/VFBMain.js
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,7 @@ class VFBMain extends React.Component {
this.restoreUIComponent("vfbCircuitBrowser");
}
this.setState({ UIUpdated: false });
break;
break;
case 'treeBrowserVisible':
if (this.treeBrowserReference !== undefined && this.treeBrowserReference !== null) {
this.restoreUIComponent("treeBrowser");
Expand Down Expand Up @@ -1176,6 +1176,16 @@ class VFBMain extends React.Component {
this.quickHelpRender = <VFBQuickHelp id="quickHelp" closeQuickHelp={this.closeQuickHelp} />;
}
}
// Set default page metadata
document.querySelector('meta[name="description"]').setAttribute("content","VFB integrates data curated from the literature with image data from many bulk sources. The search system allows you to search for neurons and neuroanatomical structures using almost any name found in the literature. The query system can identify neurons innervating any specified neuropil or fasciculating with any specified tract. It also allows queries for genes, transgenes and phenotypes expressed in any brain region or neuron. Search and query results combine referenced textual descriptions with 3D images and links to originating data sources. VFB features tens of thousands of 3D images of neurons, clones and expression patterns, registered to standard template brains. Any combination of these images can be viewed together. A BLAST-type query system (NBLAST) allows you to find similar neurons and drivers starting from a registered neuron.");
document.querySelector('meta[property="og:description"]').setAttribute("content","VFB integrates data curated from the literature with image data from many bulk sources. The search system allows you to search for neurons and neuroanatomical structures using almost any name found in the literature. The query system can identify neurons innervating any specified neuropil or fasciculating with any specified tract. It also allows queries for genes, transgenes and phenotypes expressed in any brain region or neuron. Search and query results combine referenced textual descriptions with 3D images and links to originating data sources. VFB features tens of thousands of 3D images of neurons, clones and expression patterns, registered to standard template brains. Any combination of these images can be viewed together. A BLAST-type query system (NBLAST) allows you to find similar neurons and drivers starting from a registered neuron.");
document.title = "Virtual Fly Brain, a data integrator for Drosophila neurobiology";
document.querySelector('meta[property="og:title"]').setAttribute("content",document.title);
setTimeout(function () {
if (window.templateID == undefined) {
window.location.reload(true);
}
}, 20000);
}

componentWillUnmount () {
Expand Down Expand Up @@ -1238,6 +1248,32 @@ class VFBMain extends React.Component {
idsList += ",";
}
idsList += this.idFromURL;
// populate page meta for this term for indexing
try {
if ( window.XMLHttpRequest ) {
var xhr = new XMLHttpRequest();
xhr.onload = function () {
document.title = 'Virtual Fly Brain (' + this.responseXML.title + ')';
document.querySelector('meta[property="og:title"]').setAttribute("content",this.responseXML.title);
document.querySelector('meta[name="description"]').setAttribute("content",this.responseXML.body.innerText);
document.querySelector('meta[property="og:description"]').setAttribute("content",this.responseXML.body.innerText);
}
xhr.open( 'GET', 'https://virtualflybrain.org/data/VFB/json/' + this.idFromURL + '.html')
xhr.responseType = 'document';
xhr.send();
}
} catch (err) {
console.error(err);
}
try {
var link = !!document.querySelector("link[rel='amphtml']");
link = link ? document.querySelector("link[rel='amphtml']") : document.createElement('link');
link.setAttribute('rel', 'amphtml');
link.setAttribute('href', 'https://virtualflybrain.org/data/VFB/json/' + this.idFromURL + '.html');
document.head.appendChild(link);
} catch (err) {
console.error(err);
}
} else if (idList[list].indexOf("i=") > -1) {
if (idsList.length > 0) {
idsList = "," + idsList;
Expand Down Expand Up @@ -1282,6 +1318,11 @@ class VFBMain extends React.Component {
GEPPETTO.on(GEPPETTO.Events.Instance_added, function (instance) {
that.props.instanceAdded(instance);
});

GEPPETTO.on(GEPPETTO.Events.Instance_deleted, function (instancePath) {
let id = instancePath.split(".")[0];
that.props.instanceDeleted(ACTIONS.INSTANCE_DELETED, id);
});

GEPPETTO.on(GEPPETTO.Events.Model_loaded, function () {
that.addVfbId(that.idsFinalList);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,17 @@ const conf = [
return t.type.getInitialValue().value
})[0].html;

let htmlLabels = instance.getTypes().map(function (t) {
return t.label.getInitialValue().value
})[0].html;

// Extract HTML element anchor from html string
var matchAnchor = /<a[^>]*>([\s\S]*?)<\/a>/g
, type = html.match(matchAnchor);

// Extract HTML element anchor from html string
var matchSpan = /<span[^>]*>([\s\S]*?)<\/span>/g
, tags = html.match(matchSpan);
, tags = htmlLabels.match(matchSpan);

var matchID = /data-instancepath\=\"([A-Za-z0-9 _]*)\"/
, classID = type[0].match(matchID)[1];
Expand Down
109 changes: 107 additions & 2 deletions components/configuration/VFBMain/queryBuilderConfiguration.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,19 @@ var queryResultsColMeta = [
"cssClassName": "query-results-name-column",
"sortDirectionCycle": ['asc', 'desc', null]
},
{
"columnName": "neuron_A",
"order": 2,
"locked": false,
"visible": true,
"customComponent": QueryLinkComponent,
"actions": "window.addVfbId('$entity$');",
"entityIndex": 0,
"entityDelimiter": "----",
"displayName": "Neuron_A",
"cssClassName": "query-results-name-column",
"sortDirectionCycle": ['asc', 'desc', null]
},
{
"columnName": "type",
"order": 2,
Expand All @@ -38,6 +51,19 @@ var queryResultsColMeta = [
"cssClassName": "query-results-type-column",
"sortDirectionCycle": ['asc', 'desc', null]
},
{
"columnName": "parent",
"order": 12,
"locked": false,
"visible": true,
"customComponent": QueryLinkComponent,
"actions": "window.addVfbId('$entity$');",
"entityIndex": 2,
"entityDelimiter": "----",
"displayName": "Parent",
"cssClassName": "query-results-type-column",
"sortDirectionCycle": ['asc', 'desc', null]
},
{
"columnName": "expressed_in",
"order": 3,
Expand Down Expand Up @@ -92,6 +118,81 @@ var queryResultsColMeta = [
"cssClassName": "query-results-stage-column",
"sortDirectionCycle": ['asc', 'desc', null]
},
{
"columnName": "downstream",
"order": 7,
"locked": false,
"visible": true,
"displayName": "Downstream",
"cssClassName": "query-results-stage-column",
"sortDirectionCycle": ['asc', 'desc', null]
},
{
"columnName": "tbars",
"order": 8,
"locked": false,
"visible": true,
"displayName": "Tbars",
"cssClassName": "query-results-stage-column",
"sortDirectionCycle": ['asc', 'desc', null]
},
{
"columnName": "upstream",
"order": 9,
"locked": false,
"visible": true,
"displayName": "Upstream",
"cssClassName": "query-results-stage-column",
"sortDirectionCycle": ['asc', 'desc', null]
},
{
"columnName": "weight",
"order": 10,
"locked": false,
"visible": true,
"displayName": "Weight",
"cssClassName": "query-results-stage-column",
"sortDirectionCycle": ['asc', 'desc', null]
},
{
"columnName": "neuron_B",
"order": 11,
"locked": false,
"visible": true,
"customComponent": QueryLinkComponent,
"actions": "window.addVfbId('$entity$');",
"entityIndex": 1,
"entityDelimiter": "----",
"displayName": "Neuron_B",
"cssClassName": "query-results-name-column",
"sortDirectionCycle": ['asc', 'desc', null]
},
{
"columnName": "region",
"order": 11,
"locked": false,
"visible": true,
"customComponent": QueryLinkComponent,
"actions": "window.addVfbId('$entity$');",
"entityIndex": 1,
"entityDelimiter": "----",
"displayName": "Region",
"cssClassName": "query-results-name-column",
"sortDirectionCycle": ['asc', 'desc', null]
},
{
"columnName": "traget",
"order": 11,
"locked": false,
"visible": true,
"customComponent": QueryLinkComponent,
"actions": "window.addVfbId('$entity$');",
"entityIndex": 1,
"entityDelimiter": "----",
"displayName": "Target",
"cssClassName": "query-results-name-column",
"sortDirectionCycle": ['asc', 'desc', null]
},
{
"columnName": "license",
"order": 8,
Expand Down Expand Up @@ -166,7 +267,7 @@ var queryResultsColMeta = [
];

// which columns to display in the results
var queryResultsColumns = ['name', 'type', 'expressed_in', 'description', 'reference', 'gross_type', 'stage', 'license', 'template', 'technique', 'controls', 'images', 'score','image_count'];
var queryResultsColumns = ['name', 'neuron_A', 'type', 'downstream', 'tbars', 'upstream', 'weight', 'neuron_B', 'region', 'target', 'parent', 'expressed_in', 'description', 'reference', 'gross_type', 'stage', 'license', 'template', 'technique', 'controls', 'images', 'score', 'image_count'];

var queryResultsControlConfig = {
"Common": {
Expand Down Expand Up @@ -194,7 +295,7 @@ var queryResultsControlConfig = {

var queryBuilderDatasourceConfig = {
VFB: {
url: 'https://solr.p2.virtualflybrain.org/solr/ontology/select?q=$SEARCH_TERM$+OR+$SEARCH_TERM$*+OR+*$SEARCH_TERM$*&defType=edismax&qf=label^100+synonym^100+label_autosuggest_ws+label_autosuggest_e+label_autosuggest+synonym_autosuggest_ws+synonym_autosuggest+shortform_autosuggest&indent=true&fl=short_form+label+synonym+id+facets_annotation+type:"class"&start=0&pf=true&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',
url: 'https://solr.virtualflybrain.org/solr/ontology/select?q=$SEARCH_TERM$+OR+$SEARCH_TERM$*+OR+*$SEARCH_TERM$*&defType=edismax&qf=label^100+synonym^100+label_autosuggest_ws+label_autosuggest_e+label_autosuggest+synonym_autosuggest_ws+synonym_autosuggest+shortform_autosuggest&indent=true&fl=short_form+label+synonym+id+facets_annotation+type:"class"&start=0&pf=true&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',
crossDomain: true,
id: "short_form",
label: { field: "label", formatting: "$VALUE$" },
Expand Down Expand Up @@ -330,6 +431,10 @@ var queryBuilderDatasourceConfig = {
};

var sorterColumns = [
{
column: "downstream",
order: "DESC"
},
{
column: "score",
order: "DESC"
Expand Down
2 changes: 1 addition & 1 deletion components/configuration/VFBMain/searchConfiguration.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ var searchStyle = {
};

var datasourceConfiguration = {
"url": "https://solr.p2.virtualflybrain.org/solr/ontology/select",
"url": "https://solr.virtualflybrain.org/solr/ontology/select",
"query_settings":
{
"q": "$SEARCH_TERM$ OR $SEARCH_TERM$* OR *$SEARCH_TERM$*",
Expand Down
10 changes: 3 additions & 7 deletions components/interface/VFBListViewer/ListViewerControlsMenu.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { Component } from "react";
import Menu from "@geppettoengine/geppetto-ui/menu/Menu";
import { connect } from 'react-redux';
import { SliderPicker } from 'react-color';
import { ChromePicker } from 'react-color';
import { setTermInfo, SHOW_LIST_VIEWER, INSTANCE_DELETED } from './../../../actions/generals';

const controlsConfiguration = require('../../configuration/VFBListViewer/controlsMenuConfiguration').default;
Expand Down Expand Up @@ -62,7 +62,6 @@ class ListViewerControlsMenu extends Component {
break;
case ACTIONS.DELETE:
this.props.instance.delete();
this.props.instanceDeleted(INSTANCE_DELETED, this.props.instance);
break;
case ACTIONS.INFO:
var self = this;
Expand Down Expand Up @@ -228,7 +227,7 @@ class ListViewerControlsMenu extends Component {
className="btnBar-color-picker"
ref={ref => this.colorPickerContainer = ref}
style={{ left: this.state.pickerPosition }}>
<SliderPicker
<ChromePicker
color={ this.props.instance.getColor() }
onChangeComplete={ (color, event) => {
this.props.instance.setColor(color.hex);
Expand All @@ -247,10 +246,7 @@ function mapStateToProps (state) {
}

function mapDispatchToProps (dispatch) {
return {
setTermInfo: (instance, visible) => dispatch(setTermInfo(instance, visible )),
instanceDeleted : ( type, instance ) => dispatch({ type : type , instance : instance })
}
return { setTermInfo: (instance, visible) => dispatch(setTermInfo(instance, visible )) }
}

export default connect(mapStateToProps, mapDispatchToProps)(ListViewerControlsMenu);
Loading