Skip to content

Commit

Permalink
Remove analytics dashboard
Browse files Browse the repository at this point in the history
This was originally used to show plausible external dashboard, this has been removed.
  • Loading branch information
richardhallett committed Jan 24, 2023
1 parent 56233e6 commit 08f4ef4
Show file tree
Hide file tree
Showing 10 changed files with 0 additions and 61 deletions.
1 change: 0 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -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://[email protected]/1420435
TRACKING_ID=UA-22806196-13
Expand Down
8 changes: 0 additions & 8 deletions app/abilities/repository.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
})
});
15 changes: 0 additions & 15 deletions app/models/repository.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,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'),

Expand All @@ -154,19 +153,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;
})
});
1 change: 0 additions & 1 deletion app/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down
14 changes: 0 additions & 14 deletions app/templates/components/analytics.hbs

This file was deleted.

4 changes: 0 additions & 4 deletions app/templates/providers/show/repositories/new.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
11 changes: 0 additions & 11 deletions app/templates/repositories/show.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,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"
>
Usage Dashboard
</nav.link-to>
</nav.item>
{{/if}}
<nav.item>
<nav.link-to
@route="repositories.show.index"
Expand Down
1 change: 0 additions & 1 deletion app/templates/repositories/show/analytics.hbs

This file was deleted.

4 changes: 0 additions & 4 deletions app/templates/repositories/show/edit.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down
2 changes: 0 additions & 2 deletions config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,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 ||
Expand Down

0 comments on commit 08f4ef4

Please sign in to comment.