AzureMonitor: Support querying any Resource for Logs queries (#33879)

* wip

* wip:

* ui work for resource picker

* disable rows when others are selected

* resource picker open button

* Azure Monitor: Connect to backend with real data (#34024)

* Connect to backend with real data

* Fixes from code review.

* WIP:Begin thinking about how to make queries with scope determined by the resource picker

* More fixes post code review.

* Fixes after rebasing

* Remove outdated todo

* AzureMonitor: Support any resource for Logs queries (#33762)

* Apply button for resource picker

* scroll table body

* secondary cancel button

* loading state for nested rows

* Display resource components in picker button

* fix tests

* fix icons

* move route function

* Migrate from workspace to resource uri for log analytics (#34337)

* reword backwards compat comment

* remove base url suffix

* fix lint error

* move migrations to seperate file

* cleanup

* update regex

* cleanup

* update plugin routes to use new azure auth type

* use AzureDataSourceInstanceSettings alias

Co-authored-by: Sarah Zinger <sarahzinger@users.noreply.github.com>
This commit is contained in:
Josh Hunt
2021-05-19 17:39:08 +01:00
committed by GitHub
co-authored by Sarah Zinger
parent c61dd82163
commit 5dca9fd4d8
26 changed files with 1311 additions and 315 deletions
@@ -52,7 +52,8 @@ const IconWrapper = ({ name }: { name: IconName }) => {
);
};
const icons = getAvailableIcons().sort((a, b) => a.localeCompare(b));
const icons = [...getAvailableIcons()];
icons.sort((a, b) => a.localeCompare(b));
export const IconsOverview = () => {
const [filter, setFilter] = useState('');
+140 -276
View File
@@ -2,280 +2,144 @@ import { ComponentSize } from './size';
export type IconType = 'mono' | 'default';
export type IconSize = ComponentSize | 'xl' | 'xxl' | 'xxxl';
export type IconName =
| 'angle-double-down'
| 'angle-double-right'
| 'angle-down'
| 'angle-left'
| 'angle-right'
| 'angle-up'
| 'apps'
| 'arrow-down'
| 'arrow-from-right'
| 'arrow-left'
| 'arrow-random'
| 'arrow-right'
| 'arrow-up'
| 'arrow'
| 'arrows-h'
| 'bars'
| 'bell-slash'
| 'bell'
| 'bolt'
| 'book-open'
| 'book'
| 'brackets-curly'
| 'bug'
| 'calculator-alt'
| 'calendar-alt'
| 'camera'
| 'channel-add'
| 'chart-line'
| 'check-circle'
| 'check'
| 'circle'
| 'clipboard-alt'
| 'clock-nine'
| 'cloud-download'
| 'cloud-upload'
| 'cloud'
| 'code-branch'
| 'cog'
| 'columns'
| 'comment-alt'
| 'comments-alt'
| 'compass'
| 'copy'
| 'cube'
| 'database'
| 'document-info'
| 'download-alt'
| 'draggabledots'
| 'edit'
| 'ellipsis-v'
| 'envelope'
| 'exchange-alt'
| 'exclamation-triangle'
| 'exclamation'
| 'external-link-alt'
| 'eye-slash'
| 'eye'
| 'fa fa-spinner'
| 'favorite'
| 'file-alt'
| 'file-blank'
| 'file-copy-alt'
| 'filter'
| 'folder-open'
| 'folder-plus'
| 'folder-upload'
| 'folder'
| 'forward'
| 'gf-interpolation-linear'
| 'gf-interpolation-smooth'
| 'gf-interpolation-step-after'
| 'gf-interpolation-step-before'
| 'gf-logs'
| 'github'
| 'gitlab'
| 'grafana'
| 'graph-bar'
| 'google'
| 'heart-break'
| 'heart'
| 'history'
| 'home-alt'
| 'import'
| 'info-circle'
| 'key-skeleton-alt'
| 'keyboard'
| 'line-alt'
| 'link'
| 'list-ul'
| 'lock'
| 'microsoft'
| 'minus-circle'
| 'minus'
| 'mobile-android'
| 'monitor'
| 'okta'
| 'palette'
| 'panel-add'
| 'pause'
| 'pen'
| 'percentage'
| 'play'
| 'plug'
| 'plus-circle'
| 'plus-square'
| 'plus'
| 'power'
| 'question-circle'
| 'repeat'
| 'library-panel'
| 'rocket'
| 'save'
| 'search-minus'
| 'search-plus'
| 'search'
| 'share-alt'
| 'shield'
| 'shield-exclamation'
| 'sign-in-alt'
| 'signal'
| 'signin'
| 'signout'
| 'slack'
| 'sliders-v-alt'
| 'sort-amount-down'
| 'square-shape'
| 'star'
| 'step-backward'
| 'sync'
| 'table'
| 'tag-alt'
| 'times'
| 'trash-alt'
| 'unlock'
| 'upload'
| 'user'
| 'users-alt'
| 'wrap-text'
| 'heart-rate'
| 'x';
export const getAvailableIcons = () =>
[
'angle-double-down',
'angle-double-right',
'angle-down',
'angle-left',
'angle-right',
'angle-up',
'apps',
'arrow-down',
'arrow-from-right',
'arrow-left',
'arrow-random',
'arrow-right',
'arrow-up',
'arrow',
'arrows-h',
'bars',
'bell-slash',
'bell',
'bolt',
'book-open',
'book',
'brackets-curly',
'bug',
'calculator-alt',
'calendar-alt',
'camera',
'channel-add',
'chart-line',
'check-circle',
'check',
'circle',
'clipboard-alt',
'clock-nine',
'cloud-download',
'cloud-upload',
'cloud',
'code-branch',
'cog',
'columns',
'comment-alt',
'comments-alt',
'compass',
'copy',
'cube',
'database',
'document-info',
'download-alt',
'draggabledots',
'edit',
'ellipsis-v',
'envelope',
'exchange-alt',
'exclamation-triangle',
'external-link-alt',
'eye-slash',
'eye',
'fa fa-spinner',
'favorite',
'file-alt',
'file-blank',
'file-copy-alt',
'filter',
'folder-open',
'folder-plus',
'folder-upload',
'folder',
'forward',
'gf-interpolation-linear',
'gf-interpolation-smooth',
'gf-interpolation-step-after',
'gf-interpolation-step-before',
'gf-logs',
'grafana',
'graph-bar',
'heart-break',
'heart',
'history',
'home-alt',
'import',
'info-circle',
'key-skeleton-alt',
'keyboard',
'layer-group',
'line-alt',
'link',
'list-ul',
'lock',
'minus-circle',
'minus',
'mobile-android',
'monitor',
'palette',
'panel-add',
'pause',
'pen',
'percentage',
'play',
'plug',
'plus-circle',
'plus-square',
'plus',
'power',
'question-circle',
'repeat',
'library-panel',
'rocket',
'save',
'search-minus',
'search-plus',
'search',
'share-alt',
'shield',
'shield-exclamation',
'sign-in-alt',
'signal',
'signin',
'signout',
'slack',
'sliders-v-alt',
'sort-amount-down',
'square-shape',
'star',
'step-backward',
'sync',
'table',
'tag-alt',
'times',
'trash-alt',
'unlock',
'upload',
'user',
'users-alt',
'wrap-text',
'x',
] as const;
export const getAvailableIcons = (): IconName[] => [
'angle-double-down',
'angle-double-right',
'angle-down',
'angle-left',
'angle-right',
'angle-up',
'apps',
'arrow-down',
'arrow-from-right',
'arrow-left',
'arrow-random',
'arrow-right',
'arrow-up',
'arrow',
'arrows-h',
'bars',
'bell-slash',
'bell',
'bolt',
'book-open',
'book',
'brackets-curly',
'bug',
'calculator-alt',
'calendar-alt',
'camera',
'channel-add',
'chart-line',
'check-circle',
'check',
'circle',
'clipboard-alt',
'clock-nine',
'cloud-download',
'cloud-upload',
'cloud',
'code-branch',
'cog',
'columns',
'comment-alt',
'comments-alt',
'compass',
'copy',
'cube',
'database',
'document-info',
'download-alt',
'draggabledots',
'edit',
'ellipsis-v',
'envelope',
'exchange-alt',
'exclamation-triangle',
'external-link-alt',
'eye-slash',
'eye',
'fa fa-spinner',
'favorite',
'file-alt',
'file-blank',
'file-copy-alt',
'filter',
'folder-open',
'folder-plus',
'folder-upload',
'folder',
'forward',
'gf-interpolation-linear',
'gf-interpolation-smooth',
'gf-interpolation-step-after',
'gf-interpolation-step-before',
'gf-logs',
'grafana',
'graph-bar',
'heart-break',
'heart',
'history',
'home-alt',
'import',
'info-circle',
'key-skeleton-alt',
'keyboard',
'line-alt',
'link',
'list-ul',
'lock',
'minus-circle',
'minus',
'mobile-android',
'monitor',
'palette',
'panel-add',
'pause',
'pen',
'percentage',
'play',
'plug',
'plus-circle',
'plus-square',
'plus',
'power',
'question-circle',
'repeat',
'library-panel',
'rocket',
'save',
'search-minus',
'search-plus',
'search',
'share-alt',
'shield',
'shield-exclamation',
'sign-in-alt',
'signal',
'signin',
'signout',
'slack',
'sliders-v-alt',
'sort-amount-down',
'square-shape',
'star',
'step-backward',
'sync',
'table',
'tag-alt',
'times',
'trash-alt',
'unlock',
'upload',
'user',
'users-alt',
'wrap-text',
'x',
];
type BrandIconNames = 'google' | 'microsoft' | 'github' | 'gitlab' | 'okta';
export type IconName = ReturnType<typeof getAvailableIcons>[number] | BrandIconNames;