Skip to content

Commit

Permalink
Fix crash at loading app analytics tabs
Browse files Browse the repository at this point in the history
Signed-off-by: Joshua Li <joshuali925@gmail.com>
  • Loading branch information
joshuali925 committed Apr 17, 2023
1 parent 17b3f71 commit 2141a34
Show file tree
Hide file tree
Showing 6 changed files with 178 additions and 75 deletions.
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",
"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

0 comments on commit 2141a34

Please sign in to comment.