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

[feat]: Make search panel more compact, button more visible #724

Merged
merged 5 commits into from
Apr 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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 @@ -35,6 +35,12 @@ limitations under the License.
margin-top: 0.5em;
}

.SearchForm--submit {
background-color: #11939a;
color: white;
float: right;
}

.SearchForm--tagsHintInfo {
padding-left: 1.7em;
}
Expand Down
93 changes: 57 additions & 36 deletions packages/jaeger-ui/src/components/SearchTracePage/SearchForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.

import * as React from 'react';
import { Form, Input, Button, Popover, Select } from 'antd';
import { Form, Input, Button, Popover, Select, Row, Col } from 'antd';
import _get from 'lodash/get';
import logfmtParser from 'logfmt/lib/logfmt_parser';
import { stringify as logfmtStringify } from 'logfmt/lib/stringify';
Expand Down Expand Up @@ -377,14 +377,21 @@ export class SearchFormImpl extends React.PureComponent {
</div>
}
>
<Field
name="startDate"
type="date"
component={AdaptedInput}
placeholder="Start Date"
props={{ disabled }}
/>
<Field name="startDateTime" type="time" component={AdaptedInput} props={{ disabled }} />
<Row gutter={16}>
<Col className="gutter-row" span={12}>
<Field
name="startDate"
type="date"
component={AdaptedInput}
placeholder="Start Date"
props={{ disabled }}
/>
</Col>

<Col className="gutter-row" span={12}>
<Field name="startDateTime" type="time" component={AdaptedInput} props={{ disabled }} />
</Col>
</Row>
</FormItem>,

<FormItem
Expand All @@ -406,36 +413,49 @@ export class SearchFormImpl extends React.PureComponent {
</div>
}
>
<Field
name="endDate"
type="date"
component={AdaptedInput}
placeholder="End Date"
props={{ disabled }}
/>
<Field name="endDateTime" type="time" component={AdaptedInput} props={{ disabled }} />
<Row gutter={16}>
<Col className="gutter-row" span={12}>
<Field
name="endDate"
type="date"
component={AdaptedInput}
placeholder="End Date"
props={{ disabled }}
/>
</Col>

<Col className="gutter-row" span={12}>
<Field name="endDateTime" type="time" component={AdaptedInput} props={{ disabled }} />
</Col>
</Row>
</FormItem>,
]}

<FormItem label="Min Duration">
<Field
name="minDuration"
component={ValidatedAdaptedInput}
placeholder={placeholderDurationFields}
props={{ disabled }}
validate={validateDurationFields}
/>
</FormItem>

<FormItem label="Max Duration">
<Field
name="maxDuration"
component={ValidatedAdaptedInput}
placeholder={placeholderDurationFields}
props={{ disabled }}
validate={validateDurationFields}
/>
</FormItem>
<Row gutter={16}>
<Col className="gutter-row" span={12}>
<FormItem label="Max Duration">
<Field
name="maxDuration"
component={ValidatedAdaptedInput}
placeholder={placeholderDurationFields}
props={{ disabled }}
validate={validateDurationFields}
/>
</FormItem>
</Col>

<Col className="gutter-row" span={12}>
<FormItem label="Min Duration">
<Field
name="minDuration"
component={ValidatedAdaptedInput}
placeholder={placeholderDurationFields}
props={{ disabled }}
validate={validateDurationFields}
/>
</FormItem>
</Col>
</Row>
meenal06 marked this conversation as resolved.
Show resolved Hide resolved

<FormItem label="Limit Results">
<Field
Expand All @@ -449,6 +469,7 @@ export class SearchFormImpl extends React.PureComponent {

<Button
htmlType="submit"
className="SearchForm--submit"
disabled={disabled || noSelectedService || invalid}
data-test={markers.SUBMIT_BTN}
>
Expand Down