Merge pull request #405 from warpc/404-remove_nginx_log_parsing
[refs #404] Remove downloads statistics functional
This commit is contained in:
commit
630384b05d
|
@ -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
|
|
@ -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'
|
|
@ -64,11 +64,6 @@ en:
|
|||
unlock: Do not receive unlock instructions?
|
||||
sign_in_through: Sign in by %{provider}
|
||||
|
||||
downloads:
|
||||
title: Downloads statistic
|
||||
message: Automatically updated every 24 hours
|
||||
refresh_btn: Refresh
|
||||
|
||||
weekdays:
|
||||
Monday: Monday
|
||||
Tuesday: Tuesday
|
||||
|
@ -137,9 +132,6 @@ en:
|
|||
|
||||
exception_message: Access violation to this page!
|
||||
|
||||
downloads:
|
||||
statistics_refreshed: Statistics refreshed
|
||||
|
||||
collaborators:
|
||||
successfully_changed: Collaborators list successfully changed
|
||||
error_in_changing: Collaborators list changing error
|
||||
|
@ -172,7 +164,6 @@ en:
|
|||
arch: Arch
|
||||
private_user: Private user
|
||||
product_build_list: Product build list
|
||||
download: Statistics
|
||||
|
||||
attributes:
|
||||
settings:
|
||||
|
@ -195,9 +186,3 @@ en:
|
|||
created_at: Created
|
||||
updated_at: Updated
|
||||
|
||||
download:
|
||||
name: Name
|
||||
version: Version
|
||||
distro: Source
|
||||
platform: Platform
|
||||
counter: Downloads
|
||||
|
|
|
@ -3,7 +3,6 @@ en:
|
|||
repositories: Repositories
|
||||
personal_repository: My repository
|
||||
products: Products
|
||||
downloads: Statistics
|
||||
top_menu:
|
||||
platforms: Platforms
|
||||
projects: Projects
|
||||
|
@ -38,5 +37,4 @@ en:
|
|||
users: Users
|
||||
register_requests: Invites
|
||||
event_logs: Event log
|
||||
downloads: Download statistic
|
||||
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@ ru:
|
|||
products: Продукты
|
||||
repositories: Репозитории
|
||||
personal_repository: Мой репозиторий
|
||||
downloads: Статистика
|
||||
top_menu:
|
||||
platforms: Платформы
|
||||
projects: Проекты
|
||||
|
@ -38,4 +37,3 @@ ru:
|
|||
users: Пользователи
|
||||
register_requests: Инвайты
|
||||
event_logs: Лог событий
|
||||
downloads: Статистика закачек пакетов
|
||||
|
|
|
@ -64,11 +64,6 @@ ru:
|
|||
unlock: Не получили инструкции по разблокировке?
|
||||
sign_in_through: Войти через %{provider}
|
||||
|
||||
downloads:
|
||||
title: Статистика закачек пакетов
|
||||
message: Обновляется автоматически каждые 24 часа
|
||||
refresh_btn: Обновить
|
||||
|
||||
weekdays:
|
||||
Monday: Понедельник
|
||||
Tuesday: Вторник
|
||||
|
@ -137,9 +132,6 @@ ru:
|
|||
|
||||
exception_message: У Вас нет доступа к этой странице!
|
||||
|
||||
downloads:
|
||||
statistics_refreshed: Статистика обновлена
|
||||
|
||||
collaborators:
|
||||
successfully_changed: Список коллабораторов успешно изменен
|
||||
error_in_changing: Ошибка изменения списка коллабораторов
|
||||
|
@ -172,7 +164,6 @@ ru:
|
|||
arch: Arch
|
||||
private_user: Приватный пользователь
|
||||
product_build_list: Сборочный лист продукта
|
||||
download: Статистика
|
||||
auto_build_list: Автоматическая пересборка пакетов
|
||||
|
||||
attributes:
|
||||
|
@ -196,9 +187,3 @@ ru:
|
|||
created_at: Создана
|
||||
updated_at: Обновлена
|
||||
|
||||
download:
|
||||
name: Название
|
||||
version: Версия
|
||||
distro: Дистрибутив
|
||||
platform: Архитектура
|
||||
counter: Закачки
|
||||
|
|
|
@ -178,9 +178,6 @@ Rosa::Application.routes.draw do
|
|||
|
||||
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 '/terms-of-service', :to => 'pages#tos', :as => 'tos'
|
||||
|
||||
|
|
|
@ -7,12 +7,6 @@
|
|||
# runner "Download.parse_and_remove_nginx_log"
|
||||
#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
|
||||
rake "import:sync:all", :output => 'log/sync.log'
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue