change(ui) - removed logs
This commit is contained in:
parent
509897e582
commit
ef004c0f46
19 changed files with 5 additions and 144 deletions
|
|
@ -161,8 +161,6 @@ export default class FilterModal extends React.PureComponent {
|
|||
const staticFilters = preloadedFilters
|
||||
.filter(({ value, actualValue }) => !this.props.loading && this.test(actualValue || value))
|
||||
|
||||
// console.log('filteredList', filteredList);
|
||||
|
||||
return (!displayed ? null :
|
||||
<div className={ stl.modal }>
|
||||
{ loading &&
|
||||
|
|
|
|||
|
|
@ -18,15 +18,7 @@ function NewDashboard(props) {
|
|||
dashboardStore.fetchList().then((resp) => {
|
||||
if (parseInt(dashboardId) > 0) {
|
||||
dashboardStore.selectDashboardById(dashboardId);
|
||||
}
|
||||
// else {
|
||||
// dashboardStore.selectDefaultDashboard().then(({ dashboardId }) => {
|
||||
// console.log('dashboardId', dashboardId)
|
||||
// // if (!history.location.pathname.includes('/metrics')) {
|
||||
// // history.push(withSiteId(dashboardSelected(dashboardId), siteId));
|
||||
// // }
|
||||
// });
|
||||
// }
|
||||
}
|
||||
});
|
||||
}, [siteId]);
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ function CustomMetriTable(props: Props) {
|
|||
const rows = List(data.values);
|
||||
|
||||
const onClickHandler = (event, data) => {
|
||||
console.log('onClickHandler', data);
|
||||
const filters = Array<any>();
|
||||
let filter = { ...filtersMap[metric.metricOf] }
|
||||
filter.value = [data.name]
|
||||
|
|
|
|||
|
|
@ -52,8 +52,6 @@ function CallWithErrors(props: Props) {
|
|||
const test = (value = '', serach) => getRE(serach, 'i').test(value);
|
||||
const _data = search ? metric.data.chart.filter(i => test(i.urlHostpath, search)) : metric.data.chart.images;
|
||||
|
||||
console.log('data', metric.data)
|
||||
|
||||
const write = ({ target: { name, value } }) => {
|
||||
setSearch(value)
|
||||
};
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ function DomBuildingTime(props: Props) {
|
|||
|
||||
const onSelect = (params) => {
|
||||
// const _params = { density: 70 }
|
||||
console.log('params', params) // TODO reload the data with new params;
|
||||
// TODO reload the data with new params;
|
||||
// this.props.fetchWidget(WIDGET_KEY, dashbaordStore.period, props.platform, { ..._params, url: params.value })
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ function ResourceLoadingTime(props: Props) {
|
|||
const onSelect = (params) => {
|
||||
// const _params = { density: 70 }
|
||||
setSutoCompleteSelected(params.value);
|
||||
console.log('params', params) // TODO reload the data with new params;
|
||||
// TODO reload the data with new params;
|
||||
// this.props.fetchWidget(WIDGET_KEY, dashbaordStore.period, props.platform, { ..._params, url: params.value })
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ function ResponseTime(props: Props) {
|
|||
|
||||
const onSelect = (params) => {
|
||||
// const _params = { density: 70 }
|
||||
console.log('params', params) // TODO reload the data with new params;
|
||||
// TODO reload the data with new params;
|
||||
// this.props.fetchWidget(WIDGET_KEY, dashbaordStore.period, props.platform, { ..._params, url: params.value })
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,8 +16,6 @@ function SessionsImpactedBySlowRequests(props: Props) {
|
|||
const { data, metric } = props;
|
||||
const gradientDef = Styles.gradientDef();
|
||||
|
||||
console.log('SessionsImpactedBySlowRequests', metric.data)
|
||||
|
||||
return (
|
||||
<NoContent
|
||||
size="small"
|
||||
|
|
|
|||
|
|
@ -1,114 +0,0 @@
|
|||
import React, { useEffect } from 'react';
|
||||
import { NoContent } from 'UI';
|
||||
import { Styles, AvgLabel } from '../../common';
|
||||
import Scale from './Scale';
|
||||
import { threeLetter } from 'App/constants/countries';
|
||||
import { colorScale } from 'App/utils';
|
||||
import { observer } from 'mobx-react-lite';
|
||||
import * as DataMap from "datamaps";
|
||||
import { numberWithCommas } from 'App/utils';
|
||||
|
||||
// interface Props {
|
||||
// metric?: any
|
||||
// }
|
||||
function SpeedIndexByLocation(props) {
|
||||
const { metric } = props;
|
||||
const wrapper: any = React.useRef(null);
|
||||
let map: any = null;
|
||||
|
||||
const getSeries = data => {
|
||||
const series: any[] = [];
|
||||
data.forEach(item => {
|
||||
const d = [threeLetter[item.userCountry], Math.round(item.avg)]
|
||||
series.push(d)
|
||||
})
|
||||
|
||||
return series;
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
if (wrapper.current && !map && metric.data.chart.length > 0) {
|
||||
const dataset = getDataset();
|
||||
map = new DataMap({
|
||||
element: wrapper.current,
|
||||
fills: { defaultFill: '#E8E8E8' },
|
||||
data: dataset,
|
||||
// responsive: true,
|
||||
// height: null, //if not null, datamaps will grab the height of 'element'
|
||||
// width: null, //if not null, datamaps will grab the width of 'element'
|
||||
geographyConfig: {
|
||||
borderColor: '#FFFFFF',
|
||||
borderWidth: 0.5,
|
||||
highlightBorderWidth: 1,
|
||||
popupOnHover: true,
|
||||
// don't change color on mouse hover
|
||||
highlightFillColor: function(geo) {
|
||||
return '#999999';
|
||||
// return geo['fillColor'] || '#F5F5F5';
|
||||
},
|
||||
// only change border
|
||||
highlightBorderColor: '#B7B7B7',
|
||||
// show desired information in tooltip
|
||||
popupTemplate: function(geo, data) {
|
||||
// don't show tooltip if country don't present in dataset
|
||||
if (!data) { return ; }
|
||||
// tooltip content
|
||||
return ['<div class="hoverinfo speedIndexPopup">',
|
||||
'<strong>', geo.properties.name, '</strong>',
|
||||
'<span>Avg: <strong>', numberWithCommas(data.numberOfThings), '</strong><span>',
|
||||
'</div>'].join('');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}, [])
|
||||
|
||||
useEffect(() => {
|
||||
if (map && map.updateChoropleth) {
|
||||
const series = getSeries(metric.data.chart);
|
||||
// console.log('series', series)
|
||||
// map.updateChoropleth(series, {reset: true});
|
||||
}
|
||||
}, [])
|
||||
|
||||
const getDataset = () => {
|
||||
const { metric } = props;
|
||||
const colors = Styles.colors;
|
||||
|
||||
var dataset = {};
|
||||
const series = getSeries(metric.data.chart);
|
||||
var onlyValues = series.map(function(obj){ return obj[1]; });
|
||||
const paletteScale = colorScale(onlyValues, [...colors].reverse());
|
||||
|
||||
// fill dataset in appropriate format
|
||||
series.forEach(function(item){
|
||||
var iso = item[0], value = item[1];
|
||||
dataset[iso] = { numberOfThings: value, fillColor: paletteScale(value) };
|
||||
});
|
||||
return dataset;
|
||||
}
|
||||
|
||||
return (
|
||||
<NoContent
|
||||
size="small"
|
||||
show={ metric.data.chart.length === 0 }
|
||||
style={ { height: '240px' } }
|
||||
>
|
||||
<div className="w-full flex justify-end">
|
||||
<AvgLabel text="Avg" count={Math.round(metric.data.avg)} unit="ms" />
|
||||
</div>
|
||||
<Scale colors={Styles.colors} />
|
||||
<div
|
||||
style={{
|
||||
height: '220px',
|
||||
width: '90%',
|
||||
margin: '0 auto',
|
||||
display: 'flex',
|
||||
}}
|
||||
ref={ wrapper }
|
||||
/>
|
||||
</NoContent>
|
||||
);
|
||||
}
|
||||
|
||||
export default observer(SpeedIndexByLocation);
|
||||
|
|
@ -27,7 +27,7 @@ function TimeToRender(props: Props) {
|
|||
|
||||
const onSelect = (params) => {
|
||||
// const _params = { density: 70 }
|
||||
console.log('params', params) // TODO reload the data with new params;
|
||||
// TODO reload the data with new params;
|
||||
// this.props.fetchWidget(WIDGET_KEY, dashbaordStore.period, props.platform, { ..._params, url: params.value })
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -80,7 +80,6 @@ function WidgetForm(props: Props) {
|
|||
}
|
||||
|
||||
const onObserveChanges = () => {
|
||||
console.log('observe changes');
|
||||
// metricStore.fetchMetricChartData(metric);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@ function WidgetSessions(props: Props) {
|
|||
|
||||
useEffect(() => {
|
||||
widget.fetchSessions({ ...filter, filter: widget.toJsonDrilldown()}).then(res => {
|
||||
console.log('res', res)
|
||||
setData(res);
|
||||
});
|
||||
}, [filter.startTimestamp, filter.endTimestamp, filter.filters]);
|
||||
|
|
|
|||
|
|
@ -129,7 +129,6 @@ const NodesCountTooltip = ({ active, payload} ) => {
|
|||
const TICKS_COUNT = 10;
|
||||
function generateTicks(data: Array<Timed>): Array<number> {
|
||||
if (data.length === 0) return [];
|
||||
console.log(data, data[0])
|
||||
const minTime = data[0].time;
|
||||
const maxTime = data[data.length-1].time;
|
||||
|
||||
|
|
|
|||
|
|
@ -49,8 +49,6 @@ export default class Player extends React.PureComponent {
|
|||
closedLive,
|
||||
} = this.props;
|
||||
|
||||
console.log('PlayerControls', PlayerControls)
|
||||
|
||||
return (
|
||||
<div
|
||||
className={ cn(className, stl.playerBody, "flex flex-col relative") }
|
||||
|
|
|
|||
|
|
@ -138,7 +138,6 @@ class AttributeValueField extends React.PureComponent {
|
|||
const _showAutoComplete = this.isAutoComplete(filter.type);
|
||||
const _params = _showAutoComplete ? this.getParams(filter) : {};
|
||||
let _optionsEndpoint= '/events/search';
|
||||
console.log('value', filter.value)
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
|
|
|
|||
|
|
@ -298,7 +298,6 @@ export function fetchErrorStackList(sessionId, errorId) {
|
|||
}
|
||||
|
||||
export const fetch = (sessionId, isLive = false) => (dispatch, getState) => {
|
||||
console.log('isLive', isLive)
|
||||
dispatch({
|
||||
types: FETCH.toArray(),
|
||||
call: client => client.get(isLive ? `/assist/sessions/${ sessionId }` : `/sessions2/${ sessionId }`),
|
||||
|
|
|
|||
|
|
@ -76,7 +76,6 @@ export default class MetricStore implements IMetricStore {
|
|||
reaction(
|
||||
() => this.metricsSearch,
|
||||
(metricsSearch) => { // TODO filter the list for View
|
||||
console.log('metricsSearch', metricsSearch)
|
||||
this.page = 1
|
||||
this.paginatedList
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ export default class FilterItem {
|
|||
}
|
||||
|
||||
fromJson(json, mainFilterKey = '') {
|
||||
console.log('fromJson', json.type)
|
||||
let _filter = filtersMap[json.type] || {}
|
||||
if (mainFilterKey) {
|
||||
const mainFilter = filtersMap[mainFilterKey];
|
||||
|
|
|
|||
|
|
@ -200,7 +200,6 @@ export default class Widget implements IWidget {
|
|||
fetchSessions(filter: any): Promise<any> {
|
||||
this.sessionsLoading = true
|
||||
return new Promise((resolve, reject) => {
|
||||
console.log('fetching sessions', filter)
|
||||
metricService.fetchSessions(this.metricId, filter).then(response => {
|
||||
resolve(response.map(cat => {
|
||||
return {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue