diff options
author | diosmosis <diosmosis@users.noreply.github.com> | 2018-09-21 01:53:37 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-21 01:53:37 +0300 |
commit | 2d2abcc9576079a8496ad8bd4a038ba07cf1fb2b (patch) | |
tree | 511d4c06b004d8162fb3cd2480252c25caa13a63 /plugins/Ecommerce | |
parent | a7f5d6478cfcff4cb2b9a19b40f2b526da8f1eea (diff) |
Send email if no tracked data within N days. (#13363)
* Remember user who created a site.
* Send email if no tracked data within N days.
* Add test and get to pass.
* Fixes after manual tests of emails
* Bump version & change column name to creator_login.
* Email tweaks.
* Rename Site::getCreationUserFor
* Modify Site:: access methiod name
* Applying PR feedback.
* Move email HTML content generation logic to separate class in DI.
* tweak translations
* Apply PR review feedback.
* Couple more tweaks.
* Make tracking code check a one time task + and save timetable when removing inactive tasks.
* Update save call.
* Apply more PR feedback.
* small performance tweak and put the site name in quotes
* Fixing tests.
* Update expected file.
Diffstat (limited to 'plugins/Ecommerce')
3 files changed, 69 insertions, 66 deletions
diff --git a/plugins/Ecommerce/tests/System/expected/test_ecommerceOrderWithItems_scheduled_report_in_html_row_evolution_graph__ScheduledReports.generateReport_week.original.html b/plugins/Ecommerce/tests/System/expected/test_ecommerceOrderWithItems_scheduled_report_in_html_row_evolution_graph__ScheduledReports.generateReport_week.original.html index 4fb7a6af4a..7b4336740a 100644 --- a/plugins/Ecommerce/tests/System/expected/test_ecommerceOrderWithItems_scheduled_report_in_html_row_evolution_graph__ScheduledReports.generateReport_week.original.html +++ b/plugins/Ecommerce/tests/System/expected/test_ecommerceOrderWithItems_scheduled_report_in_html_row_evolution_graph__ScheduledReports.generateReport_week.original.html @@ -7,26 +7,27 @@ <meta name="generator" content="Matomo Analytics"> </head> -<body style="color:#0d0d0d;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Cantarell, 'Helvetica Neue', sans-serif; line-height: 24px; margin:0 auto; max-width:1000px; background-color:rgb(255, 255, 255);box-shadow: 0px 0px 5px 1px rgba(0,0,0,0.75);"> +<body style="color:#0d0d0d;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Cantarell, 'Helvetica Neue', sans-serif; line-height: 24px; margin:0 auto; max-width:1000px; background-color:rgb(255, 255, 255);box-shadow: 0px 0px 5px 1px rgba(0,0,0,0.75);"> - <a name="reportTop"></a> +<a name="reportTop"></a> - <table style="width:100%; background-color: #37474f; color: #fff; padding:10px 0; margin: 0 0 25px 0; height:64px;"> +<table style="width:100%; background-color: #37474f; color: #fff; padding:10px 0; margin: 0 0 25px 0; height:64px;"> <tr> - <td> - <a style="color:#0d0d0d;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Cantarell, 'Helvetica Neue', sans-serif;; font-size:16px;padding:0 15px;color: #fff;height: 22px;display: inline-block;vertical-align: inherit;" rel="noreferrer noopener" target="_blank" href="http://example.com/piwik/tests/PHPUnit/proxy/" style="lineheight:17px"> - <img src="http://example.com/piwik/tests/PHPUnit/proxy//plugins/Morpheus/images/logo-email.png" height="20px" width="auto" alt="Matomo, free/libre analytics platform" /> - </a> - </td> - <td align="right"> - <a style="color:#0d0d0d;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Cantarell, 'Helvetica Neue', sans-serif;; font-size:16px; padding:0 15px; color: #fff" title="View Web Analytics reports for Piwik test." target="_blank" href="http://example.com/piwik/tests/PHPUnit/proxy/index.php?module=CoreHome&action=index&idSite=1&period=day&date=today-date-removed-in-tests"> - Dashboard - </a> - </td> + <td> + <a style="color:#0d0d0d;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Cantarell, 'Helvetica Neue', sans-serif;; font-size:16px;padding:0 15px;color: #fff;height: 22px;display: inline-block;vertical-align: inherit;" rel="noreferrer noopener" target="_blank" href="http://example.com/piwik/tests/PHPUnit/proxy/" style="lineheight:17px"> + <img src="http://example.com/piwik/tests/PHPUnit/proxy//plugins/Morpheus/images/logo-email.png" height="20px" width="auto" alt="Matomo, free/libre analytics platform" /> + </a> + </td> + <td align="right"> + <a style="color:#0d0d0d;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Cantarell, 'Helvetica Neue', sans-serif;; font-size:16px; padding:0 15px; color: #fff" title="View Web Analytics reports for Piwik test." target="_blank" href="http://example.com/piwik/tests/PHPUnit/proxy/index.php?module=CoreHome&action=index&idSite=1&period=day&date=today-date-removed-in-tests"> + Dashboard + </a> + </td> </tr> - </table> +</table> + +<div style="margin:0 20px;"> - <div style="margin:0 20px;"> <h2 style='color:#0d0d0d;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Cantarell, 'Helvetica Neue', sans-serif; color:#37474f; line-height:30px; margin:25px 0 15px 0;'> Hello, </h2> @@ -56,14 +57,14 @@ Back to top ↑ </a></p> - <hr style=" border: 0; margin-top: 50px; height: 1px; background-image: linear-gradient(to right, rgba(231, 231, 231, 0), rgba(231, 231, 231, 1), rgba(2311, 2311, 231, 0));"> + <hr style=" border: 0; margin-top: 50px; height: 1px; background-image: linear-gradient(to right, rgba(231, 231, 231, 0), rgba(231, 231, 231, 1), rgba(2311, 2311, 231, 0));"> - <p style='font-size:15px;line-height:24px;margin:0 0 16px;color:#0d0d0d;font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Cantarell, "Helvetica Neue", sans-serif; text-align:center;font-size:13px; color:#666; padding:30px'> - Powered by - <a style="color:#439fe0; " href="https://matomo.org/" title="Matomo Analytics">Matomo Analytics</a> - <br /> - The leading open analytics platform that respects your privacy. - </p> + <p style='font-size:15px;line-height:24px;margin:0 0 16px;color:#0d0d0d;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Cantarell, 'Helvetica Neue', sans-serif;text-align:center;font-size:13px; color:#666; padding:30px'> + Powered by + <a style="color:#439fe0; " href="https://matomo.org/" title="Matomo Analytics">Matomo Analytics</a> + <br /> + The leading open analytics platform that respects your privacy. + </p> </div> </body> diff --git a/plugins/Ecommerce/tests/System/expected/test_ecommerceOrderWithItems_scheduled_report_in_html_tables_and_graph__ScheduledReports.generateReport_week.original.html b/plugins/Ecommerce/tests/System/expected/test_ecommerceOrderWithItems_scheduled_report_in_html_tables_and_graph__ScheduledReports.generateReport_week.original.html index b1fedf85f1..546f02fbd2 100644 --- a/plugins/Ecommerce/tests/System/expected/test_ecommerceOrderWithItems_scheduled_report_in_html_tables_and_graph__ScheduledReports.generateReport_week.original.html +++ b/plugins/Ecommerce/tests/System/expected/test_ecommerceOrderWithItems_scheduled_report_in_html_tables_and_graph__ScheduledReports.generateReport_week.original.html @@ -7,26 +7,27 @@ <meta name="generator" content="Matomo Analytics"> </head> -<body style="color:#0d0d0d;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Cantarell, 'Helvetica Neue', sans-serif; line-height: 24px; margin:0 auto; max-width:1000px; background-color:rgb(255, 255, 255);box-shadow: 0px 0px 5px 1px rgba(0,0,0,0.75);"> +<body style="color:#0d0d0d;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Cantarell, 'Helvetica Neue', sans-serif; line-height: 24px; margin:0 auto; max-width:1000px; background-color:rgb(255, 255, 255);box-shadow: 0px 0px 5px 1px rgba(0,0,0,0.75);"> - <a name="reportTop"></a> +<a name="reportTop"></a> - <table style="width:100%; background-color: #37474f; color: #fff; padding:10px 0; margin: 0 0 25px 0; height:64px;"> +<table style="width:100%; background-color: #37474f; color: #fff; padding:10px 0; margin: 0 0 25px 0; height:64px;"> <tr> - <td> - <a style="color:#0d0d0d;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Cantarell, 'Helvetica Neue', sans-serif;; font-size:16px;padding:0 15px;color: #fff;height: 22px;display: inline-block;vertical-align: inherit;" rel="noreferrer noopener" target="_blank" href="http://example.com/piwik/tests/PHPUnit/proxy/" style="lineheight:17px"> - <img src="http://example.com/piwik/tests/PHPUnit/proxy//plugins/Morpheus/images/logo-email.png" height="20px" width="auto" alt="Matomo, free/libre analytics platform" /> - </a> - </td> - <td align="right"> - <a style="color:#0d0d0d;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Cantarell, 'Helvetica Neue', sans-serif;; font-size:16px; padding:0 15px; color: #fff" title="View Web Analytics reports for Piwik test." target="_blank" href="http://example.com/piwik/tests/PHPUnit/proxy/index.php?module=CoreHome&action=index&idSite=1&period=day&date=today-date-removed-in-tests"> - Dashboard - </a> - </td> + <td> + <a style="color:#0d0d0d;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Cantarell, 'Helvetica Neue', sans-serif;; font-size:16px;padding:0 15px;color: #fff;height: 22px;display: inline-block;vertical-align: inherit;" rel="noreferrer noopener" target="_blank" href="http://example.com/piwik/tests/PHPUnit/proxy/" style="lineheight:17px"> + <img src="http://example.com/piwik/tests/PHPUnit/proxy//plugins/Morpheus/images/logo-email.png" height="20px" width="auto" alt="Matomo, free/libre analytics platform" /> + </a> + </td> + <td align="right"> + <a style="color:#0d0d0d;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Cantarell, 'Helvetica Neue', sans-serif;; font-size:16px; padding:0 15px; color: #fff" title="View Web Analytics reports for Piwik test." target="_blank" href="http://example.com/piwik/tests/PHPUnit/proxy/index.php?module=CoreHome&action=index&idSite=1&period=day&date=today-date-removed-in-tests"> + Dashboard + </a> + </td> </tr> - </table> +</table> + +<div style="margin:0 20px;"> - <div style="margin:0 20px;"> <h2 style='color:#0d0d0d;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Cantarell, 'Helvetica Neue', sans-serif; color:#37474f; line-height:30px; margin:25px 0 15px 0;'> Hello, </h2> @@ -7110,14 +7111,14 @@ There is no data for this report. - <hr style=" border: 0; margin-top: 50px; height: 1px; background-image: linear-gradient(to right, rgba(231, 231, 231, 0), rgba(231, 231, 231, 1), rgba(2311, 2311, 231, 0));"> + <hr style=" border: 0; margin-top: 50px; height: 1px; background-image: linear-gradient(to right, rgba(231, 231, 231, 0), rgba(231, 231, 231, 1), rgba(2311, 2311, 231, 0));"> - <p style='font-size:15px;line-height:24px;margin:0 0 16px;color:#0d0d0d;font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Cantarell, "Helvetica Neue", sans-serif; text-align:center;font-size:13px; color:#666; padding:30px'> - Powered by - <a style="color:#439fe0; " href="https://matomo.org/" title="Matomo Analytics">Matomo Analytics</a> - <br /> - The leading open analytics platform that respects your privacy. - </p> + <p style='font-size:15px;line-height:24px;margin:0 0 16px;color:#0d0d0d;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Cantarell, 'Helvetica Neue', sans-serif;text-align:center;font-size:13px; color:#666; padding:30px'> + Powered by + <a style="color:#439fe0; " href="https://matomo.org/" title="Matomo Analytics">Matomo Analytics</a> + <br /> + The leading open analytics platform that respects your privacy. + </p> </div> </body> diff --git a/plugins/Ecommerce/tests/System/expected/test_ecommerceOrderWithItems_scheduled_report_in_html_tables_only__ScheduledReports.generateReport_week.original.html b/plugins/Ecommerce/tests/System/expected/test_ecommerceOrderWithItems_scheduled_report_in_html_tables_only__ScheduledReports.generateReport_week.original.html index c36012bdfc..027b24bacb 100644 --- a/plugins/Ecommerce/tests/System/expected/test_ecommerceOrderWithItems_scheduled_report_in_html_tables_only__ScheduledReports.generateReport_week.original.html +++ b/plugins/Ecommerce/tests/System/expected/test_ecommerceOrderWithItems_scheduled_report_in_html_tables_only__ScheduledReports.generateReport_week.original.html @@ -7,26 +7,27 @@ <meta name="generator" content="Matomo Analytics"> </head> -<body style="color:#0d0d0d;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Cantarell, 'Helvetica Neue', sans-serif; line-height: 24px; margin:0 auto; max-width:1000px; background-color:rgb(255, 255, 255);box-shadow: 0px 0px 5px 1px rgba(0,0,0,0.75);"> +<body style="color:#0d0d0d;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Cantarell, 'Helvetica Neue', sans-serif; line-height: 24px; margin:0 auto; max-width:1000px; background-color:rgb(255, 255, 255);box-shadow: 0px 0px 5px 1px rgba(0,0,0,0.75);"> - <a name="reportTop"></a> +<a name="reportTop"></a> - <table style="width:100%; background-color: #37474f; color: #fff; padding:10px 0; margin: 0 0 25px 0; height:64px;"> +<table style="width:100%; background-color: #37474f; color: #fff; padding:10px 0; margin: 0 0 25px 0; height:64px;"> <tr> - <td> - <a style="color:#0d0d0d;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Cantarell, 'Helvetica Neue', sans-serif;; font-size:16px;padding:0 15px;color: #fff;height: 22px;display: inline-block;vertical-align: inherit;" rel="noreferrer noopener" target="_blank" href="http://example.com/piwik/tests/PHPUnit/proxy/" style="lineheight:17px"> - <img src="http://example.com/piwik/tests/PHPUnit/proxy//plugins/Morpheus/images/logo-email.png" height="20px" width="auto" alt="Matomo, free/libre analytics platform" /> - </a> - </td> - <td align="right"> - <a style="color:#0d0d0d;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Cantarell, 'Helvetica Neue', sans-serif;; font-size:16px; padding:0 15px; color: #fff" title="View Web Analytics reports for Piwik test." target="_blank" href="http://example.com/piwik/tests/PHPUnit/proxy/index.php?module=CoreHome&action=index&idSite=1&period=day&date=today-date-removed-in-tests"> - Dashboard - </a> - </td> + <td> + <a style="color:#0d0d0d;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Cantarell, 'Helvetica Neue', sans-serif;; font-size:16px;padding:0 15px;color: #fff;height: 22px;display: inline-block;vertical-align: inherit;" rel="noreferrer noopener" target="_blank" href="http://example.com/piwik/tests/PHPUnit/proxy/" style="lineheight:17px"> + <img src="http://example.com/piwik/tests/PHPUnit/proxy//plugins/Morpheus/images/logo-email.png" height="20px" width="auto" alt="Matomo, free/libre analytics platform" /> + </a> + </td> + <td align="right"> + <a style="color:#0d0d0d;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Cantarell, 'Helvetica Neue', sans-serif;; font-size:16px; padding:0 15px; color: #fff" title="View Web Analytics reports for Piwik test." target="_blank" href="http://example.com/piwik/tests/PHPUnit/proxy/index.php?module=CoreHome&action=index&idSite=1&period=day&date=today-date-removed-in-tests"> + Dashboard + </a> + </td> </tr> - </table> +</table> + +<div style="margin:0 20px;"> - <div style="margin:0 20px;"> <h2 style='color:#0d0d0d;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Cantarell, 'Helvetica Neue', sans-serif; color:#37474f; line-height:30px; margin:25px 0 15px 0;'> Hello, </h2> @@ -6746,14 +6747,14 @@ There is no data for this report. - <hr style=" border: 0; margin-top: 50px; height: 1px; background-image: linear-gradient(to right, rgba(231, 231, 231, 0), rgba(231, 231, 231, 1), rgba(2311, 2311, 231, 0));"> + <hr style=" border: 0; margin-top: 50px; height: 1px; background-image: linear-gradient(to right, rgba(231, 231, 231, 0), rgba(231, 231, 231, 1), rgba(2311, 2311, 231, 0));"> - <p style='font-size:15px;line-height:24px;margin:0 0 16px;color:#0d0d0d;font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Cantarell, "Helvetica Neue", sans-serif; text-align:center;font-size:13px; color:#666; padding:30px'> - Powered by - <a style="color:#439fe0; " href="https://matomo.org/" title="Matomo Analytics">Matomo Analytics</a> - <br /> - The leading open analytics platform that respects your privacy. - </p> + <p style='font-size:15px;line-height:24px;margin:0 0 16px;color:#0d0d0d;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Cantarell, 'Helvetica Neue', sans-serif;text-align:center;font-size:13px; color:#666; padding:30px'> + Powered by + <a style="color:#439fe0; " href="https://matomo.org/" title="Matomo Analytics">Matomo Analytics</a> + <br /> + The leading open analytics platform that respects your privacy. + </p> </div> </body> |