Skip to content

Commit

Permalink
[ML] Makes aiops prefixes all lowercase.
Browse files Browse the repository at this point in the history
  • Loading branch information
walterra committed Jul 13, 2022
1 parent a46193b commit ea04776
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ export interface Refresh {
timeRange?: { start: string; end: string };
}

export const aiOpsRefresh$ = new Subject<Refresh>();
export const aiopsRefresh$ = new Subject<Refresh>();
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { TimeHistoryContract, UI_SETTINGS } from '@kbn/data-plugin/public';

import { useUrlState } from '../../hooks/url_state';
import { useAiOpsKibana } from '../../kibana_context';
import { aiOpsRefresh$ } from '../../application/services/timefilter_refresh_service';
import { aiopsRefresh$ } from '../../application/services/timefilter_refresh_service';

interface TimePickerQuickRange {
from: string;
Expand Down Expand Up @@ -47,7 +47,7 @@ function getRecentlyUsedRangesFactory(timeHistory: TimeHistoryContract) {
}

function updateLastRefresh(timeRange: OnRefreshProps) {
aiOpsRefresh$.next({ lastRefresh: Date.now(), timeRange });
aiopsRefresh$.next({ lastRefresh: Date.now(), timeRange });
}

export const DatePickerWrapper: FC = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,12 +234,12 @@ export const DocumentCountChart: FC<DocumentCountChartProps> = ({
{windowParameters && (
<>
<DualBrushAnnotation
id="baseline"
id="aiopsBaseline"
min={windowParameters.baselineMin}
max={windowParameters.baselineMax - interval}
/>
<DualBrushAnnotation
id="deviation"
id="aiopsDeviation"
min={windowParameters.deviationMin}
max={windowParameters.deviationMax - interval}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,12 @@ export const ExplainLogRateSpikesWrapper: FC<ExplainLogRateSpikesWrapperProps> =

return (
<UrlStateContextProvider value={{ searchString: urlSearchString, setUrlState }}>
<EuiPageBody data-test-subj="aiOpsIndexPage" paddingSize="none" panelled={false}>
<EuiPageBody data-test-subj="aiopsIndexPage" paddingSize="none" panelled={false}>
<EuiFlexGroup gutterSize="m">
<EuiFlexItem>
<EuiPageContentHeader className="aiOpsPageHeader">
<EuiPageContentHeader className="aiopsPageHeader">
<EuiPageContentHeaderSection>
<div className="aiOpsTitleHeader">
<div className="aiopsTitleHeader">
<EuiTitle size={'s'}>
<h2>{dataView.title}</h2>
</EuiTitle>
Expand All @@ -165,7 +165,7 @@ export const ExplainLogRateSpikesWrapper: FC<ExplainLogRateSpikesWrapperProps> =
alignItems="center"
justifyContent="flexEnd"
gutterSize="s"
data-test-subj="aiOpsTimeRangeSelectorSection"
data-test-subj="aiopsTimeRangeSelectorSection"
>
{dataView.timeFieldName !== undefined && (
<EuiFlexItem grow={false}>
Expand Down
6 changes: 3 additions & 3 deletions x-pack/plugins/aiops/public/hooks/url_state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,15 @@ export function parseUrlState(search: string): Dictionary<any> {
// This uses a context to be able to maintain only one instance
// of the url state. It gets passed down with `UrlStateProvider`
// and can be used via `useUrlState`.
export const aiOpsUrlStateStore = createContext<UrlState>({
export const aiopsUrlStateStore = createContext<UrlState>({
searchString: '',
setUrlState: () => {},
});

export const { Provider } = aiOpsUrlStateStore;
export const { Provider } = aiopsUrlStateStore;

export const useUrlState = (accessor: Accessor) => {
const { searchString, setUrlState: setUrlStateContext } = useContext(aiOpsUrlStateStore);
const { searchString, setUrlState: setUrlStateContext } = useContext(aiopsUrlStateStore);

const urlState = useMemo(() => {
const fullUrlState = parseUrlState(searchString);
Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/aiops/public/hooks/use_data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { merge } from 'rxjs';
import { UI_SETTINGS } from '@kbn/data-plugin/common';
import { useAiOpsKibana } from '../kibana_context';
import { useTimefilter } from './use_time_filter';
import { aiOpsRefresh$ } from '../application/services/timefilter_refresh_service';
import { aiopsRefresh$ } from '../application/services/timefilter_refresh_service';
import { TimeBuckets } from '../../common/time_buckets';
import { useDocumentCountStats } from './use_document_count_stats';
import { Dictionary } from './url_state';
Expand Down Expand Up @@ -80,7 +80,7 @@ export const useData = (
const timeUpdateSubscription = merge(
timefilter.getTimeUpdate$(),
timefilter.getAutoRefreshFetch$(),
aiOpsRefresh$
aiopsRefresh$
).subscribe(() => {
if (onUpdate) {
onUpdate({
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/aiops/public/hooks/use_storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import { useCallback, useState } from 'react';
import { useAiOpsKibana } from '../kibana_context';

export const AIOPS_FROZEN_TIER_PREFERENCE = 'aiOps.frozenDataTierPreference';
export const AIOPS_FROZEN_TIER_PREFERENCE = 'aiop.frozenDataTierPreference';

export type AiOps = Partial<{
[AIOPS_FROZEN_TIER_PREFERENCE]: 'exclude_frozen' | 'include_frozen';
Expand Down

0 comments on commit ea04776

Please sign in to comment.