Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
aemadrid committed Oct 6, 2011
1 parent c0acb4e commit e2c8811
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 11 deletions.
2 changes: 1 addition & 1 deletion lib/clarity/server/chunk_http.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def respond_with(status, content, options = {})
end

def render(view)
@toolbar = template("_toolbar.html.erb")
@toolbar = template("_toolbar2.html.erb")
@content_for_header = template("_header.html.erb")
template(view)
end
Expand Down
4 changes: 4 additions & 0 deletions public/stylesheets/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ div#option-ctrl ul li {
#results tr td.app {
}

#results tr td.line {
max-width: 1200px;
}

#results tr td.line div.line {
line-height: 14px;
font-size: 10px;
Expand Down
28 changes: 28 additions & 0 deletions views/_toolbar2.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<form id='search' method='get' action='<%= relative_root %>/perform' class="pull-right">
<input type="hidden" name="tool" value="grep">
<select style="width:350px;" id='file-list' name='file'>
<% logfiles.map do |f| %><%= "<option value='#{f}'>#{f}</option>\n" %><% end %>
</select>
<input class="input-small" type="text" id="term1" name="term1" placeholder="Term #1">
<input class="input-small" type="text" id="term2" name="term2" placeholder="Term #2">
<input class="input-small" type="text" id="term3" name="term3" placeholder="Term #3">
<button type="submit" class="btn primary" onclick="Search.submit(); return false;">Search</button>
<button type="reset" class="btn" onclick='Search.clear(); return false;'>Reset</button>
</form>

<div id="option-ctrl">
<ul>
<li><input type='checkbox' name='enable_scrolling' id='auto-scroll'/><span> Auto scroll?</span></li>
</ul>
</div>

<script>
Search.url = "<%= relative_root %>" + Search.url;
Search.init(
{
'grep': <%= logfiles.map {|f| f }.to_json %>,
'tail': <%= logfiles.map {|f| f }.to_json %>
},
<%= params.empty? ? 'null' : params.to_json %>
);
</script>
14 changes: 4 additions & 10 deletions views/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,13 @@
<body>

<div class="topbar">
<div class="topbar-inner">
<div class="fill">
<div class="container-fluid">
<a class="brand" href="#">Log Parser / Analyzer</a>
<a class="brand" href="/">Clarity</a>
<%= @toolbar %>
</div>
</div>
</div>

<div class="container-fluid">

<div class="sidebar">
<div class="well">
<%= @toolbar %>
</div>
</div>

<div class="content">
<div class="content" style="margin-left: 0;">

0 comments on commit e2c8811

Please sign in to comment.