The potential problem is that if you e.g. start with "12h" and want to edit
that to "6h", people often would just start editing the numbers and leave
the letter in place, and it would trigger an extra query for any
intermediate valid result (like "2h" when they've only deleted the "1"
yet). Since queries can be very expensive (in practice, they can often take
15s or longer), I'd really like to avoid that.


On Mon, Jan 13, 2014 at 3:26 PM, stuart nelson <notifications@github.com>wrote:

> In app/views/dashboards/show.html.erb:
>
> > @@ -14,7 +14,7 @@
> >              <i class="icon-minus"></i>
> >            </button>
> >          </span>
> > -        <input type="text" class="form-control" ng-model="globalConfig.range" placeholder="Range">
> > +        <input type="text" class="form-control" ng-model="globalConfig.range" ng-change="setRange()" placeholder="Range">
>
> I noticed that it fired the change on every keystroke, but it didn't seem
> to cause the graphs to display a broken range. When I change from 6d to 6,
> the graphs don't update, but as soon as I add in a time unit like h then
> the graphs do redraw. Putting in garbage like zzdk also does not cause a
> redraw. Have you found any input to break the graphs?
>
> As long as the graphs aren't breaking, I like the eagerness. I can quickly
> change to multiple different ranges without having to add any other input.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/prometheus/promdash/pull/37/files#r8825890>
> .
>