Commit b7064677 authored by Jonne Haß's avatar Jonne Haß Committed by Dennis Schubert
Browse files

Collapse StatisticsController into NodeInfoController

parent 487b0d90
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -95,4 +95,4 @@
@import 'highlightjs/github';

/* statistics */
@import 'new_styles/statistics';
@import 'statistics';
+1 −1
Original line number Diff line number Diff line
.page-statistics {
.page-node_info.action-statistics {
  h1{ text-align: center; }

  h3{
+8 −0
Original line number Diff line number Diff line
class NodeInfoController < ApplicationController
  respond_to :json
  respond_to :html, only: :statistics

  def jrd
    render json: NodeInfo.jrd(CGI.unescape(node_info_url("123.123").sub("123.123", "%{version}")))
@@ -13,4 +14,11 @@ class NodeInfoController < ApplicationController
      head :not_found
    end
  end

  def statistics
    respond_to do |format|
      format.json { render json: StatisticsPresenter.new }
      format.all { @statistics = NodeInfoPresenter.new("1.0") }
    end
  end
end
+0 −15
Original line number Diff line number Diff line
#   Copyright (c) 2010-2011, Diaspora Inc.  This file is
#   licensed under the Affero General Public License version 3 or later.  See
#   the COPYRIGHT file.

class StatisticsController < ApplicationController
  respond_to :html, :json

  def statistics
    @statistics = StatisticsPresenter.new
    respond_to do |format|
      format.json { render json: @statistics }
      format.all
    end
  end
end
Loading