Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/Dashboards #259

Merged
merged 69 commits into from
Sep 10, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
0884172
rename global scores -> producer documents dashboard
tsubik Jul 26, 2021
447cc06
add more filters to global score
tsubik Jul 26, 2021
6dada12
more for global scores
tsubik Jul 26, 2021
0cd9e2b
save smaller payload
tsubik Jul 26, 2021
ac4da9e
sync task to add global scores, fix csv export
tsubik Jul 27, 2021
8549def
moar changes, add column for selected filter, do not create global sc…
tsubik Jul 27, 2021
46b2fb9
pimp my chart
tsubik Jul 27, 2021
268f123
better by_country filter, refactor visible columns a little but
tsubik Jul 27, 2021
cc10382
speed up global scores download a little bit
tsubik Jul 27, 2021
2120831
do not count signature docs
tsubik Jul 27, 2021
919d56f
global score sync task only sunday, skip restore/save filters for glo…
tsubik Jul 28, 2021
87aae33
remove Publication Authorization from the groups, sync all sundays
tsubik Jul 28, 2021
b9d2c97
small refactor, change date format in CSV
tsubik Jul 29, 2021
3a12815
add valid & expired
tsubik Jul 29, 2021
8c3b015
refactor
tsubik Jul 29, 2021
432209d
2 way sync chart with column visible
tsubik Jul 29, 2021
4d64893
fix chart
tsubik Jul 29, 2021
82ad100
fix replace whitespace
tsubik Jul 29, 2021
a995ff0
WIP new global score
tsubik Jul 27, 2021
bd4be71
rename new global scores to operator document statistics
tsubik Jul 30, 2021
e57d6df
couple changes in sync task
tsubik Jul 30, 2021
c628bc6
more changes
tsubik Jul 30, 2021
5060fd1
hide new dashboard for now
tsubik Jul 30, 2021
1d91920
add alternative dashboard link, add forest type filter
tsubik Aug 2, 2021
dabd678
add from date, more fixes
tsubik Aug 2, 2021
60d84e0
WIP observation report dashboard
tsubik Aug 2, 2021
3e77756
finish observation report dashboard
tsubik Aug 3, 2021
597074a
fix sync
tsubik Aug 3, 2021
f78c112
add observation dashboard
tsubik Aug 3, 2021
ab7491e
add filter by date, always show not only first date but also to date
tsubik Aug 3, 2021
867c963
show from_date too
tsubik Aug 3, 2021
1ad165c
create observation histories
tsubik Aug 3, 2021
0918b8c
task to recreate observation history, update dashboard query
tsubik Aug 3, 2021
2086872
add category filter, small refactor, default date from 1 year ago
tsubik Aug 4, 2021
9a73d57
correct offenses
tsubik Aug 4, 2021
72afe80
use transaction for observation history recreation
tsubik Aug 4, 2021
207178b
remove global scores
tsubik Aug 4, 2021
17af0e0
change filters for observation reports dashboard
tsubik Aug 4, 2021
3182275
remove global observations scores
tsubik Aug 4, 2021
f421ee4
save to localstorage option, set default filters for reports dashboard
tsubik Aug 4, 2021
9610e91
show all monitors in CSV
tsubik Aug 4, 2021
34a185a
refactor to use from, and includes
tsubik Aug 4, 2021
11414ae
remove alternative name
tsubik Aug 4, 2021
46a853d
add is_active hidden for observation statistics
tsubik Aug 4, 2021
0078084
add is_active hidden to observation history
tsubik Aug 4, 2021
d667535
recreate history, forgot of current version
tsubik Aug 4, 2021
042e70d
optimize query to use only dates when observation changed
tsubik Aug 4, 2021
b1d37bc
fix deleted_at for observation statistics
tsubik Aug 4, 2021
53de87c
incorrect use of shared groups, fix all translatable specs
tsubik Aug 5, 2021
9740e7d
fix is_active, hidden
tsubik Aug 5, 2021
d10d073
prepare for cron tasks
tsubik Aug 5, 2021
377e5e1
make sure to synchronize first point
tsubik Aug 5, 2021
3c1cdc6
fix with at least one report
tsubik Aug 5, 2021
77f8faa
generate stats for a day earlier
tsubik Aug 5, 2021
7d8460c
fix paging issue
tsubik Aug 11, 2021
9b364b1
filters better order by
tsubik Aug 13, 2021
974e9cd
Merge branch 'develop' into feature/global-documents-dashboard
tsubik Aug 17, 2021
eb5d2f2
Merge branch 'develop' into feature/global-documents-dashboard
tsubik Aug 18, 2021
548355b
exclude reports for not active observers from statistics
tsubik Aug 18, 2021
b8270b5
easy to forget that collections should be as procs
tsubik Aug 18, 2021
952900b
check only important dates when generating documents stats
tsubik Aug 19, 2021
a3ed53d
forgot about distinct
tsubik Aug 19, 2021
f276bf6
eager load lib paths
tsubik Aug 19, 2021
1b361c8
changes to observations dashboard
tsubik Aug 19, 2021
332cf77
fix is hidden column
tsubik Aug 19, 2021
b51b25a
re-enable paging for observations dashboard, leave only published (al…
tsubik Aug 31, 2021
86c28e8
workaround to fix chart width after render
tsubik Aug 31, 2021
eb05e31
add observation type to observation statistic
tsubik Aug 31, 2021
dff7919
fix typo
tsubik Sep 1, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
rename global scores -> producer documents dashboard
  • Loading branch information
tsubik committed Jul 26, 2021
commit 088417204416a99e77b60d420443b61605ee028a
2 changes: 1 addition & 1 deletion app/admin/custom_admin_header.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def build(namespace, menu)
text_node content_tag 'a', 'Dashboard'
ul do
li { link_to 'Start Page', admin_dashboard_path }
li { link_to 'Global Scores', admin_global_scores_path }
li { link_to 'Producer Documents Dashboard', admin_producer_documents_dashboards_path }
li { link_to 'Global Observation Scores', admin_global_observation_scores_path }
end
end
Expand Down
9 changes: 6 additions & 3 deletions app/admin/global_score.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# frozen_string_literal: true

ActiveAdmin.register GlobalScore do
ActiveAdmin.register GlobalScore, as: 'Producer Documents Dashboard' do
extend BackRedirectable
back_redirect

menu false

actions :index, :show

index do
index title: 'Producer Documents Dashboard' do
GlobalScore.headers.each do |h|
if h.is_a?(Hash)
h.values.first.each do |k|
Expand All @@ -35,6 +35,9 @@
{ name: 'Expired', data: grouped_sod.maximum("general_status->>'doc_expired'") },
{ name: 'Not Required', data: grouped_sod.maximum("general_status->>'doc_not_required'") },
]
}
}
panel 'Visible columns' do
render partial: "fields", locals: { attributes: GlobalScore.headers.reject { |h| h.is_a?(Hash) }.map(&:to_s) }
end
end
end