File tree Expand file tree Collapse file tree 4 files changed +54
-1
lines changed Expand file tree Collapse file tree 4 files changed +54
-1
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,13 @@ producer_files:
120
120
category : files
121
121
description : |
122
122
Producer Files for a Mnemonic.
123
+ s3-list :
124
+ link-title : S3 Download Links
125
+ breadcrumb : bp_content_projects
126
+ class : S3ListQuery
127
+ category : files
128
+ description : |
129
+ Generate S3 Download Links
123
130
objects_large :
124
131
link-title : Sample Objects Larger than 1GB
125
132
breadcrumb : bp_obj
Original file line number Diff line number Diff line change
1
+ # frozen_string_literal: true
2
+
3
+ require 'tempfile'
4
+
5
+ # Query class - see config/reports.yml for description
6
+ class S3ListQuery < AdminQuery
7
+ def initialize ( query_factory , path , myparams )
8
+ super ( query_factory , path , myparams )
9
+ rptpath = myparams . fetch ( 'rptpath' , 'daily-build' )
10
+ @report = "merritt-reports/#{ rptpath } "
11
+ end
12
+
13
+ def run_sql
14
+ no_data
15
+ end
16
+
17
+ def get_alternative_queries
18
+ res = [ ]
19
+ resp = @s3_client . list_objects_v2 ( {
20
+ bucket : @s3bucket ,
21
+ prefix : @report
22
+ } )
23
+ # Delete any prior reports
24
+ # consistency-reports is intentionally hard coded into the delete
25
+ resp . contents . each do |s3obj |
26
+ res . push (
27
+ {
28
+ label : s3obj . key ,
29
+ url : get_report_url ( s3obj . key ) ,
30
+ class : 'download'
31
+ }
32
+ )
33
+ end
34
+
35
+ res
36
+ end
37
+ end
Original file line number Diff line number Diff line change @@ -66,8 +66,10 @@ <h3>Current Jobs</h3>
66
66
</ ul >
67
67
68
68
< h3 > Collections</ h3 >
69
+ < ul >
69
70
< li class ="coll "> < a href ="{{ADMINTOOL_HOME}}?path=list_collections "> List Collections</ a > </ li >
70
-
71
+ </ ul >
72
+
71
73
< h3 > Bytes Recently Ingested</ h3 >
72
74
< ul >
73
75
< li class ="graph "> < a href ="{{ADMINTOOL_HOME}}?path=ingest_bytes_by_hour "> Recent Bytes ingested by hour</ a > </ li >
@@ -77,6 +79,11 @@ <h3>Bytes Recently Ingested</h3>
77
79
< li class ="graph "> < a href ="{{ADMINTOOL_HOME}}?path=ingest_bytes_by_year "> Bytes ingested by Year</ a > </ li >
78
80
</ ul >
79
81
82
+ < h3 > Daily Build Output</ h3 >
83
+ < ul >
84
+ < li class ="graph "> < a href ="{{ADMINTOOL_HOME}}?path=s3-list&rptpath=daily-build "> Daily Build</ a > </ li >
85
+ </ ul >
86
+
80
87
< h3 > Object Management</ h3 >
81
88
< ul >
82
89
< li >
Original file line number Diff line number Diff line change 23
23
< a class ="graph " href ="{{ADMINTOOL_HOME}}?path=ingest_bytes_by_hour "> Recent Bytes ingested by hour</ a >
24
24
< a class ="graph " href ="{{ADMINTOOL_HOME}}?path=ingest_bytes_by_hour&days=30 "> Recent Bytes ingested by day - last 30 days</ a >
25
25
< a class ="graph " href ="{{ADMINTOOL_HOME}}?path=ingest_bytes_by_week "> Recent Bytes ingested by week - last year</ a >
26
+ < a class ="graph " href ="{{ADMINTOOL_HOME}}?path=list_collections "> List Collections</ a >
27
+ < a class ="graph " href ="{{ADMINTOOL_HOME}}?path=s3-list&rptpath=daily-build "> Daily Build Output</ a >
26
28
</ div >
27
29
</ div >
28
30
< div class ="dropdown ">
You can’t perform that action at this time.
0 commit comments