Double exclamation mark, the first one! Is to convert the value to a Boolean value, and the second logic is inverted. ES6 syntax class /*ES6*/ class Point { x: number y: number constructor(x: number, y: number) { this.x = x this.y = y } add(point: Point) { return new Point...
PluginOperator: React.FC<YakScriptOperatorProp> = (props) => { const [script, setScript] = useState<YakScript>() const [error, setError] = useState("") const [loading, setLoading] = useState(false) const [groups, setGroups] = useState<string[]>([]) const [markdown, setMarkdown] =...
name="Exclamation"> <Variant> <ExclamationOutlined /> </Variant> <Variant name="Circle"> <ExclamationCircleOutlined /> </Variant> </Component> <Component name="Close"> <Variant> <CloseOutlined /> </Variant> <Variant name="Circle"> <CloseCircleOutlined /> </Variant> </Component> <...
(condition) .setOperator(operator) .asRelation(); onRelationChange(newCondition); }; const handleConditionChange = value => { const newCondition = new ConditionBuilder(condition) .setValue(value) .asRelation(); onRelationChange(newCondition); }; if (condition.type === FilterConditionType....
OperatorBar: React.FC<OperatorBarProps> = () => { const dispatch = useDispatch(); const menus = [ { id: 'inbox', name: 'Inbox', icon: <InboxOutlined />, onClick: () => { dispatch({ type: 'CHANGE_PAGE', payload: { page: 'inbox', }, }); }, }, { id: 'notes', name...
Source File: MainOperator.tsx From yakit with GNU Affero General Public License v3.0 4 votes Main: React.FC<MainProp> = (props) => { const [engineStatus, setEngineStatus] = useState<"ok" | "error">("ok") const [status, setStatus] = useState<{ addr: string; isTLS: boolean }>...
== undefined) { stackTrace = error.stack } return ( <Card bordered={false} className={cn(className, "max-h-full")}> <Card.Meta avatar={icon || <ExclamationCircleOutlined className={styles.icon} />} title={title || "An Error Occured"} description={ <> <Fragment key="description"> ...
OperatorBar: React.FC<OperatorBarProps> = () => { const dispatch = useDispatch(); const menus = [ { id: 'inbox', name: 'Inbox', icon: <InboxOutlined />, onClick: () => { dispatch({ type: 'CHANGE_PAGE', payload: { page: 'inbox', }, }); }, }, { id: 'notes', name...
{ title: '删除组态', icon: <ExclamationCircleOutlined />, content: '确认删除该组态?', onOk() { api.screen.remove(id).then(res => { if (res.status === 200) { handleSearch(searchParam); } }); }, onCancel() { message.info('已取消'); }, }); }; let updateState = (state:...
<div className='table-operator-area-warning' style={{ display: 'inline-block', marginLeft: 10, }} onClick={() => { confirm({ title: t('确定删除该指标?'), icon: <ExclamationCircleOutlined />, onOk: () => { handleDelete(item); }, }); }} > {t('删除')} </div> </div> ...