chore: set timeout to 10s by default in DatePicker's time settings (#63)
* chore: set timeout to 10s by default in DatePicker's time settings * chore: update release notes --------- Co-authored-by: yaojiping <yaojiping@infini.ltd> Co-authored-by: Hardy <luohoufu@163.com>
This commit is contained in:
parent
9733b72531
commit
59908761b1
|
@ -24,6 +24,8 @@ Information about release notes of INFINI Console is provided here.
|
|||
- Optimize metric query bucket size (#59)
|
||||
- Add suggestion to chart in monitor if is no data because the time interval is less than the collection interval.
|
||||
- Check if the cluster version supports metric transport_outbound_comnections in monitor.
|
||||
- Set timeout to 10s by default in DatePicker's time settings.
|
||||
- Check if the cluster version supports metric transport_outbound_comnections in monitor.
|
||||
- Enhanced http_client to support customizable configurations.
|
||||
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ const TimeSetting = props => {
|
|||
const timeoutObject = useMemo(() => {
|
||||
if (!timeout) {
|
||||
return {
|
||||
value: 120,
|
||||
value: 10,
|
||||
unit: 's',
|
||||
}
|
||||
}
|
||||
|
@ -128,10 +128,10 @@ const TimeSetting = props => {
|
|||
timeoutObject && (
|
||||
<>
|
||||
<InputNumber
|
||||
min={60}
|
||||
min={10}
|
||||
value={timeoutObject.value}
|
||||
style={{ width: '100%' }}
|
||||
step={10}
|
||||
step={1}
|
||||
precision={0}
|
||||
onChange={(value) => {
|
||||
if (Number.isInteger(value)) {
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
| showTimeInterval | 是否显示时间间隔 | boolean | false | 1.0.0 |
|
||||
| timeInterval | 时间间隔 | string | - | 1.0.0 |
|
||||
| showTimeout | 是否显示超时时间 | boolean | false | 1.0.0 |
|
||||
| timeout | 超时时间 | string | 120s | 1.0.0 |
|
||||
| timeout | 超时时间 | string | 10s | 1.0.0 |
|
||||
| onTimeSettingChange | 时间配置变更的回调 | ({timeField: string, timeInterval: string, timeout: string}) => void | - | 1.0.0 |
|
||||
| autoFitLoading | 自动适配时间载入状态 | boolean | false | 1.0.0 |
|
||||
| onAutoFit | 自动适配时间的回调 | () => void | - | 1.0.0 |
|
||||
|
|
|
@ -52,7 +52,7 @@ export default (props) => {
|
|||
showTimeInterval: true,
|
||||
timeInterval: "15s",
|
||||
showTimeout: true,
|
||||
timeout: "120s",
|
||||
timeout: "10s",
|
||||
});
|
||||
|
||||
const [currentTimeZone, setCurrentTimeZone] = useState(timeZone);
|
||||
|
|
|
@ -40,7 +40,7 @@ export default (props) => {
|
|||
timeFormatter: formatter.dates(1),
|
||||
},
|
||||
timeInterval: allTimeSettingsCache.timeInterval,
|
||||
timeout: allTimeSettingsCache.timeout || '120s',
|
||||
timeout: allTimeSettingsCache.timeout || '10s',
|
||||
});
|
||||
|
||||
const [refresh, setRefresh] = useState({ isRefreshPaused: allTimeSettingsCache.isRefreshPaused || false, refreshInterval: allTimeSettingsCache.refreshInterval || 30000 });
|
||||
|
|
|
@ -78,7 +78,7 @@ const Monitor = (props) => {
|
|||
timeFormatter: formatter.dates(1),
|
||||
},
|
||||
timeInterval: formatTimeInterval(param?.timeInterval) || allTimeSettingsCache.timeInterval,
|
||||
timeout: formatTimeout(param?.timeout) || allTimeSettingsCache.timeout || '120s',
|
||||
timeout: formatTimeout(param?.timeout) || allTimeSettingsCache.timeout || '10s',
|
||||
param: param,
|
||||
refresh: true,
|
||||
})
|
||||
|
|
|
@ -5,6 +5,7 @@ import Infos from "./Detail/Infos";
|
|||
import Card from "./Card";
|
||||
import Table from "./Table";
|
||||
import Overview from "@/components/Overview";
|
||||
import { getAllTimeSettingsCache } from "@/components/Overview/Monitor";
|
||||
|
||||
const facetLabels = {
|
||||
"labels.health_status": "health status",
|
||||
|
@ -34,6 +35,9 @@ const sideSorterOptions = [
|
|||
];
|
||||
|
||||
export default () => {
|
||||
|
||||
const allTimeSettingsCache = getAllTimeSettingsCache()
|
||||
|
||||
return (
|
||||
<Overview
|
||||
searchAction={`${ESPrefix}/cluster/_search`}
|
||||
|
@ -54,7 +58,7 @@ export default () => {
|
|||
text: item?._source?.name
|
||||
}),
|
||||
}}
|
||||
infoAction={`${ESPrefix}/cluster/info?timeout=120s`}
|
||||
infoAction={`${ESPrefix}/cluster/info?timeout=${allTimeSettingsCache.timeout || '10s'}`}
|
||||
facetLabels={facetLabels}
|
||||
aggsParams={aggsParams}
|
||||
sideSorterOptions={sideSorterOptions}
|
||||
|
|
|
@ -4,6 +4,7 @@ import Infos from "./Detail/Infos";
|
|||
import Card from "./Card";
|
||||
import Table from "./Table";
|
||||
import Overview from "@/components/Overview";
|
||||
import { getAllTimeSettingsCache } from "@/components/Overview/Monitor";
|
||||
|
||||
const facetLabels = {
|
||||
"metadata.cluster_name": "cluster",
|
||||
|
@ -28,6 +29,9 @@ const sideSorterOptions = [
|
|||
];
|
||||
|
||||
export default () => {
|
||||
|
||||
const allTimeSettingsCache = getAllTimeSettingsCache()
|
||||
|
||||
return (
|
||||
<Overview
|
||||
extraQueryFields={["index_id"]}
|
||||
|
@ -54,7 +58,7 @@ export default () => {
|
|||
text: item?._source?.metadata?.index_name
|
||||
}),
|
||||
}}
|
||||
infoAction={`${ESPrefix}/index/info?timeout=120s`}
|
||||
infoAction={`${ESPrefix}/index/info?timeout=${allTimeSettingsCache.timeout || '10s'}`}
|
||||
facetLabels={facetLabels}
|
||||
aggsParams={aggsParams}
|
||||
sideSorterOptions={sideSorterOptions}
|
||||
|
|
|
@ -5,6 +5,7 @@ import Card from "./Card";
|
|||
import Table from "./Table";
|
||||
import Overview from "@/components/Overview";
|
||||
import Logs from "./Detail/Logs";
|
||||
import { getAllTimeSettingsCache } from "@/components/Overview/Monitor";
|
||||
|
||||
const facetLabels = {
|
||||
"metadata.cluster_name": "cluster",
|
||||
|
@ -38,6 +39,9 @@ const sideSorterOptions = [
|
|||
];
|
||||
|
||||
export default () => {
|
||||
|
||||
const allTimeSettingsCache = getAllTimeSettingsCache()
|
||||
|
||||
return (
|
||||
<Overview
|
||||
extraQueryFields={["node_id"]}
|
||||
|
@ -63,7 +67,7 @@ export default () => {
|
|||
text: item?._source?.metadata?.node_name
|
||||
}),
|
||||
}}
|
||||
infoAction={`${ESPrefix}/node/info?timeout=120s`}
|
||||
infoAction={`${ESPrefix}/node/info?timeout=${allTimeSettingsCache.timeout || '10s'}`}
|
||||
facetLabels={facetLabels}
|
||||
selectFilterLabels={selectFilterLabels}
|
||||
aggsParams={aggsParams}
|
||||
|
|
Loading…
Reference in New Issue