mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Add fancy delete button for ApiKeys.
This commit is contained in:
committed by
Johannes Schill
parent
5f5840b24c
commit
b121700103
@@ -13,6 +13,7 @@ import ApiKeysAddedModal from './ApiKeysAddedModal';
|
||||
import config from 'app/core/config';
|
||||
import appEvents from 'app/core/app_events';
|
||||
import EmptyListCTA from 'app/core/components/EmptyListCTA/EmptyListCTA';
|
||||
import DeleteButton from 'app/core/components/DeleteButton/DeleteButton';
|
||||
|
||||
export interface Props {
|
||||
navModel: NavModel;
|
||||
@@ -219,9 +220,7 @@ export class ApiKeysPage extends PureComponent<Props, any> {
|
||||
<td>{key.name}</td>
|
||||
<td>{key.role}</td>
|
||||
<td>
|
||||
<a onClick={() => this.onDeleteApiKey(key)} className="btn btn-danger btn-mini">
|
||||
<i className="fa fa-remove" />
|
||||
</a>
|
||||
<DeleteButton onConfirmDelete={() => this.onDeleteApiKey(key)} />
|
||||
</td>
|
||||
</tr>
|
||||
);
|
||||
|
||||
@@ -174,14 +174,9 @@ exports[`Render should render API keys table if there are any keys 1`] = `
|
||||
Viewer
|
||||
</td>
|
||||
<td>
|
||||
<a
|
||||
className="btn btn-danger btn-mini"
|
||||
onClick={[Function]}
|
||||
>
|
||||
<i
|
||||
className="fa fa-remove"
|
||||
/>
|
||||
</a>
|
||||
<DeleteButton
|
||||
onConfirmDelete={[Function]}
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr
|
||||
@@ -194,14 +189,9 @@ exports[`Render should render API keys table if there are any keys 1`] = `
|
||||
Viewer
|
||||
</td>
|
||||
<td>
|
||||
<a
|
||||
className="btn btn-danger btn-mini"
|
||||
onClick={[Function]}
|
||||
>
|
||||
<i
|
||||
className="fa fa-remove"
|
||||
/>
|
||||
</a>
|
||||
<DeleteButton
|
||||
onConfirmDelete={[Function]}
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr
|
||||
@@ -214,14 +204,9 @@ exports[`Render should render API keys table if there are any keys 1`] = `
|
||||
Viewer
|
||||
</td>
|
||||
<td>
|
||||
<a
|
||||
className="btn btn-danger btn-mini"
|
||||
onClick={[Function]}
|
||||
>
|
||||
<i
|
||||
className="fa fa-remove"
|
||||
/>
|
||||
</a>
|
||||
<DeleteButton
|
||||
onConfirmDelete={[Function]}
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr
|
||||
@@ -234,14 +219,9 @@ exports[`Render should render API keys table if there are any keys 1`] = `
|
||||
Viewer
|
||||
</td>
|
||||
<td>
|
||||
<a
|
||||
className="btn btn-danger btn-mini"
|
||||
onClick={[Function]}
|
||||
>
|
||||
<i
|
||||
className="fa fa-remove"
|
||||
/>
|
||||
</a>
|
||||
<DeleteButton
|
||||
onConfirmDelete={[Function]}
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr
|
||||
@@ -254,14 +234,9 @@ exports[`Render should render API keys table if there are any keys 1`] = `
|
||||
Viewer
|
||||
</td>
|
||||
<td>
|
||||
<a
|
||||
className="btn btn-danger btn-mini"
|
||||
onClick={[Function]}
|
||||
>
|
||||
<i
|
||||
className="fa fa-remove"
|
||||
/>
|
||||
</a>
|
||||
<DeleteButton
|
||||
onConfirmDelete={[Function]}
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user