aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2016-07-22 13:32:00 +0200
committerStas Vilchik <vilchiks@gmail.com>2016-07-25 13:47:25 +0200
commit2e0c8fc8d35b3baf8b116baf51d08ddee3b72fd8 (patch)
tree79d4ddc9f012a3ba6c0bcd0d67db89c970472f32
parent7543c6b2d9e44f7055a2d378f9bbfc2a0fe5114c (diff)
downloadsonarqube-2e0c8fc8d35b3baf8b116baf51d08ddee3b72fd8.tar.gz
sonarqube-2e0c8fc8d35b3baf8b116baf51d08ddee3b72fd8.zip
SONAR-7914 Drop project level "Manage Dashboards" page and actions
-rw-r--r--it/it-tests/src/test/java/it/authorisation/DashboardSharingPermissionTest.java15
-rw-r--r--it/it-tests/src/test/java/it/authorisation/SystemAdminPermissionTest.java13
-rw-r--r--it/it-tests/src/test/java/it/componentDashboard/DashboardTest.java13
-rw-r--r--it/it-tests/src/test/resources/authorisation/DashboardSharingPermissionTest/project-dashboard-sharing-allowed.html84
-rw-r--r--it/it-tests/src/test/resources/authorisation/DashboardSharingPermissionTest/project-dashboard-sharing-denied.html59
-rw-r--r--it/it-tests/src/test/resources/authorisation/SystemAdminPermissionTest/change-shared-project-dashboard-owner-failure.html109
-rw-r--r--it/it-tests/src/test/resources/authorisation/SystemAdminPermissionTest/change-shared-project-dashboard-owner.html104
-rw-r--r--it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/edit-project-dashboards.html229
-rw-r--r--it/it-tests/src/test/resources/componentDashboard/DashboardTest/share_dashboard/follow-unfollow.html73
-rw-r--r--it/it-tests/src/test/resources/componentDashboard/DashboardTest/share_dashboard/should-not-unshare-default-dashboard.html188
-rw-r--r--server/sonar-web/src/main/js/helpers/urls.js9
-rw-r--r--server/sonar-web/src/main/js/main/nav/component/component-nav-menu.js26
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/controllers/dashboards_controller.rb38
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/_available_dashboards.html.erb3
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/_create_form.html.erb10
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/_dashboard_operations.html.erb9
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/_delete_form.html.erb9
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/_edit_form.html.erb9
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/_my_dashboards.html.erb7
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/index.html.erb2
20 files changed, 29 insertions, 980 deletions
diff --git a/it/it-tests/src/test/java/it/authorisation/DashboardSharingPermissionTest.java b/it/it-tests/src/test/java/it/authorisation/DashboardSharingPermissionTest.java
index 3236b69ccfc..63a8146615b 100644
--- a/it/it-tests/src/test/java/it/authorisation/DashboardSharingPermissionTest.java
+++ b/it/it-tests/src/test/java/it/authorisation/DashboardSharingPermissionTest.java
@@ -32,7 +32,6 @@ import org.sonarqube.ws.client.permission.PermissionsService;
import util.user.UserRule;
import static util.ItUtils.newAdminWsClient;
-import static util.ItUtils.runProjectAnalysis;
public class DashboardSharingPermissionTest {
@@ -85,18 +84,4 @@ public class DashboardSharingPermissionTest {
.build();
orchestrator.executeSelenese(selenese);
}
-
- /**
- * SONAR-4136
- */
- @Test
- public void share_project_dashboard() throws Exception {
- runProjectAnalysis(orchestrator, "shared/xoo-sample");
-
- Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("project-dashboard-sharing-permission",
- "/authorisation/DashboardSharingPermissionTest/project-dashboard-sharing-allowed.html",
- "/authorisation/DashboardSharingPermissionTest/project-dashboard-sharing-denied.html")
- .build();
- orchestrator.executeSelenese(selenese);
- }
}
diff --git a/it/it-tests/src/test/java/it/authorisation/SystemAdminPermissionTest.java b/it/it-tests/src/test/java/it/authorisation/SystemAdminPermissionTest.java
index cb893b6a49b..af310ada96f 100644
--- a/it/it-tests/src/test/java/it/authorisation/SystemAdminPermissionTest.java
+++ b/it/it-tests/src/test/java/it/authorisation/SystemAdminPermissionTest.java
@@ -31,7 +31,6 @@ import org.sonarqube.ws.client.permission.PermissionsService;
import util.user.UserRule;
import static util.ItUtils.newAdminWsClient;
-import static util.ItUtils.runProjectAnalysis;
public class SystemAdminPermissionTest {
@@ -82,18 +81,6 @@ public class SystemAdminPermissionTest {
"/authorisation/SystemAdminPermissionTest/change-shared-global-dashboard-owner-failure.html");
}
- /**
- * SONAR-4136
- */
- @Test
- public void should_change_ownership_of_shared_project_dashboard() throws Exception {
- runProjectAnalysis(orchestrator, "shared/xoo-sample");
-
- seleniumSuite("change-project-dashboard-ownership",
- "/authorisation/SystemAdminPermissionTest/change-shared-project-dashboard-owner.html",
- "/authorisation/SystemAdminPermissionTest/change-shared-project-dashboard-owner-failure.html");
- }
-
private void seleniumSuite(String suiteName, String... tests) {
Selenese selenese = Selenese.builder().setHtmlTestsInClasspath(suiteName, tests).build();
orchestrator.executeSelenese(selenese);
diff --git a/it/it-tests/src/test/java/it/componentDashboard/DashboardTest.java b/it/it-tests/src/test/java/it/componentDashboard/DashboardTest.java
index b4e57a57af9..cb952347126 100644
--- a/it/it-tests/src/test/java/it/componentDashboard/DashboardTest.java
+++ b/it/it-tests/src/test/java/it/componentDashboard/DashboardTest.java
@@ -52,16 +52,6 @@ public class DashboardTest {
"/componentDashboard/DashboardTest/dashboard_extension/xss.html");
}
- /**
- * SONAR-3103
- */
- @Test
- public void share_dashboard() {
- seleniumSuite("share_dashboard",
- "/componentDashboard/DashboardTest/share_dashboard/follow-unfollow.html",
- "/componentDashboard/DashboardTest/share_dashboard/should-not-unshare-default-dashboard.html");
- }
-
@Test
public void configure_dashboard() {
seleniumSuite("configure_dashboard",
@@ -85,9 +75,6 @@ public class DashboardTest {
// SONAR-4630
"/componentDashboard/DashboardTest/global_dashboard/create-global-dashboards-error.html",
- // SONAR-3462
- "/componentDashboard/DashboardTest/global_dashboard/edit-project-dashboards.html",
-
// SONAR-3461
"/componentDashboard/DashboardTest/global_dashboard/order-project-default-dashboards.html",
diff --git a/it/it-tests/src/test/resources/authorisation/DashboardSharingPermissionTest/project-dashboard-sharing-allowed.html b/it/it-tests/src/test/resources/authorisation/DashboardSharingPermissionTest/project-dashboard-sharing-allowed.html
deleted file mode 100644
index 3b23dc8897b..00000000000
--- a/it/it-tests/src/test/resources/authorisation/DashboardSharingPermissionTest/project-dashboard-sharing-allowed.html
+++ /dev/null
@@ -1,84 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head profile="http://selenium-ide.openqa.org/profiles/test-case">
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- <title>project-dashboard-sharing-permission</title>
-</head>
-<body>
-<table cellpadding="1" cellspacing="1" border="1">
- <tbody>
- <tr>
- <td>open</td>
- <td>/sessions/logout</td>
- <td></td>
-</tr>
-<tr>
- <td>open</td>
- <td>/sessions/new</td>
- <td></td>
-</tr>
-<tr>
- <td>type</td>
- <td>id=login</td>
- <td>can_share_dashboards</td>
-</tr>
-<tr>
- <td>type</td>
- <td>id=password</td>
- <td>password</td>
-</tr>
-<tr>
- <td>clickAndWait</td>
- <td>name=commit</td>
- <td></td>
-</tr>
-<tr>
- <td>open</td>
- <td>/dashboards?resource=sample</td>
- <td></td>
-</tr>
-<tr>
- <td>click</td>
- <td>create-link-dashboard</td>
- <td></td>
-</tr>
-<tr>
- <td>waitForVisible</td>
- <td>css=div.modal-body</td>
- <td></td>
-</tr>
-<tr>
- <td>type</td>
- <td>name</td>
- <td>My shared project dashboard</td>
-</tr>
-<tr>
- <td>storeValue</td>
- <td>name</td>
- <td>DASHBOARD_NAME</td>
-</tr>
-<tr>
- <td>click</td>
- <td>name=shared</td>
- <td></td>
-</tr>
-<tr>
- <td>clickAndWait</td>
- <td>save-submit</td>
- <td></td>
-</tr>
-<tr>
- <td>assertTable</td>
- <td>css=table.data.2.0</td>
- <td>exact:${DASHBOARD_NAME}</td>
-</tr>
-<tr>
- <td>assertElementPresent</td>
- <td>dashboard-1-shared</td>
- <td></td>
-</tr>
-</tbody>
-</table>
-</body>
-</html>
diff --git a/it/it-tests/src/test/resources/authorisation/DashboardSharingPermissionTest/project-dashboard-sharing-denied.html b/it/it-tests/src/test/resources/authorisation/DashboardSharingPermissionTest/project-dashboard-sharing-denied.html
deleted file mode 100644
index d8bfbd949ec..00000000000
--- a/it/it-tests/src/test/resources/authorisation/DashboardSharingPermissionTest/project-dashboard-sharing-denied.html
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head profile="http://selenium-ide.openqa.org/profiles/test-case">
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- <title>project-dashboard-sharing-permission</title>
-</head>
-<body>
-<table cellpadding="1" cellspacing="1" border="1">
- <tbody>
- <tr>
- <td>open</td>
- <td>/sessions/logout</td>
- <td></td>
-</tr>
-<tr>
- <td>open</td>
- <td>/sessions/new</td>
- <td></td>
-</tr>
-<tr>
- <td>type</td>
- <td>id=login</td>
- <td>cannot_share_dashboards</td>
-</tr>
-<tr>
- <td>type</td>
- <td>id=password</td>
- <td>password</td>
-</tr>
-<tr>
- <td>clickAndWait</td>
- <td>name=commit</td>
- <td></td>
-</tr>
-<tr>
- <td>open</td>
- <td>/dashboards?resource=sample</td>
- <td></td>
-</tr>
-<tr>
- <td>click</td>
- <td>create-link-dashboard</td>
- <td></td>
-</tr>
-<tr>
- <td>waitForVisible</td>
- <td>css=div.modal-body</td>
- <td></td>
-</tr>
-<tr>
- <td>assertElementNotPresent</td>
- <td>css=div.modal-body &gt; div.modal.field &gt; input#shared</td>
- <td></td>
-</tr>
-</tbody>
-</table>
-</body>
-</html>
diff --git a/it/it-tests/src/test/resources/authorisation/SystemAdminPermissionTest/change-shared-project-dashboard-owner-failure.html b/it/it-tests/src/test/resources/authorisation/SystemAdminPermissionTest/change-shared-project-dashboard-owner-failure.html
deleted file mode 100644
index c82ad4bcba5..00000000000
--- a/it/it-tests/src/test/resources/authorisation/SystemAdminPermissionTest/change-shared-project-dashboard-owner-failure.html
+++ /dev/null
@@ -1,109 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head profile="http://selenium-ide.openqa.org/profiles/test-case">
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- <title>change-shared-project-dashboard-owner</title>
-</head>
-<body>
-<table cellpadding="1" cellspacing="1" border="1">
- <tbody>
- <tr>
- <td>open</td>
- <td>/sessions/logout</td>
- <td></td>
- </tr>
- <tr>
- <td>open</td>
- <td>/sessions/new</td>
- <td></td>
- </tr>
- <tr>
- <td>type</td>
- <td>login</td>
- <td>admin</td>
- </tr>
- <tr>
- <td>type</td>
- <td>password</td>
- <td>admin</td>
- </tr>
- <tr>
- <td>clickAndWait</td>
- <td>commit</td>
- <td></td>
- </tr>
- <tr>
- <td>open</td>
- <td>/dashboards?resource=sample</td>
- <td></td>
- </tr>
- <tr>
- <td>click</td>
- <td>create-link-dashboard</td>
- <td></td>
- </tr>
- <tr>
- <td>waitForVisible</td>
- <td>css=div.modal-body</td>
- <td></td>
- </tr>
- <tr>
- <td>type</td>
- <td>name</td>
- <td>shared-project-dashboard-fail</td>
- </tr>
- <tr>
- <td>storeValue</td>
- <td>name</td>
- <td>DASHBOARD_NAME</td>
- </tr>
- <tr>
- <td>click</td>
- <td>name=shared</td>
- <td></td>
- </tr>
- <tr>
- <td>clickAndWait</td>
- <td>save-submit</td>
- <td></td>
- </tr>
- <tr>
- <td>waitForVisible</td>
- <td>edit-${DASHBOARD_NAME}</td>
- <td></td>
- </tr>
- <tr>
- <td>click</td>
- <td>edit-${DASHBOARD_NAME}</td>
- <td></td>
- </tr>
- <tr>
- <td>waitForVisible</td>
- <td>css=div.modal-body</td>
- <td></td>
- </tr>
- <tr>
- <td>type</td>
- <td>select-dashboard-owner</td>
- <td>cannot_share</td>
- </tr>
- <tr>
- <td>click</td>
- <td>save-submit</td>
- <td></td>
- </tr>
- <tr>
- <td>waitForVisible</td>
- <td>css=div.modal-body > p.error</td>
- <td></td>
- </tr>
- <tr>
- <td>waitForText</td>
- <td>css=div.modal-body > p.error</td>
- <td>glob:*User cannot own this dashboard because of insufficient rights*</td>
- </tr>
- </tbody>
-</table>
-</body>
-</html>
diff --git a/it/it-tests/src/test/resources/authorisation/SystemAdminPermissionTest/change-shared-project-dashboard-owner.html b/it/it-tests/src/test/resources/authorisation/SystemAdminPermissionTest/change-shared-project-dashboard-owner.html
deleted file mode 100644
index df21b924dc3..00000000000
--- a/it/it-tests/src/test/resources/authorisation/SystemAdminPermissionTest/change-shared-project-dashboard-owner.html
+++ /dev/null
@@ -1,104 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head profile="http://selenium-ide.openqa.org/profiles/test-case">
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- <title>change-shared-project-dashboard-owner</title>
-</head>
-<body>
-<table cellpadding="1" cellspacing="1" border="1">
- <tbody>
- <tr>
- <td>open</td>
- <td>/sessions/logout</td>
- <td></td>
- </tr>
- <tr>
- <td>open</td>
- <td>/sessions/new</td>
- <td></td>
- </tr>
- <tr>
- <td>type</td>
- <td>login</td>
- <td>admin</td>
- </tr>
- <tr>
- <td>type</td>
- <td>password</td>
- <td>admin</td>
- </tr>
- <tr>
- <td>clickAndWait</td>
- <td>commit</td>
- <td></td>
- </tr>
- <tr>
- <td>open</td>
- <td>/dashboards?resource=sample</td>
- <td></td>
- </tr>
- <tr>
- <td>click</td>
- <td>create-link-dashboard</td>
- <td></td>
- </tr>
- <tr>
- <td>waitForVisible</td>
- <td>css=div.modal-body</td>
- <td></td>
- </tr>
- <tr>
- <td>type</td>
- <td>name</td>
- <td>shared-project-dashboard</td>
- </tr>
- <tr>
- <td>storeValue</td>
- <td>name</td>
- <td>DASHBOARD_NAME</td>
- </tr>
- <tr>
- <td>click</td>
- <td>name=shared</td>
- <td></td>
- </tr>
- <tr>
- <td>clickAndWait</td>
- <td>save-submit</td>
- <td></td>
- </tr>
- <tr>
- <td>waitForVisible</td>
- <td>edit-${DASHBOARD_NAME}</td>
- <td></td>
- </tr>
- <tr>
- <td>click</td>
- <td>edit-${DASHBOARD_NAME}</td>
- <td></td>
- </tr>
- <tr>
- <td>waitForVisible</td>
- <td>css=div.modal-body</td>
- <td></td>
- </tr>
- <tr>
- <td>type</td>
- <td>select-dashboard-owner</td>
- <td>can_share</td>
- </tr>
- <tr>
- <td>clickAndWait</td>
- <td>save-submit</td>
- <td></td>
- </tr>
- <tr>
- <td>waitForText</td>
- <td>dashboards</td>
- <td>glob:*can_share*</td>
- </tr>
- </tbody>
-</table>
-</body>
-</html>
diff --git a/it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/edit-project-dashboards.html b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/edit-project-dashboards.html
deleted file mode 100644
index ca8e1a7dbc4..00000000000
--- a/it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/edit-project-dashboards.html
+++ /dev/null
@@ -1,229 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head profile="http://selenium-ide.openqa.org/profiles/test-case">
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- <title>edit-project-dashboards</title>
-</head>
-<body>
-<table cellpadding="1" cellspacing="1" border="1">
- <thead>
- <tr>
- <td rowspan="1" colspan="3">edit-project-dashboards</td>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>open</td>
- <td>/sessions/login</td>
- <td></td>
-</tr>
-<tr>
- <td>type</td>
- <td>login</td>
- <td>admin</td>
-</tr>
-<tr>
- <td>type</td>
- <td>password</td>
- <td>admin</td>
-</tr>
-<tr>
- <td>clickAndWait</td>
- <td>commit</td>
- <td></td>
-</tr>
-<tr>
- <td>open</td>
- <td>/dashboards?resource=sample</td>
- <td></td>
-</tr>
-<tr>
- <td>click</td>
- <td>create-link-dashboard</td>
- <td></td>
-</tr>
-<tr>
- <td>waitForVisible</td>
- <td>css=div.modal-head &gt; h2</td>
- <td></td>
-</tr>
-<tr>
- <td>type</td>
- <td>name=name</td>
- <td>Project Shared</td>
-</tr>
-<tr>
- <td>click</td>
- <td>name=shared</td>
- <td></td>
-</tr>
-<tr>
- <td>clickAndWait</td>
- <td>id=save-submit</td>
- <td></td>
-</tr>
-<tr>
- <td>click</td>
- <td>create-link-dashboard</td>
- <td></td>
-</tr>
-<tr>
- <td>waitForVisible</td>
- <td>css=div.modal-head &gt; h2</td>
- <td></td>
-</tr>
-<tr>
- <td>type</td>
- <td>name=name</td>
- <td>Project Not Shared</td>
-</tr>
-<tr>
- <td>clickAndWait</td>
- <td>id=save-submit</td>
- <td></td>
-</tr>
-<tr>
- <td>waitForTextPresent</td>
- <td>My Project Dashboards</td>
- <td></td>
-</tr>
-<tr>
- <td>clickAndWait</td>
- <td>id=unfollow-Project%20Shared</td>
- <td></td>
-</tr>
-<tr>
- <td>clickAndWait</td>
- <td>id=unfollow-Project%20Not%20Shared</td>
- <td></td>
-</tr>
-<tr>
- <td>assertTable</td>
- <td>id=shared-dashboards.1.0</td>
- <td>Project Not Shared</td>
-</tr>
-<tr>
- <td>assertTable</td>
- <td>id=shared-dashboards.2.0</td>
- <td>Project Shared</td>
-</tr>
-<tr>
- <td>assertElementPresent</td>
- <td>id=follow-Project%20Shared</td>
- <td></td>
-</tr>
-<tr>
- <td>assertElementPresent</td>
- <td>id=follow-Project%20Not%20Shared</td>
- <td></td>
-</tr>
-<tr>
- <td>click</td>
- <td>id=edit-Project%20Shared</td>
- <td></td>
-</tr>
-<tr>
- <td>waitForVisible</td>
- <td>css=div.modal-head &gt; h2</td>
- <td></td>
-</tr>
-<tr>
- <td>type</td>
- <td>name=description</td>
- <td>Description Shared</td>
-</tr>
-<tr>
- <td>clickAndWait</td>
- <td>id=save-submit</td>
- <td></td>
-</tr>
-<tr>
- <td>waitForTextPresent</td>
- <td>Description Shared</td>
- <td></td>
-</tr>
-<tr>
- <td>click</td>
- <td>id=edit-Project%20Not%20Shared</td>
- <td></td>
-</tr>
-<tr>
- <td>waitForVisible</td>
- <td>css=div.modal-head &gt; h2</td>
- <td></td>
-</tr>
-<tr>
- <td>type</td>
- <td>name=description</td>
- <td>Description Not Shared</td>
-</tr>
-<tr>
- <td>clickAndWait</td>
- <td>id=save-submit</td>
- <td></td>
-</tr>
-<tr>
- <td>waitForTextPresent</td>
- <td>Description Not Shared</td>
- <td></td>
-</tr>
-<tr>
- <td>click</td>
- <td>id=delete-Project%20Shared</td>
- <td></td>
-</tr>
-<tr>
- <td>waitForVisible</td>
- <td>css=div.modal-head &gt; h2</td>
- <td></td>
-</tr>
-<tr>
- <td>waitForText</td>
- <td>css=.modal-body</td>
- <td>Do you want to delete this dashboard?</td>
-</tr>
-<tr>
- <td>click</td>
- <td>confirm-submit</td>
- <td></td>
-</tr>
-<tr>
- <td>waitForElementNotPresent</td>
- <td>confirm-submit</td>
- <td></td>
-</tr>
-<tr>
- <td>waitForVisible</td>
- <td>delete-Project%20Not%20Shared</td>
- <td></td>
-</tr>
-<tr>
- <td>click</td>
- <td>delete-Project%20Not%20Shared</td>
- <td></td>
-</tr>
-<tr>
- <td>waitForVisible</td>
- <td>css=div.modal-head &gt; h2</td>
- <td></td>
-</tr>
-<tr>
- <td>waitForText</td>
- <td>css=.modal-body</td>
- <td>Do you want to delete this dashboard?</td>
-</tr>
-<tr>
- <td>click</td>
- <td>confirm-submit</td>
- <td></td>
-</tr>
-<tr>
- <td>waitForElementNotPresent</td>
- <td>confirm-submit</td>
- <td></td>
-</tr>
-</tbody>
-</table>
-</body>
-</html>
diff --git a/it/it-tests/src/test/resources/componentDashboard/DashboardTest/share_dashboard/follow-unfollow.html b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/share_dashboard/follow-unfollow.html
deleted file mode 100644
index f0e635a0c0c..00000000000
--- a/it/it-tests/src/test/resources/componentDashboard/DashboardTest/share_dashboard/follow-unfollow.html
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head profile="http://selenium-ide.openqa.org/profiles/test-case">
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-</head>
-<body>
-<table cellpadding="1" cellspacing="1" border="1">
- <tbody>
- <tr>
- <td>open</td>
- <td>/sessions/new</td>
- <td></td>
-</tr>
-<tr>
- <td>type</td>
- <td>login</td>
- <td>admin</td>
-</tr>
-<tr>
- <td>type</td>
- <td>password</td>
- <td>admin</td>
-</tr>
-<tr>
- <td>clickAndWait</td>
- <td>commit</td>
- <td></td>
-</tr>
-<tr>
- <td>open</td>
- <td>/dashboards/index?resource=sample</td>
- <td></td>
-</tr>
-<tr>
- <td>waitForText</td>
- <td>dashboards</td>
- <td>glob:*Custom*</td>
-</tr>
-<tr>
- <td>clickAndWait</td>
- <td>id=unfollow-Custom</td>
- <td></td>
-</tr>
-<tr>
- <td>waitForText</td>
- <td>shared-dashboards</td>
- <td>glob:*Custom*</td>
-</tr>
-<tr>
- <td>assertNotText</td>
- <td>dashboards</td>
- <td>glob:*Custom*</td>
-</tr>
-<tr>
- <td>clickAndWait</td>
- <td>id=follow-Custom</td>
- <td></td>
-</tr>
-<tr>
- <td>assertNotText</td>
- <td>shared-dashboards</td>
- <td>glob:*Custom*</td>
-</tr>
-<tr>
- <td>waitForText</td>
- <td>dashboards</td>
- <td>glob:*Custom*</td>
-</tr>
-</tbody>
-</table>
-</body>
-</html>
diff --git a/it/it-tests/src/test/resources/componentDashboard/DashboardTest/share_dashboard/should-not-unshare-default-dashboard.html b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/share_dashboard/should-not-unshare-default-dashboard.html
deleted file mode 100644
index 8eef362bf7f..00000000000
--- a/it/it-tests/src/test/resources/componentDashboard/DashboardTest/share_dashboard/should-not-unshare-default-dashboard.html
+++ /dev/null
@@ -1,188 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head profile="http://selenium-ide.openqa.org/profiles/test-case">
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-</head>
-<body>
-<table cellpadding="1" cellspacing="1" border="1">
- <tbody>
- <tr>
- <td>open</td>
- <td>/sessions/new</td>
- <td></td>
-</tr>
-<tr>
- <td>type</td>
- <td>login</td>
- <td>admin</td>
-</tr>
-<tr>
- <td>type</td>
- <td>password</td>
- <td>admin</td>
-</tr>
-<tr>
- <td>clickAndWait</td>
- <td>commit</td>
- <td></td>
-</tr>
-<tr>
- <td>open</td>
- <td>/dashboards/index?resource=sample</td>
- <td></td>
-</tr>
-<tr>
- <td>click</td>
- <td>create-link-dashboard</td>
- <td></td>
-</tr>
-<tr>
- <td>waitForVisible</td>
- <td>css=div.modal-head &gt; h2</td>
- <td></td>
-</tr>
-<tr>
- <td>type</td>
- <td>name=name</td>
- <td>IsDefault</td>
-</tr>
-<tr>
- <td>click</td>
- <td>name=shared</td>
- <td></td>
-</tr>
-<tr>
- <td>clickAndWait</td>
- <td>save-submit</td>
- <td></td>
-</tr>
-<tr>
- <td>open</td>
- <td>/admin_dashboards/index</td>
- <td></td>
-</tr>
-<tr>
- <td>clickAndWait</td>
- <td>id=add-IsDefault</td>
- <td></td>
-</tr>
-<tr>
- <td>waitForText</td>
- <td>activeProject</td>
- <td>glob:*IsDefault*</td>
-</tr>
-<tr>
- <td>open</td>
- <td>/dashboards/index?resource=sample</td>
- <td></td>
-</tr>
-<tr>
- <td>click</td>
- <td>edit-IsDefault</td>
- <td></td>
-</tr>
-<tr>
- <td>waitForVisible</td>
- <td>css=div.modal-head &gt; h2</td>
- <td></td>
-</tr>
-<tr>
- <td>click</td>
- <td>name=shared</td>
- <td></td>
-</tr>
-<tr>
- <td>click</td>
- <td>save-submit</td>
- <td></td>
-</tr>
-<tr>
- <td>waitForVisible</td>
- <td>css=div.modal-body &gt; p.error</td>
- <td></td>
-</tr>
-<tr>
- <td>waitForText</td>
- <td>css=div.modal-body &gt; p.error</td>
- <td>glob:*This dashboard can't be unshared*</td>
-</tr>
-<tr>
- <td>click</td>
- <td>save-cancel</td>
- <td></td>
-</tr>
-<tr>
- <td>click</td>
- <td>id=delete-IsDefault</td>
- <td></td>
-</tr>
-<tr>
- <td>waitForVisible</td>
- <td>css=div.modal-head &gt; h2</td>
- <td></td>
-</tr>
-<tr>
- <td>waitForText</td>
- <td>css=div.modal-body</td>
- <td>Do you want to delete this dashboard?</td>
-</tr>
-<tr>
- <td>click</td>
- <td>confirm-submit</td>
- <td></td>
-</tr>
-<tr>
- <td>waitForVisible</td>
- <td>css=div.modal-body .alert-danger</td>
- <td></td>
-</tr>
-<tr>
- <td>waitForText</td>
- <td>css=div.modal-body .alert-danger</td>
- <td>glob:*This dashboard can't be deleted*</td>
-</tr>
-<tr>
- <td>open</td>
- <td>/admin_dashboards/index</td>
- <td></td>
-</tr>
-<tr>
- <td>click</td>
- <td>id=remove-IsDefault</td>
- <td></td>
-</tr>
-<tr>
- <td>assertConfirmation</td>
- <td>Are you sure to remove it from default dashboards?</td>
- <td></td>
-</tr>
-<tr>
- <td>open</td>
- <td>/dashboards/index?resource=sample</td>
- <td></td>
-</tr>
-<tr>
- <td>click</td>
- <td>id=delete-IsDefault</td>
- <td></td>
-</tr>
-<tr>
- <td>waitForVisible</td>
- <td>css=div.modal-head &gt; h2</td>
- <td></td>
-</tr>
-<tr>
- <td>waitForText</td>
- <td>css=div.modal-body</td>
- <td>Do you want to delete this dashboard?</td>
-</tr>
-<tr>
- <td>click</td>
- <td>confirm-submit</td>
- <td></td>
-</tr>
-</tbody>
-</table>
-</body>
-</html>
diff --git a/server/sonar-web/src/main/js/helpers/urls.js b/server/sonar-web/src/main/js/helpers/urls.js
index ef25fe9a952..19bd44e6add 100644
--- a/server/sonar-web/src/main/js/helpers/urls.js
+++ b/server/sonar-web/src/main/js/helpers/urls.js
@@ -76,15 +76,6 @@ export function getComponentFixedDashboardUrl (componentKey, dashboardKey) {
}
/**
- * Generate URL for a component's dashboards management page
- * @param {string} componentKey
- * @returns {string}
- */
-export function getComponentDashboardManagementUrl (componentKey) {
- return window.baseUrl + '/dashboards?resource=' + encodeURIComponent(componentKey);
-}
-
-/**
* Generate URL for a component's permissions page
* @param {string} componentKey
* @returns {string}
diff --git a/server/sonar-web/src/main/js/main/nav/component/component-nav-menu.js b/server/sonar-web/src/main/js/main/nav/component/component-nav-menu.js
index 6ce4822c186..3028759fe08 100644
--- a/server/sonar-web/src/main/js/main/nav/component/component-nav-menu.js
+++ b/server/sonar-web/src/main/js/main/nav/component/component-nav-menu.js
@@ -21,13 +21,11 @@ import qs from 'querystring';
import _ from 'underscore';
import classNames from 'classnames';
import React from 'react';
-
import LinksMixin from '../links-mixin';
import { translate, getLocalizedDashboardName } from '../../../helpers/l10n';
import {
getComponentDashboardUrl,
- getComponentFixedDashboardUrl,
- getComponentDashboardManagementUrl
+ getComponentFixedDashboardUrl
} from '../../../helpers/urls';
const SETTINGS_URLS = [
@@ -80,7 +78,6 @@ export default React.createClass({
isCustomDashboardsActive () {
const dashboards = this.props.component.dashboards;
return _.any(dashboards, this.isCustomDashboardActive) ||
- this.isDashboardManagementActive() ||
this.isDefaultDeveloperDashboardActive();
},
@@ -89,11 +86,6 @@ export default React.createClass({
return this.isDeveloper() && path.indexOf(window.baseUrl + '/dashboard') === 0;
},
- isDashboardManagementActive () {
- const path = window.location.pathname;
- return path.indexOf(window.baseUrl + '/dashboards') === 0;
- },
-
renderOverviewLink() {
const url = getComponentFixedDashboardUrl(this.props.component.key, '');
const name = <i className="icon-home"/>;
@@ -118,7 +110,6 @@ export default React.createClass({
renderCustomDashboards() {
const dashboards = this.props.component.dashboards.map(this.renderCustomDashboard);
const className = classNames('dropdown', { active: this.isCustomDashboardsActive() });
- const managementLink = this.renderDashboardsManagementLink();
return <li className={className}>
<a className="dropdown-toggle" data-toggle="dropdown" href="#">
{translate('layout.dashboards')}&nbsp;
@@ -126,25 +117,10 @@ export default React.createClass({
</a>
<ul className="dropdown-menu">
{dashboards}
- {managementLink && <li className="divider"/>}
- {managementLink}
</ul>
</li>;
},
- renderDashboardsManagementLink() {
- if (!window.SS.user) {
- return null;
- }
- const key = 'dashboard-management';
- const url = getComponentDashboardManagementUrl(this.props.component.key);
- const name = translate('dashboard.manage_dashboards');
- const className = classNames('pill-right', { active: this.isDashboardManagementActive() });
- return <li key={key} className={className}>
- <a className="note" href={url}>{name}</a>
- </li>;
- },
-
renderCodeLink() {
if (this.isDeveloper()) {
return null;
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/dashboards_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/dashboards_controller.rb
index 06b4e593a4f..3ca18a8aa5c 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/dashboards_controller.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/dashboards_controller.rb
@@ -24,36 +24,24 @@ class DashboardsController < ApplicationController
before_filter :login_required
def index
- @global = !params[:resource]
+ @global = true
@actives=ActiveDashboard.user_dashboards(current_user, @global)
@shared_dashboards=Dashboard.all(:conditions => ['(shared=? or user_id=?) and is_global=?', true, current_user.id, @global])
active_ids=@actives.map(&:dashboard_id)
@shared_dashboards.reject! { |d| active_ids.include?(d.id) }
@shared_dashboards=Api::Utils.insensitive_sort(@shared_dashboards, &:name)
-
- if params[:resource]
- @resource=Project.by_key(params[:resource])
- if @resource.nil?
- # TODO display error page
- redirect_to home_path
- return false
- end
- access_denied unless has_role?(:user, @resource)
- @snapshot = @resource.last_snapshot
- @project=@resource # variable name used in old widgets
- end
end
def create_form
- @global = !params[:resource]
+ @global = true
@dashboard = Dashboard.new
- render :partial => 'create_form', :resource => params[:resource]
+ render :partial => 'create_form'
end
def create
verify_post_request
- @global = !params[:resource]
+ @global = true
@dashboard = Dashboard.new()
@dashboard.user_id = current_user.id
load_dashboard_from_params(@dashboard)
@@ -61,21 +49,21 @@ class DashboardsController < ApplicationController
active_dashboard = current_user.active_dashboards.to_a.find { |ad| ad.name==@dashboard.name }
if active_dashboard
@dashboard.errors.add_to_base(Api::Utils.message('dashboard.error_create_existing_name'))
- render :partial => 'dashboards/create_form', :status => 400, :resource => params[:resource]
+ render :partial => 'dashboards/create_form', :status => 400
elsif @dashboard.save
add_default_dashboards_if_first_user_dashboard(@dashboard.global?)
last_index=current_user.active_dashboards.max_by(&:order_index).order_index
current_user.active_dashboards.create(:dashboard => @dashboard, :user => current_user, :order_index => (last_index+1))
render :text => CGI.escapeHTML(params[:resource]), :highlight => @dashboard.id, :status => 200
else
- render :partial => 'dashboards/create_form', :status => 400, :resource => params[:resource]
+ render :partial => 'dashboards/create_form', :status => 400
end
end
def edit_form
@dashboard = Dashboard.find(params[:id])
if @dashboard.editable_by?(current_user)
- render :partial => 'edit_form', :resource => params[:resource]
+ render :partial => 'edit_form'
else
access_denied
end
@@ -98,7 +86,7 @@ class DashboardsController < ApplicationController
render :text => CGI.escapeHTML(params[:resource]), :status => 200
else
@dashboard.user = dashboard_owner
- render :partial => 'dashboards/edit_form', :status => 400, :resource => params[:resource]
+ render :partial => 'dashboards/edit_form', :status => 400
end
else
access_denied
@@ -108,7 +96,7 @@ class DashboardsController < ApplicationController
def delete_form
@dashboard = Dashboard.find(params[:id])
if @dashboard.editable_by?(current_user)
- render :partial => 'delete_form', :resource => params[:resource]
+ render :partial => 'delete_form'
else
access_denied
end
@@ -125,7 +113,7 @@ class DashboardsController < ApplicationController
render :text => CGI.escapeHTML(params[:resource]), :status => 200
else
@dashboard.errors.add(message('dashboard.error_delete_default'), ' ')
- render :partial => 'dashboards/delete_form', :status => 400, :resource => params[:resource]
+ render :partial => 'dashboards/delete_form', :status => 400
end
end
@@ -152,7 +140,7 @@ class DashboardsController < ApplicationController
current_user.active_dashboards.create(:dashboard => dashboard, :user => current_user, :order_index => (last_active_dashboard ? last_active_dashboard.order_index+1 : 1))
end
- redirect_to :action => 'index', :resource => params[:resource]
+ redirect_to :action => 'index'
end
def unfollow
@@ -166,7 +154,7 @@ class DashboardsController < ApplicationController
flash[:notice]=Api::Utils.message('dashboard.default_restored')
end
- redirect_to :action => 'index', :resource => params[:resource]
+ redirect_to :action => 'index'
end
@@ -188,7 +176,7 @@ class DashboardsController < ApplicationController
end
end
- redirect_to :action => 'index', :resource => params[:resource]
+ redirect_to :action => 'index'
end
def load_dashboard_from_params(dashboard)
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/_available_dashboards.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/_available_dashboards.html.erb
index 35cd88de775..2f80d7fefdf 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/_available_dashboards.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/_available_dashboards.html.erb
@@ -15,10 +15,9 @@
</tr>
<% else
@shared_dashboards.each do |dashboard| %>
- <% resource_id = @resource.id if @resource %>
<tr id="dashboard-<%= dashboard.id -%>" class="<%= cycle('even', 'odd', :name => 'shared') -%>">
<td>
- <%= link_to h(dashboard.name(true)), {:controller => :dashboard, :action => :index, :did => dashboard.id, :id => (resource_id unless dashboard.global?)},
+ <%= link_to h(dashboard.name(true)), {:controller => :dashboard, :action => :index, :did => dashboard.id},
:id => "view-#{u dashboard.name}" %>
<div class="description"><%= h dashboard.description -%></div>
</td>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/_create_form.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/_create_form.html.erb
index 6ea50822919..c79ab4b210f 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/_create_form.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/_create_form.html.erb
@@ -1,9 +1,5 @@
<form id="create-dashboard-form" method="post" action="<%= ApplicationController.root_context -%>/dashboards/create">
- <% if @global %>
- <input type="hidden" name="global" value="true" />
- <% else %>
- <input type="hidden" name="resource" value="<%= h params[:resource] %>"/>
- <% end %>
+ <input type="hidden" name="global" value="true" />
<fieldset>
<div class="modal-head">
<h2><%= message('dashboard.new_dashboard') -%></h2>
@@ -38,8 +34,6 @@
<script>
$j("#create-dashboard-form").modalForm({success: function (data) {
- var contextParams = data.trim().length > 0 ? '?resource=' + data.trim() : '';
- window.location = window.baseUrl + '/dashboards' + contextParams;
+ window.location = window.baseUrl + '/dashboards';
}});
</script>
-
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/_dashboard_operations.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/_dashboard_operations.html.erb
index 472d7778eef..ae66c82c2d7 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/_dashboard_operations.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/_dashboard_operations.html.erb
@@ -1,18 +1,17 @@
<td class="thin nowrap text-right">
- <% resource_id = @resource.id if @resource %>
<% if dashboard.editable_by?(current_user) %>
- <%= link_to message('dashboard.configure_widgets'), {:controller => :dashboard, :action => :configure, :did => dashboard.id, :id => (resource_id unless dashboard.global?)},
+ <%= link_to message('dashboard.configure_widgets'), {:controller => :dashboard, :action => :configure, :did => dashboard.id},
:id => "configure-#{u dashboard.name}", :class => 'link-action' %>
- <%= link_to message('edit'), {:action => :edit_form, :id => dashboard.id, :resource => resource_id},
+ <%= link_to message('edit'), {:action => :edit_form, :id => dashboard.id},
:id => "edit-#{u dashboard.name}", :class => 'open-modal' %>
<% if can_be_disabled %>
- <%= link_to message('delete'), {:action => :delete_form, :id => dashboard.id, :resource => resource_id},
+ <%= link_to message('delete'), {:action => :delete_form, :id => dashboard.id},
:id => "delete-#{u dashboard.name}", :class => 'open-modal text-danger' %>
<% end %>
<% end %>
<% if can_be_disabled %>
- <%= link_to message(subscription_action), {:action => subscription_action.to_sym, :id => dashboard.id, :resource => resource_id}, :method => :post,
+ <%= link_to message(subscription_action), {:action => subscription_action.to_sym, :id => dashboard.id}, :method => :post,
:id => "#{subscription_action}-#{u dashboard.name}" %>
<% end %>
</td>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/_delete_form.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/_delete_form.html.erb
index 2bbdcfa5270..b5494ee17bd 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/_delete_form.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/_delete_form.html.erb
@@ -1,10 +1,6 @@
<form id="delete-dashboard-form" method="post" action="<%= ApplicationController.root_context -%>/dashboards/delete">
<input type="hidden" name="id" value="<%= @dashboard.id -%>">
- <% if @dashboard.global %>
- <input type="hidden" name="global" value="true" />
- <% else %>
- <input type="hidden" name="resource" value="<%= h(params[:resource]) %>"/>
- <% end %>
+ <input type="hidden" name="global" value="true" />
<fieldset>
<div class="modal-head">
<h2><%= message 'dashboard.delete_confirm_title' -%></h2>
@@ -26,7 +22,6 @@
<script>
$j("#delete-dashboard-form").modalForm({success: function (data) {
- var contextParams = data.trim().length > 0 ? '?resource=' + data.trim() : '';
- window.location = window.baseUrl + '/dashboards' + contextParams;
+ window.location = window.baseUrl + '/dashboards';
}});
</script>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/_edit_form.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/_edit_form.html.erb
index afd283ef4ac..09c82c5d924 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/_edit_form.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/_edit_form.html.erb
@@ -1,10 +1,6 @@
<form id="edit-dashboard-form" method="post" action="<%= ApplicationController.root_context -%>/dashboards/update">
<input type="hidden" name="id" value="<%= @dashboard.id -%>">
- <% if @dashboard.global %>
- <input type="hidden" name="global" value="true" />
- <% else %>
- <input type="hidden" name="resource" value="<%= h(params[:resource]) %>"/>
- <% end %>
+ <input type="hidden" name="global" value="true" />
<fieldset>
<div class="modal-head">
<h2><%= message('dashboard.edit_dashboard') -%></h2>
@@ -45,7 +41,6 @@
<script>
$j("#edit-dashboard-form").modalForm({success: function (data) {
- var contextParams = data.trim().length > 0 ? '?resource=' + data.trim() : '';
- window.location = window.baseUrl + '/dashboards' + contextParams;
+ window.location = window.baseUrl + '/dashboards';
}});
</script>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/_my_dashboards.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/_my_dashboards.html.erb
index 3c2425053b5..5b3b526756d 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/_my_dashboards.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/_my_dashboards.html.erb
@@ -15,10 +15,9 @@
</tr>
<% else %>
<% @actives.map(&:dashboard).each_with_index do |dashboard, index| %>
- <% resource_id = @resource.id if @resource %>
<tr id="dashboard-<%= dashboard.id -%>" class="<%= cycle('even', 'odd', :name => 'dashboard') -%>">
<td>
- <%= link_to h(dashboard.name(true)), {:controller => :dashboard, :action => :index, :did => dashboard.id, :id => (resource_id unless dashboard.global?)},
+ <%= link_to h(dashboard.name(true)), {:controller => :dashboard, :action => :index, :did => dashboard.id},
:id => "view-#{u dashboard.name}" %>
<div class="description"><%= h dashboard.description -%></div>
</td>
@@ -30,12 +29,12 @@
</td>
<td class="order">
<% if index > 0 %>
- <%= link_to '', {:action => :up, :id => dashboard.id, :resource => resource_id}, :method => :post, :id => "up-#{u dashboard.name}", :class => "icon-move-up" %>
+ <%= link_to '', {:action => :up, :id => dashboard.id}, :method => :post, :id => "up-#{u dashboard.name}", :class => "icon-move-up" %>
<% else %>
<%= image_tag('transparent_16.gif') %>
<% end %>
<% if index < @actives.size-1 %>
- <%= link_to '', {:action => :down, :id => dashboard.id, :resource => resource_id}, :method => :post, :id => "down-#{u dashboard.name}", :class => "icon-move-down" %>
+ <%= link_to '', {:action => :down, :id => dashboard.id}, :method => :post, :id => "down-#{u dashboard.name}", :class => "icon-move-down" %>
<% else %>
<%= image_tag('transparent_16.gif') %>
<% end %>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/index.html.erb
index eca8850357d..edbc0bf98e9 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/index.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/index.html.erb
@@ -6,7 +6,7 @@
</li>
</ul>
- <h1><%= message(@global ? 'dashboard.my_global_dashboards' : 'dashboard.my_project_dashboards') -%></h1>
+ <h1><%= message('dashboard.my_global_dashboards') -%></h1>
<%= render_partial :partial => 'my_dashboards', :locals => { :is_admin => is_admin? } %>
<h1><%= message('dashboard.available_dashboards') -%></h1>