fixed edit cluster address regex bug
This commit is contained in:
parent
1e7b932a67
commit
948ad752ab
|
@ -36,6 +36,7 @@ export default {
|
|||
"cluster.monitor.cluster.title": "Cluster",
|
||||
"cluster.monitor.node.title": "Node",
|
||||
"cluster.monitor.index.title": "Index",
|
||||
"cluster.monitor.queue.title": "Thread Pool",
|
||||
"cluster.monitor.summary.name": "Cluster Name",
|
||||
"cluster.monitor.summary.online_time": "Uptime",
|
||||
"cluster.monitor.summary.version": "Version",
|
||||
|
|
|
@ -36,6 +36,7 @@ export default {
|
|||
"cluster.monitor.cluster.title": "集群",
|
||||
"cluster.monitor.node.title": "节点",
|
||||
"cluster.monitor.index.title": "索引",
|
||||
"cluster.monitor.queue.title": "线程池",
|
||||
"cluster.monitor.summary.name": "集群名称",
|
||||
"cluster.monitor.summary.online_time": "在线时长",
|
||||
"cluster.monitor.summary.version": "集群版本",
|
||||
|
|
|
@ -22,8 +22,8 @@ export default {
|
|||
notices: [],
|
||||
clusterVisible: true,
|
||||
clusterList: [],
|
||||
selectedCluster: { name: "Select cluster", id: "" },
|
||||
selectedClusterID: "",
|
||||
selectedCluster: {},
|
||||
selectedClusterID: null,
|
||||
search: {
|
||||
cluster: {},
|
||||
},
|
||||
|
|
|
@ -37,6 +37,7 @@ import { calculateBounds } from "../../components/kibana/data/common/query/timef
|
|||
import NodeMetric from "./components/node_metric";
|
||||
import IndexMetric from "./components/index_metric";
|
||||
import ClusterMetric from "./components/cluster_metric";
|
||||
import QueueMetric from "./components/queue_metric";
|
||||
import { formatter, getFormatter, getNumFormatter } from "./format";
|
||||
|
||||
const { RangePicker } = DatePicker;
|
||||
|
@ -629,6 +630,19 @@ class ClusterMonitor extends PureComponent {
|
|||
handleTimeChange={this.handleTimeChange}
|
||||
/>
|
||||
</Tabs.TabPane>
|
||||
{/* <Tabs.TabPane
|
||||
key="queue"
|
||||
tab={formatMessage({
|
||||
id: "cluster.monitor.queue.title",
|
||||
})}
|
||||
>
|
||||
<QueueMetric
|
||||
clusterID={this.props.selectedCluster.id}
|
||||
timezone={timezone}
|
||||
timeRange={this.state.timeRange}
|
||||
handleTimeChange={this.handleTimeChange}
|
||||
/>
|
||||
</Tabs.TabPane> */}
|
||||
</Tabs>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -179,7 +179,7 @@ export default ({ clusterID, timezone, timeRange, handleTimeChange }) => {
|
|||
{metrics[e].map((metric) => {
|
||||
let axis = metric.axis;
|
||||
let lines = metric.lines;
|
||||
if (lines && lines[0].data && lines[0].data.length == 0) {
|
||||
if (lines && lines[0]?.data?.length == 0) {
|
||||
return null;
|
||||
}
|
||||
let disableHeaderFormat = false;
|
||||
|
|
|
@ -223,7 +223,7 @@ class ClusterForm extends React.Component {
|
|||
rules: [
|
||||
{
|
||||
type: "string",
|
||||
pattern: /^[\w\.]+\:\d+$/, //(https?:\/\/)?
|
||||
pattern: /^[\w\.\-_~%]+(\:\d+)?$/,
|
||||
message: "请输入域名或 IP 地址和端口号",
|
||||
},
|
||||
{
|
||||
|
|
|
@ -80,7 +80,6 @@ export default {
|
|||
return item.id === res._id;
|
||||
});
|
||||
|
||||
let originalEnabled = data[idx].enabled;
|
||||
data[idx] = {
|
||||
...data[idx],
|
||||
...res._source,
|
||||
|
@ -92,32 +91,14 @@ export default {
|
|||
},
|
||||
});
|
||||
//handle global cluster logic
|
||||
if (originalEnabled !== res._source.enabled) {
|
||||
if (res._source.enabled === true) {
|
||||
yield put({
|
||||
type: "global/addCluster",
|
||||
payload: {
|
||||
id: res._id,
|
||||
name: res._source.name,
|
||||
},
|
||||
});
|
||||
} else {
|
||||
yield put({
|
||||
type: "global/removeCluster",
|
||||
payload: {
|
||||
id: res._id,
|
||||
},
|
||||
});
|
||||
}
|
||||
} else {
|
||||
yield put({
|
||||
type: "global/updateCluster",
|
||||
payload: {
|
||||
id: res._id,
|
||||
name: res._source.name,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
yield put({
|
||||
type: "global/updateCluster",
|
||||
payload: {
|
||||
id: res._id,
|
||||
name: res._source.name,
|
||||
},
|
||||
});
|
||||
|
||||
return res;
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue