mirror of
https://github.com/apache/superset.git
synced 2024-09-12 08:39:45 -04:00
Explore mode should only expose cache on first load
This commit is contained in:
parent
fded04a51d
commit
417749f880
@ -63,7 +63,7 @@ function druidify(force) {
|
|||||||
$('#is_cached').hide();
|
$('#is_cached').hide();
|
||||||
history.pushState({}, document.title, slice.querystring());
|
history.pushState({}, document.title, slice.querystring());
|
||||||
prepForm();
|
prepForm();
|
||||||
slice.render(force, druidify);
|
slice.render(force);
|
||||||
}
|
}
|
||||||
|
|
||||||
function initExploreView() {
|
function initExploreView() {
|
||||||
@ -256,7 +256,9 @@ function initExploreView() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".druidify").click(druidify);
|
$(".druidify").click(function () {
|
||||||
|
druidify(true);
|
||||||
|
});
|
||||||
|
|
||||||
function create_choices(term, data) {
|
function create_choices(term, data) {
|
||||||
var filtered = $(data).filter(function () {
|
var filtered = $(data).filter(function () {
|
||||||
@ -319,7 +321,7 @@ $(document).ready(function () {
|
|||||||
$('.slice').data('slice', slice);
|
$('.slice').data('slice', slice);
|
||||||
|
|
||||||
// call vis render method, which issues ajax
|
// call vis render method, which issues ajax
|
||||||
druidify();
|
druidify(false);
|
||||||
|
|
||||||
// make checkbox inputs display as toggles
|
// make checkbox inputs display as toggles
|
||||||
$(':checkbox')
|
$(':checkbox')
|
||||||
|
@ -156,7 +156,6 @@ var px = (function () {
|
|||||||
container: container,
|
container: container,
|
||||||
container_id: container_id,
|
container_id: container_id,
|
||||||
selector: selector,
|
selector: selector,
|
||||||
druidify: null,
|
|
||||||
querystring: function () {
|
querystring: function () {
|
||||||
var parser = document.createElement('a');
|
var parser = document.createElement('a');
|
||||||
parser.href = data.json_endpoint;
|
parser.href = data.json_endpoint;
|
||||||
@ -185,16 +184,12 @@ var px = (function () {
|
|||||||
clearInterval(timer);
|
clearInterval(timer);
|
||||||
token.find("img.loading").hide();
|
token.find("img.loading").hide();
|
||||||
container.show();
|
container.show();
|
||||||
var that = this;
|
|
||||||
|
|
||||||
var cachedSelector = null;
|
var cachedSelector = null;
|
||||||
if (dashboard === undefined) {
|
if (dashboard === undefined) {
|
||||||
cachedSelector = $('#is_cached');
|
cachedSelector = $('#is_cached');
|
||||||
if (data !== undefined && data.is_cached) {
|
if (data !== undefined && data.is_cached) {
|
||||||
cachedSelector
|
cachedSelector
|
||||||
.click(function () {
|
|
||||||
that.druidify(true);
|
|
||||||
})
|
|
||||||
.attr('title', 'Served from data cached at ' + data.cached_dttm + '. Click to force-refresh')
|
.attr('title', 'Served from data cached at ' + data.cached_dttm + '. Click to force-refresh')
|
||||||
.show()
|
.show()
|
||||||
.tooltip('fixTitle');
|
.tooltip('fixTitle');
|
||||||
@ -271,11 +266,10 @@ var px = (function () {
|
|||||||
}, 500);
|
}, 500);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
render: function (force, druidify) {
|
render: function (force) {
|
||||||
if (force === undefined) {
|
if (force === undefined) {
|
||||||
force = false;
|
force = false;
|
||||||
}
|
}
|
||||||
this.druidify = druidify;
|
|
||||||
this.force = force;
|
this.force = force;
|
||||||
token.find("img.loading").show();
|
token.find("img.loading").show();
|
||||||
container.hide();
|
container.hide();
|
||||||
|
@ -252,7 +252,6 @@ li.widget .chart-header a {
|
|||||||
|
|
||||||
#is_cached {
|
#is_cached {
|
||||||
display: none;
|
display: none;
|
||||||
cursor: pointer;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
li.widget .chart-controls {
|
li.widget .chart-controls {
|
||||||
|
Loading…
Reference in New Issue
Block a user