Skip to content

Commit

Permalink
Update action control position.
Browse files Browse the repository at this point in the history
  • Loading branch information
justinkambic committed Aug 2, 2018
1 parent 9e2a38e commit f4ed8bc
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 27 deletions.
2 changes: 1 addition & 1 deletion x-pack/plugins/beats_management/common/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ export { PLUGIN } from './plugin';
export { INDEX_NAMES } from './index_names';
export { UNIQUENESS_ENFORCING_TYPES, ConfigurationBlockTypes } from './configuration_blocks';
export const BASE_PATH = '/management/beats_management/';
export { TABLE_CONFIG } from './beats_table';
export { TABLE_CONFIG } from './table';
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,4 @@
export const TABLE_CONFIG = {
INITIAL_ROW_SIZE: 5,
PAGE_SIZE_OPTIONS: [3, 5, 10, 20],
ACTIONS: {
BULK_ASSIGN_TAG: 'BULK_ASSIGN_TAG',
BULK_DELETE: 'BULK_DELETE',
BULK_EDIT: 'BULK_EDIT',
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,8 @@ export class ControlBar extends React.Component<ControlBarProps, ControlBarState

private renderAssignmentOptions = () => (
<EuiFlexGroup alignItems="center" justifyContent="spaceBetween">
<EuiFlexItem grow={false}>{this.renderActionButton()}</EuiFlexItem>
<EuiFlexItem>{this.props.selectionCount} selected</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiButton color="danger">Disenroll Selected</EuiButton>
</EuiFlexItem>
<EuiFlexItem grow={false}>{this.renderActionButton()}</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiPopover
button={
Expand Down Expand Up @@ -92,16 +89,11 @@ export class ControlBar extends React.Component<ControlBarProps, ControlBarState
);

private renderDefaultControls = () => (
<EuiFlexGroup>
<EuiFlexItem grow={false}>{this.renderActionButton()}</EuiFlexItem>
<EuiFlexItem>
<EuiSearchBar
box={{ incremental: true }}
filters={this.props.controlDefinitions.filters}
onChange={(query: any) => this.props.actionHandler('search', query)}
/>
</EuiFlexItem>
</EuiFlexGroup>
<EuiSearchBar
box={{ incremental: true }}
filters={this.props.controlDefinitions.filters}
onChange={(query: any) => this.props.actionHandler('search', query)}
/>
);

private renderActionButton = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,9 @@ export const BeatsTableType: TableType = {
controlDefinitions: (data: any) => ({
actions: [
{
action: 'edit',
name: 'Bulk Edit',
icon: <EuiIcon type="indexEdit" size="m" />,
},
{
name: 'Disenroll Selected',
action: 'delete',
name: 'Bulk Delete',
icon: <EuiIcon type="indexClose" size="m" />,
danger: true,
},
],
filters: [
Expand Down

0 comments on commit f4ed8bc

Please sign in to comment.