From 8dae15225e0cc5263516238d071ec0474aca1b10 Mon Sep 17 00:00:00 2001 From: xiaoxiaoqiong Date: Mon, 11 Jul 2022 15:52:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E7=BB=9F=E8=AE=A1=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gemfile.lock | 354 ++++++++++-------- .../admins/dashboards_controller.rb | 35 +- app/views/admins/dashboards/index.html.erb | 266 +++---------- 3 files changed, 272 insertions(+), 383 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index e27c504aa..d675a0723 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,69 +1,69 @@ GEM remote: https://gems.ruby-china.com/ specs: - aasm (5.0.6) + aasm (5.2.0) concurrent-ruby (~> 1.0) - actioncable (5.2.4.1) - actionpack (= 5.2.4.1) + actioncable (5.2.6) + actionpack (= 5.2.6) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailer (5.2.4.1) - actionpack (= 5.2.4.1) - actionview (= 5.2.4.1) - activejob (= 5.2.4.1) + actionmailer (5.2.6) + actionpack (= 5.2.6) + actionview (= 5.2.6) + activejob (= 5.2.6) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (5.2.4.1) - actionview (= 5.2.4.1) - activesupport (= 5.2.4.1) + actionpack (5.2.6) + actionview (= 5.2.6) + activesupport (= 5.2.6) rack (~> 2.0, >= 2.0.8) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.2.4.1) - activesupport (= 5.2.4.1) + actionview (5.2.6) + activesupport (= 5.2.6) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.3) - active_decorator (1.3.2) + active_decorator (1.4.0) activesupport - activejob (5.2.4.1) - activesupport (= 5.2.4.1) + activejob (5.2.6) + activesupport (= 5.2.6) globalid (>= 0.3.6) - activemodel (5.2.4.1) - activesupport (= 5.2.4.1) - activerecord (5.2.4.1) - activemodel (= 5.2.4.1) - activesupport (= 5.2.4.1) + activemodel (5.2.6) + activesupport (= 5.2.6) + activerecord (5.2.6) + activemodel (= 5.2.6) + activesupport (= 5.2.6) arel (>= 9.0) - activestorage (5.2.4.1) - actionpack (= 5.2.4.1) - activerecord (= 5.2.4.1) - marcel (~> 0.3.1) - activesupport (5.2.4.1) + activestorage (5.2.6) + actionpack (= 5.2.6) + activerecord (= 5.2.6) + marcel (~> 1.0.0) + activesupport (5.2.6) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) acts-as-taggable-on (6.5.0) activerecord (>= 5.0, < 6.1) - acts_as_list (0.9.19) - activerecord (>= 3.0) - addressable (2.7.0) + acts_as_list (1.0.4) + activerecord (>= 4.2) + addressable (2.8.0) public_suffix (>= 2.0.2, < 5.0) - ancestry (3.0.7) - activerecord (>= 3.2.0) - annotate (2.6.5) + ancestry (4.1.0) + activerecord (>= 5.2.6) + annotate (2.6.7) activerecord (>= 2.3.0) - rake (>= 0.8.7) + rake (~> 10.4.2, >= 10.4.2) archive-zip (0.12.0) io-like (~> 0.3.0) arel (9.0.0) - ast (2.4.0) - autoprefixer-rails (9.7.4) - execjs - awesome_print (1.8.0) + ast (2.4.2) + autoprefixer-rails (10.3.3.0) + execjs (~> 2) + awesome_print (1.9.2) axlsx (3.0.0.pre) htmlentities (~> 4.3, >= 4.3.4) mimemagic (~> 0.3) @@ -72,40 +72,43 @@ GEM axlsx_rails (0.5.2) actionpack (>= 3.1) axlsx (>= 2.0.1) - backport (1.1.2) - benchmark (0.1.0) + backport (1.2.0) + benchmark (0.2.0) bindex (0.8.1) - bootsnap (1.4.6) + bootsnap (1.9.3) msgpack (~> 1.0) bootstrap (4.3.1) autoprefixer-rails (>= 9.1.0) popper_js (>= 1.14.3, < 2) sassc-rails (>= 2.0.0) builder (3.2.4) - bulk_insert (1.7.0) + bulk_insert (1.9.0) activerecord (>= 3.2.0) - capybara (3.15.1) + capybara (3.36.0) addressable + matrix mini_mime (>= 0.1.3) nokogiri (~> 1.8) rack (>= 1.6.0) rack-test (>= 0.6.3) - regexp_parser (~> 1.2) + regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - chartkick (3.3.1) - childprocess (3.0.0) - chinese_pinyin (1.0.2) + chartkick (4.1.2) + childprocess (4.1.0) + chinese_pinyin (1.1.0) chromedriver-helper (2.1.1) archive-zip (~> 0.10) nokogiri (~> 1.8) - chunky_png (1.3.11) - concurrent-ruby (1.1.6) - connection_pool (2.2.2) + chunky_png (1.4.0) + concurrent-ruby (1.1.9) + connection_pool (2.2.5) crass (1.0.6) deep_cloneable (3.0.0) activerecord (>= 3.1.0, < 7) diff-lcs (1.3) diffy (3.3.0) + domain_name (0.5.20190701) + unf (>= 0.0.5, < 1.0.0) doorkeeper (5.5.1) railties (>= 5) doorkeeper-jwt (0.4.1) @@ -119,93 +122,103 @@ GEM elasticsearch-transport (7.5.0) faraday (>= 0.14, < 1) multi_json - enumerize (2.3.1) + enumerize (2.4.0) activesupport (>= 3.2) - erubi (1.9.0) - et-orbi (1.2.4) + erubi (1.10.0) + et-orbi (1.2.6) tzinfo - execjs (2.7.0) + execjs (2.8.1) faraday (0.15.4) multipart-post (>= 1.2, < 3) - ffi (1.12.2) + ffi (1.15.4) font-awesome-sass (4.7.0) sass (>= 3.2) - fugit (1.4.1) + fugit (1.5.2) et-orbi (~> 1.1, >= 1.1.8) raabro (~> 1.4) - globalid (0.4.2) - activesupport (>= 4.2.0) + gitea-client (0.9.2) + rest-client (~> 2.1.0) + globalid (1.0.0) + activesupport (>= 5.0) grape-entity (0.7.1) activesupport (>= 4.0) multi_json (>= 1.3.2) groupdate (4.1.2) activesupport (>= 4.2) harmonious_dictionary (0.0.1) - hashie (3.6.0) + hashie (5.0.0) htmlentities (4.3.4) - i18n (1.8.2) + http-accept (1.7.0) + http-cookie (1.0.5) + domain_name (~> 0.5) + i18n (1.8.11) concurrent-ruby (~> 1.0) io-like (0.3.1) jaro_winkler (1.5.4) - jbuilder (2.10.0) + jbuilder (2.11.3) activesupport (>= 5.0.0) - jquery-rails (4.3.5) + jquery-rails (4.4.0) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) - jwt (2.2.1) - kaminari (1.2.0) + jwt (2.3.0) + kaminari (1.2.1) activesupport (>= 4.1.0) - kaminari-actionview (= 1.2.0) - kaminari-activerecord (= 1.2.0) - kaminari-core (= 1.2.0) - kaminari-actionview (1.2.0) + kaminari-actionview (= 1.2.1) + kaminari-activerecord (= 1.2.1) + kaminari-core (= 1.2.1) + kaminari-actionview (1.2.1) actionview - kaminari-core (= 1.2.0) - kaminari-activerecord (1.2.0) + kaminari-core (= 1.2.1) + kaminari-activerecord (1.2.1) activerecord - kaminari-core (= 1.2.0) - kaminari-core (1.2.0) - letter_avatar (0.3.8) + kaminari-core (= 1.2.1) + kaminari-core (1.2.1) + letter_avatar (0.3.9) listen (3.1.5) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) ruby_dep (~> 1.2) - loofah (2.4.0) + loofah (2.13.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.1) mini_mime (>= 0.1.1) - marcel (0.3.3) - mimemagic (~> 0.3.2) + marcel (1.0.2) maruku (0.7.3) - method_source (0.9.2) - mimemagic (0.3.10) + matrix (0.4.2) + method_source (1.0.0) + mime-types (3.4.1) + mime-types-data (~> 3.2015) + mime-types-data (3.2022.0105) + mimemagic (0.4.3) nokogiri (~> 1) rake - mini_mime (1.0.2) - mini_portile2 (2.4.0) - minitest (5.14.0) - msgpack (1.3.3) - multi_json (1.14.1) + mini_mime (1.1.2) + mini_portile2 (2.6.1) + minitest (5.14.4) + msgpack (1.4.2) + multi_json (1.15.0) multi_xml (0.6.0) multipart-post (2.1.1) mustermann (1.1.1) ruby2_keywords (~> 0.0.1) mysql2 (0.5.3) + netrc (0.11.0) nio4r (2.5.2) - nokogiri (1.10.8) - mini_portile2 (~> 2.4.0) - oauth2 (1.4.4) + nokogiri (1.12.5) + mini_portile2 (~> 2.6.1) + racc (~> 1.4) + oauth2 (1.4.7) faraday (>= 0.8, < 2.0) jwt (>= 1.0, < 3.0) multi_json (~> 1.3) multi_xml (~> 0.5) rack (>= 1.2, < 3) - omniauth (1.9.0) - hashie (>= 3.4.6, < 3.7.0) + omniauth (1.9.1) + hashie (>= 3.4.6) rack (>= 1.6.2, < 3) - omniauth-cas (1.1.1) + omniauth-cas (2.0.0) addressable (~> 2.3) nokogiri (~> 1.5) omniauth (~> 1.2) @@ -213,108 +226,112 @@ GEM oauth2 (~> 1.1) omniauth (~> 1.9) parallel (1.19.1) - parser (2.7.1.1) - ast (~> 2.4.0) + parser (2.7.2.0) + ast (~> 2.4.1) pdfkit (0.8.4.1) - polyamorous (2.3.2) - activerecord (>= 5.2.1) popper_js (1.16.0) - powerpack (0.1.2) - prettier (0.18.2) - public_suffix (4.0.3) - puma (3.12.2) + powerpack (0.1.3) + prettier (2.0.0) + public_suffix (4.0.6) + puma (3.12.6) raabro (1.4.0) - rack (2.0.9) + racc (1.6.0) + rack (2.2.3) rack-cors (1.1.1) rack (>= 2.0.0) - rack-mini-profiler (2.0.1) + rack-mini-profiler (2.3.3) rack (>= 1.2.0) - rack-protection (2.0.8.1) + rack-protection (2.1.0) rack rack-test (1.1.0) rack (>= 1.0, < 3) - rails (5.2.4.1) - actioncable (= 5.2.4.1) - actionmailer (= 5.2.4.1) - actionpack (= 5.2.4.1) - actionview (= 5.2.4.1) - activejob (= 5.2.4.1) - activemodel (= 5.2.4.1) - activerecord (= 5.2.4.1) - activestorage (= 5.2.4.1) - activesupport (= 5.2.4.1) + rails (5.2.6) + actioncable (= 5.2.6) + actionmailer (= 5.2.6) + actionpack (= 5.2.6) + actionview (= 5.2.6) + activejob (= 5.2.6) + activemodel (= 5.2.6) + activerecord (= 5.2.6) + activestorage (= 5.2.6) + activesupport (= 5.2.6) bundler (>= 1.3.0) - railties (= 5.2.4.1) + railties (= 5.2.6) sprockets-rails (>= 2.0.0) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) - rails-html-sanitizer (1.3.0) + rails-html-sanitizer (1.4.2) loofah (~> 2.3) rails-i18n (5.1.3) i18n (>= 0.7, < 2) railties (>= 5.0, < 6) - railties (5.2.4.1) - actionpack (= 5.2.4.1) - activesupport (= 5.2.4.1) + railties (5.2.6) + actionpack (= 5.2.6) + activesupport (= 5.2.6) method_source rake (>= 0.8.7) thor (>= 0.19.0, < 2.0) rainbow (3.0.0) - rake (13.0.1) - ransack (2.3.2) - activerecord (>= 5.2.1) - activesupport (>= 5.2.1) + rake (10.4.2) + ransack (2.4.2) + activerecord (>= 5.2.4) + activesupport (>= 5.2.4) i18n - polyamorous (= 2.3.2) - rb-fsevent (0.10.3) + rb-fsevent (0.11.0) rb-inotify (0.10.1) ffi (~> 1.0) rchardet (1.8.0) - redcarpet (3.5.0) - redis (4.1.3) + redcarpet (3.5.1) + redis (4.5.1) redis-actionpack (5.2.0) actionpack (>= 5, < 7) redis-rack (>= 2.1.0, < 3) redis-store (>= 1.1.0, < 2) - redis-activesupport (5.2.0) + redis-activesupport (5.2.1) activesupport (>= 3, < 7) redis-store (>= 1.3, < 2) - redis-rack (2.1.2) + redis-rack (2.1.3) rack (>= 2.0.8, < 3) redis-store (>= 1.2, < 2) redis-rails (5.0.2) redis-actionpack (>= 5.0, < 6) redis-activesupport (>= 5.0, < 6) redis-store (>= 1.2, < 2) - redis-store (1.8.2) + redis-store (1.9.0) redis (>= 4, < 5) - regexp_parser (1.7.0) + regexp_parser (2.2.0) request_store (1.5.0) rack (>= 1.4) + rest-client (2.1.0) + http-accept (>= 1.7.0, < 2.0) + http-cookie (>= 1.0.2, < 2.0) + mime-types (>= 1.16, < 4.0) + netrc (~> 0.8) reverse_markdown (1.4.0) nokogiri + rexml (3.2.5) roo (2.8.3) nokogiri (~> 1) rubyzip (>= 1.3.0, < 3.0.0) roo-xls (1.2.0) nokogiri - roo (>= 2.0.0, < 3) + roo (= 2.8.3) spreadsheet (> 0.9.0) rqrcode (0.10.1) chunky_png (~> 1.0) rqrcode_png (0.1.5) chunky_png rqrcode - rspec-core (3.9.1) - rspec-support (~> 3.9.1) - rspec-expectations (3.9.0) + rspec-core (3.9.3) + rspec-support (~> 3.9.3) + rspec-expectations (3.9.4) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.9.0) rspec-mocks (3.9.1) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.9.0) - rspec-rails (3.9.0) + rspec-rails (3.9.1) actionpack (>= 3.0) activesupport (>= 3.0) railties (>= 3.0) @@ -322,7 +339,7 @@ GEM rspec-expectations (~> 3.9.0) rspec-mocks (~> 3.9.0) rspec-support (~> 3.9.0) - rspec-support (3.9.2) + rspec-support (3.9.4) rubocop (0.52.1) parallel (~> 1.10) parser (>= 2.4.0.2, < 3.0) @@ -331,8 +348,8 @@ GEM ruby-progressbar (~> 1.7) unicode-display_width (~> 1.0, >= 1.0.1) ruby-ole (1.2.12.2) - ruby-progressbar (1.10.1) - ruby2_keywords (0.0.2) + ruby-progressbar (1.11.0) + ruby2_keywords (0.0.5) ruby_dep (1.5.0) rubyzip (1.3.0) sass (3.7.4) @@ -340,13 +357,13 @@ GEM sass-listen (4.0.0) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) - sass-rails (5.0.7) - railties (>= 4.0.0, < 6) + sass-rails (5.1.0) + railties (>= 5.2.0) sass (~> 3.1) sprockets (>= 2.8, < 4.0) sprockets-rails (>= 2.0, < 4.0) tilt (>= 1.1, < 3) - sassc (2.2.1) + sassc (2.4.0) ffi (~> 1.9) sassc-rails (2.1.2) railties (>= 4.0.0) @@ -354,31 +371,31 @@ GEM sprockets (> 3.0) sprockets-rails tilt - searchkick (3.1.3) - activemodel (>= 4.2) - elasticsearch (>= 5) + searchkick (4.6.3) + activemodel (>= 5) + elasticsearch (>= 6, < 7.14) hashie - selenium-webdriver (3.142.7) - childprocess (>= 0.5, < 4.0) + selenium-webdriver (4.1.0) + childprocess (>= 0.5, < 5.0) + rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2) - sidekiq (5.2.8) - connection_pool (~> 2.2, >= 2.2.2) - rack (< 2.1.0) - rack-protection (>= 1.5.0) - redis (>= 3.3.5, < 5) + sidekiq (6.3.1) + connection_pool (>= 2.2.2) + rack (~> 2.0) + redis (>= 4.2.0) sidekiq-cron (1.2.0) fugit (~> 1.1) sidekiq (>= 4.2.1) - simple_form (5.0.2) - actionpack (>= 5.0) - activemodel (>= 5.0) + simple_form (5.1.0) + actionpack (>= 5.2) + activemodel (>= 5.2) simple_xlsx_reader (1.0.4) nokogiri rubyzip - sinatra (2.0.8.1) + sinatra (2.1.0) mustermann (~> 1.0) - rack (~> 2.0) - rack-protection (= 2.0.8.1) + rack (~> 2.2) + rack-protection (= 2.1.0) tilt (~> 2.0) solargraph (0.38.6) backport (~> 1.1) @@ -394,43 +411,47 @@ GEM thor (~> 1.0) tilt (~> 2.0) yard (~> 0.9) - spreadsheet (1.2.6) - ruby-ole (>= 1.0) - spring (2.0.2) - activesupport (>= 4.2) + spreadsheet (1.3.0) + ruby-ole + spring (2.1.1) spring-watcher-listen (2.0.1) listen (>= 2.7, < 4.0) spring (>= 1.2, < 3.0) sprockets (3.7.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-rails (3.2.1) - actionpack (>= 4.0) - activesupport (>= 4.0) + sprockets-rails (3.4.2) + actionpack (>= 5.2) + activesupport (>= 5.2) sprockets (>= 3.0.0) - thor (1.0.1) + thor (1.1.0) thread_safe (0.3.6) tilt (2.0.10) turbolinks (5.2.1) turbolinks-source (~> 5.2) turbolinks-source (5.2.0) - tzinfo (1.2.6) + tzinfo (1.2.9) thread_safe (~> 0.1) uglifier (4.2.0) execjs (>= 0.3.0, < 3) - unicode-display_width (1.6.1) + unf (0.1.4) + unf_ext + unf_ext (0.0.8.2) + unicode-display_width (1.8.0) web-console (3.7.0) actionview (>= 5.0) activemodel (>= 5.0) bindex (>= 0.4.0) railties (>= 5.0) - websocket-driver (0.7.1) + webrick (1.7.0) + websocket-driver (0.7.5) websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.4) - wkhtmltopdf-binary (0.12.5.4) + websocket-extensions (0.1.5) + wkhtmltopdf-binary (0.12.6.5) xpath (3.2.0) nokogiri (~> 1.8) - yard (0.9.24) + yard (0.9.27) + webrick (~> 1.7.0) PLATFORMS ruby @@ -459,6 +480,7 @@ DEPENDENCIES enumerize faraday (~> 0.15.4) font-awesome-sass (= 4.7.0) + gitea-client (~> 0.9.1) grape-entity (~> 0.7.1) groupdate (~> 4.1.0) harmonious_dictionary (~> 0.0.1) diff --git a/app/controllers/admins/dashboards_controller.rb b/app/controllers/admins/dashboards_controller.rb index 3971971ff..0d88d0440 100644 --- a/app/controllers/admins/dashboards_controller.rb +++ b/app/controllers/admins/dashboards_controller.rb @@ -1,10 +1,33 @@ class Admins::DashboardsController < Admins::BaseController def index - @active_user_count = User.where(last_login_on: today).count - @weekly_active_user_count = User.where(last_login_on: current_week).count - @month_active_user_count = User.where(last_login_on: current_month).count + # 用户活跃数 + day_user_ids = CommitLog.where(created_at: today).pluck(:project_id).uniq + weekly_user_ids = CommitLog.where(created_at: current_week).pluck(:project_id).uniq + month_user_ids = CommitLog.where(created_at: current_month).pluck(:project_id).uniq + @active_user_count = User.where(last_login_on: today).or(User.where(id: day_user_ids)).count + @weekly_active_user_count = User.where(last_login_on: current_week).or(User.where(id: weekly_user_ids)).count + @month_active_user_count = User.where(last_login_on: current_month).or(User.where(id: month_user_ids)).count + user_ids = User.where(created_on: pre_week).pluck(:id).uniq + weekly_keep_user_count = User.where(id: user_ids).where(last_login_on: current_week).count + @weekly_keep_rate = format("%.2f", weekly_keep_user_count > 0 ? weekly_keep_user_count / weekly_keep_user_count : 0) - @new_user_count = User.where(created_on: current_month).count + # 新用户注册数 + @day_new_user_count = User.where(created_on: today).count + @weekly_new_user_count = User.where(created_on: current_week).count + @month_new_user_count = User.where(created_on: current_month).count + + # 活跃项目数 + day_project_ids = CommitLog.where(created_at: today).pluck(:project_id).uniq + weekly_project_ids = CommitLog.where(created_at: current_week).pluck(:project_id).uniq + month_project_ids = CommitLog.where(created_at: current_month).pluck(:project_id).uniq + @day_active_project_count = Project.where(updated_on: today).or(Project.where(id: day_project_ids)).count + @weekly_active_project_count = Project.where(updated_on: current_week).or(Project.where(id: weekly_project_ids)).count + @month_active_project_count = Project.where(updated_on: current_month).or(Project.where(id: month_project_ids)).count + + # 新增项目数 + @day_new_project_count = User.where(created_on: today).count + @weekly_new_project_count = User.where(created_on: current_week).count + @month_new_project_count = User.where(created_on: current_month).count end def month_active_user @@ -48,4 +71,8 @@ class Admins::DashboardsController < Admins::BaseController def current_month 30.days.ago.beginning_of_day..Time.now.end_of_day end + + def pre_week + 14.days.ago.beginning_of_day..7.days.ago.beginning_of_day + end end \ No newline at end of file diff --git a/app/views/admins/dashboards/index.html.erb b/app/views/admins/dashboards/index.html.erb index e02c307a5..649c00904 100644 --- a/app/views/admins/dashboards/index.html.erb +++ b/app/views/admins/dashboards/index.html.erb @@ -2,217 +2,57 @@ <% add_admin_breadcrumb('概览', admins_path) %> <% end %> -
-
-
- -
-
-
-
-
-
-
当日活跃用户
- <%= @active_user_count %> -
-
-
- -
-
-
- - - - -
-
-
-
-
-
-
-
-
7天内活跃用户数
- <%= @weekly_active_user_count %> -
-
-
- -
-
-
- - - - -
-
-
-
-
-
-
-
-
30天内活跃用户数
- <%= @month_active_user_count %> -
-
-
- -
-
-
- - - - -
-
-
-
-
-
-
-
-
30天内新增用户数
- <%= @new_user_count %> -
-
-
- -
-
-
- - - - -
-
-
-
-
-
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
指标名称当日数七日内30日内周用户留存率
+ + <%=@active_user_count %><%=@weekly_active_user_count %><%=@month_active_user_count %><%="#{@weekly_keep_rate.to_f * 100 }%" %>
+ + <%=@day_new_user_count %><%=@weekly_new_user_count %><%=@month_new_user_count %><%="--" %>
+ + <%=@day_active_project_count %><%=@weekly_new_project_count %><%=@month_new_project_count %><%="--" %>
+ + <%=@day_new_project_count %><%=@weekly_new_user_count %><%=@month_new_user_count %><%="--" %>
- -
-
-
-
- - - - - - - - -
-
- -
-
-
-
-
30天内新增用户
-
-
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - <%# 5.times do %> - - - - - - - - - <%# end %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - <%# 5.times do %> - - - - - - - - - - - - - - - - - - - <%# end %> - - - - - - - \ No newline at end of file +
+
\ No newline at end of file