CESNET / SecurityCloudGUI

1 stars 0 forks source link

The "date" field under the graph doesn't work well #15

Closed vaclavbartos closed 7 years ago

vaclavbartos commented 7 years ago

There is a text field for setting date and time under the graph. When date&time is selected using a "calendar" button, it correctly moves the center of the graph to the selected time. However, the date&time can also be rewritten manually (which is good) but this doesn't cause any change. There's no way to confirm the new date&time and just leaving the text field does nothing.

Also, the text in the field should probably change when the time range in graph is changes, e.g. by using "<<" and ">>" buttons. In summary, the field should always be consistent with the current view of the graph and vice versa. (At least this is how I understand the purpose of that field.)

nerudaj commented 7 years ago

Originally the box respected the currently selected time slot/window but I was told that it's confusing and I should remove it. The box was not intended to be editable by keyboard and I am not sure whether I just did not forget to prevent any keyboard editing.

nerudaj commented 7 years ago

Ok, the datetimepicker needed the direct access to the element and thus it is editable by anyone. If you want, I can add an update button next to the text area.

vaclavbartos commented 7 years ago

OK, the update button is OK, thanks.

Regarding the updating of the field when the graph is moved by arrow buttons ... Well, it depends on the purpose of the field. If it should tell the current position of the graph, it should get updated whenever the graph is moved. If it should serve only as a way to move the graph to another position, then please add some label (like "Move to:") before it (and an update/submit button after it, which you're going to add anyway). Both variants are OK for me.

(By the way, is it really a problem to make an element non-editable by user but still editable by javascript?)

nerudaj commented 7 years ago

That field is not supposed to track position of cursor. The box in the bottom-left corner was added just to do that job. The label is a good idea, I will add it. It would not be a problem to make it editable by javascript if I was the one who edits the contents. Unfortunately the field is edited by the datetimepicker library and that library expects it to be writable.

nerudaj commented 7 years ago

That update button did not come out as I expected. Luckily the library for datetime picked had an option regarding readonly fields so I made it readonly until I find a better solution. That way it shouldn't confuse users that much.