Commit f72150c0 authored by Paul Asmuth's avatar Paul Asmuth
Browse files

wip commit

parent 003dbea5
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -95,7 +95,7 @@ input[type="search"], input[type="text"]{
table{ width:100%; }
table td, th{ text-align:left; border-bottom:1px solid #dedede; height:42px; }
table tr td:first-child{ padding-left:15px; }

table th{ background:#efefef; }

.shown{ display: block; }
.hidden{ display: none; }
@@ -226,13 +226,16 @@ color:#000;
.widget .inner{ margin:20px; }
/*.widget .headbar{ margin-bottom:30px; }*/

.ui_value.large{ font-size:18px; font-weight:bold; color:#333; }
.ui_value.left{ float:left; }

.ui_toplist{ min-height:300px; }
.ui_toplist.loading{ opacity:0.5; background:url('/loader.gif') no-repeat center center;  }

.ui_toplist .toplist_item{ border-bottom:1px solid #dedede; height:42px; display:block; }
.ui_toplist .toplist_item:hover{ background:#fff; }
.ui_toplist .toplist_item .title{ float:left; line-height:42px; margin-left:20px; font-size:13px; color:#333; }
.ui_toplist .toplist_item .value{ float:right; line-height:42px; margin-right:20px; font-size:13px; font-weight:bold; color:#333; width:70px; color:#666; }
.ui_toplist .toplist_item .value{ float:right; line-height:42px; margin-right:20px; font-size:13px; font-weight:bold; width:70px; color:#666; }
.ui_toplist .toplist_item .value.large{ width:110px; }
.ui_toplist .toplist_item .percent{ float:right; line-height:42px; margin-right:30px; font-size:18px; font-weight:bold; color:#333; width:120px; white-space:nowrap; overflow:hidden; }

@@ -663,6 +666,10 @@ margin-top: 60px;
  border-radius:3px;
}

.ui_trend.left{
  float:left;
}

.ui_item_trending{
  width: 250px;
  margin: 10px 20px;
+8 −8
Original line number Diff line number Diff line
@@ -12,18 +12,18 @@
    /   %a{:href => "#"} Export


  .resizable.right.resize_min_full_height(data-width="40" style="border-left:1px solid #ddd;")
    .headbar
      %h2 Standard Deviation


  .resizable(data-width="60")
  .headbar
    %h2 Histogram: #{@opts[:title]}

  .widget_histogram_bars
  %br


  .resizable.right.resize_min_full_height(data-width="40" style="border-left:1px solid #ddd;")
    .headbar.small Standard Deviation

  .resizable(data-width="60")

    .clearfix
      .headbar.small Value Distribution
      .numbers_container.resizable.numbers_pad_bottom(data-width="50")
+19 −8
Original line number Diff line number Diff line
@@ -19,21 +19,31 @@
  .resizable(data-width="65" style="border-right:1px solid #ddd;")
    .headbar.small Series Values

    %table
    %table(cellspacing="0")
      %tr
        %th
        -@series.each do |series, sopts|
          %th
          %th(style="padding-top:4px")
            %span.swatch(style="background:#{sopts[:color]}; display:inline-block;")
            %span= series  

      -FnordMetric::TICKS[tick, @interval.size].each do |zoom|
        %tr
        %td Today
          %td
            .ui_value{:"data-timerange-offset" => zoom, :"data-offset" => -1}
          -@series.each do |series, sopts|
          %td= 0
            %td
              .ui_value.large.left{:"data-value" => 23}
              .ui_trend.left{:style => "margin-left:5px", :"data-trend" => 1}

      %tr
        %td Today
        %td 
          Total (<span class="ui_value" data-timerange="#{@interval.size}"></span>)

        -@series.each do |series, sopts|
          %td= 0
          %td
            .ui_value.large.left{:"data-value" => 23}
            .ui_trend.left{:style => "margin-left:5px", :"data-trend" => 1}



@@ -46,6 +56,7 @@

  FnordMetric.ui.resizable('.report_view');
  FnordMetric.util.updateNumbers('.report_view', 4);
  FnordMetric.util.format('.report_view');

  FnordMetric.widgets.timeseriesWidget().render({
    title: "#{key_nouns.last}",
+23 −14
Original line number Diff line number Diff line
@@ -35,23 +35,23 @@ FnordMetric.util.formatTimeRange = function(range){
}

FnordMetric.util.formatTimeRangePre = function(range, offset){
  if(!offset){ offset=0; }
  if(!offset){ offset=0; } else { offset=parseInt(offset); }
  if((offset == 0) && (range==(3600*24))){
    return 'today';
    return 'Today';
  } else if((offset==-1) && (range==3600*24)){
    return 'yesterday';
    return 'Yesterday';
  } else if((offset == 0) && (range==3600)){
    return 'this hour';
    return 'This hour';
  } else if((offset==-1) && (range==3600)){
    return 'last hour';
    return 'Last hour';
  } else if((offset == 0) && (range==60)){
    return 'this minute';
    return 'This minute';
  } else if((offset==-1) && (range==60)){
    return 'last minute';
    return 'Last minute';
  } else if(offset==0) {
    return "this " + FnordMetric.util.formatTimeRange(range);
    return "This " + FnordMetric.util.formatTimeRange(range);
  } else if(offset==-1) {
    return "last " + FnordMetric.util.formatTimeRange(range);
    return "Last " + FnordMetric.util.formatTimeRange(range);
  } else{
    return FnordMetric.util.formatTimeRange(range) + " (-" + 
    FnordMetric.util.formatTimeRange(range * (offset*-1)) + ")";
@@ -66,15 +66,15 @@ FnordMetric.util.formatTimeSince = function(time){

FnordMetric.util.formatOffset = function(offset, next_offset){
  if((offset == 0) && (next_offset==(3600*24))){
    return 'today';
    return 'Today';
  } if((offset == 0) && (next_offset==3600)){
    return 'this hour';
    return 'This hour';
  } else if(offset == 0){
    return 'last ' + FnordMetric.util.formatTimeRange(next_offset||0);
    return 'Last ' + FnordMetric.util.formatTimeRange(next_offset||0);
  } else if(offset==(3600*24)){
    return 'yesterday';
    return 'Yesterday';
  } else if(offset==3600){
    return 'last hour';
    return 'Last hour';
  } else {
    return FnordMetric.util.formatTimeRange(offset) + ' ago';
  }
@@ -188,6 +188,15 @@ FnordMetric.util.format = function(elem){
      $(this).html(FnordMetric.util.formatGaugeValue('__dollar__', parseFloat($(this).attr('data-dolar'))));
    }

    else if($(this).attr('data-timerange-offset')){
      $(this).html(FnordMetric.util.formatTimeRangePre(
        parseInt($(this).attr('data-timerange-offset')),
        $(this).attr('data-offset')
      ));
    }
    else if($(this).attr('data-timerange')){
      $(this).html(FnordMetric.util.formatTimeRange(parseInt($(this).attr('data-timerange'))));
    }

    else if($(this).attr('data-date')){
      $(this).html(FnordMetric.util.dateFormat(parseInt($(this).attr('data-date'))));