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
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "digma-ui",
"version": "2.1.1",
"version": "2.1.2",
"description": "Digma UI",
"main": "dist/index.js",
"scripts": {
Expand Down
45 changes: 41 additions & 4 deletions src/components/IdeLauncher/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ const getURLQueryParams = (url: string) => {
export const IdeLauncher = () => {
const theme = useTheme();
const themeKind = getThemeKind(theme);
const params = getURLQueryParams(window.location.search);
const { environmentName, spanDisplayName } = params;
const action = params["plugin.action"];
const [selectItems, setSelectItems] = useState<SelectItem[]>();
const isMobile = ["Android", "iPhone", "iPad"].some((x) =>
window.navigator.userAgent.includes(x)
Expand Down Expand Up @@ -170,7 +173,7 @@ export const IdeLauncher = () => {
</s.Title>
<s.Description>
Please check that IDE is running and click the{" "}
<s.ButtonName>Try again</s.ButtonName> button below.
<s.EmphasizedText>Try again</s.EmphasizedText> button below.
</s.Description>
</s.TextContainer>
<NewButton
Expand All @@ -194,20 +197,54 @@ export const IdeLauncher = () => {
<s.Title>Failed to find IDEs with Digma plugin running</s.Title>
<s.Description>
Please open the IDE with Digma plugin installed, check its
settings and click the <s.ButtonName>Refresh</s.ButtonName> button
below.
settings and click the{" "}
<s.EmphasizedText>Refresh</s.EmphasizedText> button below.
</s.Description>
</s.TextContainer>
<NewButton label={"Refresh"} onClick={handleRefreshButtonClick} />
</>
);
}

if (selectItems.length === 1) {
return (
<>
<s.TextContainer>
<s.Title>Opening the IDE...</s.Title>
<s.Description>
Your IDE client is opening automatically; you can close this tab.
</s.Description>
</s.TextContainer>
<s.SelectContainer>
<Select
placeholder={selectedItem?.label ?? "Select IDE Project"}
items={selectItems}
onChange={(value) => {
void handleSelectChange(value);
}}
/>
</s.SelectContainer>
</>
);
}

if (selectItems.length > 0) {
return (
<>
<s.TextContainer>
<s.Title>Select the IDE project to view issues in Digma</s.Title>
{action === "OpenReport" ? (
<s.Title>
Select the IDE project to view Metrics report in Digma
</s.Title>
) : (
<s.Title>
Select the IDE project to view{" "}
{spanDisplayName && <>{spanDisplayName} </>}
issues{" "}
{environmentName && <>for {environmentName} environment </>}
in Digma
</s.Title>
)}
<s.Description>
Please select the IDE project you&apos;d like to open.
</s.Description>
Expand Down
6 changes: 3 additions & 3 deletions src/components/IdeLauncher/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const TextContainer = styled.div`
flex-direction: column;
align-items: center;
gap: 24px;
max-width: 820px;
max-width: 1100px;
text-align: center;
`;

Expand All @@ -63,12 +63,12 @@ export const Description = styled.p`
}
`;

export const ButtonName = styled.span`
export const EmphasizedText = styled.span`
color: ${({ theme }) => theme.colors.v3.text.primary};
`;

export const SelectContainer = styled.div`
width: 228px;
width: 320px;
`;

export const Footer = styled.footer`
Expand Down
Loading