Skip to content

Commit

Permalink
[Bug Bash Fixes][Event Analytics] some fixes (opensearch-project#248)
Browse files Browse the repository at this point in the history
* markdown doesnt care if there's data

Signed-off-by: Eric Wei <[email protected]>

* empty query issue

Signed-off-by: Eric Wei <[email protected]>

* remove duplicate styles

Signed-off-by: Eric Wei <[email protected]>

* hide config panel for markdown

Signed-off-by: Eric Wei <[email protected]>

* fix panel infinite calls

Signed-off-by: Eric Wei <[email protected]>

* hide availability for event analytics

Signed-off-by: Eric Wei <[email protected]>

* remove error message from search

Signed-off-by: Eric Wei <[email protected]>

* fix tab issue with linting fix

Signed-off-by: Eric Wei <[email protected]>

* remove side group button

Signed-off-by: Eric Wei <[email protected]>

* lift data validation to vis container for linting issue

Signed-off-by: Eric Wei <[email protected]>

* update snapshots and minor changes

Signed-off-by: Eric Wei <[email protected]>

---------

Signed-off-by: Eric Wei <[email protected]>
(cherry picked from commit df92519)
  • Loading branch information
mengweieric committed Feb 7, 2023
1 parent 37421ba commit 709a8a7
Show file tree
Hide file tree
Showing 26 changed files with 883 additions and 418 deletions.
4 changes: 2 additions & 2 deletions common/constants/explorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const SELECTED_FIELDS = 'selectedFields';
export const UNSELECTED_FIELDS = 'unselectedFields';
export const AVAILABLE_FIELDS = 'availableFields';
export const QUERIED_FIELDS = 'queriedFields';
export const TAB_ID_TXT_PFX = 'query-panel-';
export const TAB_ID_TXT_PFX = 'explorer-tab-';
export const TAB_TITLE = 'New query';
export const TAB_CHART_TITLE = 'Visualizations';
export const TAB_EVENT_TITLE = 'Events';
Expand Down Expand Up @@ -299,4 +299,4 @@ export const UNITS_OF_MEASURE = [
'farenheit (F)',
'meters (m)',
'kilometers (k)',
]
];
5 changes: 5 additions & 0 deletions common/constants/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,3 +191,8 @@ export const PLOT_MARGIN = {
};

export const WAITING_TIME_ON_USER_ACTIONS = 300;

export const VISUALIZATION_ERROR = {
NO_DATA: 'No data found.',
INVALID_DATA: 'Invalid visualization data',
};
4 changes: 3 additions & 1 deletion public/components/common/search/search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ export const Search = (props: any) => {
stopLive,
setIsLiveTailPopoverOpen,
liveTailName,
searchError = null,
curVisId,
spanValue,
setSubType,
Expand Down Expand Up @@ -263,6 +262,7 @@ export const Search = (props: any) => {
</>
)}
</EuiFlexGroup>
<<<<<<< HEAD
{ searchError && searchError.error && (
<EuiFlexGroup gutterSize="s" justifyContent="flexStart" alignItems="flexStart">
<EuiFlexItem>
Expand All @@ -274,6 +274,8 @@ export const Search = (props: any) => {
</EuiFlexItem>
</EuiFlexGroup>)
}
=======
>>>>>>> df92519 ([Bug Bash Fixes][Event Analytics] some fixes (#248))
{flyout}
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,35 +192,35 @@ exports[`Datagrid component Renders data grid component 1`] = `
className="osdDocTableHeader"
>
<th
key="datagrid-header-8"
key="datagrid-header-7"
/>
<th
key="datagrid-header-2"
key="datagrid-header-1"
>
double_per_ip_bytes
</th>
<th
key="datagrid-header-3"
key="datagrid-header-2"
>
host
</th>
<th
key="datagrid-header-4"
key="datagrid-header-3"
>
ip_count
</th>
<th
key="datagrid-header-5"
key="datagrid-header-4"
>
per_ip_bytes
</th>
<th
key="datagrid-header-6"
key="datagrid-header-5"
>
resp_code
</th>
<th
key="datagrid-header-7"
key="datagrid-header-6"
>
sum_bytes
</th>
Expand Down Expand Up @@ -259,6 +259,234 @@ exports[`Datagrid component Renders data grid component 1`] = `
"timestamp": "2021-05-24 00:00:00",
}
}
docId="doc_view11"
explorerFields={
Object {
"availableFields": Array [
Object {
"name": "agent",
"type": "string",
},
Object {
"name": "bytes",
"type": "long",
},
Object {
"name": "clientip",
"type": "ip",
},
Object {
"name": "event",
"type": "struct",
},
Object {
"name": "extension",
"type": "string",
},
Object {
"name": "geo",
"type": "struct",
},
Object {
"name": "host",
"type": "string",
},
Object {
"name": "index",
"type": "string",
},
Object {
"name": "ip",
"type": "ip",
},
Object {
"name": "machine",
"type": "struct",
},
Object {
"name": "memory",
"type": "double",
},
Object {
"name": "message",
"type": "string",
},
Object {
"name": "phpmemory",
"type": "long",
},
Object {
"name": "referer",
"type": "string",
},
Object {
"name": "request",
"type": "string",
},
Object {
"name": "response",
"type": "string",
},
Object {
"name": "tags",
"type": "string",
},
Object {
"name": "timestamp",
"type": "timestamp",
},
Object {
"name": "url",
"type": "string",
},
Object {
"name": "utc_time",
"type": "timestamp",
},
],
"queriedFields": Array [
Object {
"name": "double_per_ip_bytes",
"type": "long",
},
Object {
"name": "host",
"type": "text",
},
Object {
"name": "ip_count",
"type": "integer",
},
Object {
"name": "per_ip_bytes",
"type": "long",
},
Object {
"name": "resp_code",
"type": "text",
},
Object {
"name": "sum_bytes",
"type": "long",
},
],
"selectedFields": Array [],
"unselectedFields": Array [],
}
}
key="doc_view11"
onFlyoutOpen={[Function]}
selectedCols={
Array [
Object {
"name": "double_per_ip_bytes",
"type": "long",
},
Object {
"name": "host",
"type": "text",
},
Object {
"name": "ip_count",
"type": "integer",
},
Object {
"name": "per_ip_bytes",
"type": "long",
},
Object {
"name": "resp_code",
"type": "text",
},
Object {
"name": "sum_bytes",
"type": "long",
},
]
}
>
<tr
className="osdDocTable__row"
>
<td
className="osdDocTableCell__toggleDetails"
key="grid-td-13"
>
<EuiButtonIcon
className="euiButtonIcon euiButtonIcon--text"
iconType="arrowRight"
onClick={[Function]}
>
<button
className="euiButtonIcon euiButtonIcon--primary euiButtonIcon--empty euiButtonIcon--xSmall euiButtonIcon euiButtonIcon--text"
disabled={false}
onClick={[Function]}
type="button"
>
<EuiIcon
aria-hidden="true"
className="euiButtonIcon__icon"
color="inherit"
size="m"
type="arrowRight"
>
<EuiIconEmpty
aria-hidden={true}
className="euiIcon euiIcon--medium euiIcon--inherit euiIcon-isLoading euiButtonIcon__icon"
focusable="false"
role="img"
style={null}
>
<svg
aria-hidden={true}
className="euiIcon euiIcon--medium euiIcon--inherit euiIcon-isLoading euiButtonIcon__icon"
focusable="false"
height={16}
role="img"
style={null}
viewBox="0 0 16 16"
width={16}
xmlns="http://www.w3.org/2000/svg"
/>
</EuiIconEmpty>
</EuiIcon>
</button>
</EuiButtonIcon>
</td>
</tr>
</ForwardRef>
<ForwardRef
doc={
Object {
"AvgTicketPrice": 882.98267,
"Cancelled": "false",
"Carrier": "Logstash Airways",
"Dest": "Venice Marco Polo Airport",
"DestAirportID": "VE05",
"DestCityName": "Venice",
"DestCountry": "IT",
"DestLocation": "{\\"lat\\":45.505299,\\"lon\\":12.3519}",
"DestRegion": "IT-34",
"DestWeather": "Sunny",
"DistanceKilometers": 8823.4,
"DistanceMiles": 5482.6064,
"FlightDelay": "false",
"FlightDelayMin": 0,
"FlightDelayType": "No Delay",
"FlightNum": "X98CCZO",
"FlightTimeHour": "7.73982468459836",
"FlightTimeMin": 464.3895,
"Origin": "Cape Town International Airport",
"OriginAirportID": "CPT",
"OriginCityName": "Cape Town",
"OriginCountry": "ZA",
"OriginLocation": "{\\"lat\\":-33.96480179,\\"lon\\":18.60169983}",
"OriginRegion": "SE-BD",
"OriginWeather": "Clear",
"dayOfWeek": 0,
"timestamp": "2021-05-24 18:27:00",
}
}
docId="doc_view12"
explorerFields={
Object {
Expand Down Expand Up @@ -410,6 +638,7 @@ exports[`Datagrid component Renders data grid component 1`] = `
>
<td
className="osdDocTableCell__toggleDetails"
<<<<<<< HEAD
key="grid-td-14"
>
<EuiButtonIcon
Expand Down Expand Up @@ -641,6 +870,9 @@ exports[`Datagrid component Renders data grid component 1`] = `
<td
className="osdDocTableCell__toggleDetails"
key="grid-td-17"
=======
key="grid-td-16"
>>>>>>> df92519 ([Bug Bash Fixes][Event Analytics] some fixes (#248))
>
<EuiButtonIcon
className="euiButtonIcon euiButtonIcon--text"
Expand Down
Loading

0 comments on commit 709a8a7

Please sign in to comment.