Chore: reduces barrel files part II (#107688)
* Chore: reduce barrel files * chore: fixes unit test * Chore: reduces barrel files part II * chore: fix import sorting
This commit is contained in:
@@ -4012,9 +4012,6 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
|
||||
],
|
||||
"public/app/types/acl.ts:5381": [
|
||||
[0, 0, 0, "Do not re-export imported variable (\`OrgRole\`)", "0"]
|
||||
],
|
||||
"public/app/types/alerting.ts:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
||||
@@ -4036,29 +4033,6 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "7"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "8"]
|
||||
],
|
||||
"public/app/types/index.ts:5381": [
|
||||
[0, 0, 0, "Do not re-export imported variable (\`CoreEvents\`)", "0"],
|
||||
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "1"],
|
||||
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "2"],
|
||||
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "3"],
|
||||
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "4"],
|
||||
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "5"],
|
||||
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "6"],
|
||||
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "7"],
|
||||
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "8"],
|
||||
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "9"],
|
||||
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "10"],
|
||||
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "11"],
|
||||
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "12"],
|
||||
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "13"],
|
||||
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "14"],
|
||||
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "15"],
|
||||
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "16"],
|
||||
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "17"],
|
||||
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "18"],
|
||||
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "19"],
|
||||
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "20"]
|
||||
],
|
||||
"public/app/types/jquery/jquery.d.ts:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
||||
|
||||
@@ -14,8 +14,6 @@ import (
|
||||
v0alpha1 "github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/alerting/v0alpha1"
|
||||
)
|
||||
|
||||
var ()
|
||||
|
||||
var appManifestData = app.ManifestData{
|
||||
AppName: "alerting",
|
||||
Group: "notifications.alerting.grafana.app",
|
||||
|
||||
@@ -16,8 +16,6 @@ import (
|
||||
v2alpha1 "github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v2alpha1"
|
||||
)
|
||||
|
||||
var ()
|
||||
|
||||
var appManifestData = app.ManifestData{
|
||||
AppName: "dashboard",
|
||||
Group: "dashboard.grafana.app",
|
||||
|
||||
@@ -14,8 +14,6 @@ import (
|
||||
v1beta1 "github.com/grafana/grafana/apps/folder/pkg/apis/folder/v1beta1"
|
||||
)
|
||||
|
||||
var ()
|
||||
|
||||
var appManifestData = app.ManifestData{
|
||||
AppName: "folder",
|
||||
Group: "folder.grafana.app",
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { config, isFetchError } from '@grafana/runtime';
|
||||
import { ThunkDispatch } from 'app/types/store';
|
||||
|
||||
import { notifyApp } from '../core/actions';
|
||||
import { createErrorNotification } from '../core/copy/appNotification';
|
||||
import { ThunkDispatch } from '../types';
|
||||
|
||||
export const getAPINamespace = () => config.namespace;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { createAction } from '@reduxjs/toolkit';
|
||||
|
||||
import { StoreState } from '../../types';
|
||||
import { StoreState } from 'app/types/store';
|
||||
|
||||
export type CleanUpAction = (state: StoreState) => void;
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { useEffect, useMemo, useState } from 'react';
|
||||
|
||||
import { OrgRole } from '@grafana/data';
|
||||
import { Trans, t } from '@grafana/i18n';
|
||||
import { Button, Select, Stack } from '@grafana/ui';
|
||||
import { CloseButton } from 'app/core/components/CloseButton/CloseButton';
|
||||
import { ServiceAccountPicker } from 'app/core/components/Select/ServiceAccountPicker';
|
||||
import { TeamPicker } from 'app/core/components/Select/TeamPicker';
|
||||
import { UserPicker } from 'app/core/components/Select/UserPicker';
|
||||
import { OrgRole } from 'app/types/acl';
|
||||
|
||||
import { Assignments, PermissionTarget, SetPermission } from './types';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AccessControlAction } from 'app/types';
|
||||
import { AccessControlAction } from 'app/types/accessControl';
|
||||
|
||||
export type ResourcePermission = {
|
||||
id: number;
|
||||
|
||||
@@ -7,7 +7,7 @@ import { config, locationService, reportInteraction } from '@grafana/runtime';
|
||||
import appEvents from 'app/core/app_events';
|
||||
import store from 'app/core/store';
|
||||
import { isShallowEqual } from 'app/core/utils/isShallowEqual';
|
||||
import { KioskMode } from 'app/types';
|
||||
import { KioskMode } from 'app/types/dashboard';
|
||||
|
||||
import { RouteDescriptor } from '../../navigation/types';
|
||||
import { buildBreadcrumbs } from '../Breadcrumbs/utils';
|
||||
|
||||
@@ -11,7 +11,7 @@ import { ScrollContainer, useStyles2 } from '@grafana/ui';
|
||||
import { useGrafana } from 'app/core/context/GrafanaContext';
|
||||
import { setBookmark } from 'app/core/reducers/navBarTree';
|
||||
import { usePatchUserPreferencesMutation } from 'app/features/preferences/api/index';
|
||||
import { useDispatch, useSelector } from 'app/types';
|
||||
import { useDispatch, useSelector } from 'app/types/store';
|
||||
|
||||
import { InviteUserButton } from '../../InviteUserButton/InviteUserButton';
|
||||
import { shouldRenderInviteUserButton } from '../../InviteUserButton/utils';
|
||||
|
||||
@@ -5,7 +5,7 @@ import { SelectableValue, GrafanaTheme2 } from '@grafana/data';
|
||||
import { t } from '@grafana/i18n';
|
||||
import { Icon, Select, useStyles2 } from '@grafana/ui';
|
||||
import { contextSrv } from 'app/core/services/context_srv';
|
||||
import { UserOrg } from 'app/types';
|
||||
import { UserOrg } from 'app/types/user';
|
||||
|
||||
import { OrganizationBaseProps } from './types';
|
||||
|
||||
|
||||
+4
-4
@@ -4,7 +4,7 @@ import { TestProvider } from 'test/helpers/TestProvider';
|
||||
import { OrgRole } from '@grafana/data';
|
||||
import { ContextSrv, setContextSrv } from 'app/core/services/context_srv';
|
||||
import { getUserOrganizations } from 'app/features/org/state/actions';
|
||||
import * as appTypes from 'app/types';
|
||||
import { StoreState } from 'app/types/store';
|
||||
|
||||
import { OrganizationSwitcher } from './OrganizationSwitcher';
|
||||
|
||||
@@ -14,12 +14,12 @@ jest.mock('app/features/org/state/actions', () => ({
|
||||
setUserOrganization: jest.fn(),
|
||||
}));
|
||||
|
||||
jest.mock('app/types', () => ({
|
||||
...jest.requireActual('app/types'),
|
||||
jest.mock('app/types/store', () => ({
|
||||
...jest.requireActual('app/types/store'),
|
||||
useDispatch: () => jest.fn(),
|
||||
}));
|
||||
|
||||
const renderWithProvider = ({ initialState }: { initialState?: Partial<appTypes.StoreState> }) => {
|
||||
const renderWithProvider = ({ initialState }: { initialState?: Partial<StoreState> }) => {
|
||||
render(
|
||||
<TestProvider storeState={initialState}>
|
||||
<OrganizationSwitcher />
|
||||
|
||||
@@ -5,7 +5,8 @@ import { locationService } from '@grafana/runtime';
|
||||
import { Space, Text } from '@grafana/ui';
|
||||
import { contextSrv } from 'app/core/services/context_srv';
|
||||
import { getUserOrganizations, setUserOrganization } from 'app/features/org/state/actions';
|
||||
import { useDispatch, useSelector, UserOrg } from 'app/types';
|
||||
import { useDispatch, useSelector } from 'app/types/store';
|
||||
import { UserOrg } from 'app/types/user';
|
||||
|
||||
import { Branding } from '../../Branding/Branding';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { SelectableValue } from '@grafana/data';
|
||||
import { UserOrg } from 'app/types';
|
||||
import { UserOrg } from 'app/types/user';
|
||||
|
||||
export interface OrganizationBaseProps {
|
||||
orgs: UserOrg[];
|
||||
|
||||
@@ -4,7 +4,7 @@ import { t } from '@grafana/i18n';
|
||||
import { reportInteraction } from '@grafana/runtime';
|
||||
import { Menu, Dropdown, ToolbarButton } from '@grafana/ui';
|
||||
import { getExternalUserMngLinkUrl } from 'app/features/users/utils';
|
||||
import { useSelector } from 'app/types';
|
||||
import { useSelector } from 'app/types/store';
|
||||
|
||||
import { performInviteUserClick, shouldRenderInviteUserButton } from '../../InviteUserButton/utils';
|
||||
import { NavToolbarSeparator } from '../NavToolbar/NavToolbarSeparator';
|
||||
|
||||
@@ -13,7 +13,7 @@ import { useGrafana } from 'app/core/context/GrafanaContext';
|
||||
import { contextSrv } from 'app/core/core';
|
||||
import { useMediaQueryMinWidth } from 'app/core/hooks/useMediaQueryMinWidth';
|
||||
import { HOME_NAV_ID } from 'app/core/reducers/navModel';
|
||||
import { useSelector } from 'app/types';
|
||||
import { useSelector } from 'app/types/store';
|
||||
|
||||
import { Branding } from '../../Branding/Branding';
|
||||
import { Breadcrumbs } from '../../Breadcrumbs/Breadcrumbs';
|
||||
|
||||
@@ -4,7 +4,7 @@ import { useEffectOnce } from 'react-use';
|
||||
import { GrafanaTheme2 } from '@grafana/data';
|
||||
import { Trans } from '@grafana/i18n';
|
||||
import { Alert, useStyles2 } from '@grafana/ui';
|
||||
import { AppNotification, timeoutMap } from 'app/types';
|
||||
import { AppNotification, timeoutMap } from 'app/types/appNotifications';
|
||||
|
||||
interface Props {
|
||||
appNotification: AppNotification;
|
||||
|
||||
@@ -6,7 +6,7 @@ import { useStyles2, Stack } from '@grafana/ui';
|
||||
import { notifyApp, hideAppNotification } from 'app/core/actions';
|
||||
import appEvents from 'app/core/app_events';
|
||||
import { selectVisible } from 'app/core/reducers/appNotification';
|
||||
import { useSelector, useDispatch } from 'app/types';
|
||||
import { useSelector, useDispatch } from 'app/types/store';
|
||||
|
||||
import {
|
||||
createErrorNotification,
|
||||
|
||||
@@ -9,7 +9,8 @@ import { config } from 'app/core/config';
|
||||
import { getBackendSrv } from 'app/core/services/backend_srv';
|
||||
import { getGrafanaSearcher } from 'app/features/search/service/searcher';
|
||||
import { DashboardSearchItemType } from 'app/features/search/types';
|
||||
import { FolderInfo, PermissionLevelString } from 'app/types';
|
||||
import { PermissionLevelString } from 'app/types/acl';
|
||||
import { FolderInfo } from 'app/types/folders';
|
||||
|
||||
export interface FolderFilterProps {
|
||||
onChange: (folder: FolderInfo[]) => void;
|
||||
|
||||
@@ -2,7 +2,7 @@ import { reportInteraction } from '@grafana/runtime';
|
||||
import { config } from 'app/core/config';
|
||||
import { contextSrv } from 'app/core/services/context_srv';
|
||||
import { getExternalUserMngLinkUrl } from 'app/features/users/utils';
|
||||
import { AccessControlAction } from 'app/types';
|
||||
import { AccessControlAction } from 'app/types/accessControl';
|
||||
|
||||
export const shouldRenderInviteUserButton =
|
||||
config.featureToggles.inviteUserExperimental &&
|
||||
|
||||
@@ -2,7 +2,7 @@ import { t } from '@grafana/i18n';
|
||||
import { Badge } from '@grafana/ui';
|
||||
import { useIsProvisionedInstance } from 'app/features/provisioning/hooks/useIsProvisionedInstance';
|
||||
import { NestedFolderDTO } from 'app/features/search/service/types';
|
||||
import { FolderDTO, FolderListItemDTO } from 'app/types';
|
||||
import { FolderDTO, FolderListItemDTO } from 'app/types/folders';
|
||||
|
||||
export interface Props {
|
||||
folder?: FolderListItemDTO | NestedFolderDTO | FolderDTO;
|
||||
|
||||
@@ -12,7 +12,7 @@ import { Indent } from 'app/core/components/Indent/Indent';
|
||||
import { childrenByParentUIDSelector, rootItemsSelector } from 'app/features/browse-dashboards/state/hooks';
|
||||
import { DashboardsTreeItem } from 'app/features/browse-dashboards/types';
|
||||
import { DashboardViewItem } from 'app/features/search/types';
|
||||
import { useSelector } from 'app/types';
|
||||
import { useSelector } from 'app/types/store';
|
||||
|
||||
import { FolderRepo } from './FolderRepo';
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ import { getGrafanaSearcher } from 'app/features/search/service/searcher';
|
||||
import { QueryResponse } from 'app/features/search/service/types';
|
||||
import { queryResultToViewItem } from 'app/features/search/service/utils';
|
||||
import { DashboardViewItem } from 'app/features/search/types';
|
||||
import { PermissionLevelString } from 'app/types';
|
||||
import { PermissionLevelString } from 'app/types/acl';
|
||||
|
||||
import { FolderRepo } from './FolderRepo';
|
||||
import { getDOMId, NestedFolderList } from './NestedFolderList';
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { config } from '@grafana/runtime';
|
||||
|
||||
import { PermissionLevelString } from '../../../types';
|
||||
import { PermissionLevelString } from 'app/types/acl';
|
||||
|
||||
import { useFoldersQueryAppPlatform } from './useFoldersQueryAppPlatform';
|
||||
import { useFoldersQueryLegacy } from './useFoldersQueryLegacy';
|
||||
|
||||
@@ -7,7 +7,8 @@ import { ListFolderQueryArgs, browseDashboardsAPI } from 'app/features/browse-da
|
||||
import { PAGE_SIZE } from 'app/features/browse-dashboards/api/services';
|
||||
import { getPaginationPlaceholders } from 'app/features/browse-dashboards/state/utils';
|
||||
import { DashboardViewItemWithUIItems, DashboardsTreeItem } from 'app/features/browse-dashboards/types';
|
||||
import { FolderListItemDTO, PermissionLevelString } from 'app/types';
|
||||
import { PermissionLevelString } from 'app/types/acl';
|
||||
import { FolderListItemDTO } from 'app/types/folders';
|
||||
import { useDispatch, useSelector } from 'app/types/store';
|
||||
|
||||
import { ROOT_FOLDER_ITEM } from './utils';
|
||||
|
||||
@@ -3,7 +3,7 @@ import { createSelector } from 'reselect';
|
||||
import { NavModel } from '@grafana/data';
|
||||
import { getNavModel } from 'app/core/selectors/navModel';
|
||||
import { store } from 'app/store/store';
|
||||
import { StoreState, useSelector } from 'app/types';
|
||||
import { StoreState, useSelector } from 'app/types/store';
|
||||
|
||||
export function usePageNav(navId?: string, oldProp?: NavModel): NavModel | undefined {
|
||||
if (oldProp) {
|
||||
|
||||
@@ -2,7 +2,7 @@ import { useEffect } from 'react';
|
||||
|
||||
import { NavModel, NavModelItem } from '@grafana/data';
|
||||
import { HOME_NAV_ID } from 'app/core/reducers/navModel';
|
||||
import { useSelector } from 'app/types';
|
||||
import { useSelector } from 'app/types/store';
|
||||
|
||||
import { Branding } from '../Branding/Branding';
|
||||
import { buildBreadcrumbs } from '../Breadcrumbs/utils';
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import { SelectableValue } from '@grafana/data';
|
||||
import { OrgRole, SelectableValue } from '@grafana/data';
|
||||
import { Trans } from '@grafana/i18n';
|
||||
import { Icon, RadioButtonList, Tooltip, useStyles2, useTheme2, PopoverContent } from '@grafana/ui';
|
||||
import { contextSrv } from 'app/core/core';
|
||||
import { OrgRole } from 'app/types';
|
||||
|
||||
import { getStyles } from './styles';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { forwardRef, useCallback, useState } from 'react';
|
||||
|
||||
import { useStyles2, getSelectStyles, useTheme2 } from '@grafana/ui';
|
||||
import { Role } from 'app/types';
|
||||
import { Role } from 'app/types/accessControl';
|
||||
|
||||
import { RoleMenuGroupOption } from './RoleMenuGroupOption';
|
||||
import { RoleMenuOption } from './RoleMenuOption';
|
||||
|
||||
@@ -4,7 +4,7 @@ import { forwardRef, FormEvent } from 'react';
|
||||
import { t } from '@grafana/i18n';
|
||||
import { Checkbox, Icon, Tooltip, useStyles2, useTheme2 } from '@grafana/ui';
|
||||
import { getSelectStyles } from '@grafana/ui/internal';
|
||||
import { Role } from 'app/types';
|
||||
import { Role } from 'app/types/accessControl';
|
||||
|
||||
import { getStyles } from './styles';
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { FormEvent, useCallback, useEffect, useState, useRef } from 'react';
|
||||
|
||||
import { OrgRole } from '@grafana/data';
|
||||
import { ClickOutsideWrapper, Portal, useTheme2 } from '@grafana/ui';
|
||||
import { Role, OrgRole } from 'app/types';
|
||||
import { Role } from 'app/types/accessControl';
|
||||
|
||||
import { RolePickerInput } from './RolePickerInput';
|
||||
import { RolePickerMenu } from './RolePickerMenu';
|
||||
|
||||
@@ -6,8 +6,7 @@ import { GrafanaTheme2 } from '@grafana/data';
|
||||
import { Trans, t } from '@grafana/i18n';
|
||||
import { useStyles2, getInputStyles, sharedInputStyle, Tooltip, Icon, Spinner } from '@grafana/ui';
|
||||
import { getFocusStyles } from '@grafana/ui/internal';
|
||||
|
||||
import { Role } from '../../../types';
|
||||
import { Role } from 'app/types/accessControl';
|
||||
|
||||
import { ValueContainer } from './ValueContainer';
|
||||
import { ROLE_PICKER_WIDTH } from './constants';
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { css, cx } from '@emotion/css';
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
|
||||
import { OrgRole } from '@grafana/data';
|
||||
import { Trans, t } from '@grafana/i18n';
|
||||
import { Button, ScrollContainer, Stack, TextLink, useStyles2, useTheme2 } from '@grafana/ui';
|
||||
import { getSelectStyles } from '@grafana/ui/internal';
|
||||
import { OrgRole, Role } from 'app/types';
|
||||
import { Role } from 'app/types/accessControl';
|
||||
|
||||
import { BuiltinRoleSelector } from './BuiltinRoleSelector';
|
||||
import { RoleMenuGroupsSection } from './RoleMenuGroupsSection';
|
||||
|
||||
@@ -3,7 +3,7 @@ import { cx } from '@emotion/css';
|
||||
import { Trans, t } from '@grafana/i18n';
|
||||
import { Button, ScrollContainer, Stack, useStyles2, useTheme2 } from '@grafana/ui';
|
||||
import { getSelectStyles } from '@grafana/ui/internal';
|
||||
import { Role } from 'app/types';
|
||||
import { Role } from 'app/types/accessControl';
|
||||
|
||||
import { RoleMenuOption } from './RoleMenuOption';
|
||||
import { MENU_MAX_HEIGHT } from './constants';
|
||||
|
||||
@@ -2,7 +2,7 @@ import { useEffect } from 'react';
|
||||
import { useAsyncFn } from 'react-use';
|
||||
|
||||
import { contextSrv } from 'app/core/core';
|
||||
import { Role, AccessControlAction } from 'app/types';
|
||||
import { Role, AccessControlAction } from 'app/types/accessControl';
|
||||
|
||||
import { RolePicker } from './RolePicker';
|
||||
import { fetchTeamRoles, updateTeamRoles } from './api';
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { useEffect } from 'react';
|
||||
import { useAsyncFn } from 'react-use';
|
||||
|
||||
import { OrgRole } from '@grafana/data';
|
||||
import { contextSrv } from 'app/core/core';
|
||||
import { Role, OrgRole, AccessControlAction } from 'app/types';
|
||||
import { Role, AccessControlAction } from 'app/types/accessControl';
|
||||
|
||||
import { RolePicker } from './RolePicker';
|
||||
import { fetchUserRoles, updateUserRoles } from './api';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { getBackendSrv, isFetchError } from '@grafana/runtime';
|
||||
import { Role } from 'app/types';
|
||||
import { Role } from 'app/types/accessControl';
|
||||
|
||||
import { addDisplayNameForFixedRole, addFilteredDisplayName } from './utils';
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import { useDeepCompareEffect } from 'react-use';
|
||||
import useAsync from 'react-use/lib/useAsync';
|
||||
|
||||
import { contextSrv } from 'app/core/core';
|
||||
import { Role, AccessControlAction } from 'app/types';
|
||||
import { Role, AccessControlAction } from 'app/types/accessControl';
|
||||
|
||||
import { fetchRoleOptions } from './api';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Role } from 'app/types';
|
||||
import { Role } from 'app/types/accessControl';
|
||||
|
||||
export const isNotDelegatable = (role: Role) => {
|
||||
return role.delegatable !== undefined && !role.delegatable;
|
||||
|
||||
@@ -5,7 +5,7 @@ import { FormProvider, useForm } from 'react-hook-form';
|
||||
import { GrafanaTheme2 } from '@grafana/data';
|
||||
import { t } from '@grafana/i18n';
|
||||
import { useStyles2, Badge, Stack } from '@grafana/ui';
|
||||
import { OrgUser } from 'app/types';
|
||||
import { OrgUser } from 'app/types/user';
|
||||
|
||||
import { RolePickerDrawer } from './RolePickerDrawer';
|
||||
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import { Controller, useFormContext } from 'react-hook-form';
|
||||
|
||||
import { toOption } from '@grafana/data';
|
||||
import { OrgRole, toOption } from '@grafana/data';
|
||||
import { Trans, t } from '@grafana/i18n';
|
||||
import { Drawer, Field, RadioButtonGroup, TextLink } from '@grafana/ui';
|
||||
import { OrgRole } from 'app/types';
|
||||
|
||||
const roleOptions = Object.keys(OrgRole).map(toOption);
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
import { backendSrv } from 'app/core/services/backend_srv';
|
||||
import { DashboardWithAccessInfo } from 'app/features/dashboard/api/types';
|
||||
import { DashboardSearchItemType } from 'app/features/search/types';
|
||||
import { DashboardDTO } from 'app/types';
|
||||
import { DashboardDTO } from 'app/types/dashboard';
|
||||
|
||||
import { DashboardPicker } from './DashboardPicker';
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import { AnnoKeyFolder, AnnoKeyFolderTitle } from 'app/features/apiserver/types'
|
||||
import { getDashboardAPI } from 'app/features/dashboard/api/dashboard_api';
|
||||
import { isDashboardV2Resource } from 'app/features/dashboard/api/utils';
|
||||
import { DashboardSearchItem } from 'app/features/search/types';
|
||||
import { DashboardDTO } from 'app/types';
|
||||
import { DashboardDTO } from 'app/types/dashboard';
|
||||
|
||||
interface Props extends Omit<AsyncSelectProps<DashboardPickerDTO>, 'value' | 'onChange' | 'loadOptions' | ''> {
|
||||
value?: DashboardPickerDTO['uid'];
|
||||
|
||||
@@ -13,7 +13,8 @@ import appEvents from 'app/core/app_events';
|
||||
import { contextSrv } from 'app/core/services/context_srv';
|
||||
import { createFolder, getFolderByUid, searchFolders } from 'app/features/manage-dashboards/state/actions';
|
||||
import { DashboardSearchHit } from 'app/features/search/types';
|
||||
import { AccessControlAction, PermissionLevelString, SearchQueryType } from 'app/types';
|
||||
import { AccessControlAction } from 'app/types/accessControl';
|
||||
import { PermissionLevelString, SearchQueryType } from 'app/types/acl';
|
||||
|
||||
export type FolderPickerFilter = (hits: DashboardSearchHit[]) => DashboardSearchHit[];
|
||||
|
||||
|
||||
@@ -5,7 +5,8 @@ import { SelectableValue } from '@grafana/data';
|
||||
import { t } from '@grafana/i18n';
|
||||
import { getBackendSrv } from '@grafana/runtime';
|
||||
import { AsyncSelect } from '@grafana/ui';
|
||||
import { Organization, UserOrg } from 'app/types';
|
||||
import { Organization } from 'app/types/organization';
|
||||
import { UserOrg } from 'app/types/user';
|
||||
|
||||
export type OrgSelectItem = SelectableValue<Organization>;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import { SelectableValue } from '@grafana/data';
|
||||
import { t } from '@grafana/i18n';
|
||||
import { getBackendSrv } from '@grafana/runtime';
|
||||
import { AsyncSelect } from '@grafana/ui';
|
||||
import { ServiceAccountDTO, ServiceAccountsState } from 'app/types';
|
||||
import { ServiceAccountDTO, ServiceAccountsState } from 'app/types/serviceaccount';
|
||||
|
||||
export interface Props {
|
||||
onSelected: (user: SelectableValue<ServiceAccountDTO>) => void;
|
||||
|
||||
@@ -6,7 +6,7 @@ import { SelectableValue } from '@grafana/data';
|
||||
import { t } from '@grafana/i18n';
|
||||
import { getBackendSrv } from '@grafana/runtime';
|
||||
import { AsyncSelect } from '@grafana/ui';
|
||||
import { Team } from 'app/types';
|
||||
import { Team } from 'app/types/teams';
|
||||
|
||||
export interface Props {
|
||||
onSelected: (team: SelectableValue<Team>) => void;
|
||||
|
||||
@@ -6,7 +6,7 @@ import { SelectableValue } from '@grafana/data';
|
||||
import { t } from '@grafana/i18n';
|
||||
import { getBackendSrv } from '@grafana/runtime';
|
||||
import { AsyncSelect } from '@grafana/ui';
|
||||
import { OrgUser } from 'app/types';
|
||||
import { OrgUser } from 'app/types/user';
|
||||
|
||||
export interface Props {
|
||||
onSelected: (user: SelectableValue<OrgUser>) => void;
|
||||
|
||||
@@ -3,7 +3,8 @@ import { v4 as uuidv4 } from 'uuid';
|
||||
|
||||
import { getMessageFromError } from 'app/core/utils/errors';
|
||||
import { dispatch as storeDispatch } from 'app/store/store';
|
||||
import { AppNotification, AppNotificationSeverity, useDispatch } from 'app/types';
|
||||
import { AppNotificationSeverity, AppNotification } from 'app/types/appNotifications';
|
||||
import { useDispatch } from 'app/types/store';
|
||||
|
||||
import { notifyApp } from '../actions';
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { DataQuery } from '@grafana/data';
|
||||
import store from 'app/core/store';
|
||||
import { RichHistoryQuery } from 'app/types/explore';
|
||||
|
||||
import { DatasourceSrv } from '../../features/plugins/datasource_srv';
|
||||
import { RichHistoryQuery } from '../../types';
|
||||
import { backendSrv } from '../services/backend_srv';
|
||||
import { RichHistorySearchFilters, RichHistorySettings, SortOrder } from '../utils/richHistoryTypes';
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@ import { find, isEqual, omit } from 'lodash';
|
||||
|
||||
import { DataQuery, SelectableValue } from '@grafana/data';
|
||||
import { RichHistorySearchFilters, RichHistorySettings } from 'app/core/utils/richHistory';
|
||||
import { RichHistoryQuery } from 'app/types/explore';
|
||||
|
||||
import { RichHistoryQuery } from '../../types';
|
||||
import store from '../store';
|
||||
|
||||
import RichHistoryStorage, { RichHistoryServiceError, RichHistoryStorageWarning } from './RichHistoryStorage';
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { of } from 'rxjs';
|
||||
|
||||
import { Preferences as UserPreferencesDTO } from '@grafana/schema/src/raw/preferences/x/preferences_types.gen';
|
||||
import { RichHistoryQuery } from 'app/types/explore';
|
||||
|
||||
import { DatasourceSrv } from '../../features/plugins/datasource_srv';
|
||||
import { RichHistoryQuery } from '../../types';
|
||||
import { SortOrder } from '../utils/richHistoryTypes';
|
||||
|
||||
import RichHistoryRemoteStorage, { RichHistoryRemoteStorageDTO } from './RichHistoryRemoteStorage';
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { RichHistorySearchBackendFilters, RichHistorySettings } from 'app/core/utils/richHistoryTypes';
|
||||
|
||||
import { RichHistoryQuery } from '../../types';
|
||||
import { RichHistoryQuery } from 'app/types/explore';
|
||||
|
||||
/**
|
||||
* Errors are used when the operation on Rich History was not successful.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { DatasourceSrv } from 'app/features/plugins/datasource_srv';
|
||||
import { RichHistoryQuery } from 'app/types/explore';
|
||||
|
||||
import { RichHistoryQuery } from '../../types';
|
||||
import { backendSrv } from '../services/backend_srv';
|
||||
|
||||
import { RichHistoryLocalStorageDTO } from './RichHistoryLocalStorage';
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { getDataSourceSrv } from '@grafana/runtime';
|
||||
|
||||
import { RichHistoryQuery } from '../../types';
|
||||
import { RichHistoryQuery } from 'app/types/explore';
|
||||
|
||||
import { RichHistoryLocalStorageDTO } from './RichHistoryLocalStorage';
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { RichHistoryQuery } from 'app/types/explore';
|
||||
|
||||
import { DatasourceSrv } from '../../features/plugins/datasource_srv';
|
||||
import { RichHistoryQuery } from '../../types';
|
||||
import { backendSrv } from '../services/backend_srv';
|
||||
|
||||
import { RichHistoryRemoteStorageDTO } from './RichHistoryRemoteStorage';
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { getDataSourceSrv } from '@grafana/runtime';
|
||||
|
||||
import { RichHistoryQuery } from '../../types';
|
||||
import { RichHistoryQuery } from 'app/types/explore';
|
||||
|
||||
import { RichHistoryRemoteStorageDTO } from './RichHistoryRemoteStorage';
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { DataQuery } from '@grafana/data';
|
||||
import { SortOrder } from 'app/core/utils/richHistory';
|
||||
|
||||
import { RichHistoryQuery } from '../../types';
|
||||
import { RichHistoryQuery } from 'app/types/explore';
|
||||
|
||||
import { filterAndSortQueries } from './richHistoryLocalStorageUtils';
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { omit } from 'lodash';
|
||||
|
||||
import { DateTime, dateTime, dateTimeForTimeZone } from '@grafana/data';
|
||||
import { RichHistoryQuery } from 'app/types/explore';
|
||||
|
||||
import { RichHistoryQuery } from '../../types';
|
||||
import { SortOrder } from '../utils/richHistoryTypes';
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useEffect, useRef } from 'react';
|
||||
|
||||
import { useDispatch } from 'app/types';
|
||||
import { useDispatch } from 'app/types/store';
|
||||
|
||||
import { cleanUpAction, CleanUpAction } from '../actions/cleanUp';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { NavModel } from '@grafana/data';
|
||||
import { useSelector } from 'app/types';
|
||||
import { useSelector } from 'app/types/store';
|
||||
|
||||
import { getNavModel } from '../selectors/navModel';
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { UrlQueryMap } from '@grafana/data';
|
||||
|
||||
import { KioskMode } from '../../types';
|
||||
import { KioskMode } from 'app/types/dashboard';
|
||||
|
||||
// TODO Remove after topnav feature toggle is permanent and old NavBar is removed
|
||||
export function getKioskMode(queryParams: UrlQueryMap): KioskMode | null {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AppNotificationSeverity, AppNotificationsState } from 'app/types/';
|
||||
import { AppNotificationSeverity, AppNotificationsState } from 'app/types/appNotifications';
|
||||
|
||||
import { appNotificationsReducer, clearNotification, notifyApp } from './appNotification';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { createSelector, createSlice, PayloadAction } from '@reduxjs/toolkit';
|
||||
|
||||
import { AppNotification, AppNotificationSeverity, AppNotificationsState } from 'app/types/';
|
||||
import { AppNotification, AppNotificationSeverity, AppNotificationsState } from 'app/types/appNotifications';
|
||||
|
||||
const MAX_STORED_NOTIFICATIONS = 25;
|
||||
export const STORAGE_KEY = 'notifications';
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Team } from 'app/types/teams';
|
||||
|
||||
import { reducerTester } from '../../../test/core/redux/reducerTester';
|
||||
import { initialTeamsState, teamsLoaded } from '../../features/teams/state/reducers';
|
||||
import { Team } from '../../types';
|
||||
import { StoreState } from '../../types/store';
|
||||
import { cleanUpAction } from '../actions/cleanUp';
|
||||
|
||||
|
||||
@@ -25,7 +25,8 @@ import { getDashboardAPI } from 'app/features/dashboard/api/dashboard_api';
|
||||
import { DashboardModel } from 'app/features/dashboard/state/DashboardModel';
|
||||
import { DashboardSearchItem } from 'app/features/search/types';
|
||||
import { TokenRevokedModal } from 'app/features/users/TokenRevokedModal';
|
||||
import { DashboardDTO, FolderDTO } from 'app/types';
|
||||
import { DashboardDTO } from 'app/types/dashboard';
|
||||
import { FolderDTO } from 'app/types/folders';
|
||||
|
||||
import { ShowModalReactEvent } from '../../types/events';
|
||||
import { isContentTypeJson, parseInitFromOptions, parseResponseBody, parseUrlFromOptions } from '../utils/fetch';
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
} from '@grafana/data';
|
||||
import { featureEnabled, getBackendSrv } from '@grafana/runtime';
|
||||
import { getSessionExpiry } from 'app/core/utils/auth';
|
||||
import { AccessControlAction, UserPermission } from 'app/types';
|
||||
import { UserPermission, AccessControlAction } from 'app/types/accessControl';
|
||||
import { CurrentUserInternal } from 'app/types/config';
|
||||
|
||||
import config from '../../core/config';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { dateTime, DataQuery } from '@grafana/data';
|
||||
import store from 'app/core/store';
|
||||
import { RichHistoryQuery } from 'app/types/explore';
|
||||
|
||||
import { RichHistoryQuery } from '../../types';
|
||||
import RichHistoryStorage, { RichHistoryStorageWarning } from '../history/RichHistoryStorage';
|
||||
|
||||
import {
|
||||
|
||||
@@ -3,7 +3,7 @@ import store from 'app/core/store';
|
||||
|
||||
import { sendAppNotification } from './core/copy/appNotification';
|
||||
import { PreferencesService } from './core/services/PreferencesService';
|
||||
import { AppNotificationSeverity } from './types';
|
||||
import { AppNotificationSeverity } from './types/appNotifications';
|
||||
|
||||
export const STORAGE_MOCK_API_KEY = 'grafana.dev.mockApi';
|
||||
|
||||
|
||||
@@ -3,12 +3,13 @@ import { useForm } from 'react-hook-form';
|
||||
import { useParams } from 'react-router-dom-v5-compat';
|
||||
import { useAsyncFn } from 'react-use';
|
||||
|
||||
import { NavModelItem } from '@grafana/data';
|
||||
import { NavModelItem, OrgRole } from '@grafana/data';
|
||||
import { Trans, t } from '@grafana/i18n';
|
||||
import { Field, Input, Button, Legend, Alert } from '@grafana/ui';
|
||||
import { Page } from 'app/core/components/Page/Page';
|
||||
import { contextSrv } from 'app/core/core';
|
||||
import { OrgUser, AccessControlAction, OrgRole } from 'app/types';
|
||||
import { AccessControlAction } from 'app/types/accessControl';
|
||||
import { OrgUser } from 'app/types/user';
|
||||
|
||||
import { OrgUsersTable } from './Users/OrgUsersTable';
|
||||
import { getOrg, getOrgUsers, getUsersRoles, removeOrgUser, updateOrgName, updateOrgUserRole } from './api';
|
||||
|
||||
@@ -6,7 +6,8 @@ import { getBackendSrv, isFetchError } from '@grafana/runtime';
|
||||
import { LinkButton } from '@grafana/ui';
|
||||
import { Page } from 'app/core/components/Page/Page';
|
||||
import { contextSrv } from 'app/core/services/context_srv';
|
||||
import { AccessControlAction, Organization } from 'app/types';
|
||||
import { AccessControlAction } from 'app/types/accessControl';
|
||||
import { Organization } from 'app/types/organization';
|
||||
|
||||
import { AdminOrgsTable } from './AdminOrgsTable';
|
||||
|
||||
|
||||
@@ -7,7 +7,8 @@ import { Trans, t } from '@grafana/i18n';
|
||||
import { Button, ConfirmModal, useStyles2 } from '@grafana/ui';
|
||||
import { SkeletonComponent, attachSkeleton } from '@grafana/ui/unstable';
|
||||
import { contextSrv } from 'app/core/core';
|
||||
import { AccessControlAction, Organization } from 'app/types';
|
||||
import { AccessControlAction } from 'app/types/accessControl';
|
||||
import { Organization } from 'app/types/organization';
|
||||
|
||||
interface Props {
|
||||
orgs: Organization[];
|
||||
|
||||
@@ -5,7 +5,7 @@ import { GrafanaTheme2 } from '@grafana/data';
|
||||
import { Trans } from '@grafana/i18n';
|
||||
import { config, GrafanaBootConfig } from '@grafana/runtime';
|
||||
import { LinkButton, Stack, useStyles2 } from '@grafana/ui';
|
||||
import { AccessControlAction } from 'app/types';
|
||||
import { AccessControlAction } from 'app/types/accessControl';
|
||||
|
||||
import { contextSrv } from '../../core/services/context_srv';
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import { GrafanaTheme2, NavModel } from '@grafana/data';
|
||||
import { Trans, t } from '@grafana/i18n';
|
||||
import { LinkButton, useStyles2 } from '@grafana/ui';
|
||||
import { Page } from 'app/core/components/Page/Page';
|
||||
import { StoreState } from 'app/types/store';
|
||||
import checkmarkSvg from 'img/licensing/checkmark.svg';
|
||||
import customerSupportSvg from 'img/licensing/customer_support.svg';
|
||||
import handinhandSupportSvg from 'img/licensing/handinhand_support.svg';
|
||||
@@ -13,7 +14,6 @@ import pluginEnterpriseSvg from 'img/licensing/plugin_enterprise.svg';
|
||||
import slaSvg from 'img/licensing/sla.svg';
|
||||
|
||||
import { getNavModel } from '../../core/selectors/navModel';
|
||||
import { StoreState } from '../../types';
|
||||
|
||||
import { LicenseChrome } from './LicenseChrome';
|
||||
import { ServerStats } from './ServerStats';
|
||||
|
||||
@@ -8,7 +8,10 @@ import { featureEnabled } from '@grafana/runtime';
|
||||
import { Stack } from '@grafana/ui';
|
||||
import { Page } from 'app/core/components/Page/Page';
|
||||
import { contextSrv } from 'app/core/core';
|
||||
import { StoreState, UserDTO, UserOrg, UserSession, SyncInfo, UserAdminError, AccessControlAction } from 'app/types';
|
||||
import { AccessControlAction } from 'app/types/accessControl';
|
||||
import { SyncInfo } from 'app/types/ldap';
|
||||
import { StoreState } from 'app/types/store';
|
||||
import { UserDTO, UserOrg, UserSession, UserAdminError } from 'app/types/user';
|
||||
|
||||
import { UserLdapSyncInfo } from './UserLdapSyncInfo';
|
||||
import { UserOrgs } from './UserOrgs';
|
||||
|
||||
@@ -4,7 +4,9 @@ import { dateTimeFormat } from '@grafana/data';
|
||||
import { Trans, t } from '@grafana/i18n';
|
||||
import { Button, LinkButton } from '@grafana/ui';
|
||||
import { contextSrv } from 'app/core/core';
|
||||
import { AccessControlAction, SyncInfo, UserDTO } from 'app/types';
|
||||
import { AccessControlAction } from 'app/types/accessControl';
|
||||
import { SyncInfo } from 'app/types/ldap';
|
||||
import { UserDTO } from 'app/types/user';
|
||||
|
||||
import { TagBadge } from '../../core/components/TagFilter/TagBadge';
|
||||
|
||||
|
||||
@@ -8,8 +8,9 @@ import { Trans, t } from '@grafana/i18n';
|
||||
import { LinkButton, RadioButtonGroup, useStyles2, FilterInput, EmptyState } from '@grafana/ui';
|
||||
import { Page } from 'app/core/components/Page/Page';
|
||||
import { contextSrv } from 'app/core/core';
|
||||
|
||||
import { AccessControlAction, StoreState, UserFilter } from '../../types';
|
||||
import { AccessControlAction } from 'app/types/accessControl';
|
||||
import { StoreState } from 'app/types/store';
|
||||
import { UserFilter } from 'app/types/user';
|
||||
|
||||
import { EnterpriseAuthFeaturesCard } from './EnterpriseAuthFeaturesCard';
|
||||
import { UsersTable } from './Users/UsersTable';
|
||||
|
||||
@@ -7,8 +7,7 @@ import { selectors as e2eSelectors } from '@grafana/e2e-selectors/src';
|
||||
import { t } from '@grafana/i18n';
|
||||
import { RadioButtonGroup, useStyles2, FilterInput } from '@grafana/ui';
|
||||
import { Page } from 'app/core/components/Page/Page';
|
||||
|
||||
import { StoreState } from '../../types';
|
||||
import { StoreState } from 'app/types/store';
|
||||
|
||||
import { AnonUsersDevicesTable } from './Users/AnonUsersTable';
|
||||
import { fetchUsersAnonymousDevices, changeAnonUserSort, changeAnonPage, changeAnonQuery } from './state/actions';
|
||||
|
||||
@@ -9,9 +9,9 @@ import { config } from '@grafana/runtime';
|
||||
import { useStyles2, TabsBar, Tab } from '@grafana/ui';
|
||||
import { contextSrv } from 'app/core/services/context_srv';
|
||||
import { isEmailSharingEnabled } from 'app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboardUtils';
|
||||
import { AccessControlAction } from 'app/types/accessControl';
|
||||
|
||||
import { Page } from '../../core/components/Page/Page';
|
||||
import { AccessControlAction } from '../../types';
|
||||
import { UsersListPageContent } from '../users/UsersListPage';
|
||||
|
||||
import { UserListAdminPageContent } from './UserListAdminPage';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { css, cx } from '@emotion/css';
|
||||
import { createRef, PureComponent, ReactElement } from 'react';
|
||||
|
||||
import { GrafanaTheme2 } from '@grafana/data';
|
||||
import { GrafanaTheme2, OrgRole } from '@grafana/data';
|
||||
import { Trans, t } from '@grafana/i18n';
|
||||
import {
|
||||
Button,
|
||||
@@ -20,7 +20,9 @@ import { UserRolePicker } from 'app/core/components/RolePicker/UserRolePicker';
|
||||
import { fetchRoleOptions, updateUserRoles } from 'app/core/components/RolePicker/api';
|
||||
import { OrgPicker, OrgSelectItem } from 'app/core/components/Select/OrgPicker';
|
||||
import { contextSrv } from 'app/core/core';
|
||||
import { AccessControlAction, Organization, OrgRole, Role, UserDTO, UserOrg } from 'app/types';
|
||||
import { AccessControlAction, Role } from 'app/types/accessControl';
|
||||
import { Organization } from 'app/types/organization';
|
||||
import { UserOrg, UserDTO } from 'app/types/user';
|
||||
|
||||
import { OrgRolePicker } from './OrgRolePicker';
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import { Trans, t } from '@grafana/i18n';
|
||||
import { ConfirmButton, RadioButtonGroup, Icon, useStyles2 } from '@grafana/ui';
|
||||
import { contextSrv } from 'app/core/core';
|
||||
import { ExternalUserTooltip } from 'app/features/admin/UserOrgs';
|
||||
import { AccessControlAction } from 'app/types';
|
||||
import { AccessControlAction } from 'app/types/accessControl';
|
||||
|
||||
interface Props {
|
||||
isGrafanaAdmin: boolean;
|
||||
|
||||
@@ -5,7 +5,8 @@ import * as React from 'react';
|
||||
import { Trans, t } from '@grafana/i18n';
|
||||
import { Button, ConfirmButton, ConfirmModal, Input, LegacyInputStatus, Stack } from '@grafana/ui';
|
||||
import { contextSrv } from 'app/core/core';
|
||||
import { AccessControlAction, UserDTO } from 'app/types';
|
||||
import { AccessControlAction } from 'app/types/accessControl';
|
||||
import { UserDTO } from 'app/types/user';
|
||||
|
||||
interface Props {
|
||||
user: UserDTO;
|
||||
|
||||
@@ -5,7 +5,8 @@ import { ConfirmButton, ConfirmModal, Button, Stack } from '@grafana/ui';
|
||||
import { TagBadge } from 'app/core/components/TagFilter/TagBadge';
|
||||
import { contextSrv } from 'app/core/core';
|
||||
import { formatDate } from 'app/core/internationalization/dates';
|
||||
import { AccessControlAction, UserSession } from 'app/types';
|
||||
import { AccessControlAction } from 'app/types/accessControl';
|
||||
import { UserSession } from 'app/types/user';
|
||||
|
||||
interface Props {
|
||||
sessions: UserSession[];
|
||||
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
FetchDataFunc,
|
||||
} from '@grafana/ui';
|
||||
import { EmptyArea } from 'app/features/alerting/unified/components/EmptyArea';
|
||||
import { UserAnonymousDeviceDTO } from 'app/types';
|
||||
import { UserAnonymousDeviceDTO } from 'app/types/user';
|
||||
|
||||
type Cell<T extends keyof UserAnonymousDeviceDTO = keyof UserAnonymousDeviceDTO> = CellProps<
|
||||
UserAnonymousDeviceDTO,
|
||||
|
||||
@@ -2,7 +2,7 @@ import { forwardRef, PropsWithChildren } from 'react';
|
||||
|
||||
import { IconName } from '@grafana/data';
|
||||
import { Icon, Tooltip, Box, Stack } from '@grafana/ui';
|
||||
import { Unit } from 'app/types';
|
||||
import { Unit } from 'app/types/user';
|
||||
|
||||
type OrgUnitProps = { units?: Unit[]; icon: IconName };
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
|
||||
import { OrgUser } from '../../../types';
|
||||
import { OrgUser } from 'app/types/user';
|
||||
|
||||
import { getMockUsers } from '../../users/mocks/userMocks';
|
||||
|
||||
import { OrgUsersTable, Props } from './OrgUsersTable';
|
||||
|
||||
@@ -25,7 +25,8 @@ import { fetchRoleOptions, updateUserRoles } from 'app/core/components/RolePicke
|
||||
import { RolePickerBadges } from 'app/core/components/RolePickerDrawer/RolePickerBadges';
|
||||
import { TagBadge } from 'app/core/components/TagFilter/TagBadge';
|
||||
import { contextSrv } from 'app/core/core';
|
||||
import { AccessControlAction, OrgUser, Role } from 'app/types';
|
||||
import { AccessControlAction, Role } from 'app/types/accessControl';
|
||||
import { OrgUser } from 'app/types/user';
|
||||
|
||||
import { OrgRolePicker } from '../OrgRolePicker';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { render } from '@testing-library/react';
|
||||
import { MemoryRouter } from 'react-router-dom-v5-compat';
|
||||
|
||||
import { UserDTO } from '../../../types';
|
||||
import { UserDTO } from 'app/types/user';
|
||||
|
||||
import { UsersTable, UsersTableProps } from './UsersTable';
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ import {
|
||||
Tooltip,
|
||||
} from '@grafana/ui';
|
||||
import { TagBadge } from 'app/core/components/TagFilter/TagBadge';
|
||||
import { UserDTO } from 'app/types';
|
||||
import { UserDTO } from 'app/types/user';
|
||||
|
||||
import { OrgUnits } from './OrgUnits';
|
||||
|
||||
|
||||
@@ -2,7 +2,8 @@ import { UrlQueryValue } from '@grafana/data';
|
||||
import { getBackendSrv } from '@grafana/runtime';
|
||||
import { contextSrv } from 'app/core/core';
|
||||
import { accessControlQueryParam } from 'app/core/utils/accessControl';
|
||||
import { OrgUser, AccessControlAction } from 'app/types';
|
||||
import { AccessControlAction } from 'app/types/accessControl';
|
||||
import { OrgUser } from 'app/types/user';
|
||||
|
||||
const perPage = 30;
|
||||
|
||||
|
||||
@@ -2,7 +2,8 @@ import { useMemo } from 'react';
|
||||
|
||||
import { Trans, t } from '@grafana/i18n';
|
||||
import { Alert, CellProps, Column, Icon, InteractiveTable, Stack, Text, Tooltip } from '@grafana/ui';
|
||||
import { AppNotificationSeverity, LdapConnectionInfo, LdapServerInfo } from 'app/types';
|
||||
import { AppNotificationSeverity } from 'app/types/appNotifications';
|
||||
import { LdapConnectionInfo, LdapServerInfo } from 'app/types/ldap';
|
||||
|
||||
interface Props {
|
||||
ldapConnectionInfo: LdapConnectionInfo;
|
||||
|
||||
@@ -23,7 +23,7 @@ import {
|
||||
RadioButtonGroup,
|
||||
SecretInput,
|
||||
} from '@grafana/ui';
|
||||
import { LdapPayload, MapKeyCertConfigured } from 'app/types';
|
||||
import { MapKeyCertConfigured, LdapPayload } from 'app/types/ldap';
|
||||
|
||||
import { GroupMappingComponent } from './LdapGroupMapping';
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { useFormContext } from 'react-hook-form';
|
||||
|
||||
import { SelectableValue } from '@grafana/data';
|
||||
import { OrgRole, SelectableValue } from '@grafana/data';
|
||||
import { Trans, t } from '@grafana/i18n';
|
||||
import { Box, Button, Field, Input, RadioButtonGroup, Switch } from '@grafana/ui';
|
||||
import { contextSrv } from 'app/core/core';
|
||||
import { LdapPayload, OrgRole } from 'app/types';
|
||||
import { LdapPayload } from 'app/types/ldap';
|
||||
|
||||
const roleOptions: Array<SelectableValue<string>> = Object.keys(OrgRole).map((key) => {
|
||||
return { label: key, value: key };
|
||||
|
||||
@@ -9,15 +9,10 @@ import { Alert, Button, Field, Input, Stack } from '@grafana/ui';
|
||||
import { Page } from 'app/core/components/Page/Page';
|
||||
import { contextSrv } from 'app/core/core';
|
||||
import { GrafanaRouteComponentProps } from 'app/core/navigation/types';
|
||||
import {
|
||||
AppNotificationSeverity,
|
||||
LdapError,
|
||||
LdapUser,
|
||||
StoreState,
|
||||
SyncInfo,
|
||||
LdapConnectionInfo,
|
||||
AccessControlAction,
|
||||
} from 'app/types';
|
||||
import { AccessControlAction } from 'app/types/accessControl';
|
||||
import { AppNotificationSeverity } from 'app/types/appNotifications';
|
||||
import { LdapConnectionInfo, LdapUser, SyncInfo, LdapError } from 'app/types/ldap';
|
||||
import { StoreState } from 'app/types/store';
|
||||
|
||||
import {
|
||||
loadLdapState,
|
||||
|
||||
@@ -27,7 +27,8 @@ import { FormPrompt } from 'app/core/components/FormPrompt/FormPrompt';
|
||||
import { Page } from 'app/core/components/Page/Page';
|
||||
import config from 'app/core/config';
|
||||
import { Loader } from 'app/features/plugins/admin/components/Loader';
|
||||
import { LdapPayload, MapKeyCertConfigured, StoreState } from 'app/types';
|
||||
import { LdapPayload, MapKeyCertConfigured } from 'app/types/ldap';
|
||||
import { StoreState } from 'app/types/store';
|
||||
|
||||
import { LdapDrawerComponent } from './LdapDrawer';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { dateTimeFormat } from '@grafana/data';
|
||||
import { Trans } from '@grafana/i18n';
|
||||
import { InteractiveTable, Text } from '@grafana/ui';
|
||||
import { SyncInfo } from 'app/types';
|
||||
import { SyncInfo } from 'app/types/ldap';
|
||||
|
||||
interface Props {
|
||||
ldapSyncInfo: SyncInfo;
|
||||
|
||||
@@ -2,7 +2,7 @@ import { useMemo } from 'react';
|
||||
|
||||
import { Trans, t } from '@grafana/i18n';
|
||||
import { Tooltip, Icon, InteractiveTable, type CellProps, Column, Stack } from '@grafana/ui';
|
||||
import { LdapRole } from 'app/types';
|
||||
import { LdapRole } from 'app/types/ldap';
|
||||
|
||||
interface Props {
|
||||
groups: LdapRole[];
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Trans } from '@grafana/i18n';
|
||||
import { Box, Stack, Text } from '@grafana/ui';
|
||||
import { LdapUser } from 'app/types';
|
||||
import { LdapUser } from 'app/types/ldap';
|
||||
|
||||
import { LdapUserGroups } from './LdapUserGroups';
|
||||
import { LdapUserMappingInfo } from './LdapUserMappingInfo';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useMemo } from 'react';
|
||||
|
||||
import { InteractiveTable } from '@grafana/ui';
|
||||
import { LdapUserInfo } from 'app/types';
|
||||
import { LdapUserInfo } from 'app/types/ldap';
|
||||
|
||||
interface Props {
|
||||
info: LdapUserInfo;
|
||||
|
||||
@@ -3,7 +3,7 @@ import * as React from 'react';
|
||||
|
||||
import { Trans } from '@grafana/i18n';
|
||||
import { Column, Icon, InteractiveTable } from '@grafana/ui';
|
||||
import { LdapPermissions } from 'app/types';
|
||||
import { LdapPermissions } from 'app/types/ldap';
|
||||
|
||||
interface Props {
|
||||
permissions: LdapPermissions;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user