Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

CIRCLE / cloud

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 94
  • Merge Requests 10
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Merged
Merge request !173 opened Sep 01, 2014 by Kálmán Viktor@kviktor 
  • Report abuse
Report abuse

Template list upgrade and show deleted vms

Closes #234 (closed) Closes #258 (closed)

  • Discussion 4
  • Commits 17
  • Changes
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
  • Őry Máté
    @orymate started a discussion on the diff Sep 01, 2014
    circle/dashboard/views.py
    172 173 return super(FilterMixin,
    173 174 self).get_queryset().filter(**self.get_queryset_filters())
    174 175  
    176 def create_fake_get(self):
    177 """
    178 Updates the request's GET dict to filter the vm list
    179 For example: "name:xy node:1" updates the GET dict
    180 to resemble this URL ?name=xy&node=1
    181
    182 "name:xy node:1".split(":") becomes ["name", "xy node", "1"]
    183 we pop the the first element and use it as the first dict key
    184 then we iterate over the rest of the list and split by the last
    185 whitespace, the first part of this list will be the previous key's
    186 value, then last part of the list will be the next key.
    187 The final dict looks like this: {'name': xy, 'node':1}
    • Őry Máté @orymate commented Sep 01, 2014
      Owner

      make this a doctest

      Edited Sep 02, 2014
      ~~make this a doctest~~
    Please register or sign in to reply
  • Őry Máté
    @orymate started a discussion on an old version of the diff Sep 01, 2014
    circle/dashboard/static/dashboard/vm-list.js
    163 163 $(this).find('input[type="radio"]').prop("checked", true);
    164 164 });
    165 165  
    166 if(checkStatusUpdate()) {
    166 if(checkStatusUpdate() || $("#vm-list-table tbody tr").length >= 100) {
    167 167 updateStatuses(1);
    168 168 }
    169
    170 $("#vm-list-search-checkbox-span").css("cursor", "pointer");
    171
    172 $("#vm-list-search-checkbox-span").click(function(e) {
    • Őry Máté @orymate commented Sep 01, 2014
      Owner

      is this any better than a <label>?

      Edited Sep 02, 2014
      ~~is this any better than a `<label>`?~~
    Please register or sign in to reply
  • Őry Máté @orymate commented Sep 01, 2014
    Owner

    +1

    +1
  • Őry Máté
    @orymate started a discussion on commit 2fc29987 Sep 02, 2014
    circle/dashboard/views.py
    190 190 The final dict looks like this: {'name': xy, 'node':1}
    191 191  
    192 192 >>> f = FilterMixin()
    193 >>> f._parse_get({'s': "hello"}) # doctest: +ELLIPSIS
    194 {u's': u'...', u'name': u'hello'}
    195 >>> f._parse_get({'s': "name:hello owner:test"}) # doctest: +ELLIPSIS
    196 {u'owner': u'test', u's': u'...', u'name': u'hello'}
    197 >>> f._parse_get({'s': "name:hello whitespace node:node 3 oh"})
    198 ... # doctest: +ELLIPSIS
    199 {u'node': u'node 3 oh', u's': u'...', u'name': u'hello whitespace'}
    193 >>> o = f._parse_get({'s': "hello"}).items()
    194 >>> o.sort()
    195 >>> o # doctest: +ELLIPSIS
    • Őry Máté @orymate commented Sep 02, 2014
      Owner

      sorted(o)? ;)

      `sorted(o)`? ;)
    Please register or sign in to reply
  • Őry Máté
    @orymate started a discussion on commit 5035a28d Sep 08, 2014
    • Őry Máté @orymate

      mentioned in issue #279 (closed)

      Sep 08, 2014

      mentioned in issue #279 (closed)

      mentioned in issue #279
      Toggle commit list
    Please register or sign in to reply
  • Write
  • Preview
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment
Assignee
No assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
0
Labels
None
Assign labels
  • View labels
2
2 participants
Reference: circle/cloud!173