diff --git a/.env.example b/.env.example index f4322416c..cd8f05d49 100644 --- a/.env.example +++ b/.env.example @@ -6,7 +6,6 @@ FABRICA_URL=https://doi.stage.datacite.org EVENTDATA_URL=https://api.stage.datacite.org SEARCH_URL=https://search.stage.datacite.org CDN_URL=https://assets.stage.datacite.org -ANALYTICS_URL=https://analytics.stage.datacite.org JWT_PUBLIC_KEY=-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA22lpr1ntJQYKa+aCRjre\nPKTze/00S0SCdsWKhvk3honfjdebuxc54YdvfqKQk/1jLOPJj++vqIGwytKRI9uC\n1BmMRLrOluACiOgTc5DpzMm68lZss5D5g7tzjxB7NlFiKiYav1BtVDfvVxwuNqkY\njyNupf1Gjqp2/8wbsZ6SGIkzgovgjcHI5S8HZ7DE7rcrStISNJqTvpuMUXp++eie\nPkTgcrdZScKjO6VYu9epuhoyD2mbZdjAUbxYyjQ3vgftseLo4hXFEXpfIQzwxOLS\njmg1S/qxOzZHOMrp31pS1ricMtd4frvXztHPfh5XuyiOEozR0An9OIIwzKQsn+0q\np5QKfN+lHJflYGZ1TD8QruinWf8a5uWYd3q9c1V8RYgwgmfoxgHX5TmMbcQsBTuB\nyIy3io3rBiRnJEAgSu4PxNuQqVqqsaJ4cCmQrATLViZmXhZcbHJyWl3GJnZMpv8P\nor6m239QGZdoy5ijoOdVLQowtnsr+SWWrcYKF4J66223xjGBse7o3Q+gJUkyQKtB\nLifDld9XMTpgvEsZtZKEQ9S5gAWkiAzcjSMV0J4XMOzvHAalyNTucLc6ljG8HnjO\n34SrkvkkTlUwNsJOygRNJQujfQaStvb3MTagSqPteGhy9qSitSJPrDmN/W79stIe\nSvqHoJznDJsFfKUcypEG4l0CAwEAAQ==\n-----END PUBLIC KEY-----\n SENTRY_DSN=https://63201db022924202b697e03bc5e0d0ba@sentry.io/1420435 TRACKING_ID=UA-22806196-13 diff --git a/app/abilities/repository.js b/app/abilities/repository.js index b365f967d..4a23a6090 100644 --- a/app/abilities/repository.js +++ b/app/abilities/repository.js @@ -143,13 +143,5 @@ export default Ability.extend({ default: return false; } - }), - canSetAnalyticsUrl: computed('currentUser.role_id', function () { - switch (this.get('currentUser.role_id')) { - case 'staff_admin': - return true; - default: - return false; - } }) }); diff --git a/app/models/repository.js b/app/models/repository.js index 67e68f22c..a35ff5869 100644 --- a/app/models/repository.js +++ b/app/models/repository.js @@ -155,7 +155,6 @@ export default Model.extend(Validations, { keepPassword: attr('boolean', { defaultValue: true }), created: attr('date'), updated: attr('date'), - analyticsDashboardUrl: attr('string'), targetId: attr(), mode: attr('string'), @@ -175,19 +174,5 @@ export default Model.extend(Validations, { } else { return null; } - }), - analyticsDashboardUrlCmp: computed('analyticsDashboardUrl', function () { - const theme = '&embed=true&theme=light'; - var ret = ''; - - if (!isEmpty(this.analyticsDashboardUrl)) { - ret = this.analyticsDashboardUrl + theme; - } else if (!isEmpty(ENV.ANALYTICS_DASHBOARD_URL)) { - ret = ENV.ANALYTICS_DASHBOARD_URL + theme; - } else { - ret = ''; - } - - return ret; }) }); diff --git a/app/router.js b/app/router.js index ef9530e51..fde8e9e9f 100644 --- a/app/router.js +++ b/app/router.js @@ -44,7 +44,6 @@ Router.map(function () { this.route('new'); this.route('upload'); }); - this.route('analytics'); this.route('transfer'); this.route('prefixes', function () { this.route('show', { path: '/:prefix_id' }, function () { diff --git a/app/templates/components/analytics.hbs b/app/templates/components/analytics.hbs deleted file mode 100644 index aab707184..000000000 --- a/app/templates/components/analytics.hbs +++ /dev/null @@ -1,14 +0,0 @@ -{{#if @model.analyticsDashboardUrlCmp}} - <div class="content"> - <iframe plausible-embed src="{{@model.analyticsDashboardUrlCmp}}" scrolling="yes" frameborder="0" loading="lazy" - style="width: 1px; min-width: 100%; height: 1600px;"></iframe> - <div style="font-size: 14px; padding-bottom: 14px;">Stats powered by <a target="_blank" rel="noopener" style="color: #4F46E5; text-decoration: underline;" href="https://plausible.io">Plausible Analytics</a></div> - <script async src="{{analytics-dashboard-script-url}}"></script> - </div> -{{else}} - <div class="col-md-12"> - <BsAlert @dismissible={{false}} @type="warning"> - No analytics found for this repository. - </BsAlert> - </div> -{{/if}} diff --git a/app/templates/providers/show/repositories/new.hbs b/app/templates/providers/show/repositories/new.hbs index 1584a5ab1..cc44f9daa 100644 --- a/app/templates/providers/show/repositories/new.hbs +++ b/app/templates/providers/show/repositories/new.hbs @@ -111,10 +111,6 @@ </div> {{/if}} - {{#if (can "setAnalyticsUrl repository" model)}} - <form.element @controlType="text" @id="analytics-dashboard-url" @label="Analytics Dashboard URL" @property="analyticsDashboardUrl" @helpText="The Analytics Dashboard URL is the shared link generated within the analytics app settings for this repository. It should only be set if analytics has been turned on for a repository." /> - {{/if}} - <form.element @controlType="checkbox" @id="is-active" @label="Account is active" @property="isActive" @helpText="This account can register and update DOIs" /> <div class="col-md-offset-3"> diff --git a/app/templates/repositories/show.hbs b/app/templates/repositories/show.hbs index 2700602c4..9cb7779e5 100644 --- a/app/templates/repositories/show.hbs +++ b/app/templates/repositories/show.hbs @@ -86,18 +86,6 @@ Info </nav.link-to> </nav.item> - {{#if model.analyticsDashboardUrlCmp}} - <nav.item> - <nav.link-to - @route="repositories.show.analytics" - model="model.id" - class="nav-link" - @query={{hash assignedPrefix=null}} - > - Usage Dashboard - </nav.link-to> - </nav.item> - {{/if}} <nav.item> <nav.link-to @route="repositories.show.settings" diff --git a/app/templates/repositories/show/analytics.hbs b/app/templates/repositories/show/analytics.hbs deleted file mode 100644 index 531e4abcb..000000000 --- a/app/templates/repositories/show/analytics.hbs +++ /dev/null @@ -1 +0,0 @@ -<Analytics @model={{model}} /> diff --git a/app/templates/repositories/show/edit.hbs b/app/templates/repositories/show/edit.hbs index 77150e079..092d059c8 100644 --- a/app/templates/repositories/show/edit.hbs +++ b/app/templates/repositories/show/edit.hbs @@ -111,10 +111,6 @@ </div> {{/if}} - {{#if (can "setAnalyticsUrl repository" model)}} - <form.element @controlType="text" @id="analytics-dashboard-url" @label="Analytics Dashboard URL" @property="analyticsDashboardUrl" @helpText="The Analytics Dashboard URL is the shared link generated within the analytics app settings for this repository. It should only be set if analytics has been turned on for a repository." /> - {{/if}} - {{#if (can "create repository" model)}} <form.element @controlType="checkbox" @id="is-active" @label="Account is active" @property="isActive" @helpText="This account can register and update DOIs" /> {{/if}} diff --git a/config/environment.js b/config/environment.js index 8a374cf8b..187ff2dc3 100644 --- a/config/environment.js +++ b/config/environment.js @@ -83,8 +83,6 @@ module.exports = function (environment) { EVENTDATA_URL: process.env.EVENTDATA_URL || 'https://api.stage.datacite.org', CDN_URL: process.env.CDN_URL || 'https://www.stage.datacite.org', - ANALYTICS_URL: process.env.ANALYTICS_URL || 'https://analytics.stage.datacite.org', - ANALYTICS_DASHBOARD_URL: process.env.ANALYTICS_DASHBOARD_URL || '', JWT_PUBLIC_KEY: process.env.JWT_PUBLIC_KEY ||