Skip to content

Commit

Permalink
Renames TreePanel to ChatbotPanel
Browse files Browse the repository at this point in the history
  • Loading branch information
itisaram-personal committed Nov 19, 2023
1 parent f2679a3 commit 59a43b7
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 416 deletions.
42 changes: 42 additions & 0 deletions src/components/ChatbotPanel.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import { css, cx } from '@emotion/css'
import { PanelProps } from '@grafana/data'
import { useStyles2 } from '@grafana/ui'
import * as React from 'react'
import { TreeOptions } from 'types'
import { DsoChatBot } from 'components/dso-chat-bot/DsoChatbot'
import './style.css'

// let renderCount = 0

interface Props extends PanelProps<TreeOptions> {}

const getStyles = () => {
return {
wrapper: css`
font-family: Roboto, Helvetica, Arial, sans-serif;
position: relative;
`,
}
}
export const defaultFormatTemplate = `{{~#each .}}{{#if @index}} OR {{/if}}
{{~@key}} in ({{#each .}}{{~#if @index}},{{/if}}{{~id}}{{~/each}})
{{~/each}}`

export const ChatbotPanel: React.FC<Props> = ({ options, data, width, height, replaceVariables }) => {
const styles = useStyles2(getStyles)

return (
<div
className={cx(
styles.wrapper,
css`
width: ${width}px;
height: ${height}px;
padding: 4px;
`
)}
>
<DsoChatBot />
</div>
)
}
Loading

0 comments on commit 59a43b7

Please sign in to comment.