diff --git a/src/main/resources/reports/accounts_summary/v_report_accounts_summary.ddl b/src/main/resources/reports/accounts_summary/1-v_report_accounts_summary.ddl similarity index 100% rename from src/main/resources/reports/accounts_summary/v_report_accounts_summary.ddl rename to src/main/resources/reports/accounts_summary/1-v_report_accounts_summary.ddl diff --git a/src/main/resources/reports/accounts_summary/report_accounts_summary.ddl b/src/main/resources/reports/accounts_summary/2-report_accounts_summary.ddl similarity index 100% rename from src/main/resources/reports/accounts_summary/report_accounts_summary.ddl rename to src/main/resources/reports/accounts_summary/2-report_accounts_summary.ddl diff --git a/src/main/resources/reports/accounts_summary/report.json b/src/main/resources/reports/accounts_summary/report.json new file mode 100644 index 00000000..e803426b --- /dev/null +++ b/src/main/resources/reports/accounts_summary/report.json @@ -0,0 +1,8 @@ +{ + "refreshFrequency": "HOURLY", + "refreshProcedureName": "refresh_report_accounts_summary", + "reportName": "report_accounts_summary", + "reportPrettyName": "Accounts summary", + "reportType": "COUNTERS", + "sourceTableName": "report_accounts_summary" +} diff --git a/src/main/resources/reports/active_by_product_term_monthly/v_report_active_by_product_term_monthly.ddl b/src/main/resources/reports/active_by_product_term_monthly/1-v_report_active_by_product_term_monthly.ddl similarity index 100% rename from src/main/resources/reports/active_by_product_term_monthly/v_report_active_by_product_term_monthly.ddl rename to src/main/resources/reports/active_by_product_term_monthly/1-v_report_active_by_product_term_monthly.ddl diff --git a/src/main/resources/reports/active_by_product_term_monthly/report_active_by_product_term_monthly.ddl b/src/main/resources/reports/active_by_product_term_monthly/2-report_active_by_product_term_monthly.ddl similarity index 100% rename from src/main/resources/reports/active_by_product_term_monthly/report_active_by_product_term_monthly.ddl rename to src/main/resources/reports/active_by_product_term_monthly/2-report_active_by_product_term_monthly.ddl diff --git a/src/main/resources/reports/active_by_product_term_monthly/report.json b/src/main/resources/reports/active_by_product_term_monthly/report.json new file mode 100644 index 00000000..c3e4eee3 --- /dev/null +++ b/src/main/resources/reports/active_by_product_term_monthly/report.json @@ -0,0 +1,8 @@ +{ + "reportName": "report_active_by_product_term_monthly", + "reportType": "TIMELINE", + "reportPrettyName": "Monthly active subscriptions", + "sourceTableName": "report_active_by_product_term_monthly", + "refreshProcedureName": "refresh_report_active_by_product_term_monthly", + "refreshFrequency": "DAILY" +} diff --git a/src/main/resources/reports/cancellations_daily/v_report_cancellations_daily.ddl b/src/main/resources/reports/cancellations_daily/1-v_report_cancellations_daily.ddl similarity index 100% rename from src/main/resources/reports/cancellations_daily/v_report_cancellations_daily.ddl rename to src/main/resources/reports/cancellations_daily/1-v_report_cancellations_daily.ddl diff --git a/src/main/resources/reports/cancellations_daily/report_cancellations_daily.ddl b/src/main/resources/reports/cancellations_daily/2-report_cancellations_daily.ddl similarity index 100% rename from src/main/resources/reports/cancellations_daily/report_cancellations_daily.ddl rename to src/main/resources/reports/cancellations_daily/2-report_cancellations_daily.ddl diff --git a/src/main/resources/reports/cancellations_daily/report.json b/src/main/resources/reports/cancellations_daily/report.json new file mode 100644 index 00000000..9a8b2bf3 --- /dev/null +++ b/src/main/resources/reports/cancellations_daily/report.json @@ -0,0 +1,8 @@ +{ + "reportName": "report_cancellations_daily", + "reportType": "TIMELINE", + "reportPrettyName": "Daily cancellations", + "sourceTableName": "report_cancellations_daily", + "refreshProcedureName": "refresh_report_cancellations_daily", + "refreshFrequency": "DAILY" +} diff --git a/src/main/resources/reports/chargebacks_daily/v_report_chargebacks_daily.ddl b/src/main/resources/reports/chargebacks_daily/1-v_report_chargebacks_daily.ddl similarity index 100% rename from src/main/resources/reports/chargebacks_daily/v_report_chargebacks_daily.ddl rename to src/main/resources/reports/chargebacks_daily/1-v_report_chargebacks_daily.ddl diff --git a/src/main/resources/reports/chargebacks_daily/report_chargebacks_daily.ddl b/src/main/resources/reports/chargebacks_daily/2-report_chargebacks_daily.ddl similarity index 100% rename from src/main/resources/reports/chargebacks_daily/report_chargebacks_daily.ddl rename to src/main/resources/reports/chargebacks_daily/2-report_chargebacks_daily.ddl diff --git a/src/main/resources/reports/chargebacks_daily/report.json b/src/main/resources/reports/chargebacks_daily/report.json new file mode 100644 index 00000000..fa68c07b --- /dev/null +++ b/src/main/resources/reports/chargebacks_daily/report.json @@ -0,0 +1,8 @@ +{ + "reportName": "report_chargebacks_daily", + "reportType": "TIMELINE", + "reportPrettyName": "Daily chargebacks value", + "sourceTableName": "report_chargebacks_daily", + "refreshProcedureName": "refresh_report_chargebacks_daily", + "refreshFrequency": "DAILY" +} diff --git a/src/main/resources/reports/invoices_balance_daily/v_report_invoices_balance_daily.ddl b/src/main/resources/reports/invoices_balance_daily/1-v_report_invoices_balance_daily.ddl similarity index 100% rename from src/main/resources/reports/invoices_balance_daily/v_report_invoices_balance_daily.ddl rename to src/main/resources/reports/invoices_balance_daily/1-v_report_invoices_balance_daily.ddl diff --git a/src/main/resources/reports/invoices_balance_daily/report_invoices_balance_daily.ddl b/src/main/resources/reports/invoices_balance_daily/2-report_invoices_balance_daily.ddl similarity index 100% rename from src/main/resources/reports/invoices_balance_daily/report_invoices_balance_daily.ddl rename to src/main/resources/reports/invoices_balance_daily/2-report_invoices_balance_daily.ddl diff --git a/src/main/resources/reports/invoices_balance_daily/report.json b/src/main/resources/reports/invoices_balance_daily/report.json new file mode 100644 index 00000000..85936d1a --- /dev/null +++ b/src/main/resources/reports/invoices_balance_daily/report.json @@ -0,0 +1,8 @@ +{ + "reportName": "report_invoices_balance_daily", + "reportType": "TIMELINE", + "reportPrettyName": "Daily invoices balance", + "sourceTableName": "report_invoices_balance_daily", + "refreshProcedureName": "refresh_report_invoices_balance_daily", + "refreshFrequency": "DAILY" +} diff --git a/src/main/resources/reports/invoices_daily/v_report_invoices_daily.ddl b/src/main/resources/reports/invoices_daily/1-v_report_invoices_daily.ddl similarity index 100% rename from src/main/resources/reports/invoices_daily/v_report_invoices_daily.ddl rename to src/main/resources/reports/invoices_daily/1-v_report_invoices_daily.ddl diff --git a/src/main/resources/reports/invoices_daily/report_invoices_daily.ddl b/src/main/resources/reports/invoices_daily/2-report_invoices_daily.ddl similarity index 100% rename from src/main/resources/reports/invoices_daily/report_invoices_daily.ddl rename to src/main/resources/reports/invoices_daily/2-report_invoices_daily.ddl diff --git a/src/main/resources/reports/invoices_daily/report.json b/src/main/resources/reports/invoices_daily/report.json new file mode 100644 index 00000000..9085e23f --- /dev/null +++ b/src/main/resources/reports/invoices_daily/report.json @@ -0,0 +1,8 @@ +{ + "reportName": "report_invoices_daily", + "reportType": "TIMELINE", + "reportPrettyName": "Daily invoices value", + "sourceTableName": "report_invoices_daily", + "refreshProcedureName": "refresh_report_invoices_daily", + "refreshFrequency": "DAILY" +} diff --git a/src/main/resources/reports/mrr/v_report_mrr_daily.ddl b/src/main/resources/reports/mrr/1-v_report_mrr_daily.ddl similarity index 100% rename from src/main/resources/reports/mrr/v_report_mrr_daily.ddl rename to src/main/resources/reports/mrr/1-v_report_mrr_daily.ddl diff --git a/src/main/resources/reports/mrr/report_mrr_daily.ddl b/src/main/resources/reports/mrr/2-report_mrr_daily.ddl similarity index 100% rename from src/main/resources/reports/mrr/report_mrr_daily.ddl rename to src/main/resources/reports/mrr/2-report_mrr_daily.ddl diff --git a/src/main/resources/reports/mrr/report.json b/src/main/resources/reports/mrr/report.json new file mode 100644 index 00000000..e4655caa --- /dev/null +++ b/src/main/resources/reports/mrr/report.json @@ -0,0 +1,8 @@ +{ + "reportName": "report_mrr_daily", + "reportType": "TIMELINE", + "reportPrettyName": "Daily MRR", + "sourceTableName": "report_mrr_daily", + "refreshProcedureName": "refresh_report_mrr_daily", + "refreshFrequency": "DAILY" +} diff --git a/src/main/resources/reports/new_accounts_daily/v_report_new_accounts_daily.ddl b/src/main/resources/reports/new_accounts_daily/1-v_report_new_accounts_daily.ddl similarity index 100% rename from src/main/resources/reports/new_accounts_daily/v_report_new_accounts_daily.ddl rename to src/main/resources/reports/new_accounts_daily/1-v_report_new_accounts_daily.ddl diff --git a/src/main/resources/reports/new_accounts_daily/report_new_accounts_daily.ddl b/src/main/resources/reports/new_accounts_daily/2-report_new_accounts_daily.ddl similarity index 100% rename from src/main/resources/reports/new_accounts_daily/report_new_accounts_daily.ddl rename to src/main/resources/reports/new_accounts_daily/2-report_new_accounts_daily.ddl diff --git a/src/main/resources/reports/new_accounts_daily/report.json b/src/main/resources/reports/new_accounts_daily/report.json new file mode 100644 index 00000000..3875d110 --- /dev/null +++ b/src/main/resources/reports/new_accounts_daily/report.json @@ -0,0 +1,8 @@ +{ + "reportName": "report_new_accounts_daily", + "reportType": "TIMELINE", + "reportPrettyName": "Daily new accounts", + "sourceTableName": "report_new_accounts_daily", + "refreshProcedureName": "refresh_report_new_accounts_daily", + "refreshFrequency": "HOURLY" +} diff --git a/src/main/resources/reports/payment_provider_conversion/v_report_payment_provider_conversion_sub1.ddl b/src/main/resources/reports/payment_provider_conversion/1-v_report_payment_provider_conversion_sub1.ddl similarity index 100% rename from src/main/resources/reports/payment_provider_conversion/v_report_payment_provider_conversion_sub1.ddl rename to src/main/resources/reports/payment_provider_conversion/1-v_report_payment_provider_conversion_sub1.ddl diff --git a/src/main/resources/reports/payment_provider_conversion/v_report_payment_provider_conversion_sub2.ddl b/src/main/resources/reports/payment_provider_conversion/2-v_report_payment_provider_conversion_sub2.ddl similarity index 100% rename from src/main/resources/reports/payment_provider_conversion/v_report_payment_provider_conversion_sub2.ddl rename to src/main/resources/reports/payment_provider_conversion/2-v_report_payment_provider_conversion_sub2.ddl diff --git a/src/main/resources/reports/payment_provider_conversion/v_report_payment_provider_conversion.ddl b/src/main/resources/reports/payment_provider_conversion/3-v_report_payment_provider_conversion.ddl similarity index 100% rename from src/main/resources/reports/payment_provider_conversion/v_report_payment_provider_conversion.ddl rename to src/main/resources/reports/payment_provider_conversion/3-v_report_payment_provider_conversion.ddl diff --git a/src/main/resources/reports/payment_provider_conversion/refresh_report_payment_provider_conversion_history.ddl b/src/main/resources/reports/payment_provider_conversion/4-refresh_report_payment_provider_conversion_history.ddl similarity index 100% rename from src/main/resources/reports/payment_provider_conversion/refresh_report_payment_provider_conversion_history.ddl rename to src/main/resources/reports/payment_provider_conversion/4-refresh_report_payment_provider_conversion_history.ddl diff --git a/src/main/resources/reports/payment_provider_conversion/report.json b/src/main/resources/reports/payment_provider_conversion/report.json new file mode 100644 index 00000000..6bf54850 --- /dev/null +++ b/src/main/resources/reports/payment_provider_conversion/report.json @@ -0,0 +1,8 @@ +{ + "reportName": "report_payment_provider_conversion", + "reportType": "TABLE", + "reportPrettyName": "Payment Provider Conversion", + "sourceTableName": "report_payment_provider_conversion_history", + "refreshProcedureName": "refresh_report_payment_provider_conversion_history", + "refreshFrequency": "HOURLY" +} diff --git a/src/main/resources/reports/payment_provider_errors/v_report_payment_provider_errors_sub1.ddl b/src/main/resources/reports/payment_provider_errors/1-v_report_payment_provider_errors_sub1.ddl similarity index 100% rename from src/main/resources/reports/payment_provider_errors/v_report_payment_provider_errors_sub1.ddl rename to src/main/resources/reports/payment_provider_errors/1-v_report_payment_provider_errors_sub1.ddl diff --git a/src/main/resources/reports/payment_provider_errors/v_report_payment_provider_errors_sub2.ddl b/src/main/resources/reports/payment_provider_errors/2-v_report_payment_provider_errors_sub2.ddl similarity index 100% rename from src/main/resources/reports/payment_provider_errors/v_report_payment_provider_errors_sub2.ddl rename to src/main/resources/reports/payment_provider_errors/2-v_report_payment_provider_errors_sub2.ddl diff --git a/src/main/resources/reports/payment_provider_errors/v_report_payment_provider_errors.ddl b/src/main/resources/reports/payment_provider_errors/3-v_report_payment_provider_errors.ddl similarity index 100% rename from src/main/resources/reports/payment_provider_errors/v_report_payment_provider_errors.ddl rename to src/main/resources/reports/payment_provider_errors/3-v_report_payment_provider_errors.ddl diff --git a/src/main/resources/reports/payment_provider_errors/report_payment_provider_errors.ddl b/src/main/resources/reports/payment_provider_errors/4-report_payment_provider_errors.ddl similarity index 100% rename from src/main/resources/reports/payment_provider_errors/report_payment_provider_errors.ddl rename to src/main/resources/reports/payment_provider_errors/4-report_payment_provider_errors.ddl diff --git a/src/main/resources/reports/payment_provider_errors/report.json b/src/main/resources/reports/payment_provider_errors/report.json new file mode 100644 index 00000000..d06da5f2 --- /dev/null +++ b/src/main/resources/reports/payment_provider_errors/report.json @@ -0,0 +1,8 @@ +{ + "reportName": "report_payment_provider_errors", + "reportType": "TIMELINE", + "reportPrettyName": "Payment Provider Errors", + "sourceTableName": "report_payment_provider_errors", + "refreshProcedureName": "refresh_report_payment_provider_errors", + "refreshFrequency": "HOURLY" +} diff --git a/src/main/resources/reports/payment_provider_monitor/v_report_payment_provider_monitor_sub1.ddl b/src/main/resources/reports/payment_provider_monitor/1-v_report_payment_provider_monitor_sub1.ddl similarity index 100% rename from src/main/resources/reports/payment_provider_monitor/v_report_payment_provider_monitor_sub1.ddl rename to src/main/resources/reports/payment_provider_monitor/1-v_report_payment_provider_monitor_sub1.ddl diff --git a/src/main/resources/reports/payment_provider_monitor/v_report_payment_provider_monitor_sub2.ddl b/src/main/resources/reports/payment_provider_monitor/2-v_report_payment_provider_monitor_sub2.ddl similarity index 100% rename from src/main/resources/reports/payment_provider_monitor/v_report_payment_provider_monitor_sub2.ddl rename to src/main/resources/reports/payment_provider_monitor/2-v_report_payment_provider_monitor_sub2.ddl diff --git a/src/main/resources/reports/payment_provider_monitor/v_report_payment_provider_monitor_sub3.ddl b/src/main/resources/reports/payment_provider_monitor/3-v_report_payment_provider_monitor_sub3.ddl similarity index 100% rename from src/main/resources/reports/payment_provider_monitor/v_report_payment_provider_monitor_sub3.ddl rename to src/main/resources/reports/payment_provider_monitor/3-v_report_payment_provider_monitor_sub3.ddl diff --git a/src/main/resources/reports/payment_provider_monitor/v_report_payment_provider_monitor.ddl b/src/main/resources/reports/payment_provider_monitor/4-v_report_payment_provider_monitor.ddl similarity index 100% rename from src/main/resources/reports/payment_provider_monitor/v_report_payment_provider_monitor.ddl rename to src/main/resources/reports/payment_provider_monitor/4-v_report_payment_provider_monitor.ddl diff --git a/src/main/resources/reports/payment_provider_monitor/refresh_report_payment_provider_monitor_history.ddl b/src/main/resources/reports/payment_provider_monitor/5-refresh_report_payment_provider_monitor_history.ddl similarity index 100% rename from src/main/resources/reports/payment_provider_monitor/refresh_report_payment_provider_monitor_history.ddl rename to src/main/resources/reports/payment_provider_monitor/5-refresh_report_payment_provider_monitor_history.ddl diff --git a/src/main/resources/reports/payment_provider_monitor/report.json b/src/main/resources/reports/payment_provider_monitor/report.json new file mode 100644 index 00000000..45d1d0ab --- /dev/null +++ b/src/main/resources/reports/payment_provider_monitor/report.json @@ -0,0 +1,8 @@ +{ + "reportName": "report_payment_provider_monitor", + "reportType": "TABLE", + "reportPrettyName": "Payment Provider Monitor", + "sourceTableName": "report_payment_provider_monitor_history", + "refreshProcedureName": "refresh_report_payment_provider_monitor_history", + "refreshFrequency": "DAILY" +} diff --git a/src/main/resources/reports/payments_by_provider/v_report_payments_by_provider_sub1.ddl b/src/main/resources/reports/payments_by_provider/1-v_report_payments_by_provider_sub1.ddl similarity index 100% rename from src/main/resources/reports/payments_by_provider/v_report_payments_by_provider_sub1.ddl rename to src/main/resources/reports/payments_by_provider/1-v_report_payments_by_provider_sub1.ddl diff --git a/src/main/resources/reports/payments_by_provider/v_report_payments_by_provider_sub2.ddl b/src/main/resources/reports/payments_by_provider/2-v_report_payments_by_provider_sub2.ddl similarity index 100% rename from src/main/resources/reports/payments_by_provider/v_report_payments_by_provider_sub2.ddl rename to src/main/resources/reports/payments_by_provider/2-v_report_payments_by_provider_sub2.ddl diff --git a/src/main/resources/reports/payments_by_provider/v_report_payments_by_provider_sub3.ddl b/src/main/resources/reports/payments_by_provider/3-v_report_payments_by_provider_sub3.ddl similarity index 100% rename from src/main/resources/reports/payments_by_provider/v_report_payments_by_provider_sub3.ddl rename to src/main/resources/reports/payments_by_provider/3-v_report_payments_by_provider_sub3.ddl diff --git a/src/main/resources/reports/payments_by_provider/v_report_payments_by_provider.ddl b/src/main/resources/reports/payments_by_provider/4-v_report_payments_by_provider.ddl similarity index 100% rename from src/main/resources/reports/payments_by_provider/v_report_payments_by_provider.ddl rename to src/main/resources/reports/payments_by_provider/4-v_report_payments_by_provider.ddl diff --git a/src/main/resources/reports/payments_by_provider/v_report_payments_by_provider_last_24h_summary.ddl b/src/main/resources/reports/payments_by_provider/5-v_report_payments_by_provider_last_24h_summary.ddl similarity index 100% rename from src/main/resources/reports/payments_by_provider/v_report_payments_by_provider_last_24h_summary.ddl rename to src/main/resources/reports/payments_by_provider/5-v_report_payments_by_provider_last_24h_summary.ddl diff --git a/src/main/resources/reports/payments_by_provider/refresh_report_payments_by_provider_history.ddl b/src/main/resources/reports/payments_by_provider/6-refresh_report_payments_by_provider_history.ddl similarity index 100% rename from src/main/resources/reports/payments_by_provider/refresh_report_payments_by_provider_history.ddl rename to src/main/resources/reports/payments_by_provider/6-refresh_report_payments_by_provider_history.ddl diff --git a/src/main/resources/reports/payments_by_provider/refresh_report_payments_by_provider_last_24h_summary.ddl b/src/main/resources/reports/payments_by_provider/7-refresh_report_payments_by_provider_last_24h_summary.ddl similarity index 100% rename from src/main/resources/reports/payments_by_provider/refresh_report_payments_by_provider_last_24h_summary.ddl rename to src/main/resources/reports/payments_by_provider/7-refresh_report_payments_by_provider_last_24h_summary.ddl diff --git a/src/main/resources/reports/payments_by_provider/report_1.json b/src/main/resources/reports/payments_by_provider/report_1.json new file mode 100644 index 00000000..c7d9b884 --- /dev/null +++ b/src/main/resources/reports/payments_by_provider/report_1.json @@ -0,0 +1,8 @@ +{ + "reportName": "report_payments_by_provider", + "reportType": "TABLE", + "reportPrettyName": "Payments By Provider", + "sourceTableName": "report_payments_by_provider_history", + "refreshProcedureName": "refresh_report_payments_by_provider_history", + "refreshFrequency": "HOURLY" +} diff --git a/src/main/resources/reports/payments_by_provider/report_2.json b/src/main/resources/reports/payments_by_provider/report_2.json new file mode 100644 index 00000000..29112c55 --- /dev/null +++ b/src/main/resources/reports/payments_by_provider/report_2.json @@ -0,0 +1,8 @@ +{ + "reportName": "report_payments_by_provider_last_24h_summary", + "reportType": "COUNTERS", + "reportPrettyName": "Payments By Provider Summary (last 24hrs)", + "sourceTableName": "report_payments_by_provider_last_24h_summary", + "refreshProcedureName": "refresh_report_payments_by_provider_last_24h_summary", + "refreshFrequency": "DAILY" +} diff --git a/src/main/resources/reports/payments_total_daily/v_report_payments_total_daily_sub1.ddl b/src/main/resources/reports/payments_total_daily/1-v_report_payments_total_daily_sub1.ddl similarity index 100% rename from src/main/resources/reports/payments_total_daily/v_report_payments_total_daily_sub1.ddl rename to src/main/resources/reports/payments_total_daily/1-v_report_payments_total_daily_sub1.ddl diff --git a/src/main/resources/reports/payments_total_daily/v_report_payments_total_daily.ddl b/src/main/resources/reports/payments_total_daily/2-v_report_payments_total_daily.ddl similarity index 100% rename from src/main/resources/reports/payments_total_daily/v_report_payments_total_daily.ddl rename to src/main/resources/reports/payments_total_daily/2-v_report_payments_total_daily.ddl diff --git a/src/main/resources/reports/payments_total_daily/report_payments_total_daily.ddl b/src/main/resources/reports/payments_total_daily/3-report_payments_total_daily.ddl similarity index 100% rename from src/main/resources/reports/payments_total_daily/report_payments_total_daily.ddl rename to src/main/resources/reports/payments_total_daily/3-report_payments_total_daily.ddl diff --git a/src/main/resources/reports/payments_total_daily/report.json b/src/main/resources/reports/payments_total_daily/report.json new file mode 100644 index 00000000..f1a0c7be --- /dev/null +++ b/src/main/resources/reports/payments_total_daily/report.json @@ -0,0 +1,8 @@ +{ + "reportName": "report_payments_total_daily", + "reportType": "TIMELINE", + "reportPrettyName": "Daily payments value", + "sourceTableName": "report_payments_total_daily", + "refreshProcedureName": "refresh_report_payments_total_daily", + "refreshFrequency": "HOURLY" +} diff --git a/src/main/resources/reports/refunds_total_daily/v_report_refunds_total_daily.ddl b/src/main/resources/reports/refunds_total_daily/1-v_report_refunds_total_daily.ddl similarity index 100% rename from src/main/resources/reports/refunds_total_daily/v_report_refunds_total_daily.ddl rename to src/main/resources/reports/refunds_total_daily/1-v_report_refunds_total_daily.ddl diff --git a/src/main/resources/reports/refunds_total_daily/report_refunds_total_daily.ddl b/src/main/resources/reports/refunds_total_daily/2-report_refunds_total_daily.ddl similarity index 100% rename from src/main/resources/reports/refunds_total_daily/report_refunds_total_daily.ddl rename to src/main/resources/reports/refunds_total_daily/2-report_refunds_total_daily.ddl diff --git a/src/main/resources/reports/refunds_total_daily/report.json b/src/main/resources/reports/refunds_total_daily/report.json new file mode 100644 index 00000000..c8b4c76b --- /dev/null +++ b/src/main/resources/reports/refunds_total_daily/report.json @@ -0,0 +1,8 @@ +{ + "reportName": "report_refunds_total_daily", + "reportType": "TIMELINE", + "reportPrettyName": "Daily refunds value", + "sourceTableName": "report_refunds_total_daily", + "refreshProcedureName": "refresh_report_refunds_total_daily", + "refreshFrequency": "HOURLY" +} diff --git a/src/main/resources/seed_reports.sh b/src/main/resources/seed_reports.sh index 947fc8ff..21704445 100644 --- a/src/main/resources/seed_reports.sh +++ b/src/main/resources/seed_reports.sh @@ -41,6 +41,7 @@ SYSTEM=$HERE/system function install_ddl() { local ddl=$1 + echo "Executing $ddl..." mysql -h$MYSQL_HOST -u$MYSQL_USER -p$MYSQL_PASSWORD $MYSQL_DATABASE -e "source $ddl" } @@ -50,8 +51,8 @@ function create_report() { local report_type=$3 local source_table_name=$4 - curl -v \ - -X POST \ + echo "Creating report $report_name (\"$report_pretty_name\")..." + curl \ -u $KILLBILL_USER:$KILLBILL_PASSWORD \ -H "X-Killbill-ApiKey:$KILLBILL_API_KEY" \ -H "X-Killbill-ApiSecret:$KILLBILL_API_SECRET" \ @@ -65,30 +66,20 @@ function create_report() { # Install the DDL - the calendar table needs to be first install_ddl $REPORTS/calendar.sql -for r in `find $REPORTS -type f -name '*.sql' -o -name '*.ddl' -maxdepth 1`; do install_ddl $r; done -for r in `find $SYSTEM -type f -name '*.sql' -o -name '*.ddl' -maxdepth 1`; do install_ddl $r; done +for r in `find $REPORTS -maxdepth 1 -type f -name '*.sql' -o -name '*.ddl' | sed /calendar\.sql/d`; do install_ddl $r; done +for r in `find $SYSTEM -maxdepth 1 -type f -name '*.sql' -o -name '*.ddl'`; do install_ddl $r; done # Dashboard views -create_report 'accounts_summary' 'Account summary' 'COUNTERS' 'v_report_accounts_summary' -create_report 'active_by_product_term_monthly' 'Active subscriptions' 'TIMELINE' 'v_report_active_by_product_term_monthly' -create_report 'cancellations_count_daily' 'Cancellations' 'TIMELINE' 'v_report_cancellations_daily' -create_report 'chargebacks_daily' 'Chargebacks' 'TIMELINE' 'v_report_chargebacks_daily' create_report 'conversions_daily' 'Conversions' 'TIMELINE' 'v_report_conversions_daily' create_report 'invoice_adjustments_daily' 'Invoice adjustments' 'TIMELINE' 'v_report_invoice_adjustments_daily' create_report 'invoice_item_adjustments_daily' 'Invoice item adjustments' 'TIMELINE' 'v_report_invoice_item_adjustments_daily' create_report 'invoice_item_credits_daily' 'Invoice credits' 'TIMELINE' 'v_report_invoice_item_credits_daily' -create_report 'invoices_balance_daily' 'Invoice balance' 'TIMELINE' 'v_report_invoices_balance_daily' -create_report 'invoices_daily' 'Invoices' 'TIMELINE' 'v_report_invoices_daily' -create_report 'mrr_daily' 'MRR' 'TIMELINE' 'v_report_mrr_daily' -create_report 'new_accounts_daily' 'New accounts' 'TIMELINE' 'v_report_new_accounts_daily' create_report 'overdue_states_count_daily' 'Overdue states' 'TIMELINE' 'v_report_overdue_states_count_daily' -create_report 'payments_total_daily' 'Payment ($ amount)' 'TIMELINE' 'v_report_payments_total_daily' -create_report 'refunds_total_daily' 'Refunds' 'TIMELINE' 'v_report_refunds_total_daily' create_report 'trial_starts_count_daily' 'Trials' 'TIMELINE' 'v_report_trial_starts_count_daily' # System views -create_report 'system_report_control_tag_no_test' 'Control tags' 'COUNTERS' 'v_system_report_control_tag_no_test' -create_report 'system_report_notifications_per_queue_name' 'Notification queues' 'TIMELINE' 'v_system_report_notifications_per_queue_name' -create_report 'system_report_notifications_per_queue_name_late' 'Late notifications' 'COUNTERS' 'v_system_report_notifications_per_queue_name_late' -create_report 'system_report_payments' 'Payments status' 'COUNTERS' 'v_system_report_payments' -create_report 'system_report_payments_per_day' 'Payments' 'TIMELINE' 'v_system_report_payments_per_day' +create_report 'system_report_control_tag_no_test' 'System - Control tags' 'COUNTERS' 'v_system_report_control_tag_no_test' +create_report 'system_report_notifications_per_queue_name' 'System - Notification queues' 'TIMELINE' 'v_system_report_notifications_per_queue_name' +create_report 'system_report_notifications_per_queue_name_late' 'System - Late notifications' 'COUNTERS' 'v_system_report_notifications_per_queue_name_late' +create_report 'system_report_payments' 'System - Payments status' 'COUNTERS' 'v_system_report_payments' +create_report 'system_report_payments_per_day' 'System - Payments' 'TIMELINE' 'v_system_report_payments_per_day' diff --git a/src/main/resources/seed_scheduled_reports.sh b/src/main/resources/seed_scheduled_reports.sh new file mode 100644 index 00000000..be1f8c76 --- /dev/null +++ b/src/main/resources/seed_scheduled_reports.sh @@ -0,0 +1,42 @@ +#!/usr/bin/env bash + +KILLBILL_HTTP_PROTOCOL=${KILLBILL_HTTP_PROTOCOL-"http"} +KILLBILL_HOST=${KILLBILL_HOST-"127.0.0.1"} +KILLBILL_PORT=${KILLBILL_PORT-"8080"} + +KILLBILL_USER=${KILLBILL_USER-"admin"} +KILLBILL_PASSWORD=${KILLBILL_PASSWORD-"password"} +KILLBILL_API_KEY=${KILLBILL_API_KEY-"bob"} +KILLBILL_API_SECRET=${KILLBILL_API_SECRET-"lazar"} + +MYSQL_HOST=${MYSQL_HOST-"127.0.0.1"} +MYSQL_USER=${MYSQL_USER-"root"} +MYSQL_PASSWORD=${MYSQL_PASSWORD-"root"} +MYSQL_DATABASE=${MYSQL_DATABASE-"killbill"} + +function install_ddl() { + local ddl=$1 + echo "Executing $ddl..." + mysql -h$MYSQL_HOST -u$MYSQL_USER -p$MYSQL_PASSWORD $MYSQL_DATABASE -e "source $ddl" +} + +function create_report() { + local report=$1 + for r in `find $report -maxdepth 1 -type f -name '*.json' | sort`; do + echo "Creating report $r..." + curl \ + -u $KILLBILL_USER:$KILLBILL_PASSWORD \ + -H "X-Killbill-ApiKey:$KILLBILL_API_KEY" \ + -H "X-Killbill-ApiSecret:$KILLBILL_API_SECRET" \ + -H 'Content-Type: application/json' \ + -d @${r} \ + $KILLBILL_HTTP_PROTOCOL://$KILLBILL_HOST:$KILLBILL_PORT/plugins/killbill-analytics/reports + done +} + +# Install the DDL and creates the reports contained in folders passed as script parameters +for p in ${@}; do + echo -e "\n***** Processing folder ${p}" + for r in `find $p -maxdepth 1 -type f -name '*.sql' -o -name '*.ddl' -o -name '*.prc' | sort`; do install_ddl $r; done + create_report $p +done