Skip to content

Commit 25c2015

Browse files
Merge pull request #199 from alanconway/better-panel
NO-JIRA: feat: Troubleshooting panel UI improvements.
2 parents cd6e168 + 17107a5 commit 25c2015

21 files changed

Lines changed: 809 additions & 553 deletions
Lines changed: 34 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,48 @@
11
{
2-
"Advanced": "Advanced",
3-
"Ago": "Ago",
2+
"<0>Query to select the starting data for the search.</0><1>The <1>[Focus]</1> button fills in a query for the data shown in the main view. You can enter your own query.</1>": "<0>Query to select the starting data for the search.</0><1>The <1>[Focus]</1> button fills in a query for the data shown in the main view. You can enter your own query.</1>",
3+
"<0>There are two types of correlation search:</0><1><0><0>Neighbourhood</0>: Find all connected neighbours up to a maximum <2>depth</2> (number of hops.)</0><1><0>Goal</0>: Find paths to a selected <2>goal class</2>. Finds all shortest paths, and some near-shortest paths.</1></1>": "<0>There are two types of correlation search:</0><1><0><0>Neighbourhood</0>: Find all connected neighbours up to a maximum <2>depth</2> (number of hops.)</0><1><0>Goal</0>: Find paths to a selected <2>goal class</2>. Finds all shortest paths, and some near-shortest paths.</1></1>",
4+
"Advanced Search": "Advanced Search",
5+
"Advanced search parameters": "Advanced search parameters",
6+
"Cancel": "Cancel",
7+
"Correlation graph already matches search": "Correlation graph already matches search",
8+
"Correlation graph is focused on the main view.": "Correlation graph is focused on the main view.",
49
"Correlation result was empty.": "Correlation result was empty.",
5-
"Create a graph of items correlated from resources in the current page.": "Create a graph of items correlated from resources in the current page.",
6-
"Distance": "Distance",
7-
"Find all paths to items of the specified goal class.": "Find all paths to items of the specified goal class.",
10+
"Current view does not allow correlation.": "Current view does not allow correlation.",
11+
"Custom": "Custom",
12+
"Custom duration": "Custom duration",
13+
"Custom time range": "Custom time range",
14+
"End time must be after start time": "End time must be after start time",
15+
"Fix validation errors before searching": "Fix validation errors before searching",
816
"Focus": "Focus",
9-
"Follows correlation rules from the starting point to find related data, then continues the search from that data, up to the number of steps you specify.": "Follows correlation rules from the starting point to find related data, then continues the search from that data, up to the number of steps you specify.",
10-
"Goal Class": "Goal Class",
17+
"Focus the correlation on the main view.": "Focus the correlation on the main view.",
18+
"From": "From",
19+
"Goals": "Goals",
20+
"Include data from this time range": "Include data from this time range",
1121
"Korrel8r Error": "Korrel8r Error",
12-
"Loading": "Loading",
22+
"Last": "Last",
23+
"Last {{count}} {{unit}}_one": "Last {{count}} {{unit}}_one",
24+
"Last {{count}} {{unit}}_other": "Last {{count}} {{unit}}_other",
1325
"Logging Plugin Disabled": "Logging Plugin Disabled",
26+
"Neighbours": "Neighbours",
27+
"Neighbours or Goal search": "Neighbours or Goal search",
1428
"Netflow Plugin Disabled": "Netflow Plugin Disabled",
1529
"No Correlated Signals Found": "No Correlated Signals Found",
1630
"Open the Troubleshooting Panel": "Open the Troubleshooting Panel",
17-
"Query": "Query",
31+
"Other duration": "Other duration",
1832
"Quickly diagnose and resolve issues by exploring correlated observability signals for resources.": "Quickly diagnose and resolve issues by exploring correlated observability signals for resources.",
19-
"Range": "Range",
20-
"Recent": "Recent",
21-
"Refresh the graph using the current settings": "Refresh the graph using the current settings",
33+
"Refresh": "Refresh",
34+
"Refresh the graph by re-running the current search.": "Refresh the graph by re-running the current search.",
2235
"Request Failed": "Request Failed",
23-
"Return only results in the specified time range.": "Return only results in the specified time range.",
24-
"Return only results more recent than the specified duration.": "Return only results more recent than the specified duration.",
36+
"Save": "Save",
37+
"Search": "Search",
2538
"Search Type": "Search Type",
26-
"Selects the starting point for correlation search. This query is set automatically by the <1>Focus</1> button. You can edit it manually to specify a custom query.": "Selects the starting point for correlation search. This query is set automatically by the <1>Focus</1> button. You can edit it manually to specify a custom query.",
27-
"Since": "Since",
28-
"The current page does not support correlation.": "The current page does not support correlation.",
29-
"Time": "Time",
30-
"to": "to",
39+
"Searching": "Searching",
40+
"Select starting data": "Select starting data",
41+
"Start Query": "Start Query",
42+
"Start-end time range": "Start-end time range",
43+
"To": "To",
3144
"Troubleshooting": "Troubleshooting",
3245
"Troubleshooting Panel": "Troubleshooting Panel",
33-
"Unable to find Console Link": "Unable to find Console Link"
46+
"Unable to find Console Link": "Unable to find Console Link",
47+
"Update the correlation graph": "Update the correlation graph"
3448
}

web/src/__tests__/alert.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ describe('AlertNode.fromURL raises error', () => {
4646
it.each([
4747
{
4848
url: 'monitoring/alertrules/999',
49-
error: 'invalid link for domain alert: monitoring/alertrules/999: cannot find alertname',
49+
error: 'unknown alert link: monitoring/alertrules/999: cannot find alertname',
5050
},
5151
])('converts $url', ({ url, error }) => {
5252
expect(() => new AlertDomain().linkToQuery(new URIRef(url))).toThrow(error);

web/src/__tests__/log.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,12 @@ describe('expected errors', () => {
130130
it.each([
131131
{
132132
url: 'monitoring/log',
133-
expected: 'invalid link for domain log: monitoring/log',
133+
expected: 'unknown log link: monitoring/log',
134134
},
135135
{
136136
url: 'monitoring/logs?q={kubernetes_namespace_name="default",kubernetes_pod_name="foo"}',
137137
expected:
138-
'invalid link for domain log: monitoring/logs?q=%7Bkubernetes_namespace_name%3D%22default%22%2Ckubernetes_pod_name%3D%22foo%22%7D',
138+
'unknown log link: monitoring/logs?q=%7Bkubernetes_namespace_name%3D%22default%22%2Ckubernetes_pod_name%3D%22foo%22%7D',
139139
},
140140
])('error from url: $url', ({ url, expected }) => {
141141
expect(() => new LogDomain().linkToQuery(new URIRef(url))).toThrow(expected);
@@ -144,11 +144,11 @@ describe('expected errors', () => {
144144
it.each([
145145
{
146146
query: 'foo:bar:baz',
147-
expected: 'invalid query for domain log: foo:bar:baz: unknown class',
147+
expected: 'unknown query: foo:bar:baz: unknown class',
148148
},
149149
{
150150
query: 'log:incorrect:{}',
151-
expected: 'invalid query for domain log: log:incorrect:{}: unknown class',
151+
expected: 'unknown query: log:incorrect:{}: unknown class',
152152
},
153153
])('error from query: $query', ({ query, expected }) => {
154154
expect(() => new LogDomain().queryToLink(Query.parse(query))).toThrow(expected);

web/src/__tests__/metric.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ describe('metric', () => {
3333
it.each([
3434
{
3535
url: 'foobar',
36-
error: new TypeError('invalid link for domain metric: foobar'),
36+
error: 'unknown metric link: foobar',
3737
},
3838
{
3939
url: 'monitoring/query-browser',
40-
error: 'invalid link for domain metric: monitoring/query-browser',
40+
error: 'unknown metric link: monitoring/query-browser',
4141
},
4242
])('$url', ({ url, error }) => {
4343
expect(() => metric.linkToQuery(new URIRef(url))).toThrow(error);
@@ -48,11 +48,11 @@ describe('metric', () => {
4848
it.each([
4949
{
5050
query: 'wrongdomain:metric:foo',
51-
error: 'invalid query for domain metric: wrongdomain:metric:foo',
51+
error: 'unknown query: wrongdomain:metric:foo',
5252
},
5353
{
5454
query: 'metric:badclass:foo',
55-
error: 'invalid class for domain metric: badclass',
55+
error: 'class not found: metric:badclass',
5656
},
5757
])('$query', ({ query, error }) => {
5858
expect(() => metric.queryToLink(Query.parse(query))).toThrow(error);

web/src/__tests__/netflow.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ describe('', () => {
9090
it.each([
9191
{
9292
url: 'netflow-traffi',
93-
expected: 'invalid link for domain netflow: netflow-traffi',
93+
expected: 'unknown netflow link: netflow-traffi',
9494
},
9595
])('expect error fromURL($url)', ({ url, expected }) => {
9696
expect(() => new NetflowDomain().linkToQuery(new URIRef(url))).toThrow(expected);
@@ -103,15 +103,15 @@ describe('', () => {
103103
},
104104
{
105105
query: 'netflow:incorrect:{}',
106-
expected: 'invalid query for domain netflow: netflow:incorrect:{}: unknown class',
106+
expected: 'unknown query: netflow:incorrect:{}: unknown class',
107107
},
108108
{
109109
query: 'netflow:network:{SrcK8S_Type="Pod"=wrong}',
110-
expected: 'invalid query for domain netflow: netflow:network:{SrcK8S_Type="Pod"=wrong}',
110+
expected: 'unknown query: netflow:network:{SrcK8S_Type="Pod"=wrong}',
111111
},
112112
{
113113
query: 'netflow:network:{SrcK8S_Type}',
114-
expected: 'invalid query for domain netflow: netflow:network:{SrcK8S_Type}',
114+
expected: 'unknown query: netflow:network:{SrcK8S_Type}',
115115
},
116116
])('expect error fromQuery($query)', ({ query, expected }) => {
117117
expect(() => new NetflowDomain().queryToLink(Query.parse(query))).toThrow(expected);

web/src/__tests__/types.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ describe('Query', () => {
1818
const abc = new Class('a', 'b').query('c=d');
1919
expect(abc.toString()).toEqual('a:b:c=d');
2020
expect(Query.parse('a:b:c=d')).toEqual(abc);
21-
expect(() => Query.parse('x')).toThrow(/invalid.*: x/);
21+
expect(() => Query.parse('x')).toThrow(/invalid query: x/);
2222
});
2323
});
2424

@@ -27,7 +27,7 @@ class FakeDomain extends Domain {
2727
super(name);
2828
}
2929

30-
class(name: string): Class | undefined {
30+
class(name: string): Class {
3131
return new Class(this.name, name);
3232
}
3333

@@ -69,7 +69,7 @@ describe('Domain', () => {
6969
it('queryToLink', () => {
7070
expect(d.queryToLink(abc).toString()).toEqual('a/b?c=d');
7171
const query = Query.parse('x:b:c');
72-
expect(() => d.queryToLink(query)).toThrow('invalid query for domain a: x:b:c');
72+
expect(() => d.queryToLink(query)).toThrow('unknown query: x:b:c');
7373
});
7474
it('linkToQuery', () => {
7575
expect(d.linkToQuery(new URIRef('a/b?c=d'))).toEqual(abc);
@@ -85,7 +85,7 @@ describe('Domains', () => {
8585
it('queryToLink', () => {
8686
expect(ds.queryToLink(abc).toString()).toEqual('a/b?c=d');
8787
expect(ds.queryToLink(xyz).toString()).toEqual('x/y?z=z');
88-
expect(() => ds.queryToLink(Query.parse('z:b:c'))).toThrow(/unknown domain .*: z:b:c/);
88+
expect(() => ds.queryToLink(Query.parse('z:b:c'))).toThrow(/unknown domain: z/);
8989
});
9090
it('linkToQuery', () => {
9191
expect(ds.linkToQuery(new URIRef('x/y?z=z'))).toEqual(xyz);

0 commit comments

Comments
 (0)