diff --git a/docs/sources/guides/whats-new-in-v5.md b/docs/sources/guides/whats-new-in-v5.md
index 4580dbffd66..3f5b3626773 100644
--- a/docs/sources/guides/whats-new-in-v5.md
+++ b/docs/sources/guides/whats-new-in-v5.md
@@ -105,9 +105,9 @@ It's also possible to update and delete data sources from the config file. More
### Dashboards
-We also deprecated the [dashboard.json] in favor of our new dashboard provisioner that keeps dashboards on disk
+We also deprecated the `[dashboard.json]` in favor of our new dashboard provisioner that keeps dashboards on disk
in sync with dashboards in Grafana's database. The dashboard provisioner has multiple advantages over the old
-[dashboard.json] feature. Instead of storing the dashboard in memory we now insert the dashboard into the database,
+`[dashboard.json]` feature. Instead of storing the dashboard in memory we now insert the dashboard into the database,
which makes it possible to star them, use one as the home dashboard, set permissions and other features in Grafana that
expects the dashboards to exist in the database. More info in the [dashboard provisioning docs](/administration/provisioning/#dashboards)
@@ -117,4 +117,4 @@ We are introducing a new identifier (`uid`) in the dashboard JSON model. The new
We are also changing the route for getting dashboards to use this `uid` instead of the slug that the current route and API are using.
We will keep supporting the old route for backward compatibility. This will make it possible to change the title on dashboards without breaking links.
Sharing dashboards between instances becomes much easier since the uid is unique (unique enough). This might seem like a small change,
-but we are incredibly excited about it since it will make it much easier to manage, collaborate and navigate between dashboards.
\ No newline at end of file
+but we are incredibly excited about it since it will make it much easier to manage, collaborate and navigate between dashboards.
diff --git a/docs/sources/http_api/data_source.md b/docs/sources/http_api/data_source.md
index 364b55b0cfc..468a812c709 100644
--- a/docs/sources/http_api/data_source.md
+++ b/docs/sources/http_api/data_source.md
@@ -90,7 +90,7 @@ Content-Type: application/json
## Get a single data source by Name
-`GET /api/datasources/name/:name`
+`GET /api/datasources/:name`
**Example Request**:
diff --git a/pkg/api/dashboard.go b/pkg/api/dashboard.go
index 8fcc6eb5902..2894692a4c7 100644
--- a/pkg/api/dashboard.go
+++ b/pkg/api/dashboard.go
@@ -88,8 +88,8 @@ func GetDashboard(c *middleware.Context) Response {
HasAcl: dash.HasAcl,
IsFolder: dash.IsFolder,
FolderId: dash.FolderId,
- FolderTitle: "Root",
Url: dash.GetUrl(),
+ FolderTitle: "General",
}
// lookup folder title
@@ -250,6 +250,9 @@ func PostDashboard(c *middleware.Context, cmd m.SaveDashboardCommand) Response {
if err == m.ErrDashboardWithSameUIDExists {
return Json(412, util.DynMap{"status": "name-exists", "message": err.Error()})
}
+ if err == m.ErrDashboardWithSameNameInFolderExists {
+ return Json(412, util.DynMap{"status": "name-exists", "message": err.Error()})
+ }
if err == m.ErrDashboardVersionMismatch {
return Json(412, util.DynMap{"status": "version-mismatch", "message": err.Error()})
}
@@ -310,7 +313,7 @@ func GetHomeDashboard(c *middleware.Context) Response {
dash := dtos.DashboardFullWithMeta{}
dash.Meta.IsHome = true
dash.Meta.CanEdit = c.SignedInUser.HasRole(m.ROLE_EDITOR)
- dash.Meta.FolderTitle = "Root"
+ dash.Meta.FolderTitle = "General"
jsonParser := json.NewDecoder(file)
if err := jsonParser.Decode(&dash.Dashboard); err != nil {
diff --git a/public/app/core/services/search_srv.ts b/public/app/core/services/search_srv.ts
index cb9862f8cce..7bee5cdfec6 100644
--- a/public/app/core/services/search_srv.ts
+++ b/public/app/core/services/search_srv.ts
@@ -161,7 +161,7 @@ export class SearchSrv {
} else {
section = {
id: 0,
- title: 'Root',
+ title: 'General',
items: [],
icon: 'fa fa-folder-open',
toggle: this.toggleFolder.bind(this),
diff --git a/public/app/core/specs/manage_dashboards.jest.ts b/public/app/core/specs/manage_dashboards.jest.ts
index b79c4fa06a3..8c640bc0630 100644
--- a/public/app/core/specs/manage_dashboards.jest.ts
+++ b/public/app/core/specs/manage_dashboards.jest.ts
@@ -30,7 +30,7 @@ describe('ManageDashboards', () => {
},
{
id: 0,
- title: 'Root',
+ title: 'General',
icon: 'fa fa-folder-open',
uri: 'db/something-else',
type: 'dash-db',
@@ -363,7 +363,7 @@ describe('ManageDashboards', () => {
},
{
id: 0,
- title: 'Root',
+ title: 'General',
items: [{ id: 3, checked: true }],
checked: false,
},
@@ -391,7 +391,7 @@ describe('ManageDashboards', () => {
},
{
id: 0,
- title: 'Root',
+ title: 'General',
items: [{ id: 3, checked: false }],
checked: false,
},
@@ -420,7 +420,7 @@ describe('ManageDashboards', () => {
},
{
id: 0,
- title: 'Root',
+ title: 'General',
items: [{ id: 3, checked: true }],
checked: false,
},
@@ -455,7 +455,7 @@ describe('ManageDashboards', () => {
},
{
id: 0,
- title: 'Root',
+ title: 'General',
items: [{ id: 3, checked: false }],
checked: false,
},
@@ -497,7 +497,7 @@ describe('ManageDashboards', () => {
},
{
id: 0,
- title: 'Root',
+ title: 'General',
items: [{ id: 3, checked: true, uid: 'root-dash' }],
checked: true,
},
@@ -541,7 +541,7 @@ describe('ManageDashboards', () => {
},
{
id: 0,
- title: 'Root',
+ title: 'General',
items: [{ id: 3, checked: true, uid: 'dash-2' }],
checked: false,
},
diff --git a/public/app/core/specs/search.jest.ts b/public/app/core/specs/search.jest.ts
index 2457d71a48d..2c1172bcf55 100644
--- a/public/app/core/specs/search.jest.ts
+++ b/public/app/core/specs/search.jest.ts
@@ -49,7 +49,7 @@ describe('SearchCtrl', () => {
},
{
id: 0,
- title: 'Root',
+ title: 'General',
items: [{ id: 3, selected: false }, { id: 5, selected: false }],
selected: false,
expanded: true,
@@ -146,7 +146,7 @@ describe('SearchCtrl', () => {
},
{
id: 0,
- title: 'Root',
+ title: 'General',
items: [{ id: 3, selected: false }, { id: 5, selected: false }],
selected: false,
expanded: true,
diff --git a/public/app/features/dashboard/folder_picker/folder_picker.ts b/public/app/features/dashboard/folder_picker/folder_picker.ts
index 74b13c5c2a5..5eb3d094641 100644
--- a/public/app/features/dashboard/folder_picker/folder_picker.ts
+++ b/public/app/features/dashboard/folder_picker/folder_picker.ts
@@ -12,7 +12,7 @@ export class FolderPickerCtrl {
enterFolderCreation: any;
exitFolderCreation: any;
enableCreateNew: boolean;
- rootName = 'Root';
+ rootName = 'General';
folder: any;
createNewFolder: boolean;
newFolderName: string;
@@ -33,10 +33,13 @@ export class FolderPickerCtrl {
return this.backendSrv.get('api/dashboards/folders', { query: query }).then(result => {
if (
query === '' ||
- query.toLowerCase() === 'r' ||
- query.toLowerCase() === 'ro' ||
- query.toLowerCase() === 'roo' ||
- query.toLowerCase() === 'root'
+ query.toLowerCase() === 'g' ||
+ query.toLowerCase() === 'ge' ||
+ query.toLowerCase() === 'gen' ||
+ query.toLowerCase() === 'gene' ||
+ query.toLowerCase() === 'gener' ||
+ query.toLowerCase() === 'genera' ||
+ query.toLowerCase() === 'general'
) {
result.unshift({ title: this.rootName, id: 0 });
}
diff --git a/public/app/features/dashboard/save_as_modal.ts b/public/app/features/dashboard/save_as_modal.ts
index 04b029cbb4c..15a3ce5dba7 100644
--- a/public/app/features/dashboard/save_as_modal.ts
+++ b/public/app/features/dashboard/save_as_modal.ts
@@ -46,6 +46,7 @@ export class SaveDashboardAsModalCtrl {
var dashboard = this.dashboardSrv.getCurrent();
this.clone = dashboard.getSaveModelClone();
this.clone.id = null;
+ this.clone.uid = '';
this.clone.title += ' Copy';
this.clone.editable = true;
this.clone.hideControls = false;
diff --git a/public/app/features/dashboard/validation_srv.ts b/public/app/features/dashboard/validation_srv.ts
index e70bb0c426d..8460f4efa71 100644
--- a/public/app/features/dashboard/validation_srv.ts
+++ b/public/app/features/dashboard/validation_srv.ts
@@ -1,7 +1,7 @@
import coreModule from 'app/core/core_module';
export class ValidationSrv {
- rootName = 'root';
+ rootName = 'general';
/** @ngInject */
constructor(private $q, private backendSrv) {}
@@ -19,7 +19,7 @@ export class ValidationSrv {
if (name.toLowerCase() === this.rootName) {
return this.$q.reject({
type: 'EXISTING',
- message: 'A folder or dashboard with the same name already exists',
+ message: 'This is a reserved name and cannot be used for a folder.',
});
}
diff --git a/public/img/icons_light_theme/icon_add_annotation.svg b/public/img/icons_light_theme/icon_add_annotation.svg
index cb306bdd18b..1cf90df2bcb 100644
--- a/public/img/icons_light_theme/icon_add_annotation.svg
+++ b/public/img/icons_light_theme/icon_add_annotation.svg
@@ -4,7 +4,7 @@
width="64px" height="64px" viewBox="0 0 64 64" style="enable-background:new 0 0 64 64;" xml:space="preserve">
@@ -13,7 +13,7 @@
-
+
diff --git a/public/img/icons_light_theme/icon_add_annotation_alt.svg b/public/img/icons_light_theme/icon_add_annotation_alt.svg
index 2565f188d57..990df3a9d60 100644
--- a/public/img/icons_light_theme/icon_add_annotation_alt.svg
+++ b/public/img/icons_light_theme/icon_add_annotation_alt.svg
@@ -3,7 +3,7 @@