Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web UI 1.6 #2103

Closed
12 of 14 tasks
markus2330 opened this issue Jun 19, 2018 · 13 comments 路 Fixed by #2107
Closed
12 of 14 tasks

Web UI 1.6 #2103

markus2330 opened this issue Jun 19, 2018 · 13 comments 路 Fixed by #2107
Assignees

Comments

@markus2330
Copy link
Contributor

markus2330 commented Jun 19, 2018

馃憤 many bugs are resolved now but there are still some bugs:

  • creating array bug:
  • click new key
  • enter "array" as name
  • press "CREATE ARRAY"
  • do not open array and press "+" for a subkey
  • BUG: #0 not suggested as name
  • creating two arrays bug:
  • create a new array next to the old array (call it "array2")
  • add a subkey to it (#1)
  • BUG: when refreshing a session in another browser (F5) OR when trying to add a key in the other array, an already existing number is taken
  • (a simple way to reproduce: add keys in two arrays alternating)
  • set values bug
    • change values of array entry
    • add a new array entry
    • BUG: wrong name
  • arrays with different visibility as array members does not work:
  • endless "Loading instance... please wait" when http://localhost:33334/instances/X does not exist
  • undo on metadata still does not work
  • e.g. create a metakey and click "restrict/binary"
  • after undo both are still there, then abort
  • next undo removes the metakey, even though it was done in the different order
  • copying still does not copy (pressing ctrl is the accepted default afaik)
  • no error message if no "kdb find" present
  • not possible to click somewhere in the text (of values) -> Web UI Firefox problems聽#2105

Important functionalities missing:

  • there should be detailed information in showing the full error (for bug reports and similar)
  • removing all keys directly in namespaces missing

Demo:

  • very little mountpoints and data present in Live Demo

Performance/Concurrency:

Something seems to be very wrong how elektrad works. It seems to issue way to many kdb commands. For example:

  • kdb find returns in about 1.5 seconds, elektrad nearly brought my system down (16GB ram swapped), many kdb getmeta were running concurrently. Only killing elektrad helps.
  • You should at least find out what is wrong here.
@omnidan
Copy link
Contributor

omnidan commented Jun 19, 2018

I will look into the array bugs, the problem seems to be that because you do not open the arrays, the metadata is not available yet. I will try to find a way to fix this.

set values bug: change values of array entry, add a new array entry

what is the bug here?

not possible to click somewhere in the text (of values)

this issue only happens on Firefox and I do not know how to fix it. the problem here seems to be having an input field as draggable (which also breaks selecting text in the input field on firefox).

there should be detailed information in showing the full error (for bug reports and similar)

I already said there isn't more information than what kdb prints out via stderr, I am already displaying all information I have about the error.

removing all keys directly in namespaces missing

you mean a feature to remove all keys from a namespace?

very little mountpoints and data present in Live Demo

can you suggest any mountpoints I could add?

copying still does not copy (pressing ctrl is the accepted default afaik)

I implemented it with Alt, but I can probably implement it with Ctrl too.

It seems to issue way to many kdb commands.

as I said before, for every GET operation, there are actually multiple operations happening: kdb get, kdb ls, kdb lsmeta, then kdb getmeta for each metakey. this is why so many operations are happening, but they are all read-operations so they should not be causing conflicts

kdb find returns in about 1.5 seconds, elektrad nearly brought my system down (16GB ram swapped), many kdb getmeta were running concurrently. Only killing elektrad helps.

I only call kdb find and turn the result into a JSON array, there is no special treatment here. I am not sure why it would bring your system down unless kdb find itself took that long to finish.

@markus2330
Copy link
Contributor Author

I will look into the array bugs, the problem seems to be that because you do not open the arrays, the metadata is not available yet. I will try to find a way to fix this.

Thank you!

what is the bug here?

It is also about the name. I updated it.

I already said there isn't more information than what kdb prints out via stderr, I am already displaying all information I have about the error.

I only copied it from #2037, where you crossed it out. So there is a "Details" info now available?

you mean a feature to remove all keys from a namespace?

"user", "system" and so on are also keys (the respective root keys). So actually everything you can do with other keys, can be done there. But remove is the only option which is really necessary.

can you suggest any mountpoints I could add?

  • try to mount all storage plugins
  • try to mount all config files you have lying around
  • everything we have in the real world testcase (blob repo)
  • mount some large hosts/json/XML

If you add all this in the docker, I can test the same things which should be easier for both of us.

I implemented it with Alt, but I can probably implement it with Ctrl too.

Yes, I read it later. But afaik "Alt" is non-standard. And my browser shows a "+" symbol when pressing Ctrl and not on "Alt".

this is why so many operations are happening, but they are all read-operations so they should not be causing conflicts

But nevertheless it should not nearly kill a fast machine.

I am not sure why it would bring your system down unless kdb find itself took that long to finish.

Please look into it with large data yourself. E.g. it is easy to get really large hosts files.

@omnidan
Copy link
Contributor

omnidan commented Jun 19, 2018

I only copied it from #2037, where you crossed it out. So there is a "Details" info now available?

No, I was always showing all details that I have about the error. Which other information do you want me to show?

@markus2330
Copy link
Contributor Author

KDBError

read only plugin, kdbSet not supported: the key system/elektra/version/constants/KDB_VERSION (expected system/elektra/version/constants/KDB_VERSION) was modified to 0.8.25 (expected 0.8.23)

versus:

The command kdb set failed while accessing the key database with the info:
Sorry, the error (#84) occurred ;(
Description: read only plugin, kdbSet not supported
Reason: the key system/elektra/version/constants/KDB_VERSION (expected system/elektra/version/constants/KDB_VERSION) was modified to 0.8.25 (expected 0.8.23)
Ingroup: kdb
Module: 
At: /home/jenkins/workspace/libelektra_master-Q2SIBK3KE2NBEMJ4WVGJXAXCSCB77DUBUULVLZDKHQEV3WNDXBMA/libelektra/src/libs/elektra/plugin.c:420
Mountpoint: system/elektra/version
Configfile:

Btw. it is good that you hide some information (like Ingroup/Module/At) but there should be a way to see everything.

@omnidan
Copy link
Contributor

omnidan commented Jun 20, 2018

Yes, I read it later. But afaik "Alt" is non-standard. And my browser shows a "+" symbol when pressing Ctrl and not on "Alt".

I think this is platform specific. It's exactly the other way around for me. I changed it so that both keys should work. I also tested it on Windows and Ctrl to copy works for me there now.

@omnidan
Copy link
Contributor

omnidan commented Jun 20, 2018

after undo both are still there, then abort

how do you undo before aborting? you cannot press the undo button without confirming the changes (by pressing outside of the dialog or "done"). after confirming the changes pressing undo will undo the last step, not everything you did while the dialog was open (as that information is lost when you close/confirm the dialog). undo/redo always works on a per-command level, so each time you do a kdb setmeta or kdb set is one undo step. Abort reverts all steps that were done since the dialog was opened.

@markus2330
Copy link
Contributor Author

after confirming the changes pressing undo will undo the last step, not everything you did while the dialog was open (as that information is lost when you close/confirm the dialog)

Ok, it is a bit counter-intuitive but certainly something we can live with.

@omnidan
Copy link
Contributor

omnidan commented Jun 21, 2018

removing all keys directly in namespaces missing

I can add this, but then it is possible to delete user which breaks elektra web (as it uses user/sw/elektra/web for its database). Should I delete everything but user/sw/elektra/web or how should I deal with this?

BTW: this is only a problem when webd and elektrad access the same KDB (e.g. run on the same machine)

@markus2330
Copy link
Contributor Author

Delete everything from the namespace except your own configuration. Thus the configuration is hidden from the tree it would be surprising if it gets deleted.

@markus2330
Copy link
Contributor Author

markus2330 commented Jun 23, 2018

Overall it looks very good now! But I found some more bugs/missing features (in v1.6).

  • When creating new entries, remove one entry, and recreating it the correct name is shown (e.g. #4) but when pressing "CREATE" it says that the key already exists.
  • arrays are forgotten once all members are removed (but it should be an empty array)
  • text in some error messages is not copy&paste able (e.g. the error message saying that the key cannot be created)
  • error notifier (very bottom) overlap (sometimes with success+errors), this makes history of success/errors/warnings very unclear
  • it is possible to type characters into numbers (expected: only valid characters should be added)
  • default values are not checked: it is possible to enter invalid entries (wrong types) as default values
  • restrict/remove not honored recursively (if parent gets removed, child is removed too, even though it had "restrict/remove) Wanted behavior: restrict/remove keys do not get removed.

@omnidan
Copy link
Contributor

omnidan commented Jun 25, 2018

text in some error messages is not copy&paste able (e.g. the error message saying that the key cannot be created)

I cannot reproduce this. I checked all kinds of messages (success, error, and the alerts when creating a key that already exists), they are all selectable on both chrome and firefox ESR.

@markus2330
Copy link
Contributor Author

markus2330 commented Jun 25, 2018

Okay, it is minor anyway. I think it was in the message if the key name already existed.

@omnidan
Copy link
Contributor

omnidan commented Jun 25, 2018

@markus2330 I think this might have to do with your UI platform then, because it is the only native dialog. It is selectable for me in macOS (all alert dialogs are), regardless of the browser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants