Quellcode durchsuchen

feat(alerting): remove delete option from alerts page

bergquist vor 9 Jahren
Ursprung
Commit
4ea0e6ca93

+ 0 - 10
public/app/features/alerts/alerts_ctrl.ts

@@ -23,16 +23,6 @@ export class AlertPageCtrl {
       });
     });
   }
-
-  deleteAlert(alert) {
-    this.backendSrv.delete('/api/alerts/' + alert.id).then(result => {
-      if (result.alertId) {
-        this.alerts = this.alerts.filter(alert => {
-          return alert.id !== result.alertId;
-        });
-      }
-    });
-  }
 }
 
 coreModule.controller('AlertPageCtrl', AlertPageCtrl);

+ 0 - 6
public/app/features/alerts/partials/alerts_page.html

@@ -11,7 +11,6 @@
       <th style="min-width: 200px"><strong>Name</strong></th>
       <th style="width: 1%">State</th>
       <th style="width: 1%"></th>
-      <th style="width: 1%"></th>
     </thead>
     <tr ng-repeat="alert in ctrl.alerts">
       <td>
@@ -30,11 +29,6 @@
           edit
         </a>
       </td>
-      <td class="text-right">
-        <a ng-click="ctrl.deleteAlert(alert)" class="btn btn-danger btn-small">
-          <i class="fa fa-remove"></i>
-        </a>
-      </td>
     </tr>
   </table>
 </div>