Add more tracking data for UI startup
Reviewed By: lblasa Differential Revision: D50365803 fbshipit-source-id: b6a601e7bf987738400a86be6814de7cafd50d3d
This commit is contained in:
committed by
Facebook GitHub Bot
parent
17103ce1fa
commit
cc76a21d80
@@ -13,5 +13,6 @@ react-native/ReactNativeFlipperExample
|
|||||||
scripts/generate-changelog.js
|
scripts/generate-changelog.js
|
||||||
static/index.js
|
static/index.js
|
||||||
static/defaultPlugins/*
|
static/defaultPlugins/*
|
||||||
|
static/facebook/flipper-server-app-template
|
||||||
generated
|
generated
|
||||||
flipper-server/static
|
flipper-server/static
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import {validateAuthToken} from '../app-connectivity/certificate-exchange/certif
|
|||||||
import {tracker} from '../tracker';
|
import {tracker} from '../tracker';
|
||||||
import {EnvironmentInfo, isProduction} from 'flipper-common';
|
import {EnvironmentInfo, isProduction} from 'flipper-common';
|
||||||
import {GRAPH_SECRET} from '../fb-stubs/constants';
|
import {GRAPH_SECRET} from '../fb-stubs/constants';
|
||||||
|
import {sessionId} from '../sessionId';
|
||||||
|
|
||||||
type Config = {
|
type Config = {
|
||||||
port: number;
|
port: number;
|
||||||
@@ -151,7 +152,9 @@ async function startHTTPServer(
|
|||||||
const processedContent = content
|
const processedContent = content
|
||||||
.toString()
|
.toString()
|
||||||
.replace('GRAPH_SECRET_REPLACE_ME', GRAPH_SECRET)
|
.replace('GRAPH_SECRET_REPLACE_ME', GRAPH_SECRET)
|
||||||
.replace('FLIPPER_APP_VERSION_REPLACE_ME', environmentInfo.appVersion);
|
.replace('FLIPPER_APP_VERSION_REPLACE_ME', environmentInfo.appVersion)
|
||||||
|
.replace('FLIPPER_UNIXNAME_REPLACE_ME', environmentInfo.os.unixname)
|
||||||
|
.replace('FLIPPER_SESSION_ID_REPLACE_ME', sessionId);
|
||||||
res.end(processedContent);
|
res.end(processedContent);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ declare global {
|
|||||||
};
|
};
|
||||||
GRAPH_SECRET: string;
|
GRAPH_SECRET: string;
|
||||||
FLIPPER_APP_VERSION: string;
|
FLIPPER_APP_VERSION: string;
|
||||||
|
FLIPPER_SESSION_ID: string;
|
||||||
|
FLIPPER_UNIXNAME: string;
|
||||||
|
|
||||||
flipperShowMessage?(message: string): void;
|
flipperShowMessage?(message: string): void;
|
||||||
flipperHideMessage?(): void;
|
flipperHideMessage?(): void;
|
||||||
|
|||||||
@@ -139,6 +139,8 @@
|
|||||||
|
|
||||||
window.GRAPH_SECRET = 'GRAPH_SECRET_REPLACE_ME';
|
window.GRAPH_SECRET = 'GRAPH_SECRET_REPLACE_ME';
|
||||||
window.FLIPPER_APP_VERSION = 'FLIPPER_APP_VERSION_REPLACE_ME';
|
window.FLIPPER_APP_VERSION = 'FLIPPER_APP_VERSION_REPLACE_ME';
|
||||||
|
window.FLIPPER_SESSION_ID = 'FLIPPER_SESSION_ID_REPLACE_ME';
|
||||||
|
window.FLIPPER_UNIXNAME = 'FLIPPER_UNIXNAME_REPLACE_ME';
|
||||||
|
|
||||||
const params = new URL(location.href).searchParams;
|
const params = new URL(location.href).searchParams;
|
||||||
let token = params.get('token');
|
let token = params.get('token');
|
||||||
|
|||||||
@@ -88,6 +88,8 @@
|
|||||||
|
|
||||||
window.GRAPH_SECRET = 'GRAPH_SECRET_REPLACE_ME';
|
window.GRAPH_SECRET = 'GRAPH_SECRET_REPLACE_ME';
|
||||||
window.FLIPPER_APP_VERSION = 'FLIPPER_APP_VERSION_REPLACE_ME';
|
window.FLIPPER_APP_VERSION = 'FLIPPER_APP_VERSION_REPLACE_ME';
|
||||||
|
window.FLIPPER_SESSION_ID = 'FLIPPER_SESSION_ID_REPLACE_ME';
|
||||||
|
window.FLIPPER_UNIXNAME = 'FLIPPER_UNIXNAME_REPLACE_ME';
|
||||||
|
|
||||||
// load correct theme (n.b. this doesn't handle system value specifically, will assume light in such cases)
|
// load correct theme (n.b. this doesn't handle system value specifically, will assume light in such cases)
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user