Skip to content

Commit

Permalink
fix missing stuff from metric form
Browse files Browse the repository at this point in the history
  • Loading branch information
bsjaekel committed Jan 18, 2013
1 parent 79accca commit 14c1b79
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/tsd/client/MetricForm.java
Expand Up @@ -18,20 +18,17 @@
import com.google.gwt.event.dom.client.ClickHandler; import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.DomEvent; import com.google.gwt.event.dom.client.DomEvent;
import com.google.gwt.event.shared.EventHandler; import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.user.client.ui.CheckBox; import com.google.gwt.user.client.ui.*;
import com.google.gwt.user.client.ui.Focusable; import com.google.gwt.event.dom.client.BlurEvent;
import com.google.gwt.user.client.ui.HorizontalPanel; import com.google.gwt.event.dom.client.BlurHandler;
import com.google.gwt.user.client.ui.InlineLabel;
import com.google.gwt.user.client.ui.ListBox;
import com.google.gwt.user.client.ui.SuggestBox;
import com.google.gwt.user.client.ui.VerticalPanel;


final class MetricForm extends HorizontalPanel implements Focusable { final class MetricForm extends HorizontalPanel implements Focusable {


public static interface MetricChangeHandler extends EventHandler { public static interface MetricChangeHandler extends EventHandler {
void onMetricChange(MetricForm widget); void onMetricChange(MetricForm widget);
} }


private final EventsHandler events_handler;
private MetricChangeHandler metric_change_handler; private MetricChangeHandler metric_change_handler;


private final CheckBox downsample = new CheckBox("Downsample"); private final CheckBox downsample = new CheckBox("Downsample");
Expand All @@ -41,9 +38,11 @@ public static interface MetricChangeHandler extends EventHandler {
private final CheckBox x1y2 = new CheckBox("Right Axis"); private final CheckBox x1y2 = new CheckBox("Right Axis");
private final ListBox aggregators = new ListBox(); private final ListBox aggregators = new ListBox();
private final ValidatedTextBox metric = new ValidatedTextBox(); private final ValidatedTextBox metric = new ValidatedTextBox();
private final FlexTable tagtable = new FlexTable();
private TagsPanel tagsPanel; private TagsPanel tagsPanel;


public MetricForm(final EventsHandler handler) { public MetricForm(final EventsHandler handler) {
events_handler = handler;
setupDownsampleWidgets(); setupDownsampleWidgets();
tagsPanel = new TagsPanel(handler); tagsPanel = new TagsPanel(handler);
downsample.addClickHandler(handler); downsample.addClickHandler(handler);
Expand Down Expand Up @@ -357,8 +356,8 @@ private void addTag(final String default_tagname,
final SuggestBox suggesttagk = RemoteOracle.newSuggestBox("tagk", tagname); final SuggestBox suggesttagk = RemoteOracle.newSuggestBox("tagk", tagname);
final ValidatedTextBox tagvalue = new ValidatedTextBox(); final ValidatedTextBox tagvalue = new ValidatedTextBox();
final SuggestBox suggesttagv = RemoteOracle.newSuggestBox("tagv", tagvalue); final SuggestBox suggesttagv = RemoteOracle.newSuggestBox("tagv", tagvalue);
tagname.setValidationRegexp(TSDB_ID_RE); tagname.setValidationRegexp(ClientConstants.TSDB_ID_RE);
tagvalue.setValidationRegexp(TSDB_TAGVALUE_RE); tagvalue.setValidationRegexp(ClientConstants.TSDB_TAGVALUE_RE);
tagname.setWidth("100%"); tagname.setWidth("100%");
tagvalue.setWidth("100%"); tagvalue.setWidth("100%");
tagname.addBlurHandler(recompact_tagtable); tagname.addBlurHandler(recompact_tagtable);
Expand Down

0 comments on commit 14c1b79

Please sign in to comment.