mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 04:19:25 +08:00

* Add pills in search bar for context * Add scope actions * Add selection functionality * Show selected scope on secondary row * Fix selected scope titles * Add some basic tests * Test for toggle by name * Remove unnecessary mocking * Small cleanups * Lint fixes * Fix test * Update public/app/features/scopes/selector/ScopesSelectorService.ts Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com> * Bump input and breadcrumbs test * Change breadcrumbs color * Makes the breacrumb spacing consistent --------- Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
15 lines
282 B
TypeScript
15 lines
282 B
TypeScript
import { Scope } from '@grafana/data';
|
|
|
|
export function getEmptyScopeObject(name: string, title?: string): Scope {
|
|
return {
|
|
metadata: { name },
|
|
spec: {
|
|
filters: [],
|
|
title: title || name,
|
|
type: '',
|
|
category: '',
|
|
description: '',
|
|
},
|
|
};
|
|
}
|