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

Administration UI #24

Open
osma opened this issue Oct 5, 2017 · 7 comments
Open

Administration UI #24

osma opened this issue Oct 5, 2017 · 7 comments
Milestone

Comments

@osma
Copy link
Member

osma commented Oct 5, 2017

We could have a UI for administering most/all aspects of an Annif installation. It would most likely be a single-page dynamic web app that uses the REST API to perform admin functions.

@osma osma added this to the Blue Sky milestone Oct 5, 2017
@superciccio
Copy link

Hi,
I came here from a thread on reddit a guy told me about the administration UI.
I'm still fairly new to python I only have written simple scripts ( connect to firebase download images and then compress them ) for personal use.

I also have a background as Java Web developer, but I want to make a shift to Python so that is that reason.
I've worked mostly with Angular but study by my self also Vue.

My question is, do you need help on this task ? Is something that I can pick up ?

Let me know, I would be happy to help

@osma
Copy link
Member Author

osma commented Jun 19, 2019

Thanks for your kind offer @superciccio !

The current UI is very basic. It was recently reworked a bit by @kinow (the guy from reddit I guess!), changing from jQuery to Vue.JS (see #245). That was merged, but there are still parts of jQuery being used. It would be great to be able to get rid of the rest of jQuery too. I think that's mainly used for performing a couple of different REST API calls. See this comment for some ideas about replacements. So I'd be happy to receive a PR which removes the jQuery dependency and switches over the functionality that VueJS cannot perform to some more lightweight alternative.

Perhaps more related to this issue at hand, eventually I think we want to extend the UI into more administrative functions. Right now it's just a simple form for testing Annif on different documents. However, many UI admin functionalities will require also the REST API to be extended, as right now it's pretty much a read-only API - the real administration happens by editing projects.cfg and executing CLI commands.

An easy starting point would be to add UI functionality for looking at project configuration, similar to the list-projects and show-project CLI commands. This should already be possible with the current REST API, because you can use GET on a project to ask for information about it.

@superciccio
Copy link

Hi @osma

I have some question

Can I update Vue to latest version 2.6.10. Also I see that eveything is inside home.html, can I also do some refactor and export it in a new file ?

Perhaps more related to this issue at hand, eventually I think we want to extend the UI into more administrative functions
Do you have something in mind? Like having pages behind authentication or define user/role in config file ?

It would be great to be able to get rid of the rest of jQuery too
I'll look into, no problem.

An easy starting point would be to add UI functionality for looking at project configuration, similar to the list-projects and show-project CLI commands.
Great !

@osma
Copy link
Member Author

osma commented Jun 19, 2019

Can I update Vue to latest version 2.6.10

I think this should be fine - does @kinow have a comment?

Also I see that eveything is inside home.html, can I also do some refactor and export it in a new file ?

Sure, this would be welcome!

@osma
Copy link
Member Author

osma commented Jun 19, 2019

Ah sorry, I missed some of your questions that looked like quotes.

Do you have something in mind? Like having pages behind authentication or define user/role in config file ?

I think authentication, users and roles are out of scope for now (feel free to disagree, anyone!). I see Annif as mainly a microservice that is used by other systems, not (usually) directly by end users. Any authentication or other types of access control can be handled by a suitable reverse proxy such as nginx. (However, there is limited support for basic access control already: projects can be marked as hidden or private, so they don't show up (hidden) or cannot be used at all (private) via the REST API)

More likely starting points would be adding equivalents of the CLI commands loadvoc and train, i.e. for loading vocabularies and for training models. Both of these would require extending the REST API.

@kinow
Copy link
Collaborator

kinow commented Jun 19, 2019

I think this should be fine - does @kinow have a comment?

+1 from me !

@kinow
Copy link
Collaborator

kinow commented Jun 19, 2019

I think authentication, users and roles are out of scope for now (feel free to disagree, anyone!). I see Annif as mainly a microservice that is used by other systems, not (usually) directly by end users. Any authentication or other types of access control can be handled by a suitable reverse proxy such as nginx. (However, there is limited support for basic access control already: projects can be marked as hidden or private, so they don't show up (hidden) or cannot be used at all (private) via the REST API)

I think it's a good approach for now. It can be added later anyway (and makes the web dev part a bit easier too)

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

No branches or pull requests

3 participants