Sha256: b06ecba91abed1e4d144758a78dd8d7c16fad9f38ce858e49b51db93a322d20c

Contents?: true

Size: 1.53 KB

Versions: 2

Compression:

Stored size: 1.53 KB

Contents

!!!	
%html

  %head
    %title Fnordmetric Dashboard
    %script(type="text/javascript" src="#{path_prefix}/jquery-1.6.1.min.js")
    %link(type="text/css" rel="stylesheet" href="#{path_prefix}/fnordmetric/fnordmetric.css")
    %script(type="text/javascript" src="#{path_prefix}/raphael-min.js")
    %script(type="text/javascript" src="#{path_prefix}/raphael-utils.js")
    %script(type="text/javascript" src="#{path_prefix}/fnordmetric/fnordmetric.js")
    :javascript
      FnordMetric.p = '#{path_prefix}';

  %body
    .topbar

    #wrap
      #tabs
        %ul
          %li.active.sessions
            .picto.piechart
            Active Users

          -current_namespace.dashboards.each do |key,dashboard|
            %li.dashboard{:rel => dashboard.token}
              .picto.piechart
              =h dashboard.title

      #viewport
        .viewport_inner.clearfix
            

:javascript
  $(document).ready(function(){

    FnordMetric.init('#{current_namespace.token}', $('.viewport_inner'));

    $('#tabs li.dashboard').click(function(){
      FnordMetric.renderDashboard($(this).attr('rel'));
    });

    $('#tabs li.sessions').click(function(){
      FnordMetric.renderSessionView();
    });

    $('#tabs li').click(function(){
      $(this).addClass('active').siblings().removeClass('active');
    });

    function resizeViewport(){ 
      var viewport_width = window.innerWidth-220
      $('#viewport').width(viewport_width); 
      FnordMetric.resizeView();
    }

    resizeViewport();
    $(window).resize(resizeViewport);

  });



Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fnordmetric-0.5.1 haml/app.haml
fnordmetric-0.5.0 haml/app.haml