diff --git a/.storybook/preview-body.html b/.storybook/preview-body.html
index 567baa70a..065a1ec96 100644
--- a/.storybook/preview-body.html
+++ b/.storybook/preview-body.html
@@ -5,7 +5,6 @@
window.mainFont;
window.codeFont;
window.isJaegerEnabled = true;
- window.recentActivityRefreshInterval;
window.recentActivityExpirationLimit;
window.recentActivityDocumentationURL =
"https://github.com/digma-ai/digma-vscode-plugin#%EF%B8%8F-extension-settings";
diff --git a/assets/recentActivity/index.ejs b/assets/recentActivity/index.ejs
index 56af3bc62..665dac875 100644
--- a/assets/recentActivity/index.ejs
+++ b/assets/recentActivity/index.ejs
@@ -20,7 +20,6 @@
window.mainFont;
window.codeFont;
window.isJaegerEnabled;
- window.recentActivityRefreshInterval;
window.recentActivityExpirationLimit;
window.recentActivityDocumentationURL;
diff --git a/src/components/RecentActivity/index.tsx b/src/components/RecentActivity/index.tsx
index 7a165be79..7b0848d4d 100644
--- a/src/components/RecentActivity/index.tsx
+++ b/src/components/RecentActivity/index.tsx
@@ -22,15 +22,10 @@ const documentationURL =
? window.recentActivityDocumentationURL
: null;
-const REFRESH_INTERVAL =
- typeof window.recentActivityRefreshInterval === "number"
- ? window.recentActivityRefreshInterval
- : 10 * 1000; // in milliseconds
-
const ACTION_PREFIX = "RECENT_ACTIVITY";
const actions = addPrefix(ACTION_PREFIX, {
- GET_DATA: "GET_DATA",
+ INITIALIZE: "INITIALIZE",
SET_DATA: "SET_DATA",
GO_TO_SPAN: "GO_TO_SPAN",
GO_TO_TRACE: "GO_TO_TRACE"
@@ -73,13 +68,8 @@ export const RecentActivity = (props: RecentActivityProps) => {
useEffect(() => {
window.sendMessageToDigma({
- action: actions.GET_DATA
+ action: actions.INITIALIZE
});
- const refreshInterval = setInterval(() => {
- window.sendMessageToDigma({
- action: actions.GET_DATA
- });
- }, REFRESH_INTERVAL);
const handleRecentActivityData = (data: unknown) => {
setData(data as RecentActivityData);
@@ -96,8 +86,6 @@ export const RecentActivity = (props: RecentActivityProps) => {
);
return () => {
- clearInterval(refreshInterval);
-
dispatcher.removeActionListener(
actions.SET_DATA,
handleRecentActivityData
diff --git a/src/globals.d.ts b/src/globals.d.ts
index a1634442e..26d60b3f1 100644
--- a/src/globals.d.ts
+++ b/src/globals.d.ts
@@ -28,7 +28,6 @@ declare global {
mainFont?: unknown;
codeFont?: unknown;
isJaegerEnabled?: unknown;
- recentActivityRefreshInterval?: unknown;
recentActivityExpirationLimit?: unknown;
recentActivityDocumentationURL?: unknown;
wizardSkipInstallationStep?: unknown;