Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mixpanel changes #1285

Merged
merged 1 commit into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion gui/pages/Content/Agents/AgentCreate.js
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,8 @@ export default function AgentCreate({
const name = response.data.name;
const executionId = response.data.execution_id;
fetchAgents();
getUserClick('Agent Created Successfully', {})
getUserClick('Agent Run created successfully', {})
uploadResources(agentId, name, executionId)
})
.catch((error) => {
Expand Down Expand Up @@ -1359,7 +1361,7 @@ export default function AgentCreate({
<div className="primary_button"
style={{backgroundColor: 'white', marginBottom: '4px', paddingLeft: '0', paddingRight: '5px'}}>
<button disabled={!createClickable} className="primary_button" style={{paddingRight: '5px'}}
onClick={() => {handleAddAgent(); getUserClick('Agent Created Succesfully', {})}}>{createClickable ? 'Create and Run' : 'Creating Agent...'}</button>
onClick={() => {handleAddAgent();}}>{createClickable ? 'Create and Run' : 'Creating Agent...'}</button>
<button onClick={() => setCreateDropdown(!createDropdown)}
style={{border: 'none', backgroundColor: 'white'}}>
<Image width={20} height={21}
Expand Down
2 changes: 1 addition & 1 deletion gui/pages/Content/Agents/AgentTemplatesList.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default function AgentTemplatesList({
}

function handleTemplateClick(item) {
getUserClick('Agent Creating Using Template', {})
getUserClick('Agent Creating Using Template', {'Template Name': item.name})
setSendTemplate(item);
setLocalStorageValue("agent_create_click_" + String(internalId), true, setCreateAgentClicked);
}
Expand Down
2 changes: 1 addition & 1 deletion gui/pages/Content/Agents/AgentWorkspace.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export default function AgentWorkspace({env, agentId, agentName, selectedView, a
fetchAgentDetails(agentId, selectedRun?.id);
EventBus.emit('reFetchAgents', {});
toast.success("New run created", {autoClose: 1800});
getUserClick('Agent New Run Created Successfully',{})
getUserClick('Agent New Run Created Successfully',{'IsReRun' : true})
})
.catch((error) => {
console.error('Error creating execution:', error);
Expand Down
4 changes: 3 additions & 1 deletion gui/pages/Dashboard/Content.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ export default function Content({env, selectedView, selectedProjectId, organisat
const apmTab = tabs.find(tab => tab.contentType === 'APM');
setIsApmOpened(!!apmTab);
setPrevView(selectedView);
getUserClick('APM Closed',{})
}
}, [selectedView, tabs, prevView]);

Expand Down Expand Up @@ -169,6 +168,9 @@ export default function Content({env, selectedView, selectedProjectId, organisat
updatedTabs.splice(index, 1);
}

if(contentType === "APM")
getUserClick('APM Closed',{})

resetLocalStorage(contentType, internalId);
setTabs(updatedTabs);
};
Expand Down