Added Sentry logging for unsaved changes modal in admin (#20408)
ref https://linear.app/tryghost/issue/ONC-94 - adds Sentry logging for the unsaved changes modal in Admin (tags, members, collections) This will let us monitor for spikes in rates so we know if a change to Ghost has caused faulty logic in detecting dirty models.
This commit is contained in:
parent
dbd4aa61d0
commit
783984d4d3
@ -1,3 +1,4 @@
|
||||
import * as Sentry from '@sentry/ember';
|
||||
import AuthenticatedRoute from 'ghost-admin/routes/authenticated';
|
||||
import ConfirmUnsavedChangesModal from '../components/modals/confirm-unsaved-changes';
|
||||
import {action} from '@ember/object';
|
||||
@ -77,6 +78,7 @@ export default class CollectionRoute extends AuthenticatedRoute {
|
||||
|
||||
async confirmUnsavedChanges() {
|
||||
if (this.controller.model?.hasDirtyAttributes) {
|
||||
Sentry.captureMessage('showing unsaved changes modal for collections route');
|
||||
this.confirmModal = this.modals
|
||||
.open(ConfirmUnsavedChangesModal)
|
||||
.finally(() => {
|
||||
|
@ -1,3 +1,4 @@
|
||||
import * as Sentry from '@sentry/ember';
|
||||
import AdminRoute from 'ghost-admin/routes/admin';
|
||||
import ConfirmUnsavedChangesModal from '../components/modals/confirm-unsaved-changes';
|
||||
import {action} from '@ember/object';
|
||||
@ -96,6 +97,7 @@ export default class MembersRoute extends AdminRoute {
|
||||
}
|
||||
|
||||
async confirmUnsavedChanges() {
|
||||
Sentry.captureMessage('showing unsaved changes modal for members route');
|
||||
this.confirmModal = this.modals
|
||||
.open(ConfirmUnsavedChangesModal)
|
||||
.finally(() => {
|
||||
|
@ -1,3 +1,4 @@
|
||||
import * as Sentry from '@sentry/ember';
|
||||
import AuthenticatedRoute from 'ghost-admin/routes/authenticated';
|
||||
import ConfirmUnsavedChangesModal from '../components/modals/confirm-unsaved-changes';
|
||||
import {action} from '@ember/object';
|
||||
@ -77,6 +78,7 @@ export default class TagRoute extends AuthenticatedRoute {
|
||||
|
||||
async confirmUnsavedChanges() {
|
||||
if (this.controller.model?.hasDirtyAttributes) {
|
||||
Sentry.captureMessage('showing unsaved changes modal for tags route');
|
||||
this.confirmModal = this.modals
|
||||
.open(ConfirmUnsavedChangesModal)
|
||||
.finally(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user