1. 01 Sep, 2014 9 commits
    • Alex Pyrgiotis's avatar
      admin: Remove unused imports · 95692332
      Alex Pyrgiotis authored
      95692332
    • Alex Pyrgiotis's avatar
      admin: Use AdminHttp404 in any view necessary · 2ad45f89
      Alex Pyrgiotis authored
      Replace Http404 exception with AdminHttp404 exception in most of the
      views. Also, write a descriptive message in each exception that will be
      shown in 404 page.
      
      Fix apyrgio/synnefo#242
      2ad45f89
    • Alex Pyrgiotis's avatar
      admin: Show project resources properly · 2510170f
      Alex Pyrgiotis authored
      Fix a bug in project/utils.py that displayed resources only for project
      members.
      
      Fix apyrgio/synnefo#241
      2510170f
    • Alex Pyrgiotis's avatar
      admin: Improve loading speed of details page · c5b9ad64
      Alex Pyrgiotis authored
      The improvements are the following:
      
      1. Do not check if <Item>Association has a qs attribute by evaluating
      it, since this will actually evaluate querysets, and for potentially
      large querysets we do not want this.
      2. Use `prefetch_related` to get the resources along with the project
      policies, thereby reducing significantly the number of queries.
      3. Use a resource cache to cache the results of Resource queries, since
      they amount to almost half of the queries.
      
      With the above improvements, the queries where reduced by 40%.
      c5b9ad64
    • Alex Pyrgiotis's avatar
      admin: Return contact info for system projects · 9b7a5d22
      Alex Pyrgiotis authored
      Fix apyrgio/synnefo#214
      Fix apyrgio/synnefo#213
      9b7a5d22
    • Alex Pyrgiotis's avatar
      admin: Show project quotas · d4aee5e0
      Alex Pyrgiotis authored
      Project quotas are shown in two different places:
      
      a) In the project summary, where they have to be displayed horizontally
      and
      b) in the details of a project, where they should be shown vertically.
      
      Besides showing the project quotas properly, we must show and the
      requested project application resources properly, since we currently
      have no direct way to show them.
      
      Therefore, for each project we will show either the latest state of its
      quotas or the latest state of its application resources.
      
      Fix apyrgio/synnefo#215
      d4aee5e0
    • Alex Pyrgiotis's avatar
      admin: Display the pluralized name of resources · 78ee3703
      Alex Pyrgiotis authored
      Fix apyrgio/synnefo#166
      78ee3703
    • Alex Pyrgiotis's avatar
      admin: Rename "Contact mail" to "Contact email" · db95bb77
      Alex Pyrgiotis authored
      Fix apyrgio/synnefo#137
      db95bb77
    • Alex Pyrgiotis's avatar
      admin: Refactor code structure · 10197fdb
      Alex Pyrgiotis authored
      The current code structure was leading to circular imports of the files
      that are responsible for each entity. To solve this, we must break each
      of those files to smaller pieces.
      
      The pieces that each of the files are broken into are:
      
      * views: The functions that implement the views for each entity.
      * actions: The functions that have to do with the actions on each
        entity.
      * filters: The functions that have to do with filtering.
      * utils: Auxiliary functions.
      
      With the new structure, the users' views can import the vms' actions and
      the vms' views can import the users' actions without worrying about
      circular imports.
      10197fdb