From cbd278685bba9d313f9ab45b49954f64c3c26f1e Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Fri, 10 Mar 2023 12:21:30 +1300 Subject: [PATCH 1/7] MNT Update development dependencies --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index e3554cf..687f9df 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ ], "require": { "php": "^7.4 || ^8.0", - "silverstripe/cms": "^4.0" + "silverstripe/cms": "4.13.x-dev" }, "require-dev": { "phpunit/phpunit": "^9.5", @@ -42,4 +42,4 @@ }, "minimum-stability": "dev", "prefer-stable": true -} +} \ No newline at end of file From 7698371ebf5855214fd3ec48a3eeb98e408cc82f Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Fri, 10 Mar 2023 16:34:25 +1300 Subject: [PATCH 2/7] MNT Update release dependencies --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 687f9df..1b78ae6 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ ], "require": { "php": "^7.4 || ^8.0", - "silverstripe/cms": "4.13.x-dev" + "silverstripe/cms": "4.13.0-beta1" }, "require-dev": { "phpunit/phpunit": "^9.5", From 6ea69fabb28930416bc86e45b964d1155968f5c1 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Fri, 10 Mar 2023 16:34:29 +1300 Subject: [PATCH 3/7] MNT Update development dependencies --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 1b78ae6..687f9df 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ ], "require": { "php": "^7.4 || ^8.0", - "silverstripe/cms": "4.13.0-beta1" + "silverstripe/cms": "4.13.x-dev" }, "require-dev": { "phpunit/phpunit": "^9.5", From 8b273144907d6f6a5c5af10d1f7044461935344f Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Tue, 21 Mar 2023 12:25:06 +1300 Subject: [PATCH 4/7] MNT Use gha-dispatch-ci --- .github/workflows/ci.yml | 5 ----- .github/workflows/dispatch-ci.yml | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/dispatch-ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2704d44..bf02210 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,13 +4,8 @@ on: push: pull_request: workflow_dispatch: - # Every Wednesday at 2:00pm UTC - schedule: - - cron: '0 14 * * 3' jobs: ci: name: CI - # Only run cron on the silverstripe account - if: (github.event_name == 'schedule' && github.repository_owner == 'silverstripe') || (github.event_name != 'schedule') uses: silverstripe/gha-ci/.github/workflows/ci.yml@v1 diff --git a/.github/workflows/dispatch-ci.yml b/.github/workflows/dispatch-ci.yml new file mode 100644 index 0000000..ad58d2c --- /dev/null +++ b/.github/workflows/dispatch-ci.yml @@ -0,0 +1,16 @@ +name: Dispatch CI + +on: + # At 2:00 PM UTC, only on Wednesday and Thursday + schedule: + - cron: '0 14 * * 3,4' + +jobs: + dispatch-ci: + name: Dispatch CI + # Only run cron on the silverstripe account + if: (github.event_name == 'schedule' && github.repository_owner == 'silverstripe') || (github.event_name != 'schedule') + runs-on: ubuntu-latest + steps: + - name: Dispatch CI + uses: silverstripe/gha-dispatch-ci@v1 From 4d67a327fe146fa0d083c78b35553bc1af06576f Mon Sep 17 00:00:00 2001 From: Sabina Talipova Date: Fri, 24 Mar 2023 12:59:39 +1300 Subject: [PATCH 5/7] FIX Create button is disabled if server returns error --- client/javascript/BrokenExternalLinksReport.js | 1 + 1 file changed, 1 insertion(+) diff --git a/client/javascript/BrokenExternalLinksReport.js b/client/javascript/BrokenExternalLinksReport.js index 562c5db..de33077 100644 --- a/client/javascript/BrokenExternalLinksReport.js +++ b/client/javascript/BrokenExternalLinksReport.js @@ -129,6 +129,7 @@ if (typeof console !== 'undefined') { console.log(e); } + self.buttonReset(); } }); } From fe056b5e24fda21a2ccdc9e53aea47cabc522e86 Mon Sep 17 00:00:00 2001 From: Sabina Talipova Date: Fri, 24 Mar 2023 13:12:15 +1300 Subject: [PATCH 6/7] FIX ESLint warnings --- client/dist/js/BrokenExternalLinksReport.js | 2 +- client/src/js/BrokenExternalLinksReport.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/client/dist/js/BrokenExternalLinksReport.js b/client/dist/js/BrokenExternalLinksReport.js index 455a72e..f4144c5 100644 --- a/client/dist/js/BrokenExternalLinksReport.js +++ b/client/dist/js/BrokenExternalLinksReport.js @@ -1 +1 @@ -!function(){"use strict";var t={311:function(t){t.exports=jQuery}},e={};function n(o){var r=e[o];if(void 0!==r)return r.exports;var s=e[o]={exports:{}};return t[o](s,s.exports,n),s.exports}!function(){var t=n(311);t.entwine("ss",(t=>{t(".external-links-report__create-report").entwine({PollTimeout:null,ButtonIsLoading:!1,ReloadContent:!1,onclick(t){t.preventDefault(),this.buttonLoading(),this.start()},onmatch(){this.poll()},start(){const e=this;t(".external-links-report__report-progress").empty().text("Running report 0%"),t.ajax({url:"admin/externallinks/start",async:!0,timeout:3e3,success(){e.setReloadContent(!0),e.poll()},error(t){"undefined"!=typeof console&&console.error(t)}})},getButton(){return t(".external-links-report__create-report")},buttonLoading(){if(this.getButtonIsLoading())return;this.setButtonIsLoading(!0);const e=this.getButton();e.addClass("btn--loading loading"),e.attr("disabled",!0),e.is("button")&&(e.append(t('
')),e.css(`${e.outerWidth()}px`))},buttonReset(){this.setButtonIsLoading(!1);const t=this.getButton();t.removeClass("btn--loading loading"),t.attr("disabled",!1),t.find(".btn__loading-icon").remove(),t.css("width","auto")},poll(){const e=this;this.buttonLoading(),t.ajax({url:"admin/externallinks/getJobStatus",async:!0,success(n){if(!n)return void e.buttonReset();const o=n.Completed?n.Completed:0,r=n.Total?n.Total:0;if("Completed"===n.Status)return e.getReloadContent()&&(t(".cms-container").loadPanel(document.location.href,null,{},!0,!1),e.setReloadContent(!1)),t(".external-links-report__report-progress").text(`Report finished ${o}/${r}`),void e.buttonReset();if(o{t(".external-links-report__create-report").poll()}),1e3))},error(t){"undefined"!=typeof console&&(console.error(t),e.buttonReset())}})}})}))}()}(); \ No newline at end of file +!function(){"use strict";var t={311:function(t){t.exports=jQuery}},e={};function n(o){var r=e[o];if(void 0!==r)return r.exports;var s=e[o]={exports:{}};return t[o](s,s.exports,n),s.exports}!function(){var t=n(311);t.entwine("ss",(t=>{t(".external-links-report__create-report").entwine({PollTimeout:null,ButtonIsLoading:!1,ReloadContent:!1,onclick(t){t.preventDefault(),this.buttonLoading(),this.start()},onmatch(){this.poll()},start(){const e=this;t(".external-links-report__report-progress").empty().text("Running report 0%"),t.ajax({url:"admin/externallinks/start",async:!0,timeout:3e3,success(){e.setReloadContent(!0),e.poll()},error(t){"undefined"!=typeof console&&console.error(t)}})},getButton(){return t(".external-links-report__create-report")},buttonLoading(){if(this.getButtonIsLoading())return;this.setButtonIsLoading(!0);const e=this.getButton();e.addClass("btn--loading loading"),e.attr("disabled",!0),e.is("button")&&(e.append(t('
')),e.css(`${e.outerWidth()}px`))},buttonReset(){this.setButtonIsLoading(!1);const t=this.getButton();t.removeClass("btn--loading loading"),t.attr("disabled",!1),t.find(".btn__loading-icon").remove(),t.css("width","auto")},poll(){const e=this;this.buttonLoading(),t.ajax({url:"admin/externallinks/getJobStatus",async:!0,success(n){if(!n)return void e.buttonReset();const o=n.Completed?n.Completed:0,r=n.Total?n.Total:0;if("Completed"===n.Status)return e.getReloadContent()&&(t(".cms-container").loadPanel(document.location.href,null,{},!0,!1),e.setReloadContent(!1)),t(".external-links-report__report-progress").text(`Report finished ${o}/${r}`),void e.buttonReset();if(o{t(".external-links-report__create-report").poll()}),1e3))},error(t){"undefined"!=typeof console&&console.error(t),e.buttonReset()}})}})}))}()}(); \ No newline at end of file diff --git a/client/src/js/BrokenExternalLinksReport.js b/client/src/js/BrokenExternalLinksReport.js index 7692420..3396bff 100644 --- a/client/src/js/BrokenExternalLinksReport.js +++ b/client/src/js/BrokenExternalLinksReport.js @@ -36,6 +36,7 @@ }, error(e) { if (typeof console !== 'undefined') { + // eslint-disable-next-line no-console console.error(e); } } @@ -142,9 +143,10 @@ }, error(e) { if (typeof console !== 'undefined') { + // eslint-disable-next-line no-console console.error(e); - self.buttonReset(); } + self.buttonReset(); } }); } From 4f5309163b9ca679e62d125e47b6f6bc1832b5b6 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli <36352093+GuySartorelli@users.noreply.github.com> Date: Tue, 28 Mar 2023 17:08:50 +1300 Subject: [PATCH 7/7] MNT Revert erroneous dependency changes (#98) --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 687f9df..5e3f582 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ ], "require": { "php": "^7.4 || ^8.0", - "silverstripe/cms": "4.13.x-dev" + "silverstripe/cms": "^4.0" }, "require-dev": { "phpunit/phpunit": "^9.5",