Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[explore] moving the timer from a button to a label #1010

Merged
merged 1 commit into from
Aug 26, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ export default function QueryAndSaveBtns({ canAdd, onQuery }) {
return (
<div className="btn-group query-and-save">
<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
type="button"
className={saveClasses}
data-target="#save_modal"
data-toggle="modal"
>
<i className="fa fa-plus-circle"></i>Save as
<i className="fa fa-plus-circle"></i> Save as
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a question, why do you need a space in the button name?

</button>
</div>
);
Expand Down
8 changes: 4 additions & 4 deletions caravel/assets/javascripts/modules/caravel.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ const px = function () {
if (data !== undefined) {
$('#query_container').html(data.query);
}
$('#timer').removeClass('btn-warning');
$('#timer').addClass('btn-success');
$('#timer').removeClass('label-warning label-danger');
$('#timer').addClass('label-success');
$('span.view_query').removeClass('disabled');
$('#json').click(function () {
window.location = data.json_endpoint;
Expand Down Expand Up @@ -231,8 +231,8 @@ const px = function () {
container.css('height', this.height());
dttm = 0;
timer = setInterval(stopwatch, 10);
$('#timer').removeClass('btn-danger btn-success');
$('#timer').addClass('btn-warning');
$('#timer').removeClass('label-danger label-success');
$('#timer').addClass('label-warning');
this.viz.render();
},
resize() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ describe('QueryAndSaveButtons', () => {
});

it('renders buttons with correct text', () => {
expect(wrapper.find('button').contains('Query')).to.eql(true);
expect(wrapper.find('button').contains('Save as')).to.eql(true);
expect(wrapper.find('button').contains(' Query')).to.eql(true);
expect(wrapper.find('button').contains(' Save as')).to.eql(true);
});
});
});
9 changes: 8 additions & 1 deletion caravel/templates/caravel/explore.html
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,16 @@
</div>
<div class="col-md-6">
<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
</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">
<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>&nbsp;
Expand Down