From 8f992ee6e84d21c3e6306b27856e4ba90accc1f2 Mon Sep 17 00:00:00 2001 From: elijah Date: Fri, 30 Dec 2016 17:12:21 -0800 Subject: [bug] For now, disable UI for supporting multiple accounts. It does not currently work with API tokens. --- ui/app/components/panel_switcher.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'ui/app/components/panel_switcher.js') diff --git a/ui/app/components/panel_switcher.js b/ui/app/components/panel_switcher.js index d707a60..9a06b49 100644 --- a/ui/app/components/panel_switcher.js +++ b/ui/app/components/panel_switcher.js @@ -19,17 +19,31 @@ export default class PanelSwitcher extends React.Component { this.state = { panel: null, panel_properties: null, - debug: true + debug: true, + error: null } App.switcher = this } + showError(error) { + this.setState({error: error}) + } + + hideError() { + this.setState({error: null}) + } + show(component_name, properties={}) { this.setState({panel: component_name, panel_properties: properties}) } render() { let elems = [] + if (this.state.error) { + elems.push( + + ) + } if (this.panelExist(this.state.panel)) { elems.push( this.panelRender(this.state.panel, this.state.panel_properties) -- cgit v1.2.3