@ -257,11 +257,11 @@ export class BackendSrv {
} ) ;
}
deleteDashboard ( slug ) {
deleteDashboard ( uid ) {
let deferred = this . $q . defer ( ) ;
this . getDashboard ( 'db' , slug ) . then ( fullDash = > {
this . delete ( ` /api/dashboards/db / ${ slug } ` )
this . getDashboardByUid ( uid ) . then ( fullDash = > {
this . delete ( ` /api/dashboards/ui d/ ${ uid } ` )
. then ( ( ) = > {
deferred . resolve ( fullDash ) ;
} )
@ -273,21 +273,21 @@ export class BackendSrv {
return deferred . promise ;
}
deleteDashboards ( dashboardSlug s ) {
deleteDashboards ( dashboardUid s ) {
const tasks = [ ] ;
for ( let slug of dashboardSlug s) {
tasks . push ( this . createTask ( this . deleteDashboard . bind ( this ) , true , slug ) ) ;
for ( let uid of dashboardUid s) {
tasks . push ( this . createTask ( this . deleteDashboard . bind ( this ) , true , uid ) ) ;
}
return this . executeInOrder ( tasks , [ ] ) ;
}
moveDashboards ( dashboardSlug s , toFolder ) {
moveDashboards ( dashboardUid s , toFolder ) {
const tasks = [ ] ;
for ( let slug of dashboardSlug s) {
tasks . push ( this . createTask ( this . moveDashboard . bind ( this ) , true , slug , toFolder ) ) ;
for ( let uid of dashboardUid s) {
tasks . push ( this . createTask ( this . moveDashboard . bind ( this ) , true , uid , toFolder ) ) ;
}
return this . executeInOrder ( tasks , [ ] ) . then ( result = > {
@ -299,10 +299,10 @@ export class BackendSrv {
} ) ;
}
private moveDashboard ( slug , toFolder ) {
private moveDashboard ( uid , toFolder ) {
let deferred = this . $q . defer ( ) ;
this . getDashboard ( 'db' , slug ) . then ( fullDash = > {
this . getDashboardByUid ( uid ) . then ( fullDash = > {
const model = new DashboardModel ( fullDash . dashboard , fullDash . meta ) ;
if ( ( ! fullDash . meta . folderId && toFolder . id === 0 ) || fullDash . meta . folderId === toFolder . id ) {