Commit 4a281893 authored by Paul Asmuth's avatar Paul Asmuth
Browse files

toplist_widget stub

parent b0be4d75
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -137,6 +137,7 @@ require "fnordmetric/gauge"
require "fnordmetric/context"

require "fnordmetric/gauges/timeseries_gauge"
require "fnordmetric/gauges/toplist_gauge"

require "fnordmetric/web/web"
require "fnordmetric/web/app_helpers"
+19 −0
Original line number Diff line number Diff line
class FnordMetric::ToplistGauge < FnordMetric::Gauge

  def render(namespace, event)
    interval = parse_interval(event["interval"])
    colors = ["#2F635E", "#606B36", "#727070", "#936953", "#CD645A", "#FACE4F", "#42436B"]


    render_page(:toplist_gauge)
  end

  def execute(cmd, context, *args)
    #incr_series(context, *args) if cmd == :incr
  end

  def renderable?
    true
  end

end
 No newline at end of file
+7 −0
Original line number Diff line number Diff line

-> hashwithindifferentaccess

-> timeseries-gauge/widget: set resolution via "tick buttons" 
-> timeseries-gauge: realtime tab w/ moving average
-> timeseries-widget: render with stroke=3 + points if xticks < 100
-> timeseries-widget: tooltip -> show key noun

-> fix bars widget
-> fix pie widget
-> fix html widget
-> fix toplist widget

-> split up fnordmetric.namespace block into multiple files
-> show notification when connection lost
-> reconnect on disconnect

web/haml/item_topk_gauge.haml

deleted100644 → 0
+0 −30
Original line number Diff line number Diff line
.report_view

  %h1= @opts["title"]
  %h3 CategoricalTopK Report

  %ul.ui_tabs.tabs
    %li.active{"data-tab" => "Overview"}
      %a{:href => "#"} Overview

  .headbar
    %h2 Top Search Queries

  .widget_toplist.ui_sidebar_toplist(style="width:600px;")
    .ui_toplist
      .toplist_item
        .title /matches
        .value 36
        .percent 73.5%
      .toplist_item
        .title /home
        .value 6.00
        .percent 12.2%
      .toplist_item
        .title /conversations
        .value 4.00
        .percent 8.2%
      .toplist_item
        .title /conversations/show
        .value 3.00
        .percent 6.1%
 No newline at end of file

web/haml/numeric_gauge.haml

deleted100644 → 0
+0 −11
Original line number Diff line number Diff line

%ul.ui_tabs
  %li.active
    %a(href="#") Overview
  %li
    %a(href="#") Realtime


%div.numgauge_widget_total_timeline

%div.numgauge_widget_total_numbers
 No newline at end of file
Loading