diff --git a/metrics/config/metrics.cfg b/metrics/config/metrics.cfg index 70aa05b..1985785 100644 --- a/metrics/config/metrics.cfg +++ b/metrics/config/metrics.cfg @@ -13,7 +13,7 @@ subject = Monthly metrics for Borealis [excel] template = template.xlsx -report = Dataverse Usage Report.xlsx +report = Borealis Usage Report.xlsx # archive_dir is the base directory containing all the report subdirectories # A report subdirectory is created every month when the cron job is run. It is in the format: e.g: '$archive_dir/2019-06-01 to 2020-05-31/') archive_dir = output @@ -32,4 +32,4 @@ number_of_time_periods = 2 [configuration] config_dir = metrics/config/ -sql_dir = metrics/sql/ \ No newline at end of file +sql_dir = metrics/sql/ diff --git a/metrics/excel/metrics.py b/metrics/excel/metrics.py index abc0934..a7b428f 100644 --- a/metrics/excel/metrics.py +++ b/metrics/excel/metrics.py @@ -41,7 +41,7 @@ def generate_historical_reports(history): end_date = datetime.date(_end_date.year, _end_date.month, calendar.monthrange(_end_date.year, _end_date.month)[1]).strftime( '%Y-%m-%d') - print('Generating Dataverse Historical Usage Report for period: ' + start_date + ' to ' + end_date) + print('Generating Borealis Historical Usage Report for period: ' + start_date + ' to ' + end_date) history_start_date = history_start_date + relativedelta(months=1) periods = periods - 1 Metrics.create(start_date, end_date) @@ -55,7 +55,7 @@ def generate_latest_report(): end_date = datetime.date(_end_date.year, _end_date.month, calendar.monthrange(_end_date.year, _end_date.month)[1]).strftime( '%Y-%m-%d') - print('Generate Dataverse Usage Report for period: ' + start_date + ' to ' + end_date) + print('Generate Borealis Usage Report for period: ' + start_date + ' to ' + end_date) Metrics.create(start_date, end_date) @staticmethod diff --git a/metricsroutes.py b/metricsroutes.py index c01151c..96e5a48 100755 --- a/metricsroutes.py +++ b/metricsroutes.py @@ -14,7 +14,7 @@ @app.route('/', methods=['GET']) def home(): - return "

Dataverse Metrics

" + return "

Borealis Metrics

" @app.route('/api/metrics/list', methods=['GET']) @@ -39,7 +39,7 @@ def get_report_by_date(): metricsdate = get_latest_metrics_folder() filename = request.args.get('filename') if not filename: - filename = 'Dataverse Usage Report.xlsx' + filename = 'Borealis Usage Report.xlsx' file = os.path.join(archive_dir, metricsdate, filename) return send_from_directory(archive_dir, os.path.join(metricsdate, filename), as_attachment=True) @@ -54,7 +54,7 @@ def get_latest_metrics_folder(): end_date = datetime.date(_end_date.year, _end_date.month, calendar.monthrange(_end_date.year, _end_date.month)[1]).strftime( '%Y-%m-%d') - print('Generate Dataverse Usage Report for period: ' + start_date + ' to ' + end_date) + print('Generate Borealis Usage Report for period: ' + start_date + ' to ' + end_date) month_sub_dir = os.path.join(start_date + ' to ' + end_date) print('Subdirectory: ' + month_sub_dir) return month_sub_dir