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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graph Editor - Return message / metadata after executing command #448

Open
santo-it opened this issue Feb 10, 2017 · 5 comments
Open

Graph Editor - Return message / metadata after executing command #448

santo-it opened this issue Feb 10, 2017 · 5 comments
Assignees
Milestone

Comments

@santo-it
Copy link

It seems that queries like CREATE CLASS, CREATE PROPERTY, CREATE INDEX etc are allowed from the Graph Editor

However, when they are successfully executed no messages or metadata are returned

This is an ER to add a message / metadata after the query is executed (e.g. "Query successfully executed in 0.406 sec. "). Maybe in a small text area after the graph panel (?)

This will improve user experience, otherwise it is challenging to understand if the executed command was successful or not

Thanks,

@santo-it santo-it added this to the 3.0 milestone Feb 10, 2017
@wolf4ood
Copy link
Member

hi @santo-it
i'm not sure we should support non idempotent commands. If we do it's not only a problem of notification.

For example

If you create a class from the Graph editor

create class Foo extends V

then try to create a new vertex from the UI you will not find the created class in the dropdown because the metadata are loaded early.

it happens also with edge creation.

@santo-it
Copy link
Author

Hi @maggiolo00 ,

Thanks. I believe a small text area below the canvas will be useful anyway to return metadata about execution of supported queries, like select / match and to inform users about applied limit, e.g.

"Query successfully executed in 0.058 sec. Vertices: N. Edges: M. Limit: 500 (CHANGE IT)"

To understand well when to display that Limit part, in fact, I've just noticed that if you have limit set to 2, and then execute

select * from V limit 10

10 vertices are displayed - so I guess limit 10 has precedence here . Was this intentional or is this a bug? this is something in case we'll need to document

About the dropdown that are not filled with the new classes. Uhm, I guess this is because you check the available classes when the editor is loaded and not the new edge / vertex button is pressed. Was this to optimize speed? Note that this may create a problem anyway: e.g. say users are using both Studio and other connections to the same database (via console or application) and these other connections are creating classes: the new classes won't be showed in the graph editor if user try to add a vertex / edge. I'd rather consider to read list of available classes every time the add vertex / edge windows are created. WDYT?

Assuming we do the way above (may be useful anyway) and we have the text area to display the metadata (may be useful anyway), I think it's okay to keep supporting create class / property etc from the graph editor - unless this causes other issues

WDYT about the points above?

@wolf4ood
Copy link
Member

To understand well when to display that Limit part, in fact, I've just noticed that if you have limit set to 2, and then execute
select * from V limit 10

Yes the limit in the query override the one from the REST API

About the dropdown that are not filled with the new classes. Uhm, I guess this is because you check the available classes when the editor is loaded and not the new edge / vertex button is pressed. Was this to optimize speed? Note that this may create a problem anyway: e.g. say users are using both Studio and other connections to the same database (via console or application) and these other connections are creating classes: the new classes won't be showed in the graph editor if user try to add a vertex / edge. I'd rather consider to read list of available classes every time the add vertex / edge windows are created. WDYT?

I guess we can add an additional fetch of metadata, it will cost an additional amount of time
for the popup to show, but i guess it will affect only big databases with a lot of classes.

Assuming we do the way above (may be useful anyway) and we have the text area to display the metadata (may be useful anyway), I think it's okay to keep supporting create class / property etc from the graph editor - unless this causes other issues

Yes we can add a text area but IMHO we should prevent using other commands than select/match/gremlin since the graph editor uses a specific api that format the result set in a graph way. I'd rather let users edit the graph with the UI

@wolf4ood
Copy link
Member

hi @santo-it

instead of creating a new text area, can't we just use the notification system that we have?

@santo-it
Copy link
Author

Hi @maggiolo00,

Sorry for late reply. I guess that is easier, yes, and probably better than nothing.
We can try and see how it looks.

Thanks,

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

No branches or pull requests

3 participants