mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Build: add @grafana/data package (#17436)
first step in moving non-ui components to their own package
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { NavModelItem } from '@grafana/ui';
|
||||
import { NavModelItem } from '@grafana/data';
|
||||
|
||||
export enum ActionTypes {
|
||||
UpdateNavIndex = 'UPDATE_NAV_INDEX',
|
||||
|
||||
@@ -7,7 +7,8 @@ import { getTitleFromNavModel } from 'app/core/selectors/navModel';
|
||||
import PageHeader from '../PageHeader/PageHeader';
|
||||
import Footer from '../Footer/Footer';
|
||||
import PageContents from './PageContents';
|
||||
import { CustomScrollbar, NavModel } from '@grafana/ui';
|
||||
import { CustomScrollbar } from '@grafana/ui';
|
||||
import { NavModel } from '@grafana/data';
|
||||
import { isEqual } from 'lodash';
|
||||
|
||||
interface Props {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React, { FormEvent } from 'react';
|
||||
import classNames from 'classnames';
|
||||
import appEvents from 'app/core/app_events';
|
||||
import { NavModel, NavModelItem, NavModelBreadcrumb } from '@grafana/ui';
|
||||
import { NavModel, NavModelItem, NavModelBreadcrumb } from '@grafana/data';
|
||||
|
||||
export interface Props {
|
||||
model: NavModel;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React, { PureComponent } from 'react';
|
||||
import appEvents from '../../app_events';
|
||||
import { User } from '../../services/context_srv';
|
||||
import { NavModelItem } from '@grafana/ui';
|
||||
import { NavModelItem } from '@grafana/data';
|
||||
|
||||
export interface Props {
|
||||
link: NavModelItem;
|
||||
|
||||
@@ -4,7 +4,7 @@ import SignIn from './SignIn';
|
||||
import BottomNavLinks from './BottomNavLinks';
|
||||
import { contextSrv } from 'app/core/services/context_srv';
|
||||
import config from '../../config';
|
||||
import { NavModelItem } from '@grafana/ui';
|
||||
import { NavModelItem } from '@grafana/data';
|
||||
|
||||
export default function BottomSection() {
|
||||
const navTree: NavModelItem[] = _.cloneDeep(config.bootData.navTree);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { FC } from 'react';
|
||||
import DropDownChild from './DropDownChild';
|
||||
import { NavModelItem } from '@grafana/ui';
|
||||
import { NavModelItem } from '@grafana/data';
|
||||
|
||||
interface Props {
|
||||
link: NavModelItem;
|
||||
|
||||
@@ -48,7 +48,7 @@ import { updateLegendValues } from './time_series2';
|
||||
import TimeSeries from './time_series2';
|
||||
import { searchResultsDirective } from './components/search/search_results';
|
||||
import { manageDashboardsDirective } from './components/manage_dashboards/manage_dashboards';
|
||||
import { NavModel } from '@grafana/ui';
|
||||
import { NavModel } from '@grafana/data';
|
||||
|
||||
export {
|
||||
profiler,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import coreModule from 'app/core/core_module';
|
||||
import config from 'app/core/config';
|
||||
import _ from 'lodash';
|
||||
import { NavModel } from '@grafana/ui';
|
||||
import { NavModel } from '@grafana/data';
|
||||
|
||||
export class NavModelSrv {
|
||||
navItems: any;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Action, ActionTypes } from 'app/core/actions/navModel';
|
||||
import { NavIndex, NavModelItem } from '@grafana/ui';
|
||||
import { NavIndex, NavModelItem } from '@grafana/data';
|
||||
import config from 'app/core/config';
|
||||
|
||||
export function buildInitialState(): NavIndex {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { NavModel, NavModelItem, NavIndex } from '@grafana/ui';
|
||||
import { NavModel, NavModelItem, NavIndex } from '@grafana/data';
|
||||
|
||||
function getNotFoundModel(): NavModel {
|
||||
const node: NavModelItem = {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { getFlotTickDecimals } from 'app/core/utils/ticks';
|
||||
import _ from 'lodash';
|
||||
import { getValueFormat, stringToJsRegex, ValueFormatter, DecimalCount } from '@grafana/ui';
|
||||
import { getValueFormat, ValueFormatter, DecimalCount } from '@grafana/ui';
|
||||
import { stringToJsRegex } from '@grafana/data';
|
||||
|
||||
function matchSeriesOverride(aliasOrRegex: string, seriesAlias: string) {
|
||||
if (!aliasOrRegex) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { has } from 'lodash';
|
||||
import { getValueFormat, getValueFormatterIndex, getValueFormats, stringToJsRegex } from '@grafana/ui';
|
||||
import { getValueFormat, getValueFormatterIndex, getValueFormats } from '@grafana/ui';
|
||||
import { stringToJsRegex } from '@grafana/data';
|
||||
import deprecationWarning from '@grafana/ui/src/utils/deprecationWarning';
|
||||
|
||||
const kbn: any = {};
|
||||
@@ -231,7 +232,7 @@ kbn.slugifyForUrl = str => {
|
||||
|
||||
/** deprecated since 6.1, use grafana/ui */
|
||||
kbn.stringToJsRegex = str => {
|
||||
deprecationWarning('kbn.ts', 'kbn.stringToJsRegex()', '@grafana/ui');
|
||||
deprecationWarning('kbn.ts', 'kbn.stringToJsRegex()', '@grafana/data');
|
||||
return stringToJsRegex(str);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user