track script runner

track compile general (optional to use)
pull/5702/head
lianahus 2 weeks ago committed by Aniket
parent 272092e8fd
commit 09a9305f39
  1. 6
      apps/remix-ide/src/app/tabs/script-runner-ui.tsx
  2. 19
      libs/remix-ui/scriptrunner/src/lib/script-runner-ui.tsx
  3. 1
      libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx

@ -71,7 +71,6 @@ export class ScriptRunnerUIPlugin extends ViewPlugin {
})
this.plugin.on('fileManager', 'fileSaved', async (file: string) => {
if (file === configFileName && this.enableCustomScriptRunner) {
await this.loadCustomConfig()
this.renderComponent()
@ -114,7 +113,8 @@ export class ScriptRunnerUIPlugin extends ViewPlugin {
activateCustomScriptRunner={this.activateCustomScriptRunner.bind(this)}
saveCustomConfig={this.saveCustomConfig.bind(this)}
openCustomConfig={this.openCustomConfig.bind(this)}
loadScriptRunner={this.selectScriptRunner.bind(this)} />
loadScriptRunner={this.selectScriptRunner.bind(this)}
/>
)
}
@ -184,7 +184,6 @@ export class ScriptRunnerUIPlugin extends ViewPlugin {
this.setIsLoading(config.name, false)
this.renderComponent()
return result
}
async execute(script: string, filePath: string) {
@ -289,7 +288,6 @@ export class ScriptRunnerUIPlugin extends ViewPlugin {
}
}
}
}
async openCustomConfig() {

@ -5,6 +5,7 @@ import { faCaretDown, faCaretRight, faCheck, faExclamationCircle, faRedoAlt, faT
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { CustomScriptRunner } from "./custom-script-runner";
import { CustomTooltip } from "@remix-ui/helper";
const _paq = (window._paq = window._paq || []) // eslint-disable-line
export interface ScriptRunnerUIProps {
loadScriptRunner: (config: ProjectConfiguration) => void;
@ -62,12 +63,18 @@ export const ScriptRunnerUI = (props: ScriptRunnerUIProps) => {
</div>}
{!config.isLoading && config.errorStatus && config.error &&
<div onClick={() => loadScriptRunner(config)} className="pointer px-2">
<div
onClick={() => {
loadScriptRunner(config)
_paq.push(['trackEvent', 'scriptRunnerPlugin', 'loadScriptRunnerConfig', config.name])
}}
className="pointer px-2"
>
<FontAwesomeIcon data-id={`sr-reload-${config.name}`} icon={faRedoAlt}></FontAwesomeIcon>
</div>}
{!config.isLoading && !config.errorStatus && !config.error &&
<div onClick={() => loadScriptRunner(config)} className="pointer px-2">
{activeConfig && activeConfig.name !== config.name ?
{ activeConfig && activeConfig.name !== config.name ?
<FontAwesomeIcon data-id={`sr-toggle-${config.name}`} icon={faToggleOn}></FontAwesomeIcon> :
<FontAwesomeIcon data-id={`sr-loaded-${config.name}`} className="text-success" icon={faCheck}></FontAwesomeIcon>
}
@ -87,7 +94,9 @@ export const ScriptRunnerUI = (props: ScriptRunnerUIProps) => {
</li>
))}
</ul></>
</Accordion.Collapse></div>))}
</Accordion.Collapse>
</div>))
}
</Accordion>
{enableCustomScriptRunner &&
<CustomScriptRunner
@ -98,6 +107,6 @@ export const ScriptRunnerUI = (props: ScriptRunnerUIProps) => {
publishedConfigurations={configurations.filter((config) => config.publish)}
/>}
</div>
);
};
)
}

@ -486,6 +486,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
compileIcon.current.classList.remove('remixui_spinningIcon')
compileIcon.current.classList.remove('remixui_bouncingIcon')
if (!state.autoCompile || (state.autoCompile && state.matomoAutocompileOnce)) {
_paq.push(['trackEvent', 'compiler', 'compiled', 'solCompilationFinishedTriggeredByUser')
_paq.push(['trackEvent', 'compiler', 'compiled', 'with_config_file_' + state.useFileConfiguration])
_paq.push(['trackEvent', 'compiler', 'compiled', 'with_version_' + _retrieveVersion()])
if (state.autoCompile && state.matomoAutocompileOnce) {

Loading…
Cancel
Save