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',
|
||||
});
|
||||
|
||||
export function enableConnectivityHub(flipperServer: FlipperServer) {
|
||||
export function enableConnectivityHook(flipperServer: FlipperServer) {
|
||||
flipperServer.on(
|
||||
'connectivity-troubleshoot-log',
|
||||
(entry: ConnectionRecordEntry) => {
|
||||
@@ -189,7 +189,7 @@ const LogView = () => {
|
||||
);
|
||||
};
|
||||
|
||||
export function ConnectivityHub() {
|
||||
export function TroubleshootingHub() {
|
||||
return (
|
||||
<Layout.Container grow>
|
||||
<Tabs activeKey="connectivity-logs" grow>
|
||||
@@ -27,7 +27,7 @@ import {waitFor} from '../utils/waitFor';
|
||||
import {NotificationBody} from '../ui/components/NotificationBody';
|
||||
import {Layout} from '../ui';
|
||||
import {setStaticView} from '../reducers/connections';
|
||||
import {ConnectivityHub} from '../chrome/ConnectivityHub';
|
||||
import {TroubleshootingHub} from '../chrome/TroubleshootingHub';
|
||||
import {setTopLevelSelection} from '../reducers/application';
|
||||
|
||||
export function connectFlipperServerToStore(
|
||||
@@ -315,7 +315,7 @@ function showConnectivityTroubleshootNotification(
|
||||
style={{float: 'right'}}
|
||||
onClick={() => {
|
||||
store.dispatch(setTopLevelSelection('connectivity'));
|
||||
store.dispatch(setStaticView(ConnectivityHub));
|
||||
store.dispatch(setStaticView(TroubleshootingHub));
|
||||
notification.close(key);
|
||||
}}>
|
||||
Troubleshoot
|
||||
|
||||
@@ -71,7 +71,7 @@ import {
|
||||
import {StatusMessage} from './appinspect/AppInspect';
|
||||
import {TroubleshootingGuide} from './appinspect/fb-stubs/TroubleshootingGuide';
|
||||
import {FlipperDevTools} from '../chrome/FlipperDevTools';
|
||||
import {ConnectivityHub} from '../chrome/ConnectivityHub';
|
||||
import {TroubleshootingHub} from '../chrome/TroubleshootingHub';
|
||||
|
||||
export const Navbar = withTrackingScope(function Navbar() {
|
||||
const {topLevelSelection, selectedDevice, selectedAppId, selectedPlugin} =
|
||||
@@ -516,7 +516,7 @@ function TroubleshootMenu() {
|
||||
key="connectivity"
|
||||
onClick={() => {
|
||||
store.dispatch(setTopLevelSelection('connectivity'));
|
||||
store.dispatch(setStaticView(ConnectivityHub));
|
||||
store.dispatch(setStaticView(TroubleshootingHub));
|
||||
}}>
|
||||
Troubleshoot Connectivity
|
||||
</Menu.Item>
|
||||
|
||||
@@ -43,7 +43,7 @@ import {getRenderHostInstance} from 'flipper-frontend-core';
|
||||
import {startGlobalErrorHandling} from './utils/globalErrorHandling';
|
||||
import {loadTheme} from './utils/loadTheme';
|
||||
import {connectFlipperServerToStore} from './dispatcher/flipperServer';
|
||||
import {enableConnectivityHub} from './chrome/ConnectivityHub';
|
||||
import {enableConnectivityHook} from './chrome/TroubleshootingHub';
|
||||
import ReactDOM from 'react-dom';
|
||||
|
||||
class AppFrame extends React.Component<
|
||||
@@ -178,7 +178,7 @@ function init(flipperServer: FlipperServer) {
|
||||
);
|
||||
|
||||
enableConsoleHook();
|
||||
enableConnectivityHub(flipperServer);
|
||||
enableConnectivityHook(flipperServer);
|
||||
|
||||
const launcherMessage =
|
||||
getRenderHostInstance().serverConfig.processConfig.launcherMsg;
|
||||
|
||||
Reference in New Issue
Block a user