aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src')
-rw-r--r--server/sonar-web/src/main/js/apps/code/components/ComponentName.tsx8
-rw-r--r--server/sonar-web/src/main/js/apps/overview/utils.tsx2
-rw-r--r--server/sonar-web/src/main/js/helpers/__tests__/urls-test.ts4
-rw-r--r--server/sonar-web/src/main/js/helpers/urls.ts4
4 files changed, 10 insertions, 8 deletions
diff --git a/server/sonar-web/src/main/js/apps/code/components/ComponentName.tsx b/server/sonar-web/src/main/js/apps/code/components/ComponentName.tsx
index 18ad9680db7..d9f096bdfd6 100644
--- a/server/sonar-web/src/main/js/apps/code/components/ComponentName.tsx
+++ b/server/sonar-web/src/main/js/apps/code/components/ComponentName.tsx
@@ -68,9 +68,11 @@ export default function ComponentName({
const ariaLabel = unclickable ? translate('code.parent_folder') : undefined;
if (
- [ComponentQualifier.Application, ComponentQualifier.Portfolio].includes(
- rootComponent.qualifier as ComponentQualifier,
- ) &&
+ [
+ ComponentQualifier.Application,
+ ComponentQualifier.Portfolio,
+ ComponentQualifier.SubPortfolio,
+ ].includes(rootComponent.qualifier as ComponentQualifier) &&
[ComponentQualifier.Application, ComponentQualifier.Project].includes(
component.qualifier as ComponentQualifier,
)
diff --git a/server/sonar-web/src/main/js/apps/overview/utils.tsx b/server/sonar-web/src/main/js/apps/overview/utils.tsx
index 7e34977780e..fa7e2786ea5 100644
--- a/server/sonar-web/src/main/js/apps/overview/utils.tsx
+++ b/server/sonar-web/src/main/js/apps/overview/utils.tsx
@@ -214,7 +214,7 @@ export function getMeasurementMetricKey(type: MeasurementType, useDiffMetric: bo
export const parseQuery = memoize((urlQuery: RawQuery): { codeScope: string } => {
return {
- codeScope: parseAsString(urlQuery['code_scope']),
+ codeScope: parseAsString(urlQuery['codeScope']),
};
});
diff --git a/server/sonar-web/src/main/js/helpers/__tests__/urls-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/urls-test.ts
index d1940cb0385..9405edfdf25 100644
--- a/server/sonar-web/src/main/js/helpers/__tests__/urls-test.ts
+++ b/server/sonar-web/src/main/js/helpers/__tests__/urls-test.ts
@@ -124,7 +124,7 @@ describe('#getComponentOverviewUrl', () => {
).toEqual(
expect.objectContaining({
pathname: '/dashboard',
- search: queryToSearchString({ id: SIMPLE_COMPONENT_KEY, code_scope: 'new' }),
+ search: queryToSearchString({ id: SIMPLE_COMPONENT_KEY, codeScope: 'new' }),
}),
);
});
@@ -139,7 +139,7 @@ describe('#getComponentOverviewUrl', () => {
).toEqual(
expect.objectContaining({
pathname: '/dashboard',
- search: queryToSearchString({ id: SIMPLE_COMPONENT_KEY, code_scope: 'overall' }),
+ search: queryToSearchString({ id: SIMPLE_COMPONENT_KEY, codeScope: 'overall' }),
}),
);
});
diff --git a/server/sonar-web/src/main/js/helpers/urls.ts b/server/sonar-web/src/main/js/helpers/urls.ts
index bb9ed3be926..19ce4896dff 100644
--- a/server/sonar-web/src/main/js/helpers/urls.ts
+++ b/server/sonar-web/src/main/js/helpers/urls.ts
@@ -88,7 +88,7 @@ export function getProjectUrl(
search: queryToSearchString({
id: project,
branch,
- ...(codeScope && { code_scope: codeScope }),
+ ...(codeScope && { codeScope }),
}),
};
}
@@ -110,7 +110,7 @@ export function getProjectQueryUrl(
search: queryToSearchString({
id: project,
...branchParameters,
- ...(codeScope && { code_scope: codeScope }),
+ ...(codeScope && { codeScope }),
}),
};
}