aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/account
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2016-02-02 09:59:36 +0100
committerStas Vilchik <vilchiks@gmail.com>2016-02-19 11:01:56 +0100
commit2ee64e504b6921fd2d2f2d183e425904bc492c9d (patch)
tree37b02f07c7a819f4cd9f41d2a1b83ac37445c376 /server/sonar-web/src/main/js/apps/account
parent0c2b2d0afe3f28f7075fcadb78a81c59a21b34d3 (diff)
downloadsonarqube-2ee64e504b6921fd2d2f2d183e425904bc492c9d.tar.gz
sonarqube-2ee64e504b6921fd2d2f2d183e425904bc492c9d.zip
SONAR-7122 drop web context from js code
Diffstat (limited to 'server/sonar-web/src/main/js/apps/account')
-rw-r--r--server/sonar-web/src/main/js/apps/account/app.js2
-rw-r--r--server/sonar-web/src/main/js/apps/account/components/FavoriteIssueFilters.js4
-rw-r--r--server/sonar-web/src/main/js/apps/account/components/FavoriteMeasureFilters.js4
-rw-r--r--server/sonar-web/src/main/js/apps/account/components/IssueWidgets.js12
-rw-r--r--server/sonar-web/src/main/js/apps/account/components/Nav.js4
-rw-r--r--server/sonar-web/src/main/js/apps/account/components/Notifications.js2
6 files changed, 14 insertions, 14 deletions
diff --git a/server/sonar-web/src/main/js/apps/account/app.js b/server/sonar-web/src/main/js/apps/account/app.js
index e4643b9349c..4494c4d3d65 100644
--- a/server/sonar-web/src/main/js/apps/account/app.js
+++ b/server/sonar-web/src/main/js/apps/account/app.js
@@ -36,7 +36,7 @@ window.sonarqube.appStarted.then(options => {
const el = document.querySelector(options.el);
const history = useRouterHistory(createHistory)({
- basename: window.baseUrl + '/account'
+ basename: '/account'
});
const store = configureStore();
diff --git a/server/sonar-web/src/main/js/apps/account/components/FavoriteIssueFilters.js b/server/sonar-web/src/main/js/apps/account/components/FavoriteIssueFilters.js
index 3eb59fcc076..af3baa5d0dd 100644
--- a/server/sonar-web/src/main/js/apps/account/components/FavoriteIssueFilters.js
+++ b/server/sonar-web/src/main/js/apps/account/components/FavoriteIssueFilters.js
@@ -42,7 +42,7 @@ const FavoriteIssueFilters = ({ issueFilters }) => (
<FavoriteIssueFilter filter={f} favorite={true}/>
</td>
<td>
- <a href={`${window.baseUrl}/issues/search#id=${f.id}`}>
+ <a href={`/issues/search#id=${f.id}`}>
{f.name}
</a>
</td>
@@ -52,7 +52,7 @@ const FavoriteIssueFilters = ({ issueFilters }) => (
</table>
<div className="spacer-top small">
- <a href={`${window.baseUrl}/issues/manage`}>{translate('see_all')}</a>
+ <a href="/issues/manage">{translate('see_all')}</a>
</div>
</section>
diff --git a/server/sonar-web/src/main/js/apps/account/components/FavoriteMeasureFilters.js b/server/sonar-web/src/main/js/apps/account/components/FavoriteMeasureFilters.js
index c9998d0eaca..4bf9b26e79a 100644
--- a/server/sonar-web/src/main/js/apps/account/components/FavoriteMeasureFilters.js
+++ b/server/sonar-web/src/main/js/apps/account/components/FavoriteMeasureFilters.js
@@ -42,7 +42,7 @@ const FavoriteMeasureFilters = ({ measureFilters }) => (
<FavoriteMeasureFilter filter={f} favorite={true}/>
</td>
<td>
- <a href={`${window.baseUrl}/measures/filter/${f.id}`}>
+ <a href={`/measures/filter/${f.id}`}>
{f.name}
</a>
</td>
@@ -52,7 +52,7 @@ const FavoriteMeasureFilters = ({ measureFilters }) => (
</table>
<div className="spacer-top small">
- <a href={`${window.baseUrl}/measures/manage`}>{translate('see_all')}</a>
+ <a href="/measures/manage">{translate('see_all')}</a>
</div>
</section>
diff --git a/server/sonar-web/src/main/js/apps/account/components/IssueWidgets.js b/server/sonar-web/src/main/js/apps/account/components/IssueWidgets.js
index 673089bab6a..a59d59a5585 100644
--- a/server/sonar-web/src/main/js/apps/account/components/IssueWidgets.js
+++ b/server/sonar-web/src/main/js/apps/account/components/IssueWidgets.js
@@ -32,27 +32,27 @@ const BASE_QUERY = { resolved: false, assignees: '__me__' };
function getTotalUrl () {
- return window.baseUrl + '/account/issues#resolved=false';
+ return '/account/issues#resolved=false';
}
function getToFixUrl () {
- return window.baseUrl + '/account/issues#resolved=false|statuses=CONFIRMED';
+ return '/account/issues#resolved=false|statuses=CONFIRMED';
}
function getToReviewUrl () {
- return window.baseUrl + '/account/issues#resolved=false|statuses=' + encodeURIComponent('OPEN,REOPENED');
+ return '/account/issues#resolved=false|statuses=' + encodeURIComponent('OPEN,REOPENED');
}
function getSeverityUrl (severity) {
- return window.baseUrl + '/account/issues#resolved=false|severities=' + severity;
+ return '/account/issues#resolved=false|severities=' + severity;
}
function getProjectUrl (project) {
- return window.baseUrl + '/account/issues#resolved=false|projectUuids=' + project;
+ return '/account/issues#resolved=false|projectUuids=' + project;
}
function getPeriodUrl (createdAfter, createdBefore) {
- return window.baseUrl + `/account/issues#resolved=false|createdAfter=${createdAfter}|createdBefore=${createdBefore}`;
+ return `/account/issues#resolved=false|createdAfter=${createdAfter}|createdBefore=${createdBefore}`;
}
diff --git a/server/sonar-web/src/main/js/apps/account/components/Nav.js b/server/sonar-web/src/main/js/apps/account/components/Nav.js
index a1fe74bfc0d..a7c1df4a6db 100644
--- a/server/sonar-web/src/main/js/apps/account/components/Nav.js
+++ b/server/sonar-web/src/main/js/apps/account/components/Nav.js
@@ -36,8 +36,8 @@ const Nav = ({ user }) => (
</li>
<li>
<a
- className={window.location.pathname === `${window.baseUrl}/account/issues` && 'active'}
- href={`${window.baseUrl}/account/issues`}>
+ className={window.location.pathname === `/account/issues` && 'active'}
+ href={`/account/issues`}>
{translate('issues.page')}
</a>
</li>
diff --git a/server/sonar-web/src/main/js/apps/account/components/Notifications.js b/server/sonar-web/src/main/js/apps/account/components/Notifications.js
index 8eb4e437afb..9c24284a7d2 100644
--- a/server/sonar-web/src/main/js/apps/account/components/Notifications.js
+++ b/server/sonar-web/src/main/js/apps/account/components/Notifications.js
@@ -31,7 +31,7 @@ export default function Notifications ({ globalNotifications, projectNotificatio
<p className="big-spacer-bottom">
{translate('notification.dispatcher.information')}
</p>
- <form id="notif_form" method="post" action={`${window.baseUrl}/account/update_notifications`}>
+ <form id="notif_form" method="post" action={`/account/update_notifications`}>
<div className="columns columns-overflow-visible">
<div className="column-half">
<GlobalNotifications