Prettier 2.0 (#393)

This commit is contained in:
Steve Faulkner
2021-01-20 09:15:01 -06:00
committed by GitHub
parent c1937ca464
commit 4be53284b5
500 changed files with 41927 additions and 41838 deletions

View File

@@ -1,136 +1,136 @@
// Data Explorer specific actions. No need to keep this in sync with the one in Portal.
export enum Action {
CollapseTreeNode,
CreateCollection,
CreateDocument,
CreateStoredProcedure,
CreateTrigger,
CreateUDF,
DeleteCollection,
DeleteDatabase,
DeleteDocument,
ExpandTreeNode,
ExecuteQuery,
HasFeature,
GetVNETServices,
InitializeAccountLocationFromResourceGroup,
InitializeDataExplorer,
LoadDatabaseAccount,
LoadCollections,
LoadDatabases,
LoadOffers,
MongoShell,
ContextualPane,
ScaleThroughput,
ToggleAutoscaleSetting,
SelectItem,
Tab,
UpdateDocument,
UpdateSettings,
UpdateStoredProcedure,
UpdateTrigger,
UpdateUDF,
LoadResourceTree,
CreateDatabase,
ResolveConflict,
DeleteConflict,
SaveQuery,
SetupSavedQueries,
LoadSavedQuery,
DeleteSavedQuery,
ConnectEncryptionToken,
SignInAad,
SignOutAad,
FetchTenants,
FetchSubscriptions,
FetchAccounts,
GetAccountKeys,
LoadingStatus,
AccountSwitch,
SubscriptionSwitch,
TenantSwitch,
DefaultTenantSwitch,
ResetNotebookWorkspace,
CreateNotebookWorkspace,
NotebookErrorNotification,
CreateSparkCluster,
UpdateSparkCluster,
DeleteSparkCluster,
LibraryManage,
ClusterLibraryManage,
ModifyOptionForThroughputWithSharedDatabase,
EnableAzureSynapseLink,
CreateNewNotebook,
OpenSampleNotebook,
ExecuteCell,
ExecuteCellPromptBtn,
ExecuteAllCells,
NotebookEnabled,
NotebooksGitHubConnect,
NotebooksGitHubAuthorize,
NotebooksGitHubManualRepoAdd,
NotebooksGitHubManageRepo,
NotebooksGitHubCommit,
NotebooksGitHubDisconnect,
NotebooksFetched,
NotebooksKernelSpecName,
NotebooksExecuteCellFromMenu,
NotebooksClearOutputsFromMenu,
NotebooksInsertCodeCellAboveFromMenu,
NotebooksInsertCodeCellBelowFromMenu,
NotebooksInsertTextCellAboveFromMenu,
NotebooksInsertTextCellBelowFromMenu,
NotebooksMoveCellUpFromMenu,
NotebooksMoveCellDownFromMenu,
DeleteCellFromMenu,
OpenTerminal,
CreateMongoCollectionWithWildcardIndex,
ClickCommandBarButton,
RefreshResourceTreeMyNotebooks,
ClickResourceTreeNodeContextMenuItem,
DiscardSettings,
SettingsV2Updated,
SettingsV2Discarded,
MongoIndexUpdated
}
export const ActionModifiers = {
Start: "start",
Success: "success",
Failed: "failed",
Mark: "mark",
Open: "open",
IFrameReady: "iframeready",
Close: "close",
Submit: "submit",
IndexAll: "index all properties",
NoIndex: "no indexing",
Cancel: "cancel",
ToggleAutoscaleOn: "autoscale on",
ToggleAutoscaleOff: "autoscale off"
} as const;
export enum SourceBlade {
AddCollection,
AzureFunction,
BrowseCollectionBlade,
CassandraAccountCreateBlade,
CollectionSetting,
DatabaseAccountCreateBlade,
DataExplorer,
DeleteCollection,
DeleteDatabase,
DocumentExplorer,
FirewallVNETBlade,
Metrics,
NonDocumentDBAccountCreateBlade,
OverviewBlade,
QueryExplorer,
Quickstart,
ReaderWarning,
ResourceMenu,
RpcProvider,
ScaleCollection,
ScriptExplorer,
Keys
}
// Data Explorer specific actions. No need to keep this in sync with the one in Portal.
export enum Action {
CollapseTreeNode,
CreateCollection,
CreateDocument,
CreateStoredProcedure,
CreateTrigger,
CreateUDF,
DeleteCollection,
DeleteDatabase,
DeleteDocument,
ExpandTreeNode,
ExecuteQuery,
HasFeature,
GetVNETServices,
InitializeAccountLocationFromResourceGroup,
InitializeDataExplorer,
LoadDatabaseAccount,
LoadCollections,
LoadDatabases,
LoadOffers,
MongoShell,
ContextualPane,
ScaleThroughput,
ToggleAutoscaleSetting,
SelectItem,
Tab,
UpdateDocument,
UpdateSettings,
UpdateStoredProcedure,
UpdateTrigger,
UpdateUDF,
LoadResourceTree,
CreateDatabase,
ResolveConflict,
DeleteConflict,
SaveQuery,
SetupSavedQueries,
LoadSavedQuery,
DeleteSavedQuery,
ConnectEncryptionToken,
SignInAad,
SignOutAad,
FetchTenants,
FetchSubscriptions,
FetchAccounts,
GetAccountKeys,
LoadingStatus,
AccountSwitch,
SubscriptionSwitch,
TenantSwitch,
DefaultTenantSwitch,
ResetNotebookWorkspace,
CreateNotebookWorkspace,
NotebookErrorNotification,
CreateSparkCluster,
UpdateSparkCluster,
DeleteSparkCluster,
LibraryManage,
ClusterLibraryManage,
ModifyOptionForThroughputWithSharedDatabase,
EnableAzureSynapseLink,
CreateNewNotebook,
OpenSampleNotebook,
ExecuteCell,
ExecuteCellPromptBtn,
ExecuteAllCells,
NotebookEnabled,
NotebooksGitHubConnect,
NotebooksGitHubAuthorize,
NotebooksGitHubManualRepoAdd,
NotebooksGitHubManageRepo,
NotebooksGitHubCommit,
NotebooksGitHubDisconnect,
NotebooksFetched,
NotebooksKernelSpecName,
NotebooksExecuteCellFromMenu,
NotebooksClearOutputsFromMenu,
NotebooksInsertCodeCellAboveFromMenu,
NotebooksInsertCodeCellBelowFromMenu,
NotebooksInsertTextCellAboveFromMenu,
NotebooksInsertTextCellBelowFromMenu,
NotebooksMoveCellUpFromMenu,
NotebooksMoveCellDownFromMenu,
DeleteCellFromMenu,
OpenTerminal,
CreateMongoCollectionWithWildcardIndex,
ClickCommandBarButton,
RefreshResourceTreeMyNotebooks,
ClickResourceTreeNodeContextMenuItem,
DiscardSettings,
SettingsV2Updated,
SettingsV2Discarded,
MongoIndexUpdated,
}
export const ActionModifiers = {
Start: "start",
Success: "success",
Failed: "failed",
Mark: "mark",
Open: "open",
IFrameReady: "iframeready",
Close: "close",
Submit: "submit",
IndexAll: "index all properties",
NoIndex: "no indexing",
Cancel: "cancel",
ToggleAutoscaleOn: "autoscale on",
ToggleAutoscaleOff: "autoscale off",
} as const;
export enum SourceBlade {
AddCollection,
AzureFunction,
BrowseCollectionBlade,
CassandraAccountCreateBlade,
CollectionSetting,
DatabaseAccountCreateBlade,
DataExplorer,
DeleteCollection,
DeleteDatabase,
DocumentExplorer,
FirewallVNETBlade,
Metrics,
NonDocumentDBAccountCreateBlade,
OverviewBlade,
QueryExplorer,
Quickstart,
ReaderWarning,
ResourceMenu,
RpcProvider,
ScaleCollection,
ScriptExplorer,
Keys,
}

View File

@@ -18,8 +18,8 @@ export function trace(action: Action, actionModifier: string = ActionModifiers.M
data: {
action: Action[action],
actionModifier: actionModifier,
data: JSON.stringify(data)
}
data: JSON.stringify(data),
},
});
appInsights.trackEvent({ name: Action[action] }, getData(actionModifier, data));
@@ -33,8 +33,8 @@ export function traceStart(action: Action, data?: TelemetryData): number {
action: Action[action],
actionModifier: ActionModifiers.Start,
timestamp: timestamp,
data: JSON.stringify(data)
}
data: JSON.stringify(data),
},
});
appInsights.startTrackEvent(Action[action]);
@@ -48,8 +48,8 @@ export function traceSuccess(action: Action, data?: TelemetryData, timestamp?: n
action: Action[action],
actionModifier: ActionModifiers.Success,
timestamp: timestamp || Date.now(),
data: JSON.stringify(data)
}
data: JSON.stringify(data),
},
});
appInsights.stopTrackEvent(Action[action], getData(ActionModifiers.Success, data));
@@ -62,8 +62,8 @@ export function traceFailure(action: Action, data?: TelemetryData, timestamp?: n
action: Action[action],
actionModifier: ActionModifiers.Failed,
timestamp: timestamp || Date.now(),
data: JSON.stringify(data)
}
data: JSON.stringify(data),
},
});
appInsights.stopTrackEvent(Action[action], getData(ActionModifiers.Failed, data));
@@ -76,8 +76,8 @@ export function traceCancel(action: Action, data?: TelemetryData, timestamp?: nu
action: Action[action],
actionModifier: ActionModifiers.Cancel,
timestamp: timestamp || Date.now(),
data: JSON.stringify(data)
}
data: JSON.stringify(data),
},
});
appInsights.stopTrackEvent(Action[action], getData(ActionModifiers.Cancel, data));
@@ -91,8 +91,8 @@ export function traceOpen(action: Action, data?: TelemetryData, timestamp?: numb
action: Action[action],
actionModifier: ActionModifiers.Open,
timestamp: validTimestamp,
data: JSON.stringify(data)
}
data: JSON.stringify(data),
},
});
appInsights.startTrackEvent(Action[action]);
@@ -107,8 +107,8 @@ export function traceMark(action: Action, data?: TelemetryData, timestamp?: numb
action: Action[action],
actionModifier: ActionModifiers.Mark,
timestamp: validTimestamp,
data: JSON.stringify(data)
}
data: JSON.stringify(data),
},
});
appInsights.startTrackEvent(Action[action]);
@@ -125,6 +125,6 @@ function getData(actionModifier: string, data: TelemetryData = {}): { [key: stri
platform: configContext.platform,
env: process.env.NODE_ENV as string,
actionModifier,
...data
...data,
};
}