Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions assets/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@
</head>
<body>
<div id="root"></div>
<!-- Environment variables -->
<script>
window.recentActivityRefreshInterval;
window.recentActivityExpirationLimit;
window.recentActivityDocumentationURL;
</script>
<%= htmlWebpackPlugin.tags.bodyTags %>
</body>
</html>
29 changes: 19 additions & 10 deletions src/components/RecentActivity/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ import { isRecent, RecentActivityTable } from "./RecentActivityTable";
import * as s from "./styles";
import { EntrySpan, RecentActivityData } from "./types";

const DOCUMENTATION_LINK =
"https://github.com/digma-ai/digma-vscode-plugin#%EF%B8%8F-extension-settings";
const documentationURL =
typeof window.recentActivityDocumentationURL === "string"
? window.recentActivityDocumentationURL
: null;

const REFRESH_INTERVAL =
typeof window.recentActivityRefreshInterval === "number"
Expand All @@ -35,14 +37,21 @@ const renderNoData = () => {
<DigmaLogoFlatIcon size={64} />
</CursorFollower>
<s.NoDataTitle>No Recent Activity</s.NoDataTitle>
<s.NoDataText>Check out our documentation to learn how to</s.NoDataText>
<s.DocumentationLink
href={DOCUMENTATION_LINK}
rel={"noopener noreferrer"}
target={"_blank"}
>
dig with digma
</s.DocumentationLink>
{documentationURL && (
<>
<s.NoDataText>
Check out our documentation to learn how to
</s.NoDataText>

<s.DocumentationLink
href={documentationURL}
rel={"noopener noreferrer"}
target={"_blank"}
>
dig with digma
</s.DocumentationLink>
</>
)}
</s.NoDataContainer>
);
};
Expand Down
1 change: 1 addition & 0 deletions src/globals.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ declare global {
theme?: Mode;
recentActivityRefreshInterval?: number;
recentActivityExpirationLimit?: number;
recentActivityDocumentationURL?: string;
}
}
1 change: 1 addition & 0 deletions webpack.common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const config: WebpackConfiguration = {
new HtmlWebpackPlugin({
template: path.resolve(__dirname, "./assets/index.ejs"),
inject: false,
minify: false,
scriptLoading: "blocking"
})
]
Expand Down