APIKeys: Update text on API keys deprecation (#97022)

* update text on API keys deprecation

* run prettier

* add betterer results
This commit is contained in:
Mihai Doarna 2024-11-26 14:22:23 +02:00 committed by GitHub
parent 5039725da6
commit d2fab92d8b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 14 deletions

View File

@ -1848,8 +1848,7 @@ exports[`better eslint`] = {
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"], [0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "2"], [0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "2"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "3"], [0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "3"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "4"], [0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "4"]
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "5"]
], ],
"public/app/features/auth-config/AuthDrawer.tsx:5381": [ "public/app/features/auth-config/AuthDrawer.tsx:5381": [
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"], [0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"],

View File

@ -17,30 +17,23 @@ export const MigrateToServiceAccountsCard = ({ onMigrate, apikeysCount, disabled
const docsLink = ( const docsLink = (
<a <a
className="external-link" className="external-link"
href="https://grafana.com/docs/grafana/latest/administration/service-accounts/migrate-api-keys/)" href="https://grafana.com/docs/grafana/latest/administration/service-accounts/migrate-api-keys/"
target="_blank" target="_blank"
rel="noopener noreferrer" rel="noopener noreferrer"
> >
Find out more about the migration here. Find out more about the migration here.
</a> </a>
); );
const migrationBoxDesc = ( const migrationBoxDesc = <span>Migrating all API keys will hide the API keys tab.</span>;
<span>
Migrating all API keys will hide the API keys tab.
<br></br>
<br></br>
The API keys API will remain available for you to create new API keys, but we strongly encourage you to use
Service accounts instead.
</span>
);
return ( return (
<> <>
{apikeysCount > 0 && ( {apikeysCount > 0 && (
<Alert title="Switch from API keys to service accounts" severity="warning"> <Alert title="Switch from API keys to service accounts" severity="warning">
<div className={styles.text}> <div className={styles.text}>
We will soon deprecate API keys. Each API key will be migrated into a service account with a token and will API keys are deprecated and will be removed from Grafana on Jan 31, 2025. Each API key will be migrated into
continue to work as they were. We encourage you to migrate your API keys to service accounts now. {docsLink} a service account with a token and will continue to work as they were. We encourage you to migrate your API
keys to service accounts now. {docsLink}
</div> </div>
<div className={styles.actionRow}> <div className={styles.actionRow}>
<Button className={styles.actionButton} onClick={() => setIsModalOpen(true)}> <Button className={styles.actionButton} onClick={() => setIsModalOpen(true)}>