1. 30 Jun, 2016 5 commits
  2. 01 Sep, 2014 13 commits
    • Alex Pyrgiotis's avatar
      admin: Create folder for resources · 174b8e8f
      Alex Pyrgiotis authored
      Move the user/vm/project/... folders to a folder called "resources".
    • Alex Pyrgiotis's avatar
    • Alex Pyrgiotis's avatar
      admin: Nascent solution for reversing Astakos urls · 75d8f6a4
      Alex Pyrgiotis authored
      Use a context manager to set and unset the ROOT_URLCONF.
    • Alex Pyrgiotis's avatar
      admin: Replace send_email with send_admin_email · ff3eab91
      Alex Pyrgiotis authored
      Remove any email handling from the actions/views of each model, since
      the `send_admin_email` utility handles these transparently.
    • Alex Pyrgiotis's avatar
      admin: Unify filters · 6f477b9b
      Alex Pyrgiotis authored
      Unify filters for a model field. Each table view has a list of filters,
      one for each associated model. Every filter by default receives a list
      of keywords and filters the respective model using a predefined set of
      The user can override the default fields and define its own using the
      operator "=".
      For example, in a User filter, the query "John" will search by default
      in the following fields: first_name, last_name, uuid. On the other hand,
      the query "first_name=John" will search only in the field specified at
      the left of the "=" operator.
      Fix apyrgio/synnefo#179
    • Alex Pyrgiotis's avatar
      admin: Comment out activation url · a276f544
      Alex Pyrgiotis authored
      The activation url is generated from the URLs that have been defined on
      the astakos node. If the admin node is installed elsewhere, then the
      URLs are useless.
      Comment them out for now until we find a better solution.
    • Alex Pyrgiotis's avatar
      admin: Use a different function to get user quotas · a7fccd56
      Alex Pyrgiotis authored
      Instead of defining our own, we can use the `list_user_quotas` function
      of im.quotas. The only difference that this function has is that it
      expects a list of users. In our case, we just create a list of one
    • Alex Pyrgiotis's avatar
      admin: Update user actions · a08a7430
      Alex Pyrgiotis authored
      Due to the changes in the develop branch, validate_user_action now
      returns a (result, message) tuple. Use it properly to get allowed
    • Alex Pyrgiotis's avatar
      admin: Add RBAC · 7dbf0dc8
      Alex Pyrgiotis authored
      The definition of which groups can author actions is kept in the conf
      file of admin and has the following structure:
      ADMIN_RBAC = {
          'user': {
              'activate': ['admin', 'helpdesk'],
          'vm': {...},
      That is, the main entry point is ADMIN_RBAC, which is a dictionary. The
      first level of this dictionary is the target category of an action, e.g.
      user, vm, volume etc. The second level is the action, which points to a
      list of groups that can author it.
      Fix apyrgio/synnefo#149
    • Alex Pyrgiotis's avatar
      admin: Add support for "Select All" · 875a78a7
      Alex Pyrgiotis authored
      Add support for the "Select All" operation. For this operation, we want
      to provide as much functionality as possible to users, without
      sacrificing speed. This means that we want to give to the user the
      ability to see what he/she would normally see, minus some parts of the
      summary that are not necessary. To do that, we try to optimize our
      queries as much as possible. Below follows our flow for this operation:
      * We check if the Datatables request we receive is unpaginated.
      * If the request is unpagingated, we narrow the QuerySet to the least
        possible fields that we may need.
      * For each row, we use a normal dictionary instead of the OrderedDict.
      * We collect all the necessary info for the actions and then return.
      * Finally, we gzip the response.
      Caveats: Only the users behave normally when selecting more than 1,000
      instances. The other categories have issues with the contact info
      (due to the fact that cyclades' db is in a different node than astakos'
      Fix apyrgio/synnefo#100 and fix apyrgio/synnefo#104
    • Alex Pyrgiotis's avatar
      admin: Fix action errors · 8ca10312
      Alex Pyrgiotis authored
      Fix apyrgio/synnefo#115
    • Alex Pyrgiotis's avatar
      admin: Update action metadata · eae8ad27
      Alex Pyrgiotis authored
      Change reversible to caution_level and adapt the views where necessary.
      Fix apyrgio/synnefo#86
    • 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
      * 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.