react-native-inapp-inspector 1.1.27 → 1.1.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/src/main/java/com/inappinspector/NetworkInspectorModule.java +29 -46
- package/dist/commonjs/components/AppHeaderLogo.js +12 -15
- package/dist/commonjs/components/ConsoleLogCard.js +31 -7
- package/dist/commonjs/components/CopyButton.js +15 -1
- package/dist/commonjs/components/DomainHeader.js +56 -28
- package/dist/commonjs/components/ErrorBoundary.d.ts +1 -1
- package/dist/commonjs/components/ErrorBoundary.js +530 -100
- package/dist/commonjs/components/HighlightText.js +7 -1
- package/dist/commonjs/components/Inspector/AnalyticsTab.js +190 -126
- package/dist/commonjs/components/Inspector/BundleTab.d.ts +1 -0
- package/dist/commonjs/components/Inspector/BundleTab.js +145 -21
- package/dist/commonjs/components/Inspector/CrashTab.js +0 -8
- package/dist/commonjs/components/Inspector/InspectorHeader.js +17 -3
- package/dist/commonjs/components/Inspector/LogDetail.js +8 -5
- package/dist/commonjs/components/Inspector/MainScreen.js +4 -0
- package/dist/commonjs/components/Inspector/NetworkDetail.js +65 -24
- package/dist/commonjs/components/Inspector/PerformanceTab.d.ts +5 -0
- package/dist/commonjs/components/Inspector/PerformanceTab.js +588 -155
- package/dist/commonjs/components/Inspector/SettingsPanel.js +57 -22
- package/dist/commonjs/components/Inspector/TabBar.js +13 -1
- package/dist/commonjs/components/JsonViewer.js +25 -3
- package/dist/commonjs/components/LogCard.js +173 -40
- package/dist/commonjs/components/NetworkIcons.d.ts +112 -102
- package/dist/commonjs/components/Toast.d.ts +3 -0
- package/dist/commonjs/components/Toast.js +152 -0
- package/dist/commonjs/components/TouchableScale.d.ts +1 -0
- package/dist/commonjs/components/TouchableScale.js +3 -3
- package/dist/commonjs/components/TreeNode.js +1 -1
- package/dist/commonjs/constants/index.js +6 -6
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/analyticsLogger.d.ts +1 -11
- package/dist/commonjs/customHooks/analyticsLogger.js +8 -1
- package/dist/commonjs/customHooks/bundleAnalyzer.js +121 -124
- package/dist/commonjs/customHooks/networkLogger.d.ts +1 -0
- package/dist/commonjs/customHooks/networkLogger.js +16 -0
- package/dist/commonjs/customHooks/performanceTracker.d.ts +74 -0
- package/dist/commonjs/customHooks/performanceTracker.js +546 -392
- package/dist/commonjs/customHooks/reduxLogger.d.ts +1 -0
- package/dist/commonjs/customHooks/reduxLogger.js +3 -1
- package/dist/commonjs/helpers/index.d.ts +4 -0
- package/dist/commonjs/helpers/index.js +92 -69
- package/dist/commonjs/helpers/toast.d.ts +4 -0
- package/dist/commonjs/helpers/toast.js +20 -0
- package/dist/commonjs/i18n/locales/en.json +229 -5
- package/dist/commonjs/index.d.ts +1 -1
- package/dist/commonjs/index.js +36 -2
- package/dist/commonjs/styles/index.d.ts +63 -15
- package/dist/commonjs/styles/index.js +79 -32
- package/dist/commonjs/types/interfaces.d.ts +3 -0
- package/dist/esm/components/AppHeaderLogo.js +12 -15
- package/dist/esm/components/ConsoleLogCard.js +33 -9
- package/dist/esm/components/CopyButton.js +15 -1
- package/dist/esm/components/DomainHeader.js +56 -28
- package/dist/esm/components/ErrorBoundary.d.ts +1 -1
- package/dist/esm/components/ErrorBoundary.js +498 -101
- package/dist/esm/components/HighlightText.js +7 -1
- package/dist/esm/components/Inspector/AnalyticsTab.js +191 -127
- package/dist/esm/components/Inspector/BundleTab.d.ts +1 -0
- package/dist/esm/components/Inspector/BundleTab.js +145 -23
- package/dist/esm/components/Inspector/CrashTab.js +0 -8
- package/dist/esm/components/Inspector/InspectorHeader.js +18 -4
- package/dist/esm/components/Inspector/LogDetail.js +10 -7
- package/dist/esm/components/Inspector/MainScreen.js +4 -0
- package/dist/esm/components/Inspector/NetworkDetail.js +66 -25
- package/dist/esm/components/Inspector/PerformanceTab.d.ts +5 -0
- package/dist/esm/components/Inspector/PerformanceTab.js +591 -158
- package/dist/esm/components/Inspector/SettingsPanel.js +57 -22
- package/dist/esm/components/Inspector/TabBar.js +13 -1
- package/dist/esm/components/JsonViewer.js +25 -3
- package/dist/esm/components/LogCard.js +175 -42
- package/dist/esm/components/NetworkIcons.d.ts +112 -102
- package/dist/esm/components/Toast.d.ts +3 -0
- package/dist/esm/components/Toast.js +117 -0
- package/dist/esm/components/TouchableScale.d.ts +1 -0
- package/dist/esm/components/TouchableScale.js +3 -3
- package/dist/esm/components/TreeNode.js +1 -1
- package/dist/esm/constants/index.js +6 -6
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/analyticsLogger.d.ts +1 -11
- package/dist/esm/customHooks/analyticsLogger.js +6 -0
- package/dist/esm/customHooks/bundleAnalyzer.js +121 -124
- package/dist/esm/customHooks/networkLogger.d.ts +1 -0
- package/dist/esm/customHooks/networkLogger.js +16 -0
- package/dist/esm/customHooks/performanceTracker.d.ts +74 -0
- package/dist/esm/customHooks/performanceTracker.js +531 -391
- package/dist/esm/customHooks/reduxLogger.d.ts +1 -0
- package/dist/esm/customHooks/reduxLogger.js +1 -0
- package/dist/esm/helpers/index.d.ts +4 -0
- package/dist/esm/helpers/index.js +87 -69
- package/dist/esm/helpers/toast.d.ts +4 -0
- package/dist/esm/helpers/toast.js +15 -0
- package/dist/esm/i18n/locales/en.json +229 -5
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +24 -3
- package/dist/esm/styles/index.d.ts +63 -15
- package/dist/esm/styles/index.js +79 -32
- package/dist/esm/types/interfaces.d.ts +3 -0
- package/package.json +4 -1
|
@@ -28,7 +28,6 @@ public class NetworkInspectorModule extends ReactContextBaseJavaModule {
|
|
|
28
28
|
public NetworkInspectorModule(ReactApplicationContext reactContext) {
|
|
29
29
|
super(reactContext);
|
|
30
30
|
this.reactContext = reactContext;
|
|
31
|
-
setupNativeCrashProtection();
|
|
32
31
|
}
|
|
33
32
|
|
|
34
33
|
@NonNull
|
|
@@ -38,55 +37,39 @@ public class NetworkInspectorModule extends ReactContextBaseJavaModule {
|
|
|
38
37
|
}
|
|
39
38
|
|
|
40
39
|
private void setupNativeCrashProtection() {
|
|
41
|
-
if (isProtectionEnabled)
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
try {
|
|
45
|
-
defaultHandler = Thread.getDefaultUncaughtExceptionHandler();
|
|
46
|
-
Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
|
|
47
|
-
@Override
|
|
48
|
-
public void uncaughtException(@NonNull Thread thread, @NonNull Throwable throwable) {
|
|
49
|
-
try {
|
|
50
|
-
StringWriter sw = new StringWriter();
|
|
51
|
-
PrintWriter pw = new PrintWriter(sw);
|
|
52
|
-
throwable.printStackTrace(pw);
|
|
53
|
-
String stackTrace = sw.toString();
|
|
54
|
-
String message = throwable.getMessage() != null ? throwable.getMessage() : throwable.toString();
|
|
55
|
-
|
|
56
|
-
Log.e(TAG, "Intercepted Android Native Crash: " + message, throwable);
|
|
57
|
-
|
|
58
|
-
sendCrashEventToJS(message, stackTrace, thread.getName());
|
|
59
|
-
} catch (Exception e) {
|
|
60
|
-
Log.e(TAG, "Failed to dispatch native crash event", e);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
// Keep main looper processing to prevent instant process exit
|
|
64
|
-
if (Looper.myLooper() != null) {
|
|
65
|
-
while (true) {
|
|
66
|
-
try {
|
|
67
|
-
Looper.loop();
|
|
68
|
-
} catch (Throwable inner) {
|
|
69
|
-
Log.e(TAG, "Caught inner loop exception", inner);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
} catch (Exception e) {
|
|
76
|
-
Log.e(TAG, "Error installing uncaught exception handler", e);
|
|
40
|
+
if (isProtectionEnabled) {
|
|
41
|
+
return;
|
|
77
42
|
}
|
|
43
|
+
defaultHandler = Thread.getDefaultUncaughtExceptionHandler();
|
|
44
|
+
Thread.setDefaultUncaughtExceptionHandler((thread, throwable) -> {
|
|
45
|
+
try {
|
|
46
|
+
handleNativeCrash(thread, throwable);
|
|
47
|
+
} catch (Exception e) {
|
|
48
|
+
Log.e(TAG, "Error in native crash handler", e);
|
|
49
|
+
} finally {
|
|
50
|
+
if (defaultHandler != null) {
|
|
51
|
+
defaultHandler.uncaughtException(thread, throwable);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
isProtectionEnabled = true;
|
|
56
|
+
Log.i(TAG, "Native crash protection enabled");
|
|
78
57
|
}
|
|
79
58
|
|
|
80
|
-
private void
|
|
59
|
+
private void handleNativeCrash(Thread thread, Throwable throwable) {
|
|
81
60
|
try {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
61
|
+
StringWriter sw = new StringWriter();
|
|
62
|
+
PrintWriter pw = new PrintWriter(sw);
|
|
63
|
+
throwable.printStackTrace(pw);
|
|
64
|
+
String stackTrace = sw.toString();
|
|
65
|
+
|
|
66
|
+
WritableMap params = Arguments.createMap();
|
|
67
|
+
params.putString("error", throwable.getMessage() != null ? throwable.getMessage() : "Unknown native crash");
|
|
68
|
+
params.putString("name", throwable.getClass().getName());
|
|
69
|
+
params.putString("stack", stackTrace);
|
|
70
|
+
params.putDouble("timestamp", System.currentTimeMillis());
|
|
71
|
+
|
|
72
|
+
if (reactContext.hasActiveReactInstance()) {
|
|
90
73
|
reactContext
|
|
91
74
|
.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
|
|
92
75
|
.emit("onNativeCrash", params);
|
|
@@ -40,13 +40,12 @@ exports.AppHeaderLogo = void 0;
|
|
|
40
40
|
const react_1 = __importStar(require("react"));
|
|
41
41
|
const react_native_1 = require("react-native");
|
|
42
42
|
const BrandSquareIcon_1 = __importDefault(require("./BrandSquareIcon"));
|
|
43
|
-
const AppColors_1 = require("../styles/AppColors");
|
|
44
43
|
const AppHeaderLogo = ({ size = 46, customIcon, }) => {
|
|
45
44
|
const [loadError, setLoadError] = (0, react_1.useState)(false);
|
|
46
|
-
// 1. If customIcon is explicitly provided, render it directly
|
|
45
|
+
// 1. If customIcon is explicitly provided, render it directly edge-to-edge
|
|
47
46
|
if (customIcon) {
|
|
48
47
|
return (<react_native_1.View style={[logoStyles.container, { width: size, height: size }]}>
|
|
49
|
-
<react_native_1.Image source={customIcon} style={
|
|
48
|
+
<react_native_1.Image source={customIcon} style={logoStyles.image} resizeMode="cover"/>
|
|
50
49
|
</react_native_1.View>);
|
|
51
50
|
}
|
|
52
51
|
// 2. Dynamically query installed native app icon (AppIcon on iOS, ic_launcher on Android)
|
|
@@ -57,29 +56,27 @@ const AppHeaderLogo = ({ size = 46, customIcon, }) => {
|
|
|
57
56
|
default: { uri: 'AppIcon' },
|
|
58
57
|
});
|
|
59
58
|
return (<react_native_1.View style={[logoStyles.container, { width: size, height: size }]}>
|
|
60
|
-
<react_native_1.Image source={nativeSource} style={
|
|
59
|
+
<react_native_1.Image source={nativeSource} style={logoStyles.image} resizeMode="cover" onError={() => setLoadError(true)}/>
|
|
61
60
|
</react_native_1.View>);
|
|
62
61
|
}
|
|
63
62
|
// 3. Fallback: Inspector's Signature Owl Brand Logo
|
|
64
63
|
return (<react_native_1.View style={[logoStyles.container, { width: size, height: size }]}>
|
|
65
|
-
<BrandSquareIcon_1.default size={size
|
|
64
|
+
<BrandSquareIcon_1.default size={size}/>
|
|
66
65
|
</react_native_1.View>);
|
|
67
66
|
};
|
|
68
67
|
exports.AppHeaderLogo = AppHeaderLogo;
|
|
69
68
|
const logoStyles = react_native_1.StyleSheet.create({
|
|
70
69
|
container: {
|
|
70
|
+
borderRadius: 10,
|
|
71
|
+
overflow: 'hidden',
|
|
72
|
+
backgroundColor: 'transparent',
|
|
71
73
|
alignItems: 'center',
|
|
72
74
|
justifyContent: 'center',
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
shadowColor: AppColors_1.AppColors.primaryBlack,
|
|
79
|
-
shadowOffset: { width: 0, height: 2 },
|
|
80
|
-
shadowOpacity: 0.15,
|
|
81
|
-
shadowRadius: 4,
|
|
82
|
-
elevation: 3,
|
|
75
|
+
},
|
|
76
|
+
image: {
|
|
77
|
+
width: '100%',
|
|
78
|
+
height: '100%',
|
|
79
|
+
borderRadius: 10,
|
|
83
80
|
},
|
|
84
81
|
});
|
|
85
82
|
exports.default = exports.AppHeaderLogo;
|
|
@@ -232,18 +232,34 @@ exports.ConsoleLogCard = react_1.default.memo(function ConsoleLogCard({ item, se
|
|
|
232
232
|
<react_native_1.Text style={styles.footerText}>{(0, helpers_1.formatTime)(item.timestamp)}</react_native_1.Text>
|
|
233
233
|
{parsedCaller && (<>
|
|
234
234
|
<react_native_1.View style={styles.footerDot}/>
|
|
235
|
-
<react_native_1.
|
|
235
|
+
<react_native_1.Pressable onPress={e => {
|
|
236
|
+
e.stopPropagation?.();
|
|
237
|
+
(0, helpers_1.openInVSCode)(parsedCaller.rawFilePath ||
|
|
238
|
+
parsedCaller.fullPath ||
|
|
239
|
+
parsedCaller.fileName, parsedCaller.lineNumber, parsedCaller.columnNumber);
|
|
240
|
+
}} hitSlop={8} style={{
|
|
241
|
+
flexDirection: 'row',
|
|
242
|
+
alignItems: 'center',
|
|
243
|
+
gap: 4,
|
|
244
|
+
maxWidth: 185,
|
|
245
|
+
backgroundColor: `${AppColors_1.AppColors.sky600}10`,
|
|
246
|
+
borderColor: `${AppColors_1.AppColors.sky600}2B`,
|
|
247
|
+
borderWidth: 1,
|
|
248
|
+
borderRadius: 5,
|
|
249
|
+
paddingHorizontal: 5,
|
|
250
|
+
paddingVertical: 1.5,
|
|
251
|
+
}}>
|
|
236
252
|
{parsedCaller.fileExt && parsedCaller.fileExt !== 'other' && (<react_native_1.View style={{
|
|
237
253
|
backgroundColor: parsedCaller.fileExt === 'tsx' || parsedCaller.fileExt === 'ts'
|
|
238
|
-
? `${AppColors_1.AppColors.brandPurple}
|
|
239
|
-
: `${AppColors_1.AppColors.teal600}
|
|
254
|
+
? `${AppColors_1.AppColors.brandPurple}22`
|
|
255
|
+
: `${AppColors_1.AppColors.teal600}22`,
|
|
240
256
|
borderRadius: 3,
|
|
241
257
|
paddingHorizontal: 3.5,
|
|
242
|
-
paddingVertical:
|
|
258
|
+
paddingVertical: 0.5,
|
|
243
259
|
}}>
|
|
244
260
|
<react_native_1.Text style={{
|
|
245
261
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
246
|
-
fontSize: 8
|
|
262
|
+
fontSize: 8,
|
|
247
263
|
color: parsedCaller.fileExt === 'tsx' || parsedCaller.fileExt === 'ts'
|
|
248
264
|
? AppColors_1.AppColors.brandPurple
|
|
249
265
|
: AppColors_1.AppColors.teal600,
|
|
@@ -251,11 +267,19 @@ exports.ConsoleLogCard = react_1.default.memo(function ConsoleLogCard({ item, se
|
|
|
251
267
|
{parsedCaller.fileExt.toUpperCase()}
|
|
252
268
|
</react_native_1.Text>
|
|
253
269
|
</react_native_1.View>)}
|
|
254
|
-
<react_native_1.Text style={[
|
|
270
|
+
<react_native_1.Text style={[
|
|
271
|
+
styles.footerText,
|
|
272
|
+
{
|
|
273
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
274
|
+
color: AppColors_1.AppColors.sky600,
|
|
275
|
+
fontSize: 9.5,
|
|
276
|
+
},
|
|
277
|
+
]} numberOfLines={1} ellipsizeMode="middle">
|
|
255
278
|
{parsedCaller.fileName}
|
|
256
279
|
{parsedCaller.lineNumber ? `:${parsedCaller.lineNumber}` : ''}
|
|
257
280
|
</react_native_1.Text>
|
|
258
|
-
|
|
281
|
+
<NetworkIcons_1.ExternalLinkIcon color={AppColors_1.AppColors.sky600} size={8.5}/>
|
|
282
|
+
</react_native_1.Pressable>
|
|
259
283
|
</>)}
|
|
260
284
|
</react_native_1.View>
|
|
261
285
|
|
|
@@ -37,6 +37,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
const react_1 = __importStar(require("react"));
|
|
40
|
+
const react_native_1 = require("react-native");
|
|
40
41
|
// Components
|
|
41
42
|
const TouchableScale_1 = __importDefault(require("./TouchableScale"));
|
|
42
43
|
// Helpers
|
|
@@ -54,6 +55,19 @@ const CopyButton = react_1.default.memo(({ value, label, iconType = 'copy' }) =>
|
|
|
54
55
|
setCopied(true);
|
|
55
56
|
setTimeout(() => setCopied(false), 1200);
|
|
56
57
|
}, [value, label]);
|
|
58
|
+
const handleLongPress = (0, react_1.useCallback)(() => {
|
|
59
|
+
try {
|
|
60
|
+
const resolvedValue = typeof value === 'function' ? value() : value;
|
|
61
|
+
const textToShare = typeof resolvedValue === 'string'
|
|
62
|
+
? resolvedValue
|
|
63
|
+
: JSON.stringify(resolvedValue, null, 2);
|
|
64
|
+
react_native_1.Share.share({
|
|
65
|
+
message: textToShare,
|
|
66
|
+
title: label,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
catch { }
|
|
70
|
+
}, [value, label]);
|
|
57
71
|
const containerStyle = [
|
|
58
72
|
styles_1.default.iconSquareBtn,
|
|
59
73
|
copied && styles_1.default.iconSquareBtnSuccess,
|
|
@@ -63,7 +77,7 @@ const CopyButton = react_1.default.memo(({ value, label, iconType = 'copy' }) =>
|
|
|
63
77
|
: iconType === 'fetch'
|
|
64
78
|
? NetworkIcons_1.FetchIcon
|
|
65
79
|
: NetworkIcons_1.CopyIcon;
|
|
66
|
-
return (<TouchableScale_1.default onPress={handlePress} hitSlop={12} style={containerStyle}>
|
|
80
|
+
return (<TouchableScale_1.default onPress={handlePress} onLongPress={handleLongPress} hitSlop={12} style={containerStyle}>
|
|
67
81
|
{copied ? (<NetworkIcons_1.CheckIcon color={AppColors_1.AppColors.greenColor} size={14}/>) : (<IconComponent color={AppColors_1.AppColors.grayTextWeak} size={14}/>)}
|
|
68
82
|
</TouchableScale_1.default>);
|
|
69
83
|
});
|
|
@@ -40,6 +40,7 @@ const react_1 = __importStar(require("react"));
|
|
|
40
40
|
const react_native_1 = require("react-native");
|
|
41
41
|
// Stylesheet
|
|
42
42
|
const AppColors_1 = require("../styles/AppColors");
|
|
43
|
+
const AppFonts_1 = require("../styles/AppFonts");
|
|
43
44
|
// Helpers
|
|
44
45
|
const helpers_1 = require("../helpers");
|
|
45
46
|
// Assets
|
|
@@ -73,10 +74,61 @@ const DomainHeader = ({ pageName, color, stats, activeFilters, onToggleFilter, i
|
|
|
73
74
|
<react_native_1.View style={[styles_1.default.domainIconWrap, { backgroundColor: `${color}18` }]}>
|
|
74
75
|
<NetworkIcons_1.ScreenIcon color={color} size={14}/>
|
|
75
76
|
</react_native_1.View>
|
|
76
|
-
<react_native_1.View style={{ flex: 1, justifyContent: 'center' }}>
|
|
77
|
-
<react_native_1.
|
|
78
|
-
{
|
|
79
|
-
|
|
77
|
+
<react_native_1.View style={{ flex: 1, justifyContent: 'center', minWidth: 0 }}>
|
|
78
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 6 }}>
|
|
79
|
+
<react_native_1.Text style={[styles_1.default.domainTitleText, { flexShrink: 1 }]} numberOfLines={1}>
|
|
80
|
+
{pageName}
|
|
81
|
+
</react_native_1.Text>
|
|
82
|
+
{total > 0 && (<react_native_1.View style={{
|
|
83
|
+
flexDirection: 'row',
|
|
84
|
+
alignItems: 'center',
|
|
85
|
+
gap: 4,
|
|
86
|
+
backgroundColor: stats.failed > 0
|
|
87
|
+
? '#FEE2E2'
|
|
88
|
+
: stats.loading > 0
|
|
89
|
+
? '#FEF3C7'
|
|
90
|
+
: '#D1FAE5',
|
|
91
|
+
paddingHorizontal: 5,
|
|
92
|
+
paddingVertical: 1.5,
|
|
93
|
+
borderRadius: 4,
|
|
94
|
+
}}>
|
|
95
|
+
<react_native_1.View style={{
|
|
96
|
+
width: 24,
|
|
97
|
+
height: 3.5,
|
|
98
|
+
borderRadius: 2,
|
|
99
|
+
backgroundColor: '#E5E7EB',
|
|
100
|
+
flexDirection: 'row',
|
|
101
|
+
overflow: 'hidden',
|
|
102
|
+
}}>
|
|
103
|
+
{pctSuccess > 0 && (<react_native_1.View style={{
|
|
104
|
+
width: `${pctSuccess}%`,
|
|
105
|
+
height: '100%',
|
|
106
|
+
backgroundColor: '#10B981',
|
|
107
|
+
}}/>)}
|
|
108
|
+
{pctFailed > 0 && (<react_native_1.View style={{
|
|
109
|
+
width: `${pctFailed}%`,
|
|
110
|
+
height: '100%',
|
|
111
|
+
backgroundColor: '#EF4444',
|
|
112
|
+
}}/>)}
|
|
113
|
+
{pctLoading > 0 && (<react_native_1.View style={{
|
|
114
|
+
width: `${pctLoading}%`,
|
|
115
|
+
height: '100%',
|
|
116
|
+
backgroundColor: '#F59E0B',
|
|
117
|
+
}}/>)}
|
|
118
|
+
</react_native_1.View>
|
|
119
|
+
<react_native_1.Text style={{
|
|
120
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
121
|
+
fontSize: 8.5,
|
|
122
|
+
color: stats.failed > 0
|
|
123
|
+
? '#991B1B'
|
|
124
|
+
: stats.loading > 0
|
|
125
|
+
? '#92400E'
|
|
126
|
+
: '#065F46',
|
|
127
|
+
}}>
|
|
128
|
+
{pctSuccess}%
|
|
129
|
+
</react_native_1.Text>
|
|
130
|
+
</react_native_1.View>)}
|
|
131
|
+
</react_native_1.View>
|
|
80
132
|
<react_native_1.Text style={styles_1.default.domainSummaryText} numberOfLines={1}>
|
|
81
133
|
{(0, helpers_1.formatDateTime)(timestamp)}
|
|
82
134
|
</react_native_1.Text>
|
|
@@ -132,30 +184,6 @@ const DomainHeader = ({ pageName, color, stats, activeFilters, onToggleFilter, i
|
|
|
132
184
|
})}
|
|
133
185
|
</react_native_1.View>
|
|
134
186
|
</react_native_1.View>
|
|
135
|
-
|
|
136
|
-
{total > 0 && (<react_native_1.View style={styles_1.default.domainProgressTrack}>
|
|
137
|
-
{pctSuccess > 0 && (<react_native_1.View style={[
|
|
138
|
-
styles_1.default.domainProgressSegment,
|
|
139
|
-
{
|
|
140
|
-
width: `${pctSuccess}%`,
|
|
141
|
-
backgroundColor: AppColors_1.AppColors.greenColor,
|
|
142
|
-
},
|
|
143
|
-
]}/>)}
|
|
144
|
-
{pctFailed > 0 && (<react_native_1.View style={[
|
|
145
|
-
styles_1.default.domainProgressSegment,
|
|
146
|
-
{
|
|
147
|
-
width: `${pctFailed}%`,
|
|
148
|
-
backgroundColor: AppColors_1.AppColors.errorColor,
|
|
149
|
-
},
|
|
150
|
-
]}/>)}
|
|
151
|
-
{pctLoading > 0 && (<react_native_1.View style={[
|
|
152
|
-
styles_1.default.domainProgressSegment,
|
|
153
|
-
{
|
|
154
|
-
width: `${pctLoading}%`,
|
|
155
|
-
backgroundColor: AppColors_1.AppColors.darkOrange,
|
|
156
|
-
},
|
|
157
|
-
]}/>)}
|
|
158
|
-
</react_native_1.View>)}
|
|
159
187
|
</react_native_1.Pressable>);
|
|
160
188
|
};
|
|
161
189
|
exports.default = DomainHeader;
|
|
@@ -6,6 +6,6 @@ export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBo
|
|
|
6
6
|
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
7
7
|
private handleReset;
|
|
8
8
|
private handleCopyTrace;
|
|
9
|
-
render(): React.ReactNode;
|
|
9
|
+
render(): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode>> | React.JSX.Element;
|
|
10
10
|
}
|
|
11
11
|
export default ErrorBoundary;
|