first draft to merge the list of machines in a page#20
first draft to merge the list of machines in a page#20sblondon wants to merge 32 commits intoDebian:masterfrom
Conversation
|
I prefer these URLs instead: /machines Please merge the cleaning commit into the first commit. It would be nice if the templates matched what we have already. ldaps is supported by db.debian.org, not sure why you got an error. I don't know django very well, but ISTR that it has a way to map views |
Are you sure about the '/machine/name' instead of the plural version ('/machines/name')? |
|
On Tue, 2016-05-24 at 17:42 -0700, sblondon wrote:
I prefer it but either way works.
Those are about REST APIs, which is not what this patch is about.
That is even more ugly :) bye, |
…nfo about a server
…nt production site
|
In the new commits :
Do you agree with it? It seems that some data are not available in common.models.DebianHost (or __LdapDebianServer) so I can't insert them into the pages. Did I missed something? |
|
On Wed, 2016-05-25 at 16:35 -0700, sblondon wrote:
Thanks.
Please don't create embedded code copies, we will have ud depend on the https://wiki.debian.org/EmbeddedCodeCopies
Which data are you talking about? I guess you will need to add the data Some more comments: These files contain trailing whitespace: src/templates/machines/all.html I would use os.path.join() instead of + "/ The way the urlpatterns stuff is looks weird to me, I especially wonder ROOT_URLCONF shouldn't have two definitions. I would call all_machines list instead. bye, |
|
There are still a lot of stuff to do but there are some news:
I found the debian/links file for userdir-ldap-cgi and copy-pasted it with 'ud' as name. It probably not sufficient but it's a start.
Yes, it was my conclusion. It' probably my next task, competing with understanding why ldaps protocol raises an error (and not ldap).
Fixed.
Fixed.
Yes, it looks weird due to the difference from '/machines' and '/machine/name'. But perhaps you talk about something else?
Fixed.
Do you talk about the file src/templates/machines/all.html? I added transformation from string like '[[gluck.debian.org]]' to '<ahref="gluck.debian.org">gluck.debian.org' too. |
…ge at db.debian.org
|
Is it ok to use javascript for sorting the table of all machines or should I do it server-side? |
|
Additionals info about the machines are added. It seems the LDAP is not available under TLS layer: stephane@foehn:~/src/ud/src$ telnet db.debian.org 389 stephane@foehn:~/src/ud/src$ telnet db.debian.org 686 |
This pull request add 2 urls usables to display data about the machines:
/machines/
/machines/name
They are mapped on 2 differents views and templates.
The code is minimal. I needed to change the LDAP protocol from ldaps to ldap. With ldaps, the request were refused. This modification is not included into the patch.
The html code does not include the mandatory code to be valid (html, body tags). I didn't add it to simplify this code review. I plan to add it later.
After writing it, I think it would be better to include this code and templates in a specific directory (like 'web' or 'www') to separate it from the rest of the application. What do you think about it?
What do you think about the code of the pull/request too?