Skip to content

Commit

Permalink
Fixed scatter chart stuck #2299
Browse files Browse the repository at this point in the history
Fixed scatter chart stuck when the ms value per pixel is less than 1 ms
  • Loading branch information
koo-taejin committed Dec 7, 2016
1 parent 81ebb90 commit 56eb10d
Showing 1 changed file with 20 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,6 @@

package com.navercorp.pinpoint.web.controller;

import java.util.Collections;
import java.util.List;
import java.util.Map;

import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.util.StopWatch;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import com.navercorp.pinpoint.common.server.bo.SpanBo;
import com.navercorp.pinpoint.common.util.DateUtils;
import com.navercorp.pinpoint.common.util.TransactionId;
Expand All @@ -48,6 +31,22 @@
import com.navercorp.pinpoint.web.vo.LimitedScanResult;
import com.navercorp.pinpoint.web.vo.Range;
import com.navercorp.pinpoint.web.vo.TransactionMetadataQuery;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.util.StopWatch;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import java.util.Collections;
import java.util.List;
import java.util.Map;

/**
* @author netspider
Expand Down Expand Up @@ -152,8 +151,8 @@ public ModelAndView getScatterData(
if (xGroupUnit <= 0) {
throw new IllegalArgumentException("xGroupUnit(" + xGroupUnit + ") must be positive number");
}
if (yGroupUnit <= 0) {
throw new IllegalArgumentException("yGroupUnit(" + yGroupUnit + ") must be positive number");
if (yGroupUnit < 0) {
throw new IllegalArgumentException("yGroupUnit(" + yGroupUnit + ") may not be negative number");
}

limit = LimitUtils.checkRange(limit);
Expand All @@ -167,9 +166,9 @@ public ModelAndView getScatterData(

ModelAndView mv = null;
if (StringUtils.isEmpty(filterText)) {
mv = selectScatterData(applicationName, range, xGroupUnit, yGroupUnit, limit, backwardDirection, version);
mv = selectScatterData(applicationName, range, xGroupUnit, Math.max(yGroupUnit, 1), limit, backwardDirection, version);
} else {
mv = selectFilterScatterData(applicationName, range, xGroupUnit, yGroupUnit, limit, backwardDirection, filterText, version);
mv = selectFilterScatterData(applicationName, range, xGroupUnit, Math.max(yGroupUnit, 1), limit, backwardDirection, filterText, version);
}

if (jsonpCallback == null) {
Expand Down

0 comments on commit 56eb10d

Please sign in to comment.