Skip to content

Commit

Permalink
[v10.0.x] AppChromeService: Fixes update to breadcrumb parent URL (#7…
Browse files Browse the repository at this point in the history
…1418)

AppChromeService: Fixes update to breadcrumb parent URL (#71410)

AppChromeService: Fixes update to parent url
(cherry picked from commit dc71d36)
  • Loading branch information
torkelo authored Jul 12, 2023
1 parent 08def85 commit 1f13067
Show file tree
Hide file tree
Showing 34 changed files with 40 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
// Run 'make gen-cue' from repository root to regenerate.

export const pluginVersion = "10.0.2";
export const pluginVersion = "10.0.3";

export interface Options {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
// Run 'make gen-cue' from repository root to regenerate.

export const pluginVersion = "10.0.2";
export const pluginVersion = "10.0.3";

export interface Options {
limit: number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import * as common from '@grafana/schema';

export const pluginVersion = "10.0.2";
export const pluginVersion = "10.0.3";

export interface Options extends common.OptionsWithLegend, common.OptionsWithTooltip, common.OptionsWithTextFormatting {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import * as common from '@grafana/schema';

export const pluginVersion = "10.0.2";
export const pluginVersion = "10.0.3";

export interface Options extends common.SingleStatBaseOptions {
displayMode: common.BarGaugeDisplayMode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import * as common from '@grafana/schema';

export const pluginVersion = "10.0.2";
export const pluginVersion = "10.0.3";

export enum VizDisplayMode {
Candles = 'candles',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import * as ui from '@grafana/schema';

export const pluginVersion = "10.0.2";
export const pluginVersion = "10.0.3";

export enum HorizontalConstraint {
Center = 'center',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import * as common from '@grafana/schema';

export const pluginVersion = "10.0.2";
export const pluginVersion = "10.0.3";

export interface MetricStat {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
// Run 'make gen-cue' from repository root to regenerate.

export const pluginVersion = "10.0.2";
export const pluginVersion = "10.0.3";

export interface Options {
folderId?: number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
// Run 'make gen-cue' from repository root to regenerate.

export const pluginVersion = "10.0.2";
export const pluginVersion = "10.0.3";

export interface Options {
selectedSeries: number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
// Run 'make gen-cue' from repository root to regenerate.

export const pluginVersion = "10.0.2";
export const pluginVersion = "10.0.3";

export type UpdateConfig = {
render: boolean,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import * as common from '@grafana/schema';

export const pluginVersion = "10.0.2";
export const pluginVersion = "10.0.3";

export type BucketAggregation = (DateHistogram | Histogram | Terms | Filters | GeoHashGrid | Nested);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import * as common from '@grafana/schema';

export const pluginVersion = "10.0.2";
export const pluginVersion = "10.0.3";

export interface Options extends common.SingleStatBaseOptions {
showThresholdLabels: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import * as ui from '@grafana/schema';

export const pluginVersion = "10.0.2";
export const pluginVersion = "10.0.3";

export interface Options {
basemap: ui.MapLayerOptions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import * as common from '@grafana/schema';

export const pluginVersion = "10.0.2";
export const pluginVersion = "10.0.3";

export type PhlareQueryType = ('metrics' | 'profile' | 'both');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import * as ui from '@grafana/schema';

export const pluginVersion = "10.0.2";
export const pluginVersion = "10.0.3";

/**
* Controls the color mode of the heatmap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import * as common from '@grafana/schema';

export const pluginVersion = "10.0.2";
export const pluginVersion = "10.0.3";

export interface Options extends common.OptionsWithLegend, common.OptionsWithTooltip {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import * as common from '@grafana/schema';

export const pluginVersion = "10.0.2";
export const pluginVersion = "10.0.3";

export interface Options {
dedupStrategy: common.LogsDedupStrategy;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import * as common from '@grafana/schema';

export const pluginVersion = "10.0.2";
export const pluginVersion = "10.0.3";

export enum QueryEditorMode {
Builder = 'builder',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
// Run 'make gen-cue' from repository root to regenerate.

export const pluginVersion = "10.0.2";
export const pluginVersion = "10.0.3";

export interface Options {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
// Run 'make gen-cue' from repository root to regenerate.

export const pluginVersion = "10.0.2";
export const pluginVersion = "10.0.3";

export interface ArcOption {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import * as common from '@grafana/schema';

export const pluginVersion = "10.0.2";
export const pluginVersion = "10.0.3";

export type ParcaQueryType = ('metrics' | 'profile' | 'both');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import * as common from '@grafana/schema';

export const pluginVersion = "10.0.2";
export const pluginVersion = "10.0.3";

/**
* Select the pie chart display style.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import * as common from '@grafana/schema';

export const pluginVersion = "10.0.2";
export const pluginVersion = "10.0.3";

export enum QueryEditorMode {
Builder = 'builder',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import * as common from '@grafana/schema';

export const pluginVersion = "10.0.2";
export const pluginVersion = "10.0.3";

export interface Options extends common.SingleStatBaseOptions {
colorMode: common.BigValueColorMode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import * as ui from '@grafana/schema';

export const pluginVersion = "10.0.2";
export const pluginVersion = "10.0.3";

export interface Options extends ui.OptionsWithLegend, ui.OptionsWithTooltip, ui.OptionsWithTimezones {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import * as ui from '@grafana/schema';

export const pluginVersion = "10.0.2";
export const pluginVersion = "10.0.3";

export interface Options extends ui.OptionsWithLegend, ui.OptionsWithTooltip, ui.OptionsWithTimezones {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import * as ui from '@grafana/schema';

export const pluginVersion = "10.0.2";
export const pluginVersion = "10.0.3";

export interface Options {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import * as common from '@grafana/schema';

export const pluginVersion = "10.0.2";
export const pluginVersion = "10.0.3";

export interface TempoQuery extends common.DataQuery {
filters: Array<TraceqlFilter>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import * as common from '@grafana/schema';

export const pluginVersion = "10.0.2";
export const pluginVersion = "10.0.3";

export enum TestDataQueryType {
Annotations = 'annotations',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
// Run 'make gen-cue' from repository root to regenerate.

export const pluginVersion = "10.0.2";
export const pluginVersion = "10.0.3";

export enum TextMode {
Code = 'code',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import * as common from '@grafana/schema';

export const pluginVersion = "10.0.2";
export const pluginVersion = "10.0.3";

export interface Options extends common.OptionsWithTimezones {
legend: common.VizLegendOptions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import * as common from '@grafana/schema';

export const pluginVersion = "10.0.2";
export const pluginVersion = "10.0.3";

/**
* Identical to timeseries... except it does not have timezone settings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import * as common from '@grafana/schema';

export const pluginVersion = "10.0.2";
export const pluginVersion = "10.0.3";

export enum SeriesMapping {
Auto = 'auto',
Expand Down
9 changes: 7 additions & 2 deletions public/app/core/components/AppChrome/AppChromeService.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,18 @@ export class AppChromeService {
/**
* Checks if text, url and active child url are the same
**/
function navItemsAreTheSame(a: NavModelItem | undefined, b: NavModelItem | undefined) {
function navItemsAreTheSame(a: NavModelItem | undefined, b: NavModelItem | undefined): boolean {
if (a === b) {
return true;
}

const aActiveChild = a?.children?.find((child) => child.active);
const bActiveChild = b?.children?.find((child) => child.active);

return a?.text === b?.text && a?.url === b?.url && aActiveChild?.url === bActiveChild?.url;
return (
a?.text === b?.text &&
a?.url === b?.url &&
aActiveChild?.url === bActiveChild?.url &&
navItemsAreTheSame(a?.parentItem, b?.parentItem)
);
}

0 comments on commit 1f13067

Please sign in to comment.