fix: Fix for monitor page
1. fix for object data of formatedData 2. fix for evictions 3. fix for chart modal Change-Id: I757387714a1088647538870e80615662f830ac1e
This commit is contained in:
parent
1834f92c8a
commit
a070ecd94e
@ -77,14 +77,6 @@ const ChartCard = (props) => {
|
||||
);
|
||||
};
|
||||
|
||||
const getModalCardsParams = (store) => {
|
||||
const pa = {};
|
||||
if (params && Object.keys(params).includes('hostname')) {
|
||||
pa.hostname = store.node.metric.hostname;
|
||||
}
|
||||
return pa;
|
||||
};
|
||||
|
||||
const ModalContent = observer(() => (
|
||||
<div style={{ height: 520 }}>
|
||||
<BaseContent
|
||||
@ -93,11 +85,11 @@ const ChartCard = (props) => {
|
||||
{...props}
|
||||
currentRange={store.currentRange}
|
||||
interval={store.interval}
|
||||
params={getModalCardsParams(store)}
|
||||
isModal
|
||||
/>
|
||||
)}
|
||||
{...BaseContentConfig}
|
||||
renderNodeSelect={false}
|
||||
/>
|
||||
</div>
|
||||
));
|
||||
|
@ -408,6 +408,7 @@ const metricDict = {
|
||||
},
|
||||
evictions: {
|
||||
url: ['memcached_slab_items_evicted_unfetched_total'],
|
||||
finalFormatFunc: [(url) => `sum(${url})`],
|
||||
},
|
||||
itemsInCache: {
|
||||
url: ['memcached_items_total'],
|
||||
|
@ -94,7 +94,7 @@ export default class BaseMonitorStore {
|
||||
this.nodes = result;
|
||||
this.node = this.nodes[0] || {
|
||||
metric: {
|
||||
hostname: '',
|
||||
instance: '',
|
||||
},
|
||||
};
|
||||
this.isLoading = false;
|
||||
|
@ -13,7 +13,7 @@
|
||||
// limitations under the License.
|
||||
|
||||
import { observable, action } from 'mobx';
|
||||
import { get, isArray } from 'lodash';
|
||||
import { clone, get, isArray } from 'lodash';
|
||||
import DataSet from '@antv/data-set';
|
||||
import {
|
||||
getRequestUrl,
|
||||
@ -95,7 +95,7 @@ export default class FetchPrometheusStore {
|
||||
this.deviceKey,
|
||||
this.modifyKeys
|
||||
);
|
||||
this.data = [...formatedData];
|
||||
this.data = clone(formatedData);
|
||||
if (
|
||||
isArray(formatedData) &&
|
||||
formatedData.length !== 0 &&
|
||||
|
Loading…
Reference in New Issue
Block a user