mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Visualizations Registry: default to on
This commit is contained in:
@@ -1,3 +1,24 @@
|
||||
<%
|
||||
hda_dict = trans.security.encode_dict_ids( hda.to_dict() )
|
||||
|
||||
config = query_args
|
||||
title = "Scatterplot of '" + hda.name + "'"
|
||||
info = hda.info
|
||||
|
||||
visualization = context.get( 'visualization' )
|
||||
if visualization is not None:
|
||||
config = visualization.latest_revision.config
|
||||
config.update( query_args )
|
||||
title = visualization.title
|
||||
info = config.get( 'description', info )
|
||||
|
||||
config[ 'type' ] = 'scatterplot'
|
||||
|
||||
# optionally bootstrap data from dprov
|
||||
##data = list( hda.datatype.dataset_column_dataprovider( hda, limit=10000 ) )
|
||||
%>
|
||||
## ----------------------------------------------------------------------------
|
||||
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
@@ -13,14 +34,15 @@
|
||||
## ----------------------------------------------------------------------------
|
||||
<script type="text/javascript" src="/static/scripts/libs/jquery/jquery.js"></script>
|
||||
<script type="text/javascript" src="/static/scripts/libs/jquery/jquery.migrate.js"></script>
|
||||
<script type="text/javascript" src="/static/scripts/libs/jquery/jquery-ui.js"></script>
|
||||
<script type="text/javascript" src="/static/scripts/libs/bootstrap.js"></script>
|
||||
<script type="text/javascript" src="/static/scripts/libs/underscore.js"></script>
|
||||
<script type="text/javascript" src="/static/scripts/libs/backbone/backbone.js"></script>
|
||||
<script type="text/javascript" src="/static/scripts/libs/handlebars.runtime.js"></script>
|
||||
<script type="text/javascript" src="/static/scripts/libs/d3.js"></script>
|
||||
<script type="text/javascript" src="/static/scripts/libs/bootstrap.js"></script>
|
||||
<script type="text/javascript" src="/static/scripts/libs/jquery/jquery-ui.js"></script>
|
||||
<script type="text/javascript" src="/static/scripts/utils/LazyDataLoader.js"></script>
|
||||
|
||||
<script type="text/javascript" src="/static/scripts/mvc/base-mvc.js"></script>
|
||||
<script type="text/javascript" src="/static/scripts/mvc/visualization/visualization-model.js"></script>
|
||||
|
||||
<script type="text/javascript" src="/plugins/visualizations/scatterplot/static/scatterplot-edit.js"></script>
|
||||
</head>
|
||||
@@ -30,25 +52,20 @@
|
||||
%if not embedded:
|
||||
## dataset info: only show if on own page
|
||||
<div class="chart-header">
|
||||
<h2>Scatterplot of '${hda.name}'</h2>
|
||||
<p>${hda.info}</p>
|
||||
<h2>${title}</h2>
|
||||
<p>${info}</p>
|
||||
</div>
|
||||
|
||||
<div class="scatterplot-editor"></div>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
<%
|
||||
# optionally, bootstrap data from dprov
|
||||
data = None
|
||||
##data = list( hda.datatype.dataset_column_dataprovider( hda, limit=10000 ) )
|
||||
%>
|
||||
var hda = ${h.to_json_string( trans.security.encode_dict_ids( hda.to_dict() ) )};
|
||||
|
||||
var editor = new ScatterplotConfigEditor({
|
||||
el : $( '.scatterplot-editor' ).attr( 'id', 'scatterplot-editor-hda-' + hda.id ),
|
||||
config : ${h.to_json_string( query_args )},
|
||||
dataset : ${h.to_json_string( trans.security.encode_dict_ids( hda.to_dict() ) )}
|
||||
}).render();
|
||||
var model = new ScatterplotModel( ${h.to_json_string( config )} ),
|
||||
hdaJson = ${h.to_json_string( hda_dict )},
|
||||
editor = new ScatterplotConfigEditor({
|
||||
el : $( '.scatterplot-editor' ).attr( 'id', 'scatterplot-editor-hda-' + hdaJson.id ),
|
||||
model : model,
|
||||
dataset : hdaJson
|
||||
}).render();
|
||||
window.editor = editor;
|
||||
// uncomment to auto render for development
|
||||
//$( '.render-button:visible' ).click();
|
||||
|
||||
Reference in New Issue
Block a user