mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Service accounts: UI polish improvements (#47461)
* ui polishes * change icon
This commit is contained in:
parent
7e844064a4
commit
883ce5ad30
@ -307,7 +307,7 @@ func (hs *HTTPServer) getNavTree(c *models.ReqContext, hasEditPerm bool) ([]*dto
|
|||||||
Id: "serviceaccounts",
|
Id: "serviceaccounts",
|
||||||
Description: "Manage service accounts",
|
Description: "Manage service accounts",
|
||||||
// TODO: change icon to "key-skeleton-alt" when it's available
|
// TODO: change icon to "key-skeleton-alt" when it's available
|
||||||
Icon: "key-skeleton-alt",
|
Icon: "keyhole-circle",
|
||||||
Url: hs.Cfg.AppSubURL + "/org/serviceaccounts",
|
Url: hs.Cfg.AppSubURL + "/org/serviceaccounts",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -64,8 +64,11 @@ export const CreateTokenModal = ({ isOpen, token, onCreateToken, onClose }: Crea
|
|||||||
<FieldSet>
|
<FieldSet>
|
||||||
<Field
|
<Field
|
||||||
label="Display name"
|
label="Display name"
|
||||||
description="Optional name to easily identify the token"
|
description="name to easily identify the token"
|
||||||
className={styles.modalRow}
|
className={styles.modalRow}
|
||||||
|
// for now this is required
|
||||||
|
// need to make this optional in backend as well
|
||||||
|
required={true}
|
||||||
>
|
>
|
||||||
<Input
|
<Input
|
||||||
name="tokenName"
|
name="tokenName"
|
@ -17,7 +17,7 @@ import {
|
|||||||
import { ServiceAccountTokensTable } from './ServiceAccountTokensTable';
|
import { ServiceAccountTokensTable } from './ServiceAccountTokensTable';
|
||||||
import { getTimeZone, NavModel } from '@grafana/data';
|
import { getTimeZone, NavModel } from '@grafana/data';
|
||||||
import { Button } from '@grafana/ui';
|
import { Button } from '@grafana/ui';
|
||||||
import { CreateTokenModal } from './CreateTokenModal';
|
import { CreateTokenModal } from './CreateServiceAccountTokenModal';
|
||||||
import { contextSrv } from 'app/core/core';
|
import { contextSrv } from 'app/core/core';
|
||||||
|
|
||||||
interface OwnProps extends GrafanaRouteComponentProps<{ id: string }> {
|
interface OwnProps extends GrafanaRouteComponentProps<{ id: string }> {
|
||||||
|
@ -66,10 +66,18 @@ export function ServiceAccountProfile({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<h3 className="page-heading">Information</h3>
|
<div style={{ marginBottom: '10px' }}>
|
||||||
<a href="org/serviceaccounts">
|
<a href="org/serviceaccounts" style={{ display: 'inline-block', verticalAlign: 'middle' }}>
|
||||||
<Button variant="link" icon="backward" />
|
<Button variant="link" icon="backward" />
|
||||||
</a>
|
</a>
|
||||||
|
<h1
|
||||||
|
className="page-heading"
|
||||||
|
style={{ display: 'inline-block', verticalAlign: 'middle', margin: '0!important', marginBottom: '0px' }}
|
||||||
|
>
|
||||||
|
{serviceAccount.name}
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
<span style={{ marginBottom: '10px' }}>Information</span>
|
||||||
<div className="gf-form-group">
|
<div className="gf-form-group">
|
||||||
<div className="gf-form">
|
<div className="gf-form">
|
||||||
<table className="filter-table form-inline">
|
<table className="filter-table form-inline">
|
||||||
|
@ -78,6 +78,7 @@ const ServiceAccountsListPage = ({
|
|||||||
return (
|
return (
|
||||||
<Page navModel={navModel}>
|
<Page navModel={navModel}>
|
||||||
<Page.Contents>
|
<Page.Contents>
|
||||||
|
<h2>Service accounts</h2>
|
||||||
<div className="page-action-bar" style={{ justifyContent: 'flex-end' }}>
|
<div className="page-action-bar" style={{ justifyContent: 'flex-end' }}>
|
||||||
<FilterInput
|
<FilterInput
|
||||||
placeholder="Search service account by name."
|
placeholder="Search service account by name."
|
||||||
@ -123,7 +124,7 @@ const ServiceAccountsListPage = ({
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th>Display name</th>
|
<th>Account</th>
|
||||||
<th>ID</th>
|
<th>ID</th>
|
||||||
<th>Roles</th>
|
<th>Roles</th>
|
||||||
<th>Status</th>
|
<th>Status</th>
|
||||||
|
Loading…
Reference in New Issue
Block a user