-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into sidecar-multi-config-and-tags
- Loading branch information
Showing
28 changed files
with
323 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
graylog2-web-interface/src/components/bootstrap/NavItem.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Copyright (C) 2020 Graylog, Inc. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the Server Side Public License, version 1, | ||
* as published by MongoDB, Inc. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* Server Side Public License for more details. | ||
* | ||
* You should have received a copy of the Server Side Public License | ||
* along with this program. If not, see | ||
* <http://www.mongodb.com/licensing/server-side-public-license>. | ||
*/ | ||
import * as React from 'react'; | ||
// eslint-disable-next-line no-restricted-imports | ||
import { NavItem as BootstrapNavItem } from 'react-bootstrap'; | ||
|
||
const NavItem = (props: React.ComponentProps<typeof NavItem>) => <BootstrapNavItem {...props} />; | ||
|
||
NavItem.displayName = 'NavItem'; | ||
|
||
/** @component */ | ||
export default NavItem; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
77 changes: 77 additions & 0 deletions
77
graylog2-web-interface/src/components/common/FormSubmit.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
/* | ||
* Copyright (C) 2020 Graylog, Inc. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the Server Side Public License, version 1, | ||
* as published by MongoDB, Inc. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* Server Side Public License for more details. | ||
* | ||
* You should have received a copy of the Server Side Public License | ||
* along with this program. If not, see | ||
* <http://www.mongodb.com/licensing/server-side-public-license>. | ||
*/ | ||
import * as React from 'react'; | ||
|
||
import { Button, ButtonToolbar } from 'components/bootstrap'; | ||
import type { IconName } from 'components/common/Icon'; | ||
import Icon from 'components/common/Icon'; | ||
import Spinner from 'components/common/Spinner'; | ||
|
||
type Props = { | ||
className?: string, | ||
disableCancel?: boolean, | ||
disabledSubmit?: boolean, | ||
isSubmitting?: boolean, | ||
leftCol?: React.ReactNode, | ||
onCancel: () => void, | ||
onSubmit?: () => void, | ||
submitButtonText: string, | ||
submitIcon?: IconName, | ||
submitButtonType?: 'submit' | 'button', | ||
submitLoadingText?: string, | ||
} | ||
|
||
const FormSubmit = ({ | ||
className, | ||
disableCancel, | ||
disabledSubmit, | ||
isSubmitting, | ||
leftCol, | ||
onCancel, | ||
onSubmit, | ||
submitButtonText, | ||
submitButtonType, | ||
submitIcon, | ||
submitLoadingText, | ||
}: Props) => ( | ||
<ButtonToolbar className={`${className} pull-right`}> | ||
{leftCol} | ||
<Button type="button" onClick={onCancel} disabled={disableCancel}>Cancel</Button> | ||
<Button bsStyle="success" | ||
disabled={disabledSubmit} | ||
title={submitButtonText} | ||
type={submitButtonType} | ||
onClick={onSubmit}> | ||
{(submitIcon && !isSubmitting) && <><Icon name={submitIcon} /> </>} | ||
{isSubmitting ? <Spinner text={submitLoadingText} delay={0} /> : submitButtonText} | ||
</Button> | ||
</ButtonToolbar> | ||
); | ||
|
||
FormSubmit.defaultProps = { | ||
className: undefined, | ||
disableCancel: false, | ||
disabledSubmit: false, | ||
isSubmitting: false, | ||
leftCol: undefined, | ||
onSubmit: undefined, | ||
submitButtonType: 'submit', | ||
submitIcon: undefined, | ||
submitLoadingText: undefined, | ||
}; | ||
|
||
export default FormSubmit; |
48 changes: 48 additions & 0 deletions
48
graylog2-web-interface/src/components/common/ModalSubmit.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* | ||
* Copyright (C) 2020 Graylog, Inc. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the Server Side Public License, version 1, | ||
* as published by MongoDB, Inc. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* Server Side Public License for more details. | ||
* | ||
* You should have received a copy of the Server Side Public License | ||
* along with this program. If not, see | ||
* <http://www.mongodb.com/licensing/server-side-public-license>. | ||
*/ | ||
import * as React from 'react'; | ||
|
||
import FormSubmit from 'components/common/FormSubmit'; | ||
|
||
type Props = React.ComponentProps<typeof FormSubmit> | ||
|
||
/* eslint-disable react/prop-types */ | ||
const ModalSubmit = ({ | ||
className, | ||
disabledSubmit, | ||
disableCancel, | ||
isSubmitting, | ||
leftCol, | ||
onCancel, | ||
onSubmit, | ||
submitLoadingText, | ||
submitIcon, | ||
submitButtonText, | ||
}: Props) => ( | ||
<FormSubmit disableCancel={disableCancel} | ||
disabledSubmit={disabledSubmit} | ||
isSubmitting={isSubmitting} | ||
leftCol={leftCol} | ||
onCancel={onCancel} | ||
onSubmit={onSubmit} | ||
submitButtonText={submitButtonText} | ||
submitIcon={submitIcon} | ||
submitLoadingText={submitLoadingText} | ||
className={className} /> | ||
); | ||
|
||
export default ModalSubmit; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.