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
1 change: 1 addition & 0 deletions .storybook/preview-body.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script>
window.digmaApiUrl = "https://localhost:5051";
window.digmaApiProxyPrefix = "/api-proxy";
window.theme;
window.platform = "JetBrains";
window.ide = "IDEA";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const getHistogramAttachment = (

return {
url: `${
config.digmaApiUrl
config.digmaApiProxyPrefix
}/Graphs/graphForSpanScaling?${histogramUrlParams.toString()}`,
fileName: `histogram.html`
};
Expand Down
3 changes: 3 additions & 0 deletions src/components/common/App/ConfigContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import { ConfigContextData } from "./types";

export const ConfigContext = createContext<ConfigContextData>({
digmaApiUrl: isString(window.digmaApiUrl) ? window.digmaApiUrl : "",
digmaApiProxyPrefix: isString(window.digmaApiProxyPrefix)
? window.digmaApiProxyPrefix
: "",
digmaStatus: undefined,
isObservabilityEnabled: window.isObservabilityEnabled === true,
jaegerURL: isString(window.jaegerURL) ? window.jaegerURL : "",
Expand Down
1 change: 1 addition & 0 deletions src/components/common/App/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export interface GlobalState {

export interface ConfigContextData {
digmaApiUrl: string;
digmaApiProxyPrefix: string;
digmaStatus: DigmaStatus | undefined;
isObservabilityEnabled: boolean;
jaegerURL: string;
Expand Down
1 change: 1 addition & 0 deletions src/globals.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ declare global {
) => string | undefined;
cancelMessageToDigma: (request_id: string) => void;
digmaApiUrl?: unknown;
digmaApiProxyPrefix?: unknown;
theme?: unknown;
platform?: unknown;
ide?: unknown;
Expand Down