Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crash at loading app analytics tabs #369

Merged
merged 2 commits into from
Apr 17, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ export function Application(props: AppDetailProps) {

const childBreadcrumbs = [
{
text: 'Application analytics',
text: 'Applications',
href: '#/',
},
{
Expand All @@ -295,6 +295,7 @@ export function Application(props: AppDetailProps) {
endTime={appEndTime}
setStartTime={setStartTimeForApp}
setEndTime={setEndTimeForApp}
parentBreadcrumb={parentBreadcrumbs[0]}
childBreadcrumbs={childBreadcrumbs}
toasts={toasts}
/>
Expand All @@ -314,6 +315,7 @@ export function Application(props: AppDetailProps) {
page="app"
nameColumnAction={nameColumnAction}
traceColumnAction={traceColumnAction}
parentBreadcrumb={parentBreadcrumbs[0]}
childBreadcrumbs={childBreadcrumbs}
startTime={appStartTime}
endTime={appEndTime}
Expand All @@ -337,6 +339,7 @@ export function Application(props: AppDetailProps) {
<TracesContent
{...props}
page="app"
parentBreadcrumb={parentBreadcrumbs[0]}
childBreadcrumbs={childBreadcrumbs}
traceIdColumnAction={traceIdColumnAction}
startTime={appStartTime}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,29 @@ exports[`Dashboard component renders dashboard 1`] = `
"setAppTitle": [MockFunction],
"setBadge": [MockFunction],
"setBrand": [MockFunction],
"setBreadcrumbs": [MockFunction],
"setBreadcrumbs": [MockFunction] {
"calls": Array [
Array [
Array [
undefined,
Object {
"href": "#/trace_analytics/home",
"text": "Trace analytics",
},
Object {
"href": "#/trace_analytics/home",
"text": "Dashboard",
},
],
],
],
"results": Array [
Object {
"type": "return",
"value": undefined,
},
],
},
"setCustomNavLink": [MockFunction],
"setHelpExtension": [MockFunction],
"setHelpSupportUrl": [MockFunction],
Expand Down Expand Up @@ -305,7 +327,29 @@ exports[`Dashboard component renders dashboard 1`] = `
"setAppTitle": [MockFunction],
"setBadge": [MockFunction],
"setBrand": [MockFunction],
"setBreadcrumbs": [MockFunction],
"setBreadcrumbs": [MockFunction] {
"calls": Array [
Array [
Array [
undefined,
Object {
"href": "#/trace_analytics/home",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is trace_analytics in url works? I thought it was removed in earlier pr

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that is probably from test files

The unit test doesn't care what it should be in reality, as long as dummy arguments are all valid it serves its purpose

"text": "Trace analytics",
},
Object {
"href": "#/trace_analytics/home",
"text": "Dashboard",
},
],
],
],
"results": Array [
Object {
"type": "return",
"value": undefined,
},
],
},
"setCustomNavLink": [MockFunction],
"setHelpExtension": [MockFunction],
"setHelpSupportUrl": [MockFunction],
Expand Down Expand Up @@ -2372,7 +2416,29 @@ exports[`Dashboard component renders empty dashboard 1`] = `
"setAppTitle": [MockFunction],
"setBadge": [MockFunction],
"setBrand": [MockFunction],
"setBreadcrumbs": [MockFunction],
"setBreadcrumbs": [MockFunction] {
"calls": Array [
Array [
Array [
undefined,
Object {
"href": "#/trace_analytics/home",
"text": "Trace analytics",
},
Object {
"href": "#/trace_analytics/home",
"text": "Dashboard",
},
],
],
],
"results": Array [
Object {
"type": "return",
"value": undefined,
},
],
},
"setCustomNavLink": [MockFunction],
"setHelpExtension": [MockFunction],
"setHelpSupportUrl": [MockFunction],
Expand Down Expand Up @@ -2614,7 +2680,29 @@ exports[`Dashboard component renders empty dashboard 1`] = `
"setAppTitle": [MockFunction],
"setBadge": [MockFunction],
"setBrand": [MockFunction],
"setBreadcrumbs": [MockFunction],
"setBreadcrumbs": [MockFunction] {
"calls": Array [
Array [
Array [
undefined,
Object {
"href": "#/trace_analytics/home",
"text": "Trace analytics",
},
Object {
"href": "#/trace_analytics/home",
"text": "Dashboard",
},
],
],
],
"results": Array [
Object {
"type": "return",
"value": undefined,
},
],
},
"setCustomNavLink": [MockFunction],
"setHelpExtension": [MockFunction],
"setHelpSupportUrl": [MockFunction],
Expand Down Expand Up @@ -4654,7 +4742,29 @@ exports[`Dashboard component renders empty jaeger dashboard 1`] = `
"setAppTitle": [MockFunction],
"setBadge": [MockFunction],
"setBrand": [MockFunction],
"setBreadcrumbs": [MockFunction],
"setBreadcrumbs": [MockFunction] {
"calls": Array [
Array [
Array [
undefined,
Object {
"href": "#/trace_analytics/home",
"text": "Trace analytics",
},
Object {
"href": "#/trace_analytics/home",
"text": "Dashboard",
},
],
],
],
"results": Array [
Object {
"type": "return",
"value": undefined,
},
],
},
"setCustomNavLink": [MockFunction],
"setHelpExtension": [MockFunction],
"setHelpSupportUrl": [MockFunction],
Expand Down Expand Up @@ -4902,7 +5012,29 @@ exports[`Dashboard component renders empty jaeger dashboard 1`] = `
"setAppTitle": [MockFunction],
"setBadge": [MockFunction],
"setBrand": [MockFunction],
"setBreadcrumbs": [MockFunction],
"setBreadcrumbs": [MockFunction] {
"calls": Array [
Array [
Array [
undefined,
Object {
"href": "#/trace_analytics/home",
"text": "Trace analytics",
},
Object {
"href": "#/trace_analytics/home",
"text": "Dashboard",
},
],
],
],
"results": Array [
Object {
"type": "return",
"value": undefined,
},
],
},
"setCustomNavLink": [MockFunction],
"setHelpExtension": [MockFunction],
"setHelpSupportUrl": [MockFunction],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,11 @@ exports[`Services component renders empty services page 1`] = `
}
nameColumnAction={[Function]}
page="services"
parentBreadcrumbs={
Array [
Object {
"href": "test#/",
"text": "test",
},
]
parentBreadcrumb={
Object {
"href": "test#/",
"text": "test",
}
}
query=""
setEndTime={[MockFunction]}
Expand Down Expand Up @@ -378,13 +376,11 @@ exports[`Services component renders empty services page 1`] = `
}
nameColumnAction={[Function]}
page="services"
parentBreadcrumbs={
Array [
Object {
"href": "test#/",
"text": "test",
},
]
parentBreadcrumb={
Object {
"href": "test#/",
"text": "test",
}
}
query=""
setEndTime={[MockFunction]}
Expand Down Expand Up @@ -1957,10 +1953,7 @@ exports[`Services component renders jaeger services page 1`] = `
"calls": Array [
Array [
Array [
Object {
"href": "test#/",
"text": "test",
},
undefined,
Object {
"href": "#/trace_analytics/home",
"text": "Trace analytics",
Expand Down Expand Up @@ -2232,10 +2225,7 @@ exports[`Services component renders jaeger services page 1`] = `
"calls": Array [
Array [
Array [
Object {
"href": "test#/",
"text": "test",
},
undefined,
Object {
"href": "#/trace_analytics/home",
"text": "Trace analytics",
Expand Down Expand Up @@ -3361,10 +3351,7 @@ exports[`Services component renders services page 1`] = `
"calls": Array [
Array [
Array [
Object {
"href": "test#/",
"text": "test",
},
undefined,
Object {
"href": "#/trace_analytics/home",
"text": "Trace analytics",
Expand Down Expand Up @@ -3635,10 +3622,7 @@ exports[`Services component renders services page 1`] = `
"calls": Array [
Array [
Array [
Object {
"href": "test#/",
"text": "test",
},
undefined,
Object {
"href": "#/trace_analytics/home",
"text": "Trace analytics",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe('Services component', () => {
<Services
http={core.http}
chrome={core.chrome}
parentBreadcrumbs={[{ text: 'test', href: 'test#/' }]}
parentBreadcrumb={{ text: 'test', href: 'test#/' }}
childBreadcrumbs={serviceBreadcrumbs}
nameColumnAction={nameColumnAction}
traceColumnAction={traceColumnAction}
Expand All @@ -53,7 +53,7 @@ describe('Services component', () => {
endTime="now"
setEndTime={setEndTime}
page="services"
mode='data_prepper'
mode="data_prepper"
dataPrepperIndicesExist={true}
modes={modes}
/>
Expand Down Expand Up @@ -99,7 +99,7 @@ describe('Services component', () => {
endTime="now"
setEndTime={setEndTime}
page="services"
mode='data_prepper'
mode="data_prepper"
dataPrepperIndicesExist={true}
modes={modes}
/>
Expand Down Expand Up @@ -145,7 +145,7 @@ describe('Services component', () => {
endTime="now"
setEndTime={setEndTime}
page="services"
mode='jaeger'
mode="jaeger"
dataPrepperIndicesExist={false}
jaegerIndicesExist={true}
modes={modes}
Expand Down
Loading