mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[APM][UI] Sort environment dropdown alphabetically (#217710)
Closes #217814 ### Summary Sort environment list alphabetically. |Before|After| |-|-| |<img width="1724" alt="Screenshot 2025-04-10 at 12 01 15" src="https://github.com/user-attachments/assets/53f0b66d-146a-45d9-b4e3-25bde350a263" />|<img width="1722" alt="Screenshot 2025-04-10 at 11 58 27" src="https://github.com/user-attachments/assets/91315d23-801c-4a16-8688-c43d60c389c8" />|
This commit is contained in:
parent
79058c6529
commit
23cbaa6d55
3 changed files with 7 additions and 2 deletions
|
@ -54,6 +54,7 @@ export async function getEnvironments({
|
|||
terms: {
|
||||
field: SERVICE_ENVIRONMENT,
|
||||
missing: ENVIRONMENT_NOT_DEFINED.value,
|
||||
order: { _key: 'asc' as const },
|
||||
size,
|
||||
},
|
||||
},
|
||||
|
|
|
@ -51,7 +51,11 @@ export async function getSuggestionsWithTermsAggregation({
|
|||
},
|
||||
aggs: {
|
||||
items: {
|
||||
terms: { field: fieldName, size },
|
||||
terms: {
|
||||
field: fieldName,
|
||||
size,
|
||||
order: { _key: 'asc' as const },
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
|
@ -104,10 +104,10 @@ export default function environmentsAPITests({ getService }: DeploymentAgnosticF
|
|||
expect(body.environments.length).to.be.equal(4);
|
||||
expectSnapshot(body.environments).toMatchInline(`
|
||||
Array [
|
||||
"custom-go-environment",
|
||||
"development",
|
||||
"production",
|
||||
"staging",
|
||||
"custom-go-environment",
|
||||
]
|
||||
`);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue