React.createClass({ shouldComponentUpdate: function() { return false; }, show: function(options, rulesModal, valuesModal) { this.refs.syncDialog.show(options, rulesModal, valuesModal); }, render: function() { return <SyncDialog ref="syncDialog" />; } })
React.createClass({ render: function() { return ( <div className={this.props.hide ? 'hide' : undefined}> Favorites </div> ); } })
React.createClass({ render: function() { var order = this.props.order; var desc = order == 'desc'; if (!desc && order != 'asc') { order = null; } return ( <div className="w-spinner"> <span className={'glyphicon glyphicon-triangle-top' + (order ? ' spinner-' + order : '')}></span> <span className={'glyphicon glyphicon-triangle-bottom' + (order ? ' spinner-' + order : '')}></span> </div> ); } })
React.createClass({ render: function() { var p = this.props; var order = p.order; var draggable = p.draggable; var columnList = p.columnList; var item = p.item; var style = item.style; return (<table className="table" key={p.key} style={p.style}><tbody> <tr tabIndex="-1" draggable={draggable} data-id={item.id} className={getClassName(item)} style={ROW_STYLE}> <th className="order" scope="row" style={style}>{order}</th> {columnList.map(function(col) { var name = col.name; var className = col.className; var value = name === 'hostIp' ? util.getServerIp(item) : item[name]; var colStyle = getColStyle(col, style); return (<td key={name} className={className} style={colStyle} title={col.showTitle ? value : undefined}>{value}</td>); })} </tr> </tbody></table>); } })
React.createClass({ show: function(data, action) { this.refs.addRuleDialog.show(data, action); }, hide: function() { this.refs.addRuleDialog.hide(); }, setRuleName: function(name) { name && this.refs.addRuleDialog.updateRuleName(name); }, shouldComponentUpdate: function() { return !this.props.rulesModal; }, render: function() { return <AddRuleDialog onConfirm={this.props.onConfirm} rulesModal={this.props.rulesModal} ref="addRuleDialog" />; } })
React.createClass({ render: function() { var data = this.props.data || { hide: true }; if (data.isHttps) { return ( <div className={'w-textview-tips' + (data.hide ? ' hide' : '')}> <p>Tunnel</p> <a href="https://avwo.github.io/whistle/webui/https.html" target="_blank"> Click here for more information </a> </div> ); } return ( <div className={'w-textview-tips' + (data.hide ? ' hide' : '')}> <p>{data.message}</p> {data.url ? <a href={data.url} target="_blank">Open the URL in a new window</a> : undefined} </div> ); } })
React.createClass({ getInitialState: function() { return { disabled: true }; }, componentDidMount: function() { var self = this; events.on('setUpdateAllBtnState', function(_, hasNewPlugin) { self.setState({ disabled: !hasNewPlugin }); }); }, updateAllPlugins: function() { !this.state.disabled && events.trigger('updateAllPlugins'); }, render: function() { return ( <a style={this.state.disabled ? DISABLED : undefined} onClick={this.updateAllPlugins} className={'w-plugins-menu' + (this.props.hide ? ' hide' : '')} draggable="false"> <span className="glyphicon glyphicon-refresh" /> UpdateAll </a> ); } })
React.createClass({ shouldComponentUpdate: function(nextProps) { var hide = util.getBoolean(this.props.hide); return hide != util.getBoolean(nextProps.hide) || !hide; }, preview: function() { util.openPreview(this.props.data); }, render: function() { var props = this.props; return ( <div className={'fill w-image-view' + (props.hide ? ' hide' : '')}> <img src={props.imgSrc || undefined} /> {props.data ? <a onClick={this.preview}> Click here to preview page in new window </a> : undefined } </div> ); } })
React.createClass({ getInitialState: function() { return {};
React.createClass({ getInitialState: function() { return {
React.createClass({ render: function() { var head = this.props.head;
React.createClass({ getInitialState: function() { return {}; }, handleLeave: function() { this.setState({ copied: false }); }, handleCopy: function() { this.setState({ copied: true }); }, render: function() { var copied = this.state.copied; return ( <a onMouseLeave={this.handleLeave} onClick={this.handleCopy} style={copied ? {color: '#ccc', cursor: 'not-allowed'} : undefined} className={copied ? undefined : 'w-copy-text'} draggable="false" data-clipboard-text={this.props.value || ''}> {(copied ? 'Copied' : 'Copy') + (this.props.name || '')} </a> ); } })
React.createClass({ show: function(data) { this.refs.filesDialog.show(data); }, hide: function() { this.refs.filesDialog.hide(); }, shouldComponentUpdate: function() { return false; }, render: function() { return <FilesDialog ref="filesDialog" />; } })
React.createClass({ shouldComponentUpdate: function() { return false; }, show: function(text) { this.refs.jsonDialog.show(text); }, render: function() { return <JSONDialog ref="jsonDialog" />; } })
React.createClass({ shouldComponentUpdate: function() { return false; }, show: function(value, base64, name) { this.refs.textDialog.show(value, base64, name); }, render: function() { return <TextDialog ref="textDialog" />; } })