From 79acccae5d382f8bdd745e718ce875b007ed7596 Mon Sep 17 00:00:00 2001 From: Sebastian Jaekel Date: Fri, 18 Jan 2013 16:27:47 +0100 Subject: [PATCH] build fixes --- README | 9 +++++++++ src/graph/Plot.java | 3 +-- src/tsd/client/MetricForm.java | 22 ---------------------- 3 files changed, 10 insertions(+), 24 deletions(-) diff --git a/README b/README index 639c9d8b92..fc644bdcd9 100644 --- a/README +++ b/README @@ -18,3 +18,12 @@ easily store hundreds of billions of data points. OpenTSDB is free software and is available under both LGPLv2.1+ and GPLv3+. Find more about OpenTSDB at http://opentsdb.net + +== Building the antlr stuff == + +1. cd into src/expression +2. run java -classpath ../../build/third_party/antlr/antlr-3.4-complete.jar org.antlr.Tool MetricArithmeticExpression.g MetricArithmeticExpressionTreeWalker.g +3. cd into src base directory +4. run build.sh +5. enjoy + diff --git a/src/graph/Plot.java b/src/graph/Plot.java index 77bc7dd514..156c6d5577 100644 --- a/src/graph/Plot.java +++ b/src/graph/Plot.java @@ -79,8 +79,7 @@ public final class Plot { * Gnuplot always renders timestamps in UTC, so we simply apply a delta * to get local time. */ - private static final int utc_offset = - TimeZone.getDefault().getOffset(System.currentTimeMillis()) / 1000; + private static int utc_offset = TimeZone.getDefault().getOffset(System.currentTimeMillis()) / 1000; /** * Constructor. diff --git a/src/tsd/client/MetricForm.java b/src/tsd/client/MetricForm.java index af6d69d92c..388dafd98e 100644 --- a/src/tsd/client/MetricForm.java +++ b/src/tsd/client/MetricForm.java @@ -393,28 +393,6 @@ private void clearTags() { } } - public void autoSuggestTag(final String tag) { - // First try to see if the tag is already in the table. - final int nrows = tagtable.getRowCount(); - int unused_row = -1; - for (int row = 1; row < nrows; row++) { - final SuggestBox tagname = ((SuggestBox) tagtable.getWidget(row, 1)); - final SuggestBox tagvalue = ((SuggestBox) tagtable.getWidget(row, 2)); - final String thistag = tagname.getValue(); - if (thistag.equals(tag)) { - return; // This tag is already in the table. - } if (thistag.isEmpty() && tagvalue.getValue().isEmpty()) { - unused_row = row; - break; - } - } - if (unused_row >= 0) { - ((SuggestBox) tagtable.getWidget(unused_row, 1)).setValue(tag); - } else { - addTag(tag); - } - } - private final BlurHandler recompact_tagtable = new BlurHandler() { public void onBlur(final BlurEvent event) { int ntags = getNumTags();