mirror of https://github.com/apache/superset.git
parent
b93f9ec598
commit
7eceb140be
|
@ -14,7 +14,7 @@ export default function QueryAndSaveBtns({ canAdd, onQuery }) {
|
||||||
return (
|
return (
|
||||||
<div className="btn-group query-and-save">
|
<div className="btn-group query-and-save">
|
||||||
<button type="button" className="btn btn-primary btn-sm" onClick={onQuery}>
|
<button type="button" className="btn btn-primary btn-sm" onClick={onQuery}>
|
||||||
<i className="fa fa-bolt"></i>Query
|
<i className="fa fa-bolt"></i> Query
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
|
@ -22,7 +22,7 @@ export default function QueryAndSaveBtns({ canAdd, onQuery }) {
|
||||||
data-target="#save_modal"
|
data-target="#save_modal"
|
||||||
data-toggle="modal"
|
data-toggle="modal"
|
||||||
>
|
>
|
||||||
<i className="fa fa-plus-circle"></i>Save as
|
<i className="fa fa-plus-circle"></i> Save as
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
@ -153,8 +153,8 @@ const px = function () {
|
||||||
if (data !== undefined) {
|
if (data !== undefined) {
|
||||||
$('#query_container').html(data.query);
|
$('#query_container').html(data.query);
|
||||||
}
|
}
|
||||||
$('#timer').removeClass('btn-warning');
|
$('#timer').removeClass('label-warning label-danger');
|
||||||
$('#timer').addClass('btn-success');
|
$('#timer').addClass('label-success');
|
||||||
$('span.view_query').removeClass('disabled');
|
$('span.view_query').removeClass('disabled');
|
||||||
$('#json').click(function () {
|
$('#json').click(function () {
|
||||||
window.location = data.json_endpoint;
|
window.location = data.json_endpoint;
|
||||||
|
@ -231,8 +231,8 @@ const px = function () {
|
||||||
container.css('height', this.height());
|
container.css('height', this.height());
|
||||||
dttm = 0;
|
dttm = 0;
|
||||||
timer = setInterval(stopwatch, 10);
|
timer = setInterval(stopwatch, 10);
|
||||||
$('#timer').removeClass('btn-danger btn-success');
|
$('#timer').removeClass('label-danger label-success');
|
||||||
$('#timer').addClass('btn-warning');
|
$('#timer').addClass('label-warning');
|
||||||
this.viz.render();
|
this.viz.render();
|
||||||
},
|
},
|
||||||
resize() {
|
resize() {
|
||||||
|
|
|
@ -28,8 +28,8 @@ describe('QueryAndSaveButtons', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('renders buttons with correct text', () => {
|
it('renders buttons with correct text', () => {
|
||||||
expect(wrapper.find('button').contains('Query')).to.eql(true);
|
expect(wrapper.find('button').contains(' Query')).to.eql(true);
|
||||||
expect(wrapper.find('button').contains('Save as')).to.eql(true);
|
expect(wrapper.find('button').contains(' Save as')).to.eql(true);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -192,9 +192,16 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="slice-meta-controls pull-right">
|
<div class="slice-meta-controls pull-right">
|
||||||
<span id="is_cached" class="label label-default" title="{{ _("Force refresh" )}}" data-toggle="tooltip">
|
<span id="is_cached" class="label label-default m-r-3" title="{{ _("Force refresh" )}}" data-toggle="tooltip">
|
||||||
cached
|
cached
|
||||||
</span>
|
</span>
|
||||||
|
<span
|
||||||
|
class="label label-warning m-r-3"
|
||||||
|
id="timer"
|
||||||
|
title="{{ _("Query timer") }}"
|
||||||
|
data-toggle="tooltip">
|
||||||
|
{{ _("0 sec") }}
|
||||||
|
</span>
|
||||||
<div class="btn-group results" role="group">
|
<div class="btn-group results" role="group">
|
||||||
<a role="button" tabindex="0" class="btn btn-default btn-sm" id="shortner" data-toggle="popover" data-trigger="focus">
|
<a role="button" tabindex="0" class="btn btn-default btn-sm" id="shortner" data-toggle="popover" data-trigger="focus">
|
||||||
<i class="fa fa-link" data-toggle="tooltip" title="{{ _("Short URL") }}"></i>
|
<i class="fa fa-link" data-toggle="tooltip" title="{{ _("Short URL") }}"></i>
|
||||||
|
|
Loading…
Reference in New Issue