Merge pull request #405 from warpc/404-remove_nginx_log_parsing

[refs #404] Remove downloads statistics functional
This commit is contained in:
Vladimir Sharshov 2012-04-17 02:31:52 -07:00
commit 630384b05d
9 changed files with 1 additions and 90 deletions

View File

@ -1,16 +0,0 @@
# -*- encoding : utf-8 -*-
class DownloadsController < ApplicationController
before_filter :authenticate_user!
load_and_authorize_resource
def index
@downloads = Download.paginate :page => params[:page], :per_page => 30
end
def refresh
Download.rotate_nginx_log
Download.parse_and_remove_nginx_log
redirect_to downloads_path, :notice => t('flash.downloads.statistics_refreshed')
end
end

View File

@ -1,30 +0,0 @@
.block
.content
%h2.title
= title t("layout.downloads.title")
.inner
%h3= t("layout.downloads.message")
.inner
%table.table
%tr
%th.first= t("activerecord.attributes.download.name")
%th= t("activerecord.attributes.download.version")
%th= t("activerecord.attributes.download.distro")
%th= t("activerecord.attributes.download.platform")
%th.last= t("activerecord.attributes.download.counter")
- @downloads.each do |download|
%tr{:class => cycle("odd", "even")}
%td
= download.name
%td
= download.version
%td
= download.distro
%td
= download.platform
%td.last
= download.counter
.actions-bar.wat-cf
.actions
= will_paginate @downloads
= render 'admin/submenu'

View File

@ -64,11 +64,6 @@ en:
unlock: Do not receive unlock instructions? unlock: Do not receive unlock instructions?
sign_in_through: Sign in by %{provider} sign_in_through: Sign in by %{provider}
downloads:
title: Downloads statistic
message: Automatically updated every 24 hours
refresh_btn: Refresh
weekdays: weekdays:
Monday: Monday Monday: Monday
Tuesday: Tuesday Tuesday: Tuesday
@ -137,9 +132,6 @@ en:
exception_message: Access violation to this page! exception_message: Access violation to this page!
downloads:
statistics_refreshed: Statistics refreshed
collaborators: collaborators:
successfully_changed: Collaborators list successfully changed successfully_changed: Collaborators list successfully changed
error_in_changing: Collaborators list changing error error_in_changing: Collaborators list changing error
@ -172,7 +164,6 @@ en:
arch: Arch arch: Arch
private_user: Private user private_user: Private user
product_build_list: Product build list product_build_list: Product build list
download: Statistics
attributes: attributes:
settings: settings:
@ -195,9 +186,3 @@ en:
created_at: Created created_at: Created
updated_at: Updated updated_at: Updated
download:
name: Name
version: Version
distro: Source
platform: Platform
counter: Downloads

View File

@ -3,7 +3,6 @@ en:
repositories: Repositories repositories: Repositories
personal_repository: My repository personal_repository: My repository
products: Products products: Products
downloads: Statistics
top_menu: top_menu:
platforms: Platforms platforms: Platforms
projects: Projects projects: Projects
@ -38,5 +37,4 @@ en:
users: Users users: Users
register_requests: Invites register_requests: Invites
event_logs: Event log event_logs: Event log
downloads: Download statistic

View File

@ -3,7 +3,6 @@ ru:
products: Продукты products: Продукты
repositories: Репозитории repositories: Репозитории
personal_repository: Мой репозиторий personal_repository: Мой репозиторий
downloads: Статистика
top_menu: top_menu:
platforms: Платформы platforms: Платформы
projects: Проекты projects: Проекты
@ -38,4 +37,3 @@ ru:
users: Пользователи users: Пользователи
register_requests: Инвайты register_requests: Инвайты
event_logs: Лог событий event_logs: Лог событий
downloads: Статистика закачек пакетов

View File

@ -64,11 +64,6 @@ ru:
unlock: Не получили инструкции по разблокировке? unlock: Не получили инструкции по разблокировке?
sign_in_through: Войти через %{provider} sign_in_through: Войти через %{provider}
downloads:
title: Статистика закачек пакетов
message: Обновляется автоматически каждые 24 часа
refresh_btn: Обновить
weekdays: weekdays:
Monday: Понедельник Monday: Понедельник
Tuesday: Вторник Tuesday: Вторник
@ -137,9 +132,6 @@ ru:
exception_message: У Вас нет доступа к этой странице! exception_message: У Вас нет доступа к этой странице!
downloads:
statistics_refreshed: Статистика обновлена
collaborators: collaborators:
successfully_changed: Список коллабораторов успешно изменен successfully_changed: Список коллабораторов успешно изменен
error_in_changing: Ошибка изменения списка коллабораторов error_in_changing: Ошибка изменения списка коллабораторов
@ -172,7 +164,6 @@ ru:
arch: Arch arch: Arch
private_user: Приватный пользователь private_user: Приватный пользователь
product_build_list: Сборочный лист продукта product_build_list: Сборочный лист продукта
download: Статистика
auto_build_list: Автоматическая пересборка пакетов auto_build_list: Автоматическая пересборка пакетов
attributes: attributes:
@ -196,9 +187,3 @@ ru:
created_at: Создана created_at: Создана
updated_at: Обновлена updated_at: Обновлена
download:
name: Название
version: Версия
distro: Дистрибутив
platform: Архитектура
counter: Закачки

View File

@ -178,9 +178,6 @@ Rosa::Application.routes.draw do
resources :event_logs, :only => :index resources :event_logs, :only => :index
match 'statistics/' => 'downloads#index', :as => :downloads
match 'statistics/refresh' => 'downloads#refresh', :as => :downloads_refresh
match '/forbidden', :to => 'pages#forbidden', :as => 'forbidden' match '/forbidden', :to => 'pages#forbidden', :as => 'forbidden'
match '/terms-of-service', :to => 'pages#tos', :as => 'tos' match '/terms-of-service', :to => 'pages#tos', :as => 'tos'

View File

@ -7,12 +7,6 @@
# runner "Download.parse_and_remove_nginx_log" # runner "Download.parse_and_remove_nginx_log"
#end #end
every 1.day, :at => '5:00' do
#rake "sudo_test:projects"
runner "Download.rotate_nginx_log"
runner "Download.parse_and_remove_nginx_log"
end
every 1.day, :at => '4:00 am' do every 1.day, :at => '4:00 am' do
rake "import:sync:all", :output => 'log/sync.log' rake "import:sync:all", :output => 'log/sync.log'
end end