Skip to content

Commit 4929dfc

Browse files
Merge pull request #1328 from digma-ai/feature/vs-assets-tab
Enable Assets tab for Visual Studio
2 parents e965c81 + 33c384c commit 4929dfc

File tree

4 files changed

+29
-29
lines changed

4 files changed

+29
-29
lines changed

src/components/Main/index.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,12 +206,11 @@ export const Main = () => {
206206

207207
if (scope?.context) {
208208
switch (scope.context.event) {
209-
case ScopeChangeEvent.HistoryNavigated: {
209+
case ScopeChangeEvent.HistoryNavigated:
210210
updateBrowserLocation(
211211
scope.context.payload?.location as HistoryEntryLocation
212212
);
213213
break;
214-
}
215214
case ScopeChangeEvent.HistoryCleared:
216215
goTo(`/${TAB_IDS.ISSUES}`, {
217216
state: {
@@ -227,6 +226,10 @@ export const Main = () => {
227226
break;
228227
case ScopeChangeEvent.JaegerSpanLinkClicked:
229228
case ScopeChangeEvent.AssetsAssetCardTitleLinkClicked:
229+
if (platform === "Visual Studio") {
230+
goTo(`/${TAB_IDS.ISSUES}`, { state });
231+
break;
232+
}
230233
goTo(`/${TAB_IDS.HIGHLIGHTS}`, { state });
231234
break;
232235
case ScopeChangeEvent.HighlightsTopIssuesCardItemClicked:
@@ -248,10 +251,9 @@ export const Main = () => {
248251
goTo(`/${TAB_IDS.ASSETS}`, { state });
249252
break;
250253
case ScopeChangeEvent.MetricsServiceSelected:
251-
case ScopeChangeEvent.MetricsEndpointSelected: {
254+
case ScopeChangeEvent.MetricsEndpointSelected:
252255
goTo(`/${TAB_IDS.ISSUES}`, { state });
253256
break;
254-
}
255257
case ScopeChangeEvent.IdeCodeLensClicked: {
256258
const url = getURLToNavigateOnCodeLensClick(scope);
257259
if (url) {

src/components/Navigation/Tabs/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ const tabs: BaseTabData[] = [
2222
{
2323
title: "Issues",
2424
id: TAB_IDS.ISSUES,
25-
platforms: ["JetBrains", "Web"]
25+
platforms: ["JetBrains", "Visual Studio", "Web"]
2626
},
2727
{
2828
title: "Assets",
2929
id: TAB_IDS.ASSETS,
30-
platforms: ["JetBrains", "Web"]
30+
platforms: ["JetBrains", "Visual Studio", "Web"]
3131
},
3232
{
3333
title: "Analytics",

src/components/Navigation/index.tsx

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -462,19 +462,17 @@ export const Navigation = () => {
462462
)}
463463
</Tooltip>
464464
</s.Row> */}
465-
{platform === "JetBrains" && (
466-
<s.TabsContainer>
467-
<Tabs
468-
onTabSelect={handleTabSelect}
469-
selectedTabId={selectedTabId}
470-
spanCodeObjectId={scope?.span?.spanCodeObjectId}
471-
environmentId={environment?.id}
472-
unreadInsightsCount={scope?.unreadInsightsCount}
473-
hasErrors={scope?.hasErrors}
474-
services={selectedServices ?? undefined}
475-
/>
476-
</s.TabsContainer>
477-
)}
465+
<s.TabsContainer>
466+
<Tabs
467+
onTabSelect={handleTabSelect}
468+
selectedTabId={selectedTabId}
469+
spanCodeObjectId={scope?.span?.spanCodeObjectId}
470+
environmentId={environment?.id}
471+
unreadInsightsCount={scope?.unreadInsightsCount}
472+
hasErrors={scope?.hasErrors}
473+
services={selectedServices ?? undefined}
474+
/>
475+
</s.TabsContainer>
478476
</s.Container>
479477
);
480478
};

src/containers/Main/router.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,18 @@ export const routes: RouteObject[] = [
2828
path: TAB_IDS.ISSUES,
2929
element: <Insights insightViewType={"Issues"} key={"issues"} />
3030
},
31+
{
32+
path: TAB_IDS.ASSETS,
33+
element: <Assets />,
34+
children: [
35+
{
36+
path: ":typeId",
37+
element: <Assets />
38+
}
39+
]
40+
},
3141
...(platform === "JetBrains"
3242
? [
33-
{
34-
path: TAB_IDS.ASSETS,
35-
element: <Assets />,
36-
children: [
37-
{
38-
path: ":typeId",
39-
element: <Assets />
40-
}
41-
]
42-
},
4343
{
4444
path: TAB_IDS.ANALYTICS,
4545
element: (

0 commit comments

Comments
 (0)