render() { return ( <pre> <code className='language-javascript'> { this.props.code } </code> </pre> ) }
logs.map(function(log) { var text = 'Date: ' + util.toLocaleString(new Date(log.date)) + '\r\n' + log.text; var hide = (log.hide || (level && !hide && log.level !== level)) ? ' hide' : ''; return ( <li key={log.id} title={log.level.toUpperCase()} className={'w-' + log.level + hide}> <pre> {text && text.length >= 2100 ? <ExpandCollapse text={text} /> : text} </pre> </li> ); })
render() { return ( <pre style={this.props.style}> <code className="language-javascript">{this.props.code}</code> </pre> ); }
const Card = ({ body }) => { return ( <div className="markdown"> <pre className="inline"> <code>{body}</code> </pre> </div> ); }
this.state.explainResult.map(res => ( <div> <h4> Result from SQL{' '} <a href="https://www.postgresql.org/docs/current/sql-explain.html"> EXPLAIN </a>{' '} on executed query: </h4> <pre className="explain-plan"> <code>{res.plan}</code> </pre> <h4>Executed SQL query:</h4> <pre className="explain-sql"> <code>{formatSQL(res.query)}</code> </pre> </div> ))
keys.map(function(name) { var item = modal[name]; return ( <tr key={name}> <th className={isHeader && highlight(item.name) ? 'w-bold' : undefined}>{item.name}</th> <td> <pre> {item.data ? <span className="glyphicon glyphicon-file"></span> : undefined} {item.data ? ' [' + util.getSize(item.size) + '] ' : undefined} {item.value} </pre> </td> <td className="w-props-ops"> <a data-name={name} onClick={self.onEdit} className="glyphicon glyphicon-edit" title="Edit"></a> <a data-name={name} onClick={self.onRemove} className="glyphicon glyphicon-remove" title="Delete"></a> </td> </tr> ); })
const Pre = props => { const newChildren = React.Children.map(props.children.props.children, child => { if (React.isValidElement(child)) { if (child.props.props.className.includes('keyword')) { if (!detailComponentsList.includes(child.props.props.componentname)) return child; return <Details children={child.props.children.slice(4, React.Children.count(child.props.children) - 4)} url={child.props.props.url} />; } if (child.props.props.className.includes('comment')) { return <ReactMarkdown source={child.props.children} disallowedTypes={['paragraph']} unwrapDisallowed />; } } return child; }); const newProps = { children: newChildren }; return ( <pre> <code {...newProps} /> </pre> ); }
async loadDashboard() { this.setState({ appCode: null, loadError: null, }); try { await this.dashboardSource.load(); this.setState({ dashboardStarting: false, appCode: !this.dashboardSource.loadError && this.dashboardSource.dashboardCreated, loadError: this.dashboardSource.loadError, }); const dashboardStatus = await ( await fetch('/playground/dashboard-app-status') ).json(); this.setState({ dashboardRunning: dashboardStatus.running, dashboardPort: dashboardStatus.dashboardPort, dashboardAppPath: dashboardStatus.dashboardAppPath, }); } catch (e) { this.setState({ dashboardStarting: false, loadError: <pre>{e.toString()}</pre>, }); throw e; } }
render () { const lang = this.props.params.lang let script if (lang === 'python') { script = pythonScript } else { script = `Unsupported language: ${lang}` } const metricID = this.props.params.metricid script = script.replace('<METRIC_ID>', metricID) const query = this.props.location.query if (query.hasOwnProperty('apiKey')) { script = script.replace('<API_KEY>', query['apiKey']) } if (query.hasOwnProperty('hostname')) { script = script.replace('<API_HOSTNAME>', query['hostname']) } return ( <pre className={classes.script}> <code> {script} </code> </pre> ) }
<FormattedMessage id={MESSAGES.execError.id} defaultMessage={MESSAGES.execError.defaultMessage} /> </p> <pre className="mediainfo__output mediainfo__output--error">{JSON.stringify(errorData.error, null, 2)}</pre> </div> ); </Tooltip> </div> <pre className="mediainfo__output">{this.props.mediainfo}</pre> </div> );
<Alert message="Error occurred while compiling JS" description={<pre>{jsCompilingError.toString()}</pre>} type="error" />
</div> : undefined { sourceText ? (<pre className="w-properties-source"> { sourceText.length >= 2100 ? <ExpandCollapse text={sourceText} /> : sourceText} </pre>) : undefined } {name && name.length >= 2100 ? <ExpandCollapse text={name} /> : name} </th> <td><pre>{val && val.length >= 2100 ? <ExpandCollapse text={val} /> : val}</pre></td> </tr> ); {name && name.length >= 2100 ? <ExpandCollapse text={name} /> : name} </th> <td><pre>{value && value.length >= 2100 ? <ExpandCollapse text={value} /> : value}</pre></td> </tr> );
logs.map(function(log) { var logId = log.logId; logId = logId ? ' (LogID: ' + logId + ')' : ''; var date = 'Date: ' + util.toLocaleString(new Date(log.date)) + logId + '\r\n'; var hide = (log.hide || (level && !hide && log.level !== level)) ? ' hide' : ''; return ( <li key={log.id} title={log.level.toUpperCase()} className={'w-' + log.level + hide}> <pre> {date} {parseLog(log, expandRoot)} </pre> </li> ); })
render() { return ( <pre> <code className='language-javascript'> { this.props.code } </code> </pre> ) }
this.state.explainResult.map(res => ( <div> <h4> Result from SQL{' '} <a href="https://www.postgresql.org/docs/current/sql-explain.html"> EXPLAIN </a>{' '} on executed query: </h4> <pre className="explain-plan"> <code>{res.plan}</code> </pre> <h4>Executed SQL query:</h4> <pre className="explain-sql"> <code>{formatSQL(res.query)}</code> </pre> </div> ))