Skip to content

Commit

Permalink
Merge branch 'vfb_geppetto_application' into Feature_333
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbie1977 authored Jul 3, 2019
2 parents 3fa1d68 + fc5685d commit 51c1a69
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 47 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,5 @@ RUN cd $HOME/workspace/org.geppetto/utilities/source_setup && python update_serv


EXPOSE 8080
EXPOSE 8443
CMD [ "/bin/bash", "-c", "/startup.sh" ]
57 changes: 32 additions & 25 deletions components/VFBMain.js
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,7 @@ export default class VFBMain extends React.Component {
<VFBTermInfoWidget
termInfoHandler={this.termInfoHandler}
ref={ref => this.termInfoReference = ref}
queryBuilder={this.refs.querybuilderRef}
showButtonBar={true}
termInfoName={this.termInfoName}
termInfoId={this.termInfoId}
Expand Down Expand Up @@ -996,12 +997,6 @@ export default class VFBMain extends React.Component {
});
}

// Query builder initialization
this.refs.querybuilderRef.setResultsColumnMeta(this.queryResultsColMeta);
this.refs.querybuilderRef.setResultsColumns(this.queryResultsColumns);
this.refs.querybuilderRef.setResultsControlsConfig(this.queryResultsControlConfig);
this.refs.querybuilderRef.addDataSource(this.queryBuilderDatasourceConfig);

// Loading ids passed through the browser's url
if ((this.props.location.search.indexOf("id=") == -1) && (this.props.location.search.indexOf("i=") == -1)) {
var that = this;
Expand Down Expand Up @@ -1127,11 +1122,11 @@ export default class VFBMain extends React.Component {
enableResizing={{
top: false, right: false, bottom: false,
left: false, topRight: false, bottomRight: false,
bottomLeft: false, topLeft: false
bottomLeft: false, topLeft: false
}}
default={{
x: this.modalX, y: this.modalY,
height: 150, width: 150
height: 150, width: 150
}}
className="historyModal"
disableDragging={true}
Expand Down Expand Up @@ -1205,19 +1200,18 @@ export default class VFBMain extends React.Component {
this.htmlToolbarRender = (this.state.htmlFromToolbar !== undefined)
? <Rnd enableResizing={{
top: false, right: false, bottom: false, left: false,
topRight: false, bottomRight: false, bottomLeft: false,
topLeft: false
topRight: false, bottomRight: false, bottomLeft: false, topLeft: false
}}
default={{
x: 50, y: 50,
height: window.innerHeight - 100,
width: window.innerWidth - 100
width: window.innerWidth - 100
}}className="htmlViewerVFB"
disableDragging={true}
maxHeight={window.innerHeight - 100} minHeight={100}
maxWidth={window.innerWidth - 100} minWidth={100}
ref={d => {
this.rnd2 = d;
this.rnd2 = d;
}} >
<div><i onClick={this.closeHtmlViewer} className='close-slider fa fa-times'/></div>
<div ref={this.htmlToolbarRef}>
Expand All @@ -1229,27 +1223,27 @@ export default class VFBMain extends React.Component {
style={{
width: '100%',
height: '100%',
float: 'center'
float: 'center'
}}
ref="htmlViewer" />
</div>
</Rnd> : undefined;

return (
<div style={{ height: '100%', width: '100%' }}>
<VFBToolBar
<VFBToolBar
htmlOutputHandler={this.renderHTMLViewer}
menuHandler={this.menuHandler}/>

<Rnd
enableResizing={{
top: false, right: false, bottom: false,
left: false, topRight: false, bottomRight: false,
bottomLeft: false, topLeft: false
top: false, right: false, bottom: false, left: false,
topRight: false, bottomRight: false, bottomLeft: false, topLeft: false
}}
default={{
x: this.getButtonBarDefaultX(), y: this.getButtonBarDefaultY(),
height: 28, width: 340
x: this.getButtonBarDefaultX(),
y: this.getButtonBarDefaultY(),
height: 28, width: 340
}}
className="new-widget"
disableDragging={true}
Expand All @@ -1275,19 +1269,32 @@ export default class VFBMain extends React.Component {
clickOnBordersAction={clickOnBordersAction}/>

<div id="spotlight" style={{ top: 0 }}>
<SpotLight ref="spotlightRef" indexInstances={false} spotlightConfig={this.spotlightConfig}
spotlightDataSourceConfig={this.spotlightDataSourceConfig} icon={"styles.Modal"}
<SpotLight ref="spotlightRef"
indexInstances={false}
spotlightConfig={this.spotlightConfig}
spotlightDataSourceConfig={this.spotlightDataSourceConfig}
icon={"styles.Modal"}
useBuiltInFilter={false} />
</div>

<div id="controlpanel" style={{ top: 0 }}>
<ControlPanel ref="controlpanelRef" icon={"styles.Modal"} enableInfiniteScroll={true}
useBuiltInFilter={false} controlPanelColMeta={this.controlPanelColMeta}
controlPanelConfig={this.controlPanelConfig} columns={this.controlPanelColumns}
<ControlPanel ref="controlpanelRef"
icon={"styles.Modal"}
enableInfiniteScroll={true}
useBuiltInFilter={false}
controlPanelColMeta={this.controlPanelColMeta}
controlPanelConfig={this.controlPanelConfig}
columns={this.controlPanelColumns}
controlPanelControlConfigs={this.controlPanelControlConfigs}/>
</div>

<QueryBuilder ref="querybuilderRef" icon={"styles.Modal"} useBuiltInFilter={false} />
<QueryBuilder ref="querybuilderRef"
icon={"styles.Modal"}
useBuiltInFilter={false}
resultsColMeta={this.queryResultsColMeta}
resultsColumns={this.queryResultsColumns}
resultsControlConfig={this.queryResultsControlConfig}
datasourceConfig={this.queryBuilderDatasourceConfig} />

<div id="tutorialDiv">
{this.tutorialRender}
Expand Down
23 changes: 11 additions & 12 deletions components/interface/VFBTermInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,7 @@ export default class VFBTermInfoWidget extends React.Component {
var otherId;
var otherName;
var target = widget;
var that = this;
var meta = path + "." + path + "_meta";
if (n != undefined) {
var metanode = Instances.getInstance(meta);
Expand Down Expand Up @@ -599,38 +600,38 @@ export default class VFBTermInfoWidget extends React.Component {
var entity = Model[path];
if (typeof (entity) != 'undefined' && entity instanceof Query) {
// clear query builder unless ctrl pressed them add to compound.
GEPPETTO.QueryBuilder.open();
this.props.queryBuilder.open();
if (!GEPPETTO.isKeyPressed("shift")) {
GEPPETTO.QueryBuilder.switchView(false, false);
GEPPETTO.QueryBuilder.clearAllQueryItems();
this.props.queryBuilder.switchView(false, false);
this.props.queryBuilder.clearAllQueryItems();
} else {
GEPPETTO.QueryBuilder.switchView(false, false);
this.props.queryBuilder.switchView(false, false);
}

GEPPETTO.trigger('spin_logo');
$("body").css("cursor", "progress");

var callback = function () {
// check if any results with count flag
if (GEPPETTO.QueryBuilder.props.model.count > 0) {
if (that.props.queryBuilder.props.model.count > 0) {
// runQuery if any results
GEPPETTO.QueryBuilder.runQuery();
that.props.queryBuilder.runQuery();
} else {
GEPPETTO.QueryBuilder.switchView(false);
that.props.queryBuilder.switchView(false);
}
// show query component
GEPPETTO.QueryBuilder.open();
that.props.queryBuilder.open();
$("body").css("cursor", "default");
GEPPETTO.trigger('stop_spin_logo');
};
// add query item + selection
if (window[otherId] == undefined) {
window.fetchVariableThenRun(otherId, function () {
GEPPETTO.QueryBuilder.addQueryItem({ term: otherName, id: otherId, queryObj: entity }, callback)
that.props.queryBuilder.addQueryItem({ term: otherName, id: otherId, queryObj: entity }, callback)
});
} else {
setTimeout(function () {
GEPPETTO.QueryBuilder.addQueryItem({ term: otherName, id: otherId, queryObj: entity }, callback);
that.props.queryBuilder.addQueryItem({ term: otherName, id: otherId, queryObj: entity }, callback);
}, 100);
}
} else {
Expand Down Expand Up @@ -725,8 +726,6 @@ export default class VFBTermInfoWidget extends React.Component {
}

render () {
// var VFBTermInfoWidget = WidgetCapability.createWidget(VFBTermInfo);

return (
<VFBTermInfo
id={this.idWidget}
Expand Down
7 changes: 7 additions & 0 deletions dockerFiles/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,19 @@ grep -rls pdb.virtualflybrain.org $HOME/ | xargs sed -i "s@pdb.virtualflybrain.o
grep -rls owl.virtualflybrain.org $HOME/workspace/ | xargs sed -iv "s@owl.virtualflybrain.org@$VFB_OWL_SERVER@g" grep -rls owl.virtualflybrain.org /home/ | xargs sed -i "s@owl.virtualflybrain.org@$VFB_OWL_SERVER@g" &
grep -rls solr.virtualflybrain.org $HOME/workspace/ | xargs sed -iv "s@http://solr.virtualflybrain.org/solr/ontology/select@$SOLR_SERVER@g" grep -rls solr.virtualflybrain.org /home/ | xargs sed -i "s@http://solr.virtualflybrain.org/solr/ontology/select@$SOLR_SERVER@g" &

#Start a logfile
mkdir -p $SERVER_HOME/serviceability/logs
echo 'Start of log...' > $SERVER_HOME/serviceability/logs/log.log

# re-deploy Geppetto
cd $HOME/workspace/org.geppetto/utilities/source_setup && python update_server.py

# set java memory maximum
sed 's/XX:MaxPermSize=512m/XX:MaxPermSize=$MAXSIZE/g' -i $SERVER_HOME/bin/dmk.sh
sed 's/Xmx512m/Xmx$MAXSIZE/' -i $SERVER_HOME/bin/dmk.sh

# output log
tail -F --retry $SERVER_HOME/serviceability/logs/log.log &

# start virgo server
$SERVER_HOME/bin/startup.sh
Loading

0 comments on commit 51c1a69

Please sign in to comment.