Skip to content

Commit

Permalink
AI Improvements. (#634)
Browse files Browse the repository at this point in the history
  • Loading branch information
samaea authored Aug 10, 2023
1 parent 5713b75 commit d36711c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion helper/src/components/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ export function CodeBlock({deploycmd, testId, lang, filename, error, hideSave})
window.open(dataUrl());
}

const onCopyDeployHandler = () => {
appInsights.trackEvent({name: "Copy."+ testId});
};

return [
<div key="code-header" className="codeHeader" style={{...(error && {borderColor: 'darkred'})}}>
<span className="language">{lang}</span>
Expand All @@ -64,7 +68,7 @@ export function CodeBlock({deploycmd, testId, lang, filename, error, hideSave})
</div>,

<pre key="code-pre" className="has-inner-focus" style={{...(error && {borderColor: 'darkred'})}}>
<code className={"lang-" + lang}><span data-lang={lang} data-testid={testId || 'none'} style={{...(error && {color: 'grey'})}}>{deploycmd}</span></code>
<code onCopyCapture={onCopyDeployHandler} className={"lang-" + lang}><span data-lang={lang} data-testid={testId || 'none'} style={{...(error && {color: 'grey'})}}>{deploycmd}</span></code>
</pre>
]
}
Expand Down
4 changes: 2 additions & 2 deletions helper/src/components/deployTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ az role assignment create --role "Managed Identity Operator" --assignee-principa
</Stack.Item>
</Stack>

<CodeBlock hideSave={true} lang="PowerShell script" error={allok ? false : 'Configuration not complete, please correct the tabs with the warning symbol before running'} deploycmd={deployPScmd} testId={'deploy-deploycmd'}/>
<CodeBlock hideSave={true} lang="PowerShell script" error={allok ? false : 'Configuration not complete, please correct the tabs with the warning symbol before running'} deploycmd={deployPScmd} testId={'deploy-deployPS'}/>

{ urlParams.toString() !== "" &&
<Text variant="medium">Not ready to deploy? Bookmark your configuration : <a href={"?" + urlParams.toString()}>here</a></Text>
Expand Down Expand Up @@ -672,7 +672,7 @@ az ad sp delete --id $(az ad sp show --id \${rmId[0]} --query id -o tsv)

<PivotItem headerText="Parameters File" itemKey="params" itemIcon="FileSymlink">
<Label>Can be used for source control</Label>
<CodeBlock lang="json" deploycmd={param_file} label="Parameter file" />
<CodeBlock lang="json" deploycmd={param_file} label="Parameter file" testId={'deploy-deployparams'} />
</PivotItem>


Expand Down

0 comments on commit d36711c

Please sign in to comment.