Commit a6440402 authored by ale's avatar ale

provide proper time range query support; fix lots of other minor UI issues

parent 2478535d
This diff is collapsed.
......@@ -9,6 +9,8 @@
href="{{ url_for('static', filename='css/lens2.css') }}">
<link rel="stylesheet" type="text/css"
href="{{ url_for('static', filename='css/bootstrap.min.css') }}">
<link rel="stylesheet" type="text/css"
href="{{ url_for('static', filename='css/bootstrap-datetimepicker.min.css') }}">
<link href="//fonts.googleapis.com/css?family=Ubuntu+Mono"
rel="stylesheet" type="text/css">
</head>
......@@ -33,13 +35,32 @@
<div class="collapse navbar-collapse" id="navbar-collapse-1">
<form id="searchForm" class="navbar-form navbar-left"
<form id="searchForm" class="navbar-form navbar-left lens-form"
action="{{ url_for('api.api_search') }}" method="post"
role="search">
<div class="form-group">
<input type="text" class="form-control"
name="q" id="query_field" size="70"
<input type="text" class="form-control lens-query-field"
name="q" id="query_field" size="60"
placeholder="Search...">
<div class="input-group date form_datetime lens-time-start"
data-date="{{ time_from }}">
<input class="form-control" name="time_from"
size="15" type="text" value="" readonly>
<span class="input-group-addon">
<span class="glyphicon glyphicon-th"></span>
</span>
</div>
<div class="input-group date form_datetime lens-time-end"
data-date="{{ time_to }}">
<input class="form-control" name="time_to"
size="15" type="text" value="" readonly>
<span class="input-group-addon">
<span class="glyphicon glyphicon-th"></span>
</span>
</div>
<button type="submit" class="btn btn-default">
<span class="glyphicon glyphicon-search"></span>
</button>
......@@ -48,10 +69,6 @@
<p class="navbar-text">
{# The loading spinner gif #}
<img id="loading" style="display:none;"
src="{{ url_for('static', filename='spinner.gif') }}">
{# A pop-up for errors #}
<span id="error" class="glyphicon glyphicon-warning-sign"
data-toggle="tooltip" data-placement="bottom" data-html="true"
......@@ -63,16 +80,17 @@
<li>
{# Pagination and time-based navigation #}
<div class="button-group" id="log_pagination_div">
<button type="button" class="btn btn-default btn-sm navbar-btn"
id="log_pagination_prev" style="display:none;">
<div class="button-group lens-pagination-group">
<button type="button"
class="btn btn-default btn-sm navbar-btn lens-pagination-prev"
style="display:none;">
<span class="glyphicon glyphicon-chevron-left"></span>
</button>
<button type="button" disabled="disabled"
class="btn btn-default btn-sm navbar-btn"
id="log_pagination_title"></button>
<button type="button" class="btn btn-default btn-sm navbar-btn"
id="log_pagination_next" style="display:none;">
class="btn btn-default btn-sm navbar-btn lens-pagination-title"></button>
<button type="button"
class="btn btn-default btn-sm navbar-btn lens-pagination-next"
style="display:none;">
<span class="glyphicon glyphicon-chevron-right"></span>
</button>
</div>
......@@ -138,8 +156,7 @@
'jquery-2.1.0.min.js',
'jsrender.min.js',
'bootstrap.min.js',
'protovis.min.js',
'graphs.js',
'bootstrap-datetimepicker.min.js',
'lens2.js') %}
{% for script in javascripts %}
<script src="{{ url_for('static', filename=script) }}"></script>
......@@ -148,15 +165,13 @@
<script>
var lens_instance;
$(document).ready(function() {
$(function() {
$.views.helpers({
timestampToString: lens.util.timestampToString,
timestampToString: lens.util.EStimestampToString,
replaceAttrsInMsg: lens.util.replaceAttrsInMsg,
});
lens_instance = new lens.Lens({
search_endpoint: $('#searchForm').attr('action')
});
lens_instance = new lens.Lens($('.navbar'), $('#log_viewer'));
$('#query_field').focus();
$('#searchForm').submit(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment