2019-10-18 05:09:53 -05:00
|
|
|
import {
|
2022-01-07 07:41:09 -06:00
|
|
|
ClipboardButton,
|
2019-10-18 05:09:53 -05:00
|
|
|
ColorPicker,
|
2020-09-09 00:45:51 -05:00
|
|
|
DataLinksInlineEditor,
|
2019-10-18 05:09:53 -05:00
|
|
|
DataSourceHttpSettings,
|
2024-02-29 08:25:33 -06:00
|
|
|
GraphContextMenu,
|
@grafana/ui: Create Icon component and replace part of the icons (#23402)
* Part1: Unicons implementation (#23197)
* Create a new Icon component
* Update icons in main sidebar
* Update icons in Useful links and in react components on main site
* Update icons in Useful links and in main top navigation
* Adjust sizing
* Update panel navigation and timepicker
* Update icons in Panel menu
* NewPanelEditor: Fixed so that test alert rule works in new edit mode (#23179)
* Update icons in add panel widget
* Resolve merge conflict
* Fix part of the test errors and type errors
* Fix storybook errors
* Update getAvailableIcons import in storybook knobs
* Fix import path
* Fix SyntaxError: Cannot use import statement outside a module in test environment error
* Remove dynamic imports
* Remove types as using @ts-ignore
* Update snapshot test
* Add @iconscout/react-unicons to the shouldExclude list as it is blundled with es2015 syntax
* Remove color prop from icon, remove color implemetation in mono icons
* Update navbar styling
* Move toPascalCase to utils/string
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* Resolve type errors resulted from merge
* Part2: Unicons implementation (#23266)
* Create a new Icon component
* Update icons in main sidebar
* Update icons in Useful links and in react components on main site
* Update icons in Useful links and in main top navigation
* Adjust sizing
* Update panel navigation and timepicker
* Update icons in Panel menu
* Update icons in add panel widget
* Resolve merge conflict
* Fix part of the test errors and type errors
* Fix storybook errors
* Update getAvailableIcons import in storybook knobs
* Fix import path
* Fix SyntaxError: Cannot use import statement outside a module in test environment error
* Remove dynamic imports
* Remove types as using @ts-ignore
* Update snapshot test
* Add @iconscout/react-unicons to the shouldExclude list as it is blundled with es2015 syntax
* Implment icons in Tabs
* Implement icons in search items and empty list
* Update buttons
* Update button-related snapshot tests
* Update icons in modals and page headers
* Create anfular wrapper and update all icons on search screen
* Update sizing, remove colors, update snapshot tests
* Remove color prop from icon, remove color implemetation in mono icons
* Remove color props from monochrome icons
* Complete update of icons for search screen
* Update icons for infor tooltips, playlist, permissions
* Support temporarly font awesome icons used in enterprise grafana
* Part1: Unicons implementation (#23197)
* Create a new Icon component
* Update icons in main sidebar
* Update icons in Useful links and in react components on main site
* Update icons in Useful links and in main top navigation
* Adjust sizing
* Update panel navigation and timepicker
* Update icons in Panel menu
* NewPanelEditor: Fixed so that test alert rule works in new edit mode (#23179)
* Update icons in add panel widget
* Resolve merge conflict
* Fix part of the test errors and type errors
* Fix storybook errors
* Update getAvailableIcons import in storybook knobs
* Fix import path
* Fix SyntaxError: Cannot use import statement outside a module in test environment error
* Remove dynamic imports
* Remove types as using @ts-ignore
* Update snapshot test
* Add @iconscout/react-unicons to the shouldExclude list as it is blundled with es2015 syntax
* Remove color prop from icon, remove color implemetation in mono icons
* Update navbar styling
* Move toPascalCase to utils/string
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* Icons update
* Add optional chaining to for isFontAwesome variable
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* Part3: Unicons implementation (#23356)
* Create a new Icon component
* Update icons in main sidebar
* Update icons in Useful links and in react components on main site
* Update icons in Useful links and in main top navigation
* Adjust sizing
* Update panel navigation and timepicker
* Update icons in Panel menu
* Update icons in add panel widget
* Resolve merge conflict
* Fix part of the test errors and type errors
* Fix storybook errors
* Update getAvailableIcons import in storybook knobs
* Fix import path
* Fix SyntaxError: Cannot use import statement outside a module in test environment error
* Remove dynamic imports
* Remove types as using @ts-ignore
* Update snapshot test
* Add @iconscout/react-unicons to the shouldExclude list as it is blundled with es2015 syntax
* Implment icons in Tabs
* Implement icons in search items and empty list
* Update buttons
* Update button-related snapshot tests
* Update icons in modals and page headers
* Create anfular wrapper and update all icons on search screen
* Update sizing, remove colors, update snapshot tests
* Remove color prop from icon, remove color implemetation in mono icons
* Remove color props from monochrome icons
* Complete update of icons for search screen
* Update icons for infor tooltips, playlist, permissions
* Support temporarly font awesome icons used in enterprise grafana
* Part1: Unicons implementation (#23197)
* Create a new Icon component
* Update icons in main sidebar
* Update icons in Useful links and in react components on main site
* Update icons in Useful links and in main top navigation
* Adjust sizing
* Update panel navigation and timepicker
* Update icons in Panel menu
* NewPanelEditor: Fixed so that test alert rule works in new edit mode (#23179)
* Update icons in add panel widget
* Resolve merge conflict
* Fix part of the test errors and type errors
* Fix storybook errors
* Update getAvailableIcons import in storybook knobs
* Fix import path
* Fix SyntaxError: Cannot use import statement outside a module in test environment error
* Remove dynamic imports
* Remove types as using @ts-ignore
* Update snapshot test
* Add @iconscout/react-unicons to the shouldExclude list as it is blundled with es2015 syntax
* Remove color prop from icon, remove color implemetation in mono icons
* Update navbar styling
* Move toPascalCase to utils/string
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* Update icons in Explore
* Update icons in alerting
* Update + and x buttons
* Update icons in configurations and settings
* Update close icons
* Update icons in rich history
* Update alert messages
* Add optional chaining to for isFontAwesome variable
* Remove icon mock, set up jest.config
* Fix navbar plus icon
* Fir enable-bacground to enableBackgournd
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* Merge remote branch origin master to icons-unicons
* Revert "Merge remote branch origin master to icons-unicons"
This reverts commit 3f25d50a39a940883fefe73ce51219139c1ed37f.
* Size-up dashnav icons
* Fix alerting icons, panel headers, update tests
* Fix typecheck error
* Adjustments - add panel icon, spacing
* Set TerserPlugin sourceMap to false to prevent running out of memory when publishing storybook
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-04-08 07:33:31 -05:00
|
|
|
Icon,
|
2020-04-21 04:42:21 -05:00
|
|
|
LegacyForms,
|
2020-09-09 00:45:51 -05:00
|
|
|
SeriesColorPickerPopoverWithTheme,
|
2021-08-17 11:50:31 -05:00
|
|
|
Spinner,
|
2020-09-09 00:45:51 -05:00
|
|
|
UnitPicker,
|
2019-10-18 05:09:53 -05:00
|
|
|
} from '@grafana/ui';
|
2022-04-22 08:33:13 -05:00
|
|
|
import { react2AngularDirective } from 'app/angular/react2angular';
|
2023-07-21 08:24:43 -05:00
|
|
|
import { OldFolderPicker } from 'app/core/components/Select/OldFolderPicker';
|
2021-03-11 05:37:39 -06:00
|
|
|
import { TimePickerSettings } from 'app/features/dashboard/components/DashboardSettings/TimePickerSettings';
|
2022-04-22 08:33:13 -05:00
|
|
|
import { QueryEditor as CloudMonitoringQueryEditor } from 'app/plugins/datasource/cloud-monitoring/components/QueryEditor';
|
2017-10-22 00:03:26 -05:00
|
|
|
|
2022-04-22 08:33:13 -05:00
|
|
|
import EmptyListCTA from '../core/components/EmptyListCTA/EmptyListCTA';
|
|
|
|
import { Footer } from '../core/components/Footer/Footer';
|
|
|
|
import { MetricSelect } from '../core/components/Select/MetricSelect';
|
|
|
|
import { TagFilter } from '../core/components/TagFilter/TagFilter';
|
|
|
|
import { HelpModal } from '../core/components/help/HelpModal';
|
|
|
|
|
2024-06-03 05:47:47 -05:00
|
|
|
import { PageHeader } from './components/PageHeader/PageHeader';
|
|
|
|
|
2020-09-09 00:45:51 -05:00
|
|
|
const { SecretFormField } = LegacyForms;
|
|
|
|
|
2017-10-22 00:03:26 -05:00
|
|
|
export function registerAngularDirectives() {
|
2020-01-09 04:25:52 -06:00
|
|
|
react2AngularDirective('footer', Footer, []);
|
@grafana/ui: Create Icon component and replace part of the icons (#23402)
* Part1: Unicons implementation (#23197)
* Create a new Icon component
* Update icons in main sidebar
* Update icons in Useful links and in react components on main site
* Update icons in Useful links and in main top navigation
* Adjust sizing
* Update panel navigation and timepicker
* Update icons in Panel menu
* NewPanelEditor: Fixed so that test alert rule works in new edit mode (#23179)
* Update icons in add panel widget
* Resolve merge conflict
* Fix part of the test errors and type errors
* Fix storybook errors
* Update getAvailableIcons import in storybook knobs
* Fix import path
* Fix SyntaxError: Cannot use import statement outside a module in test environment error
* Remove dynamic imports
* Remove types as using @ts-ignore
* Update snapshot test
* Add @iconscout/react-unicons to the shouldExclude list as it is blundled with es2015 syntax
* Remove color prop from icon, remove color implemetation in mono icons
* Update navbar styling
* Move toPascalCase to utils/string
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* Resolve type errors resulted from merge
* Part2: Unicons implementation (#23266)
* Create a new Icon component
* Update icons in main sidebar
* Update icons in Useful links and in react components on main site
* Update icons in Useful links and in main top navigation
* Adjust sizing
* Update panel navigation and timepicker
* Update icons in Panel menu
* Update icons in add panel widget
* Resolve merge conflict
* Fix part of the test errors and type errors
* Fix storybook errors
* Update getAvailableIcons import in storybook knobs
* Fix import path
* Fix SyntaxError: Cannot use import statement outside a module in test environment error
* Remove dynamic imports
* Remove types as using @ts-ignore
* Update snapshot test
* Add @iconscout/react-unicons to the shouldExclude list as it is blundled with es2015 syntax
* Implment icons in Tabs
* Implement icons in search items and empty list
* Update buttons
* Update button-related snapshot tests
* Update icons in modals and page headers
* Create anfular wrapper and update all icons on search screen
* Update sizing, remove colors, update snapshot tests
* Remove color prop from icon, remove color implemetation in mono icons
* Remove color props from monochrome icons
* Complete update of icons for search screen
* Update icons for infor tooltips, playlist, permissions
* Support temporarly font awesome icons used in enterprise grafana
* Part1: Unicons implementation (#23197)
* Create a new Icon component
* Update icons in main sidebar
* Update icons in Useful links and in react components on main site
* Update icons in Useful links and in main top navigation
* Adjust sizing
* Update panel navigation and timepicker
* Update icons in Panel menu
* NewPanelEditor: Fixed so that test alert rule works in new edit mode (#23179)
* Update icons in add panel widget
* Resolve merge conflict
* Fix part of the test errors and type errors
* Fix storybook errors
* Update getAvailableIcons import in storybook knobs
* Fix import path
* Fix SyntaxError: Cannot use import statement outside a module in test environment error
* Remove dynamic imports
* Remove types as using @ts-ignore
* Update snapshot test
* Add @iconscout/react-unicons to the shouldExclude list as it is blundled with es2015 syntax
* Remove color prop from icon, remove color implemetation in mono icons
* Update navbar styling
* Move toPascalCase to utils/string
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* Icons update
* Add optional chaining to for isFontAwesome variable
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* Part3: Unicons implementation (#23356)
* Create a new Icon component
* Update icons in main sidebar
* Update icons in Useful links and in react components on main site
* Update icons in Useful links and in main top navigation
* Adjust sizing
* Update panel navigation and timepicker
* Update icons in Panel menu
* Update icons in add panel widget
* Resolve merge conflict
* Fix part of the test errors and type errors
* Fix storybook errors
* Update getAvailableIcons import in storybook knobs
* Fix import path
* Fix SyntaxError: Cannot use import statement outside a module in test environment error
* Remove dynamic imports
* Remove types as using @ts-ignore
* Update snapshot test
* Add @iconscout/react-unicons to the shouldExclude list as it is blundled with es2015 syntax
* Implment icons in Tabs
* Implement icons in search items and empty list
* Update buttons
* Update button-related snapshot tests
* Update icons in modals and page headers
* Create anfular wrapper and update all icons on search screen
* Update sizing, remove colors, update snapshot tests
* Remove color prop from icon, remove color implemetation in mono icons
* Remove color props from monochrome icons
* Complete update of icons for search screen
* Update icons for infor tooltips, playlist, permissions
* Support temporarly font awesome icons used in enterprise grafana
* Part1: Unicons implementation (#23197)
* Create a new Icon component
* Update icons in main sidebar
* Update icons in Useful links and in react components on main site
* Update icons in Useful links and in main top navigation
* Adjust sizing
* Update panel navigation and timepicker
* Update icons in Panel menu
* NewPanelEditor: Fixed so that test alert rule works in new edit mode (#23179)
* Update icons in add panel widget
* Resolve merge conflict
* Fix part of the test errors and type errors
* Fix storybook errors
* Update getAvailableIcons import in storybook knobs
* Fix import path
* Fix SyntaxError: Cannot use import statement outside a module in test environment error
* Remove dynamic imports
* Remove types as using @ts-ignore
* Update snapshot test
* Add @iconscout/react-unicons to the shouldExclude list as it is blundled with es2015 syntax
* Remove color prop from icon, remove color implemetation in mono icons
* Update navbar styling
* Move toPascalCase to utils/string
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* Update icons in Explore
* Update icons in alerting
* Update + and x buttons
* Update icons in configurations and settings
* Update close icons
* Update icons in rich history
* Update alert messages
* Add optional chaining to for isFontAwesome variable
* Remove icon mock, set up jest.config
* Fix navbar plus icon
* Fir enable-bacground to enableBackgournd
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* Merge remote branch origin master to icons-unicons
* Revert "Merge remote branch origin master to icons-unicons"
This reverts commit 3f25d50a39a940883fefe73ce51219139c1ed37f.
* Size-up dashnav icons
* Fix alerting icons, panel headers, update tests
* Fix typecheck error
* Adjustments - add panel icon, spacing
* Set TerserPlugin sourceMap to false to prevent running out of memory when publishing storybook
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-04-08 07:33:31 -05:00
|
|
|
react2AngularDirective('icon', Icon, [
|
|
|
|
'name',
|
|
|
|
'size',
|
|
|
|
'type',
|
|
|
|
['onClick', { watchDepth: 'reference', wrapApply: true }],
|
|
|
|
]);
|
2020-11-04 06:34:40 -06:00
|
|
|
react2AngularDirective('spinner', Spinner, ['inline']);
|
2019-10-02 08:57:40 -05:00
|
|
|
react2AngularDirective('helpModal', HelpModal, []);
|
2018-01-03 08:50:39 -06:00
|
|
|
react2AngularDirective('pageHeader', PageHeader, ['model', 'noTabs']);
|
2019-08-20 10:19:21 -05:00
|
|
|
react2AngularDirective('emptyListCta', EmptyListCTA, [
|
|
|
|
'title',
|
|
|
|
'buttonIcon',
|
|
|
|
'buttonLink',
|
|
|
|
'buttonTitle',
|
|
|
|
['onClick', { watchDepth: 'reference', wrapApply: true }],
|
|
|
|
'proTip',
|
|
|
|
'proTipLink',
|
|
|
|
'proTipLinkTitle',
|
|
|
|
'proTipTarget',
|
|
|
|
'infoBox',
|
|
|
|
'infoBoxTitle',
|
|
|
|
]);
|
2018-01-16 05:52:13 -06:00
|
|
|
react2AngularDirective('tagFilter', TagFilter, [
|
|
|
|
'tags',
|
2018-12-10 06:23:38 -06:00
|
|
|
['onChange', { watchDepth: 'reference' }],
|
2018-01-16 05:52:13 -06:00
|
|
|
['tagOptions', { watchDepth: 'reference' }],
|
|
|
|
]);
|
2019-01-10 06:34:23 -06:00
|
|
|
react2AngularDirective('colorPicker', ColorPicker, [
|
|
|
|
'color',
|
|
|
|
['onChange', { watchDepth: 'reference', wrapApply: true }],
|
|
|
|
]);
|
2019-02-05 10:04:48 -06:00
|
|
|
react2AngularDirective('seriesColorPickerPopover', SeriesColorPickerPopoverWithTheme, [
|
2019-01-24 05:01:15 -06:00
|
|
|
'color',
|
2019-01-10 06:34:23 -06:00
|
|
|
'series',
|
|
|
|
'onColorChange',
|
|
|
|
'onToggleAxis',
|
|
|
|
]);
|
2019-12-04 02:08:07 -06:00
|
|
|
react2AngularDirective('unitPicker', UnitPicker, [
|
|
|
|
'value',
|
|
|
|
'width',
|
|
|
|
['onChange', { watchDepth: 'reference', wrapApply: true }],
|
|
|
|
]);
|
2018-12-19 14:44:38 -06:00
|
|
|
react2AngularDirective('metricSelect', MetricSelect, [
|
|
|
|
'options',
|
|
|
|
'onChange',
|
|
|
|
'value',
|
|
|
|
'isSearchable',
|
|
|
|
'className',
|
|
|
|
'placeholder',
|
|
|
|
['variables', { watchDepth: 'reference' }],
|
|
|
|
]);
|
2020-06-30 10:47:13 -05:00
|
|
|
react2AngularDirective('cloudMonitoringQueryEditor', CloudMonitoringQueryEditor, [
|
2019-01-08 06:37:08 -06:00
|
|
|
'target',
|
|
|
|
'onQueryChange',
|
|
|
|
'onExecuteQuery',
|
|
|
|
['events', { watchDepth: 'reference' }],
|
|
|
|
['datasource', { watchDepth: 'reference' }],
|
2019-01-08 06:52:19 -06:00
|
|
|
['templateSrv', { watchDepth: 'reference' }],
|
|
|
|
]);
|
2019-03-19 07:38:54 -05:00
|
|
|
react2AngularDirective('secretFormField', SecretFormField, [
|
|
|
|
'value',
|
|
|
|
'isConfigured',
|
|
|
|
'inputWidth',
|
2019-04-15 04:11:17 -05:00
|
|
|
'labelWidth',
|
2022-01-19 15:53:54 -06:00
|
|
|
'aria-label',
|
2019-03-19 07:38:54 -05:00
|
|
|
['onReset', { watchDepth: 'reference', wrapApply: true }],
|
|
|
|
['onChange', { watchDepth: 'reference', wrapApply: true }],
|
|
|
|
]);
|
2019-06-25 04:38:51 -05:00
|
|
|
react2AngularDirective('graphContextMenu', GraphContextMenu, [
|
|
|
|
'x',
|
|
|
|
'y',
|
2021-03-11 08:35:17 -06:00
|
|
|
'itemsGroup',
|
2019-06-25 04:38:51 -05:00
|
|
|
['onClose', { watchDepth: 'reference', wrapApply: true }],
|
|
|
|
['getContextMenuSource', { watchDepth: 'reference', wrapApply: true }],
|
2020-04-27 08:28:06 -05:00
|
|
|
['timeZone', { watchDepth: 'reference', wrapApply: true }],
|
2019-06-25 04:38:51 -05:00
|
|
|
]);
|
|
|
|
|
|
|
|
// We keep the drilldown terminology here because of as using data-* directive
|
|
|
|
// being in conflict with HTML data attributes
|
2020-04-24 02:26:22 -05:00
|
|
|
react2AngularDirective('drilldownLinksEditor', DataLinksInlineEditor, [
|
2019-06-25 04:38:51 -05:00
|
|
|
'value',
|
2020-04-24 02:26:22 -05:00
|
|
|
'links',
|
2019-06-25 04:38:51 -05:00
|
|
|
'suggestions',
|
|
|
|
['onChange', { watchDepth: 'reference', wrapApply: true }],
|
|
|
|
]);
|
2019-08-19 12:40:14 -05:00
|
|
|
|
2019-10-18 05:09:53 -05:00
|
|
|
react2AngularDirective('datasourceHttpSettingsNext', DataSourceHttpSettings, [
|
|
|
|
'defaultUrl',
|
|
|
|
'showAccessOptions',
|
|
|
|
'dataSourceConfig',
|
2021-08-20 08:53:54 -05:00
|
|
|
'showForwardOAuthIdentityOption',
|
2019-10-18 05:09:53 -05:00
|
|
|
['onChange', { watchDepth: 'reference', wrapApply: true }],
|
|
|
|
]);
|
2023-07-21 08:24:43 -05:00
|
|
|
react2AngularDirective('folderPicker', OldFolderPicker, [
|
2020-02-13 04:13:03 -06:00
|
|
|
'labelClass',
|
|
|
|
'rootName',
|
|
|
|
'enableCreateNew',
|
|
|
|
'enableReset',
|
|
|
|
'initialTitle',
|
|
|
|
'initialFolderId',
|
|
|
|
'dashboardId',
|
|
|
|
'onCreateFolder',
|
|
|
|
['enterFolderCreation', { watchDepth: 'reference', wrapApply: true }],
|
|
|
|
['exitFolderCreation', { watchDepth: 'reference', wrapApply: true }],
|
|
|
|
['onLoad', { watchDepth: 'reference', wrapApply: true }],
|
|
|
|
['onChange', { watchDepth: 'reference', wrapApply: true }],
|
|
|
|
]);
|
2021-03-11 05:37:39 -06:00
|
|
|
|
|
|
|
react2AngularDirective('timePickerSettings', TimePickerSettings, [
|
|
|
|
'renderCount',
|
|
|
|
'refreshIntervals',
|
|
|
|
'timePickerHidden',
|
|
|
|
'nowDelay',
|
|
|
|
'timezone',
|
|
|
|
['onTimeZoneChange', { watchDepth: 'reference', wrapApply: true }],
|
|
|
|
['onRefreshIntervalChange', { watchDepth: 'reference', wrapApply: true }],
|
|
|
|
['onNowDelayChange', { watchDepth: 'reference', wrapApply: true }],
|
|
|
|
['onHideTimePickerChange', { watchDepth: 'reference', wrapApply: true }],
|
|
|
|
]);
|
|
|
|
|
2022-01-07 07:41:09 -06:00
|
|
|
react2AngularDirective('clipboardButton', ClipboardButton, [
|
|
|
|
['getText', { watchDepth: 'reference', wrapApply: true }],
|
|
|
|
]);
|
2017-10-22 00:03:26 -05:00
|
|
|
}
|