mirror of
https://github.com/portainer/portainer.git
synced 2025-07-20 22:09:41 +02:00
feat(analytics): track existing features (#5448) [EE-1076]
This commit is contained in:
parent
b8e6c5ea91
commit
4ffee27a4b
25 changed files with 361 additions and 55 deletions
|
@ -43,6 +43,30 @@ export class CreateEdgeStackViewController {
|
|||
this.onChangeFormValues = this.onChangeFormValues.bind(this);
|
||||
}
|
||||
|
||||
buildAnalyticsProperties() {
|
||||
const format = 'compose';
|
||||
const metadata = { type: methodLabel(this.state.Method), format };
|
||||
|
||||
if (metadata.type === 'template') {
|
||||
metadata.templateName = this.selectedTemplate.title;
|
||||
}
|
||||
|
||||
return { metadata };
|
||||
|
||||
function methodLabel(method) {
|
||||
switch (method) {
|
||||
case 'editor':
|
||||
return 'web-editor';
|
||||
case 'repository':
|
||||
return 'git';
|
||||
case 'upload':
|
||||
return 'file-upload';
|
||||
case 'template':
|
||||
return 'template';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async uiCanExit() {
|
||||
if (this.state.Method === 'editor' && this.formValues.StackFileContent && this.state.isEditorDirty) {
|
||||
return this.ModalService.confirmWebEditorDiscard();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue