Skip to content

Commit

Permalink
Moving files around
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Feb 24, 2016
1 parent 3e83460 commit 171301b
Show file tree
Hide file tree
Showing 20 changed files with 117 additions and 418 deletions.
4 changes: 2 additions & 2 deletions panoramix/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@


class MyIndexView(IndexView):
index_template = 'refactor/index.html'
index_template = 'panoramix/featured_datasets.html'

appbuilder = AppBuilder(
app, db.session,
base_template='refactor/base.html',
base_template='panoramix/base.html',
indexview=MyIndexView,
security_manager_class=app.config.get("CUSTOM_SECURITY_MANAGER"))

Expand Down
45 changes: 0 additions & 45 deletions panoramix/assets/html/base.html

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
</title>
{% block head_meta %}{% endblock %}
{% block head_css %}
<link rel="stylesheet" type="text/css" href="/static/refactor/node_modules/jquery-ui/themes/base/minified/jquery-ui.min.css" />
<link rel="stylesheet" type="text/css" href="/static/refactor/node_modules/font-awesome/css/font-awesome.min.css" />
<link rel="stylesheet" type="text/css" href="/static/refactor/node_modules/select2/select2.css" />
<link rel="stylesheet" type="text/css" href="/static/refactor/node_modules/select2/select2-bootstrap.css" />
<link rel="stylesheet" type="text/css" href="/static/refactor/stylesheets/panoramix.css" />
<link rel="stylesheet" type="text/css" href="/static/assets/node_modules/jquery-ui/themes/base/minified/jquery-ui.min.css" />
<link rel="stylesheet" type="text/css" href="/static/assets/node_modules/font-awesome/css/font-awesome.min.css" />
<link rel="stylesheet" type="text/css" href="/static/assets/node_modules/select2/select2.css" />
<link rel="stylesheet" type="text/css" href="/static/assets/node_modules/select2/select2-bootstrap.css" />
<link rel="stylesheet" type="text/css" href="/static/assets/stylesheets/panoramix.css" />
<!-- Replace with custom bootstrap theme -->
<link rel="stylesheet" type="text/css" href="/static/refactor/stylesheets/themes/bootswatch.paper.min.css" />
<link rel="stylesheet" type="text/css" href="/static/assets/stylesheets/themes/bootswatch.paper.min.css" />
{% endblock %}
{% block head_js %}{% endblock %}
</head>
Expand Down
4 changes: 2 additions & 2 deletions panoramix/assets/html/explore.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "panoramix/basic.html" %}
{% extends "refactor/basic.html" %}

{% block body %}
{% set datasource = viz.datasource %}
Expand Down Expand Up @@ -208,5 +208,5 @@ <h4 class="modal-title">Datasource Description</h4>

{% block tail_js %}
{{ super() }}
<script src="/static/refactor/javascripts/dist/explore.entry.js"></script>
<script src="/static/assets/javascripts/dist/explore.entry.js"></script>
{% endblock %}
70 changes: 0 additions & 70 deletions panoramix/assets/javascripts/modules/panoramix.js
Original file line number Diff line number Diff line change
Expand Up @@ -460,75 +460,6 @@ var px = (function() {
});
}

function initSqlEditorView() {
var database_id = $('#database_id').val();
var editor = ace.edit("sql");
editor.$blockScrolling = Infinity
editor.getSession().setUseWrapMode(true);

var textarea = $('#sql').hide();
editor.setTheme("ace/theme/crimson_editor");
editor.setOptions({
minLines: 16,
maxLines: Infinity,
});
editor.getSession().setMode("ace/mode/sql");
editor.focus();
$("select").select2({dropdownAutoWidth : true});
function showTableMetadata() {
$(".metadata").load(
'/panoramix/table/' + database_id + '/' + $("#dbtable").val() + '/');
}
$("#dbtable").on("change", showTableMetadata);
showTableMetadata();
$("#create_view").click(function(){alert("Not implemented");});
$(".sqlcontent").show();
$("#select_star").click(function(){
$.ajax('/panoramix/select_star/' + database_id + '/' + $("#dbtable").val() + '/')
.done(function(msg){
editor.setValue(msg);
});
});
editor.setValue(getParam('sql'));
$(window).bind("popstate", function(event) {
// Browser back button
var returnLocation = history.location || document.location;
// Could do something more lightweight here, but we're not optimizing
// for the use of the back button anyways
editor.setValue(getParam('sql'));
$("#run").click();
});
$("#run").click(function() {
$('#results').hide(0);
$('#loading').show(0);
history.pushState({}, document.title, '?sql=' + encodeURIComponent(editor.getValue()));
$.ajax({
type: "POST",
url: '/panoramix/runsql/',
data: {
'data': JSON.stringify({
'database_id': $('#database_id').val(),
'sql': editor.getSession().getValue(),
})},
success: function(data) {
$('#loading').hide(0);
$('#results').show(0);
$('#results').html(data);

var datatable = $('table.sql_results').DataTable({
paging: false,
searching: true,
aaSorting: [],
});
},
error: function(err, err2) {
$('#loading').hide(0);
$('#results').show(0);
$('#results').html(err.responseText);
},
});
});
}

function initDashboardView() {
var gridster = $(".gridster ul").gridster({
Expand Down Expand Up @@ -633,7 +564,6 @@ var px = (function() {
timeFormatFactory: timeFormatFactory,
color: color(),
renderSlice: renderSlice,
initSqlEditorView: initSqlEditorView,
}
})();

Expand Down
4 changes: 3 additions & 1 deletion panoramix/assets/stylesheets/panoramix.css
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ legend.legend-style {
//position: relative !important;
z-index: 888;
}

.nvtooltip table td{
font-size: small !important;
}
legend {
width: auto;
border-bottom: 0px;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions panoramix/data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def load_world_bank_health_n_pop():
tbl = TBL(table_name=tbl_name)
tbl.description = utils.readfile(os.path.join(DATA_FOLDER, 'countries.md'))
tbl.main_dttm_col = 'year'
tbl.is_featured = True
tbl.database = get_or_create_db(db.session)
db.session.merge(tbl)
db.session.commit()
Expand Down Expand Up @@ -305,6 +306,7 @@ def load_birth_names():
obj = TBL(table_name = 'birth_names')
obj.main_dttm_col = 'ds'
obj.database = get_or_create_db(db.session)
obj.is_featured = True
db.session.merge(obj)
db.session.commit()
obj.fetch_metadata()
Expand Down
File renamed without changes.
17 changes: 2 additions & 15 deletions panoramix/templates/panoramix/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,6 @@

{% block head_css %}
{{super()}}
<link rel="shortcut icon" href="{{ url_for('static', filename='chaudron.png') }}" />
<link rel="stylesheet" type="text/css" href="/static/panoramix-bootstrap-theme.css" />
<link rel="stylesheet" type="text/css" href="/static/panoramix.css" />
<link rel="stylesheet" type="text/css" href="/static/lib/jquery-ui/jquery-ui.min.css" />
<link rel="stylesheet" type="text/css" href="/static/assets/stylesheets/panoramix.css" />
<link rel="stylesheet" type="text/css" href="/static/assets/stylesheets/themes/bootswatch.paper.min.css" />
{% endblock %}

{% block tail_js %}
<script src="/static/lib/d3.min.js"></script>
<script src="/static/panoramix.js"></script>
<script src="/static/lib/jquery-ui/jquery-ui.min.js"></script>
<script src="/static/lib/select2.sortable.js"></script>
{{ super() }}
{% endblock %}
{% block footer %}
{% endblock %}

Loading

0 comments on commit 171301b

Please sign in to comment.