zalando-zmon / zmon-controller

ZMON UI and REST API
https://docs.zmon.io/
Other
21 stars 17 forks source link

Tag create does not work with keyboard on dashboard create #209

Closed szuecs closed 8 years ago

szuecs commented 8 years ago

If I want to create a new dashboard, I have to pick a tag to select alerts. If that tag does not exist, then you can create a new tag, but Dashboard create will fail if you are created the tag by writing into tag and hit .

hjacobs commented 8 years ago

I can confirm that the bug exists, it also is broken on https://demo.zmon.io/

hjacobs commented 8 years ago

@elauria can you check please?

elauria commented 8 years ago

zmon-select's directive "close" argument is optional ( declared as "&? " in the scope), and it is not defined in the view (DashboardConfiguration.html). Still the directive wants to call scope.close() on 'select2-close' event, which is emitted when the user hits <>.

As a fix I just added a condition to make sure scope.close() its not undefined.

As to why the directive has this bug is out of my understanding. In any case I would replace it for a newer wrapper of select2 for angular in another issue ( https://github.com/angular-ui/ui-select )