mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 06:39:48 +00:00
chore: add event for workspace environment type [no-ticket] (#7602)
* chore: add event for workspace environment type [no-ticket] * fix lint
This commit is contained in:
parent
3ab6165f52
commit
eab0e9c675
@ -5,6 +5,7 @@ export enum SegmentEvent {
|
||||
dataImport = 'Data Imported',
|
||||
documentCreate = 'Document Created',
|
||||
mockCreate = 'Mock Created',
|
||||
environmentWorkspaceCreate = 'Environment Workspace Created',
|
||||
loginSuccess = 'Login Success',
|
||||
inviteTrigger = 'Invite Triggered From App',
|
||||
exportAllCollections = 'Exported All Collections',
|
||||
|
@ -20,7 +20,7 @@ import { isRequestGroupMeta } from '../../models/request-group-meta';
|
||||
import { UnitTest } from '../../models/unit-test';
|
||||
import { UnitTestSuite } from '../../models/unit-test-suite';
|
||||
import { WebSocketRequest } from '../../models/websocket-request';
|
||||
import { isCollection, isMockServer, scopeToActivity, Workspace } from '../../models/workspace';
|
||||
import { isCollection, isEnvironment, scopeToActivity, Workspace } from '../../models/workspace';
|
||||
import { WorkspaceMeta } from '../../models/workspace-meta';
|
||||
import { getSendRequestCallback } from '../../network/unit-test-feature';
|
||||
import { initializeLocalBackendProjectAndMarkForSync } from '../../sync/vcs/initialize-backend-project';
|
||||
@ -370,7 +370,9 @@ export const createNewWorkspaceAction: ActionFunction = async ({
|
||||
workspace,
|
||||
});
|
||||
}
|
||||
|
||||
window.main.trackSegmentEvent({
|
||||
event: SegmentEvent.mockCreate,
|
||||
});
|
||||
return redirect(`/organization/${organizationId}/project/${projectId}/workspace/${workspace._id}/${scopeToActivity(workspace.scope)}`);
|
||||
}
|
||||
|
||||
@ -398,8 +400,8 @@ export const createNewWorkspaceAction: ActionFunction = async ({
|
||||
|
||||
if (isCollection(workspace)) {
|
||||
event = SegmentEvent.collectionCreate;
|
||||
} else if (isMockServer(workspace)) {
|
||||
event = SegmentEvent.mockCreate;
|
||||
} else if (isEnvironment(workspace)) {
|
||||
event = SegmentEvent.environmentWorkspaceCreate;
|
||||
}
|
||||
|
||||
window.main.trackSegmentEvent({
|
||||
|
Loading…
Reference in New Issue
Block a user