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

Improvements for the build/version admin #4344

Merged
merged 1 commit into from Jul 16, 2018

Conversation

@davidfischer
Copy link
Contributor

@davidfischer davidfischer commented Jul 9, 2018

While looking at #4001, I noted the pain of using the Django admin to look at builds and versions. These improvements are small improvements to make the admin usable.

  • Project is a raw ID field on Version. Without this, we need to load tens of thousands of projects
  • Select related is used for Build and Versions since foreign key objects are displayed
  • Filtering on projects in the Version admin resulted in loading tens of thousands of projects
  • Use a reasonable list display on Versions
  • Show the version built in the Build admin

Build admin screen

screen shot 2018-07-09 at 11 42 25 am

@davidfischer davidfischer requested a review from Jul 9, 2018
Copy link
Member

@humitos humitos left a comment

I think it's too much useful with these changes!

@@ -13,14 +13,22 @@ class BuildCommandResultInline(admin.TabularInline):

class BuildAdmin(admin.ModelAdmin):
fields = ('project', 'version', 'type', 'state', 'error', 'success', 'length', 'cold_storage')
list_display = ('project', 'success', 'type', 'state', 'date')
list_display = ('id', 'project', 'version_name', 'success', 'type', 'state', 'date')
Copy link
Member

@humitos humitos Jul 10, 2018

nit: I think the id could be removed from this list since I suppose it's not very useful.

Copy link
Member

@humitos humitos Jul 10, 2018

Oh! If we remove the id the link would be the project and it will be confusing. So, I suppose that was what you wanted. In that case, I'm 👍 on leaving it.

I'm sorry.

@davidfischer davidfischer merged commit 2d95d21 into master Jul 16, 2018
1 check passed
@davidfischer davidfischer deleted the davidfischer/build-admin-improvements branch Jul 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants