mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-01 06:31:59 +08:00
fix: custom time width and refresh text visibility issues (#4428)
This commit is contained in:
parent
9e05cb48fe
commit
5b0e3d375a
@ -37,6 +37,12 @@
|
|||||||
padding: 4px 8px;
|
padding: 4px 8px;
|
||||||
padding-left: 0px !important;
|
padding-left: 0px !important;
|
||||||
|
|
||||||
|
&.custom-time {
|
||||||
|
input:not(:focus) {
|
||||||
|
min-width: 240px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
input::placeholder {
|
input::placeholder {
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
@ -178,7 +178,10 @@ function CustomTimePicker({
|
|||||||
return (
|
return (
|
||||||
<div className="custom-time-picker">
|
<div className="custom-time-picker">
|
||||||
<Popover
|
<Popover
|
||||||
className="timeSelection-input-container"
|
className={cx(
|
||||||
|
'timeSelection-input-container',
|
||||||
|
selectedTime === 'custom' && inputValue === '' ? 'custom-time' : '',
|
||||||
|
)}
|
||||||
placement="bottomRight"
|
placement="bottomRight"
|
||||||
getPopupContainer={popupContainer}
|
getPopupContainer={popupContainer}
|
||||||
content={content}
|
content={content}
|
||||||
@ -193,12 +196,7 @@ function CustomTimePicker({
|
|||||||
<Input
|
<Input
|
||||||
className="timeSelection-input"
|
className="timeSelection-input"
|
||||||
type="text"
|
type="text"
|
||||||
style={{
|
|
||||||
minWidth: '120px',
|
|
||||||
width: '100%',
|
|
||||||
}}
|
|
||||||
status={inputValue && inputStatus === 'error' ? 'error' : ''}
|
status={inputValue && inputStatus === 'error' ? 'error' : ''}
|
||||||
allowClear={!isInputFocused && selectedTime === 'custom'}
|
|
||||||
placeholder={
|
placeholder={
|
||||||
isInputFocused
|
isInputFocused
|
||||||
? 'Time Format (1m or 2h or 3d or 4w)'
|
? 'Time Format (1m or 2h or 3d or 4w)'
|
||||||
|
@ -0,0 +1,3 @@
|
|||||||
|
.date-time-selection-container {
|
||||||
|
margin-bottom: 16px;
|
||||||
|
}
|
@ -1,3 +1,5 @@
|
|||||||
|
import './DateTimeSelection.styles.scss';
|
||||||
|
|
||||||
import { SyncOutlined } from '@ant-design/icons';
|
import { SyncOutlined } from '@ant-design/icons';
|
||||||
import { Button } from 'antd';
|
import { Button } from 'antd';
|
||||||
import getLocalStorageKey from 'api/browser/localstorage/get';
|
import getLocalStorageKey from 'api/browser/localstorage/get';
|
||||||
@ -294,7 +296,7 @@ function DateTimeSelection({
|
|||||||
}, [location.pathname, updateTimeInterval, globalTimeLoading]);
|
}, [location.pathname, updateTimeInterval, globalTimeLoading]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<div className="date-time-selection-container">
|
||||||
<Form
|
<Form
|
||||||
form={formSelector}
|
form={formSelector}
|
||||||
layout="inline"
|
layout="inline"
|
||||||
@ -335,7 +337,7 @@ function DateTimeSelection({
|
|||||||
</FormContainer>
|
</FormContainer>
|
||||||
</Form>
|
</Form>
|
||||||
|
|
||||||
{!hasSelectedTimeError && (
|
{!hasSelectedTimeError && selectedTime !== 'custom' && (
|
||||||
<RefreshText
|
<RefreshText
|
||||||
{...{
|
{...{
|
||||||
onLastRefreshHandler,
|
onLastRefreshHandler,
|
||||||
@ -351,7 +353,7 @@ function DateTimeSelection({
|
|||||||
setCustomDTPickerVisible(false);
|
setCustomDTPickerVisible(false);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,7 +24,6 @@ interface Props {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const RefreshTextContainer = styled.div<Props>`
|
export const RefreshTextContainer = styled.div<Props>`
|
||||||
min-height: 2rem;
|
|
||||||
visibility: ${({ refreshButtonHidden }): string =>
|
visibility: ${({ refreshButtonHidden }): string =>
|
||||||
refreshButtonHidden ? 'hidden' : 'visible'};
|
refreshButtonHidden ? 'hidden' : 'visible'};
|
||||||
`;
|
`;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user