diff --git a/public/app/features/plugins/ds_edit_ctrl.ts b/public/app/features/plugins/ds_edit_ctrl.ts index d2ca7a82dc4..57e43983b8c 100644 --- a/public/app/features/plugins/ds_edit_ctrl.ts +++ b/public/app/features/plugins/ds_edit_ctrl.ts @@ -134,6 +134,24 @@ export class DataSourceEditCtrl { }); } }; + + confirmDelete() { + this.backendSrv.delete('/api/datasources/' + this.current.id).then(() => { + this.$location.path('datasources'); + }); + } + + delete(s) { + this.$scope.appEvent('confirm-modal', { + title: 'Delete', + text: 'Are you sure you want to delete this datasource?', + yesText: "Delete", + icon: "fa-trash", + onConfirm: () => { + this.confirmDelete(); + } + }); + } } coreModule.controller('DataSourceEditCtrl', DataSourceEditCtrl); diff --git a/public/app/features/plugins/partials/ds_edit.html b/public/app/features/plugins/partials/ds_edit.html index 3305bfd67af..1470a312bb0 100644 --- a/public/app/features/plugins/partials/ds_edit.html +++ b/public/app/features/plugins/partials/ds_edit.html @@ -66,6 +66,9 @@ + Cancel diff --git a/public/app/features/plugins/partials/ds_list.html b/public/app/features/plugins/partials/ds_list.html index 314c165a3ac..c5ca9f514a4 100644 --- a/public/app/features/plugins/partials/ds_list.html +++ b/public/app/features/plugins/partials/ds_list.html @@ -18,23 +18,28 @@
  1. -
    +
    {{ds.type}}
    - -
    - -
    -
    +
    + +
    - {{ds.name}} -
    {{ds.url}}
    +
    + {{ds.name}} + + default + +
    +
    + {{ds.url}} +
    -
    +
@@ -43,49 +48,4 @@ No data sources defined - - - - - - - - - - - - - - - - - - - - - -
nametypeurl
- -   {{ds.name}} - - - {{ds.type}} - - {{ds.url}} - - - default - - - - - Edit - - - - - -
- - diff --git a/public/sass/components/_cards.scss b/public/sass/components/_cards.scss index eb5c6875ac0..01f619bf4c2 100644 --- a/public/sass/components/_cards.scss +++ b/public/sass/components/_cards.scss @@ -106,8 +106,14 @@ .card-list-layout-list { .card-item-wrapper { + padding: 0; width: 100%; - padding: 0 0 1.5rem 0rem; + } + + .card-item { + border-bottom: .2rem solid $page-bg; + border-radius: 0; + box-shadow: none; } .card-item-header {