Commit 8bab63d5 authored by Paul Asmuth's avatar Paul Asmuth
Browse files

better gaugeexplorer init

parent 0bd231b7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -565,7 +565,7 @@ h1.head{ margin-top:70px; }
#sidebar ul li{ height:28px; line-height:28px; cursor:pointer; font-size:13px; padding-left:25px; }
#sidebar ul li a{ color:#ccc; text-decoration:none; }
/*#sidebar ul li:after{ content:'›'; display:block; float:right; margin-right:15px; color:#ccc; font-size:16px; line-height:27px; }*/
#sidebar ul li i{ margin-right: 1px; color: #AAA; font-size: 11px; position: relative; left: -2px; top: -1px; }
#sidebar ul li i{ margin-right: 1px; color: #AAA; font-size: 11px; position: relative; left: -2px; top: -1px; display:none; }
#sidebar ul li:hover, #tabs ul li:hover:after{ color:#fff; }
#sidebar ul li:hover .picto{ opacity:1; }
#sidebar ul li.active i, #sidebar ul li.active a{ color:#eee; }
+2 −5
Original line number Diff line number Diff line
@@ -39,11 +39,6 @@ FnordMetric.views.gaugeExplorer = (function(){
      ]
    });

    currentGauge = {
      key: "useronline_total",
      title: "Fnord"
    };

    $(default_time_ranges).each(function(i, tr){
      $('.ge_timerange_links', elem).append(
        $('<a>')
@@ -79,6 +74,8 @@ FnordMetric.views.gaugeExplorer = (function(){
  }

  function render() {
    if (!currentGauge) return;

    $(".widget_viewport", elem).html('');
    widget = FnordMetric.widgets.timeseriesWidget();

+4 −3
Original line number Diff line number Diff line
@@ -87,6 +87,7 @@ var FnordMetric = (function(pre_init){
  }

  function sidebarClick(){
    console.log("clicjed");
    $('#sidebar li').removeClass('active');
    $(this).addClass('active');

@@ -115,10 +116,10 @@ var FnordMetric = (function(pre_init){
      renderSidebar();

      if(!currentView && (window.location.hash.length < 2)){
        sidebarClick.apply($('#sidebar li:first'));
      } else if(!navigatedViaHash){
        navigateViaHash();
        window.location.hash = "gauge_explorer";
      }

      navigateViaHash();
    }
  }

+2 −0
Original line number Diff line number Diff line
@@ -117,6 +117,8 @@
        input.tooltip({
          tooltipClass: "ui-state-highlight"
        });

        select.trigger("value_changed");
      },
 
      _destroy: function() {
+1 −1
Original line number Diff line number Diff line
@@ -7,7 +7,6 @@ Todo
Backlog
=======

  → icons for sidebar
  → bignumberwidget
  → fancy topbar daterange picker for legacy dashboards
  → make fnordmetric responsive
@@ -29,6 +28,7 @@ Changelog
=========

  1.1.1
    → icons for sidebar
    → simple gauge explorer (style like active users) + html5 api snippet generator
    → new file structure
    → better namespacing for javascript