Overdue refactor for TroubleshootingHub
Summary: It's troubleshooting in general, not only connectivity. So rename and refactor accordingly. Reviewed By: antonk52 Differential Revision: D47914411 fbshipit-source-id: 658563bfd33427f11fe9f7660b0985fc3f013866
This commit is contained in:
committed by
Facebook GitHub Bot
parent
d83f3fddb2
commit
778eaf2038
@@ -36,7 +36,7 @@ const rows = createDataSource<ConnectionRecordEntry>([], {
|
|||||||
persist: 'connectivity-logs',
|
persist: 'connectivity-logs',
|
||||||
});
|
});
|
||||||
|
|
||||||
export function enableConnectivityHub(flipperServer: FlipperServer) {
|
export function enableConnectivityHook(flipperServer: FlipperServer) {
|
||||||
flipperServer.on(
|
flipperServer.on(
|
||||||
'connectivity-troubleshoot-log',
|
'connectivity-troubleshoot-log',
|
||||||
(entry: ConnectionRecordEntry) => {
|
(entry: ConnectionRecordEntry) => {
|
||||||
@@ -189,7 +189,7 @@ const LogView = () => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export function ConnectivityHub() {
|
export function TroubleshootingHub() {
|
||||||
return (
|
return (
|
||||||
<Layout.Container grow>
|
<Layout.Container grow>
|
||||||
<Tabs activeKey="connectivity-logs" grow>
|
<Tabs activeKey="connectivity-logs" grow>
|
||||||
@@ -27,7 +27,7 @@ import {waitFor} from '../utils/waitFor';
|
|||||||
import {NotificationBody} from '../ui/components/NotificationBody';
|
import {NotificationBody} from '../ui/components/NotificationBody';
|
||||||
import {Layout} from '../ui';
|
import {Layout} from '../ui';
|
||||||
import {setStaticView} from '../reducers/connections';
|
import {setStaticView} from '../reducers/connections';
|
||||||
import {ConnectivityHub} from '../chrome/ConnectivityHub';
|
import {TroubleshootingHub} from '../chrome/TroubleshootingHub';
|
||||||
import {setTopLevelSelection} from '../reducers/application';
|
import {setTopLevelSelection} from '../reducers/application';
|
||||||
|
|
||||||
export function connectFlipperServerToStore(
|
export function connectFlipperServerToStore(
|
||||||
@@ -315,7 +315,7 @@ function showConnectivityTroubleshootNotification(
|
|||||||
style={{float: 'right'}}
|
style={{float: 'right'}}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
store.dispatch(setTopLevelSelection('connectivity'));
|
store.dispatch(setTopLevelSelection('connectivity'));
|
||||||
store.dispatch(setStaticView(ConnectivityHub));
|
store.dispatch(setStaticView(TroubleshootingHub));
|
||||||
notification.close(key);
|
notification.close(key);
|
||||||
}}>
|
}}>
|
||||||
Troubleshoot
|
Troubleshoot
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ import {
|
|||||||
import {StatusMessage} from './appinspect/AppInspect';
|
import {StatusMessage} from './appinspect/AppInspect';
|
||||||
import {TroubleshootingGuide} from './appinspect/fb-stubs/TroubleshootingGuide';
|
import {TroubleshootingGuide} from './appinspect/fb-stubs/TroubleshootingGuide';
|
||||||
import {FlipperDevTools} from '../chrome/FlipperDevTools';
|
import {FlipperDevTools} from '../chrome/FlipperDevTools';
|
||||||
import {ConnectivityHub} from '../chrome/ConnectivityHub';
|
import {TroubleshootingHub} from '../chrome/TroubleshootingHub';
|
||||||
|
|
||||||
export const Navbar = withTrackingScope(function Navbar() {
|
export const Navbar = withTrackingScope(function Navbar() {
|
||||||
const {topLevelSelection, selectedDevice, selectedAppId, selectedPlugin} =
|
const {topLevelSelection, selectedDevice, selectedAppId, selectedPlugin} =
|
||||||
@@ -516,7 +516,7 @@ function TroubleshootMenu() {
|
|||||||
key="connectivity"
|
key="connectivity"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
store.dispatch(setTopLevelSelection('connectivity'));
|
store.dispatch(setTopLevelSelection('connectivity'));
|
||||||
store.dispatch(setStaticView(ConnectivityHub));
|
store.dispatch(setStaticView(TroubleshootingHub));
|
||||||
}}>
|
}}>
|
||||||
Troubleshoot Connectivity
|
Troubleshoot Connectivity
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ import {getRenderHostInstance} from 'flipper-frontend-core';
|
|||||||
import {startGlobalErrorHandling} from './utils/globalErrorHandling';
|
import {startGlobalErrorHandling} from './utils/globalErrorHandling';
|
||||||
import {loadTheme} from './utils/loadTheme';
|
import {loadTheme} from './utils/loadTheme';
|
||||||
import {connectFlipperServerToStore} from './dispatcher/flipperServer';
|
import {connectFlipperServerToStore} from './dispatcher/flipperServer';
|
||||||
import {enableConnectivityHub} from './chrome/ConnectivityHub';
|
import {enableConnectivityHook} from './chrome/TroubleshootingHub';
|
||||||
import ReactDOM from 'react-dom';
|
import ReactDOM from 'react-dom';
|
||||||
|
|
||||||
class AppFrame extends React.Component<
|
class AppFrame extends React.Component<
|
||||||
@@ -178,7 +178,7 @@ function init(flipperServer: FlipperServer) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
enableConsoleHook();
|
enableConsoleHook();
|
||||||
enableConnectivityHub(flipperServer);
|
enableConnectivityHook(flipperServer);
|
||||||
|
|
||||||
const launcherMessage =
|
const launcherMessage =
|
||||||
getRenderHostInstance().serverConfig.processConfig.launcherMsg;
|
getRenderHostInstance().serverConfig.processConfig.launcherMsg;
|
||||||
|
|||||||
Reference in New Issue
Block a user