From 359f48d871c8171a53104a9e924e2f2f1afb1629 Mon Sep 17 00:00:00 2001 From: r888888888 Date: Tue, 21 Feb 2017 13:09:43 -0800 Subject: [PATCH] remove user promotions report --- app/controllers/reports_controller.rb | 4 -- app/logical/reports/contributors.rb | 9 ---- app/views/reports/user_promotions.html.erb | 51 ---------------------- config/routes.rb | 1 - 4 files changed, 65 deletions(-) delete mode 100644 app/logical/reports/contributors.rb delete mode 100644 app/views/reports/user_promotions.html.erb diff --git a/app/controllers/reports_controller.rb b/app/controllers/reports_controller.rb index be8ba16f5..87fbd5662 100644 --- a/app/controllers/reports_controller.rb +++ b/app/controllers/reports_controller.rb @@ -3,10 +3,6 @@ class ReportsController < ApplicationController before_filter :gold_only, :only => [:similar_users] before_filter :moderator_only, :only => [:post_versions, :post_versions_create] - def user_promotions - @report = Reports::UserPromotions.new - end - def janitor_trials @report = Reports::JanitorTrials.new end diff --git a/app/logical/reports/contributors.rb b/app/logical/reports/contributors.rb deleted file mode 100644 index e4ecbb072..000000000 --- a/app/logical/reports/contributors.rb +++ /dev/null @@ -1,9 +0,0 @@ -require 'statistics2' - -module Reports - class Contributors < User - def users - ::User.where("users.bit_prefs & ? > 0 and users.post_upload_count >= 250", ::User.flag_value_for("can_upload_free")).order("created_at desc").map {|x| Reports::UserPromotions::User.new(x)} - end - end -end diff --git a/app/views/reports/user_promotions.html.erb b/app/views/reports/user_promotions.html.erb deleted file mode 100644 index af7d15f0c..000000000 --- a/app/views/reports/user_promotions.html.erb +++ /dev/null @@ -1,51 +0,0 @@ -
-
-

User Promotion Report

- -

Binomial proportion confidence interval for how likely a user's uploads will achieve a score of at at least n with 95% confidence within the past 60 days. Most statistics are not significant unless there are at least 300 uploads.

- - - - - - - - - - - - - - - <% @report.users.each do |user| %> - <% if user.confidence_interval_for(5) > 0 %> - - - - - - - - - - <% end %> - <% end %> - -
UserLevelUploadsAgeDel ChanceNeg Score ChanceLimit
<%= link_to_user user.user %><%= user.level_string %><%= link_to user.post_upload_count, posts_path(:tags => "user:#{user.name} order:random", :limit => 200) %><%= time_ago_in_words user.created_at %><%= link_to number_to_percentage(user.deletion_confidence_interval, :precision => 0), posts_path(:tags => "user:#{user.name} status:deleted", :limit => 200) %><%= link_to number_to_percentage(user.negative_score_confidence_interval, :precision => 0), posts_path(:tags => "user:#{user.name} score:<0", :limit => 200) %><%= user.max_upload_limit %>
-
-
- -<% content_for(:page_title) do %> - User Promotion Report - <%= Danbooru.config.app_name %> -<% end %> - -<%= content_for(:html_header) do %> - -<% end %> diff --git a/config/routes.rb b/config/routes.rb index cae450c4a..76e622cbd 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -230,7 +230,6 @@ Rails.application.routes.draw do end resources :artist_commentary_versions, :only => [:index] resource :related_tag, :only => [:show, :update] - get "reports/user_promotions" => "reports#user_promotions" get "reports/janitor_trials" => "reports#janitor_trials" get "reports/contributors" => "reports#contributors" get "reports/uploads" => "reports#uploads"