Skip to content

Commit

Permalink
Match core wizard design (#1044)
Browse files Browse the repository at this point in the history
* Bump prismjs from 1.25.0 to 1.27.0 in /dashboards-observability (#508) (#574)

Bumps [prismjs](https://github.com/PrismJS/prism) from 1.25.0 to 1.27.0.
- [Release notes](https://github.com/PrismJS/prism/releases)
- [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md)
- [Commits](PrismJS/prism@v1.25.0...v1.27.0)

---
updated-dependencies:
- dependency-name: prismjs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
(cherry picked from commit b4f491a)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* change to support java 8 in compile and runtime (#575) (#576)

Signed-off-by: Zhongnan Su <szhongna@amazon.com>
(cherry picked from commit 5c43e9d)

Co-authored-by: Zhongnan Su <szhongna@amazon.com>

* Add 1.3.0 release notes (#580) (#582)

Signed-off-by: Eugene Lee <eugenesk@amazon.com>

* query manager

Signed-off-by: Eric Wei <menwe@amazon.com>

* removed aggregations from dimensions

Signed-off-by: Eric Wei <menwe@amazon.com>

* qm improvements

Signed-off-by: Eric Wei <menwe@amazon.com>

* types/code cleanups/error corrections

Signed-off-by: Eric Wei <menwe@amazon.com>

* qm fixes for query builder

Signed-off-by: Eric Wei <menwe@amazon.com>

* viz timestamp selector

Signed-off-by: Eric Wei <menwe@amazon.com>

* query manager integration with bar step 1

Signed-off-by: Eric Wei <menwe@amazon.com>

* span fix

Signed-off-by: Eric Wei <menwe@amazon.com>

* use postinstall for antlr output files

Signed-off-by: Eric Wei <menwe@amazon.com>

* query building fix

Signed-off-by: Eric Wei <menwe@amazon.com>

* updated snapshots

Signed-off-by: Eric Wei <menwe@amazon.com>

* fixed file not found issue

Signed-off-by: Eric Wei <menwe@amazon.com>

* remove output files

Signed-off-by: Eric Wei <menwe@amazon.com>

* removed extra padding

Signed-off-by: Eric Wei <menwe@amazon.com>

* changed field button size to m

Signed-off-by: Eric Wei <menwe@amazon.com>

* adjusted styling to align with wizard ux design

Signed-off-by: Eric Wei <menwe@amazon.com>

* added according for field sections

Signed-off-by: Eric Wei <menwe@amazon.com>

* remove reset

Signed-off-by: Eric Wei <menwe@amazon.com>

* add scrolling and followed core team's design

Signed-off-by: Eric Wei <menwe@amazon.com>

* field selector title

Signed-off-by: Eric Wei <menwe@amazon.com>

* synced with main

Signed-off-by: Eric Wei <menwe@amazon.com>

* field selector fix, viz selector restyling

Signed-off-by: Eric Wei <menwe@amazon.com>

* path issue

Signed-off-by: Eric Wei <menwe@amazon.com>

* event sidebar, one renaming

Signed-off-by: Eric Wei <menwe@amazon.com>

* run tests and update snapshots

Signed-off-by: Eric Wei <menwe@amazon.com>

* code clean up

Signed-off-by: Eric Wei <menwe@amazon.com>

Signed-off-by: Eugene Lee <eugenesk@amazon.com>
Signed-off-by: Eric Wei <menwe@amazon.com>
Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Zhongnan Su <szhongna@amazon.com>
  • Loading branch information
4 people authored Sep 27, 2022
1 parent 3ce8d87 commit 08a8d82
Show file tree
Hide file tree
Showing 28 changed files with 22,382 additions and 22,306 deletions.
8 changes: 4 additions & 4 deletions dashboards-observability/common/types/explorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export interface ILogExplorerProps {
) => void;
savedObjectId: string;
getExistingEmptyTab: (params: EmptyTabParams) => string;
qm: QueryManager;
queryManager: QueryManager;
}

export interface IExplorerProps {
Expand Down Expand Up @@ -130,7 +130,7 @@ export interface IExplorerProps {
appBaseQuery?: string;
callback?: any;
callbackInApp?: any;
qm: QueryManager;
queryManager: QueryManager;
}

export interface SavedQuery {
Expand Down Expand Up @@ -316,13 +316,13 @@ export interface EventAnalyticsProps {
timestampUtils: TimestampUtils;
http: HttpStart;
notifications: NotificationsStart;
qm: QueryManager;
queryManager: QueryManager;
}

export interface DataConfigPanelProps {
fieldOptionList: IField[];
visualizations: IVisualizationContainerProps;
qm?: QueryManager;
queryManager?: QueryManager;
}
export interface GetTooltipHoverInfoType {
tooltipMode: string;
Expand Down
6 changes: 3 additions & 3 deletions dashboards-observability/public/components/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ interface ObservabilityAppDeps {
dslService: any;
savedObjects: any;
timestampUtils: any;
qm: QueryManager;
queryManager: QueryManager;
}

// for cypress to test redux store
Expand All @@ -40,7 +40,7 @@ export const App = ({
dslService,
savedObjects,
timestampUtils,
qm,
queryManager,
}: ObservabilityAppDeps) => {
const { chrome, http, notifications } = CoreStartProp;
const parentBreadcrumb = {
Expand Down Expand Up @@ -133,7 +133,7 @@ export const App = ({
timestampUtils={timestampUtils}
http={http}
notifications={notifications}
qm={qm}
queryManager={queryManager}
{...props}
/>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,45 @@
margin-right: $euiSizeXS;
}
}

.shard__fieldSelectorField {
&:hover,
&:focus-within,
&[class*='-isActive'] {
.dscSidebarItem__action {
opacity: 1;
}
}

& > .osdFieldButton__button {
padding: 0;
}

& .osdFieldButton__name {
padding: $euiSizeS $euiSizeS $euiSizeS 0;
}

& > button {
align-items: stretch;
}

& .osdFieldIcon {
box-shadow: none;
height: 100%;
flex-shrink: 0;
line-height: 0;
}

& .osdFieldButton__fieldIcon {
box-shadow: none;
margin-right: 8px;
}
}

#vis__mainContent .explorer__fieldSelectorField {
@include euiBottomShadowSmall;

background-color: $euiColorEmptyShade;
border: $euiBorderThin;
margin-top: $euiSizeS;
}
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export function FieldButton({
buttonProps,
...rest
}: FieldButtonProps) {

const classes = classNames(
'osdFieldButton',
size ? sizeToClassNameMap[size] : null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export interface FieldIconProps extends Omit<EuiTokenProps, 'iconType'> {
}

// defaultIcon => a unknown datatype
const defaultIcon = { iconType: 'questionInCircle', color: 'gray' };
const defaultIcon = { iconType: 'tokenString' };

export const typeToEuiIconMap: Partial<Record<string, EuiTokenProps>> = {
boolean: { iconType: 'tokenBoolean' },
Expand All @@ -50,13 +50,12 @@ export const typeToEuiIconMap: Partial<Record<string, EuiTokenProps>> = {
export function FieldIcon({
type,
label,
size = 's',
size = 'l',
scripted,
className,
...rest
}: FieldIconProps) {
const token = typeToEuiIconMap[type] || defaultIcon;

return (
<EuiToken
{...token}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,22 @@
* SPDX-License-Identifier: Apache-2.0
*/

.liveStream {
margin : 8px;
height: 40px;
align-items: center;
justify-content: center;
flex-direction: row;
display: flex;
flex-grow: 1;
vertical-align: baseline;
}
#opensearch-dashboards-body {
overflow-y: hidden;
}

.liveStream {
margin : 8px;
height: 40px;
align-items: center;
justify-content: center;
flex-direction: row;
display: flex;
flex-grow: 1;
vertical-align: baseline;
}

.mainContentTabs .euiResizableContainer {
height: calc(100vh - 298px);
}

Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export const Explorer = ({
setEndTime,
callback,
callbackInApp,
qm,
queryManager,
}: IExplorerProps) => {
const dispatch = useDispatch();
const requestParams = { tabId };
Expand Down Expand Up @@ -497,6 +497,7 @@ export const Explorer = ({
handleQuerySearch(availability);
};


/**
* Toggle fields between selected and unselected sets
* @param field field to be toggled
Expand Down Expand Up @@ -585,7 +586,7 @@ export const Explorer = ({
data-test-subj="eventExplorer__sidebar"
>
{!isSidebarClosed && (
<div className="dscFieldChooser">
<div className="explorerFieldSelector">
<Sidebar
query={query}
explorerFields={explorerFields}
Expand Down Expand Up @@ -768,7 +769,7 @@ export const Explorer = ({
handleOverrideTimestamp={handleOverrideTimestamp}
callback={callbackForConfig}
changeIsValidConfigOptionState={changeIsValidConfigOptionState}
qm={qm}
queryManager={queryManager}
/>
);
};
Expand Down Expand Up @@ -925,8 +926,7 @@ export const Explorer = ({

if (selectedContentTabId === TAB_CHART_ID) {
// parse stats section on every search
const qm = new QueryManager();
const statsTokens = qm.queryParser().parse(tempQuery).getStats();
const statsTokens = queryManager.queryParser().parse(tempQuery).getStats();

const updatedDataConfig = getUpdatedDataConfig(statsTokens);
await dispatch(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
}
}

// #queryTabs {
// height: calc(100vh - 98px);
// }

.tab-title {
display: inline-block;
margin-right: 5px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const LogExplorer = ({
history,
notifications,
http,
qm,
queryManager,
}: ILogExplorerProps) => {
const dispatch = useDispatch();
const tabIds = useSelector(selectQueryTabs).queryTabIds.filter(
Expand Down Expand Up @@ -185,7 +185,7 @@ export const LogExplorer = ({
curSelectedTabId={curSelectedTabIdRef}
http={http}
searchBarConfigs={searchBarConfigs}
qm={qm}
queryManager={queryManager}
/>
</>
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ exports[`Field component Renders a sidebar field 1`] = `
anchorPosition="rightUp"
button={
<FieldButton
className="dscSidebarItem"
className="shard__fieldSelectorField explorer__fieldSelectorField"
dataTestSubj="field-agent-showDetails"
fieldAction={
<React.Fragment>
Expand Down Expand Up @@ -67,7 +67,7 @@ exports[`Field component Renders a sidebar field 1`] = `
}
isActive={false}
onClick={[Function]}
size="s"
size="m"
/>
}
closePopover={[Function]}
Expand All @@ -85,7 +85,7 @@ exports[`Field component Renders a sidebar field 1`] = `
className="euiPopover__anchor"
>
<FieldButton
className="dscSidebarItem"
className="shard__fieldSelectorField explorer__fieldSelectorField"
dataTestSubj="field-agent-showDetails"
fieldAction={
<React.Fragment>
Expand Down Expand Up @@ -131,10 +131,10 @@ exports[`Field component Renders a sidebar field 1`] = `
}
isActive={false}
onClick={[Function]}
size="s"
size="m"
>
<div
className="osdFieldButton osdFieldButton--small dscSidebarItem"
className="osdFieldButton shard__fieldSelectorField explorer__fieldSelectorField"
>
<button
className="osd-resetFocusState osdFieldButton__button"
Expand All @@ -151,23 +151,23 @@ exports[`Field component Renders a sidebar field 1`] = `
aria-label="string"
className="osdFieldIcon"
iconType="tokenString"
size="s"
size="l"
title="string"
>
<span
className="euiToken euiToken--euiColorVis1 euiToken--square euiToken--light euiToken--small osdFieldIcon"
className="euiToken euiToken--euiColorVis1 euiToken--square euiToken--light euiToken--large osdFieldIcon"
style={Object {}}
>
<EuiIcon
aria-label="string"
size="m"
size="l"
title="string"
type="tokenString"
>
<EuiIconEmpty
aria-hidden={true}
aria-label="string"
className="euiIcon euiIcon--medium euiIcon-isLoading"
className="euiIcon euiIcon--large euiIcon-isLoading"
focusable="false"
role="img"
style={null}
Expand All @@ -176,7 +176,7 @@ exports[`Field component Renders a sidebar field 1`] = `
<svg
aria-hidden={true}
aria-label="string"
className="euiIcon euiIcon--medium euiIcon-isLoading"
className="euiIcon euiIcon--large euiIcon-isLoading"
focusable="false"
height={16}
role="img"
Expand Down
Loading

0 comments on commit 08a8d82

Please sign in to comment.