satellite/analytics: Track Project Details Updates (#5451)
This commit is contained in:
parent
b5d0021fb6
commit
6e9567cb25
@ -75,6 +75,10 @@ const (
|
||||
eventProjectMemberAdded = "Project Member Added"
|
||||
eventProjectMemberDeleted = "Project Member Deleted"
|
||||
eventError = "UI error occurred"
|
||||
eventProjectNameUpdated = "Project Name Updated"
|
||||
eventProjectDescriptionUpdated = "Project Description Updated"
|
||||
eventProjectStorageLimitUpdated = "Project Storage Limit Updated"
|
||||
eventProjectBandwidthLimitUpdated = "Project Bandwidth Limit Updated"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -124,7 +128,8 @@ func NewService(log *zap.Logger, config Config, satelliteName string) *Service {
|
||||
eventCopyToClipboardClicked, eventCreateAccessGrantClicked, eventCreateS3CredentialsClicked, eventKeysForCLIClicked,
|
||||
eventSeePaymentsClicked, eventEditPaymentMethodClicked, eventUsageDetailedInfoClicked, eventAddNewPaymentMethodClicked,
|
||||
eventApplyNewCouponClicked, eventCreditCardRemoved, eventCouponCodeApplied, eventInvoiceDownloaded, eventCreditCardAddedFromBilling,
|
||||
eventStorjTokenAddedFromBilling, eventAddFundsClicked, eventProjectMembersInviteSent, eventError} {
|
||||
eventStorjTokenAddedFromBilling, eventAddFundsClicked, eventProjectMembersInviteSent, eventError, eventProjectNameUpdated, eventProjectDescriptionUpdated,
|
||||
eventProjectStorageLimitUpdated, eventProjectBandwidthLimitUpdated} {
|
||||
service.clientEvents[name] = true
|
||||
}
|
||||
|
||||
|
@ -210,7 +210,8 @@ import {
|
||||
ProjectFields, ProjectLimits,
|
||||
} from '@/types/projects';
|
||||
import { MetaUtils } from '@/utils/meta';
|
||||
import { AnalyticsErrorEventSource } from '@/utils/constants/analyticsEventNames';
|
||||
import { AnalyticsErrorEventSource, AnalyticsEvent } from '@/utils/constants/analyticsEventNames';
|
||||
import { AnalyticsHttpApi } from '@/api/analytics';
|
||||
|
||||
import VButton from '@/components/common/VButton.vue';
|
||||
|
||||
@ -238,6 +239,8 @@ export default class EditProjectDetails extends Vue {
|
||||
public storageLimitValue = 0;
|
||||
public bandwidthLimitValue = 0;
|
||||
|
||||
private readonly analytics: AnalyticsHttpApi = new AnalyticsHttpApi();
|
||||
|
||||
/**
|
||||
* Returns selected project from store.
|
||||
*/
|
||||
@ -512,6 +515,7 @@ export default class EditProjectDetails extends Vue {
|
||||
}
|
||||
|
||||
this.toggleNameEditing();
|
||||
this.analytics.eventTriggered(AnalyticsEvent.PROJECT_NAME_UPDATED);
|
||||
await this.$notify.success('Project name updated successfully!');
|
||||
}
|
||||
|
||||
@ -528,6 +532,7 @@ export default class EditProjectDetails extends Vue {
|
||||
}
|
||||
|
||||
this.toggleDescriptionEditing();
|
||||
this.analytics.eventTriggered(AnalyticsEvent.PROJECT_DESCRIPTION_UPDATED);
|
||||
await this.$notify.success('Project description updated successfully!');
|
||||
}
|
||||
|
||||
@ -552,6 +557,7 @@ export default class EditProjectDetails extends Vue {
|
||||
}
|
||||
|
||||
this.toggleStorageLimitEditing();
|
||||
this.analytics.eventTriggered(AnalyticsEvent.PROJECT_STORAGE_LIMIT_UPDATED);
|
||||
await this.$notify.success('Project storage limit updated successfully!');
|
||||
}
|
||||
|
||||
@ -576,6 +582,7 @@ export default class EditProjectDetails extends Vue {
|
||||
}
|
||||
|
||||
this.toggleBandwidthLimitEditing();
|
||||
this.analytics.eventTriggered(AnalyticsEvent.PROJECT_BANDWIDTH_LIMIT_UPDATED);
|
||||
await this.$notify.success('Project bandwidth limit updated successfully!');
|
||||
}
|
||||
|
||||
|
@ -54,6 +54,10 @@ export enum AnalyticsEvent {
|
||||
ADD_FUNDS_CLICKED = 'Add Funds Clicked',
|
||||
PROJECT_MEMBERS_INVITE_SENT = 'Project Members Invite Sent',
|
||||
UI_ERROR = 'UI error occurred',
|
||||
PROJECT_NAME_UPDATED = 'Project Name Updated',
|
||||
PROJECT_DESCRIPTION_UPDATED = 'Project Description Updated',
|
||||
PROJECT_STORAGE_LIMIT_UPDATED = 'Project Storage Limit Updated',
|
||||
PROJECT_BANDWIDTH_LIMIT_UPDATED = 'Project Bandwidth Limit Updated',
|
||||
}
|
||||
|
||||
export enum AnalyticsErrorEventSource {
|
||||
|
Loading…
Reference in New Issue
Block a user