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