fix: analytics logging behavior being incorrect (#3064)
This commit is contained in:
@@ -258,6 +258,8 @@ import IconSave from "~icons/lucide/save"
|
|||||||
import IconShare2 from "~icons/lucide/share-2"
|
import IconShare2 from "~icons/lucide/share-2"
|
||||||
import { HoppRESTTab } from "~/helpers/rest/tab"
|
import { HoppRESTTab } from "~/helpers/rest/tab"
|
||||||
import { getDefaultRESTRequest } from "~/helpers/rest/default"
|
import { getDefaultRESTRequest } from "~/helpers/rest/default"
|
||||||
|
import { platform } from "~/platform"
|
||||||
|
import { getCurrentStrategyID } from "~/helpers/network"
|
||||||
|
|
||||||
const t = useI18n()
|
const t = useI18n()
|
||||||
|
|
||||||
@@ -320,6 +322,12 @@ const newSendRequest = async () => {
|
|||||||
|
|
||||||
loading.value = true
|
loading.value = true
|
||||||
|
|
||||||
|
// Log the request run into analytics
|
||||||
|
platform.analytics?.logHoppRequestRunToAnalytics({
|
||||||
|
platform: "rest",
|
||||||
|
strategy: getCurrentStrategyID(),
|
||||||
|
})
|
||||||
|
|
||||||
// Double calling is because the function returns a TaskEither than should be executed
|
// Double calling is because the function returns a TaskEither than should be executed
|
||||||
const streamResult = await runRESTRequest$(tab)()
|
const streamResult = await runRESTRequest$(tab)()
|
||||||
|
|
||||||
|
|||||||
@@ -187,6 +187,8 @@ export function useCodemirror(
|
|||||||
: null
|
: null
|
||||||
|
|
||||||
const initView = (el: any) => {
|
const initView = (el: any) => {
|
||||||
|
if (el) platform.ui?.onCodemirrorInstanceMount?.(el)
|
||||||
|
|
||||||
const extensions = [
|
const extensions = [
|
||||||
basicSetup,
|
basicSetup,
|
||||||
baseTheme,
|
baseTheme,
|
||||||
@@ -268,7 +270,6 @@ export function useCodemirror(
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (el.value) {
|
if (el.value) {
|
||||||
if (!view.value) initView(el.value)
|
if (!view.value) initView(el.value)
|
||||||
platform.ui?.onCodemirrorInstanceMount?.(el.value)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user