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
Closed
Merge request !108 opened Jun 30, 2014 by Kálmán Viktor@kviktor 
  • Report abuse
Report abuse

Issue Resource Op

  • Discussion 3
  • Commits 7
  • Changes
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
  • Bach Dániel
    @bachdaniel started a discussion on an old version of the diff Jul 02, 2014
    circle/vm/operations.py
    599 600  
    600 601  
    601 602 register_operation(ScreenshotOperation)
    603
    604
    605 class ResourcesOperation(InstanceOperation):
    606 activity_code_suffix = 'Resources change'
    607 id = 'resources_change'
    608 name = _("resources change")
    609 description = _("Change resources")
    610 acl_level = "owner"
    611 concurrency_check = False
    612
    613 def check_precond(self):
    614 super(ResourcesOperation, self).check_precond()
    615 if self.instance.status in ['RUNNING']:
    • Bach Dániel @bachdaniel commented Jul 02, 2014
      Owner

      if self.instance.status not in ['STOPPED', 'PENDING']:

      if self.instance.status not in ['STOPPED', 'PENDING']:
    Please register or sign in to reply
  • Őry Máté
    @orymate started a discussion on the diff Jul 02, 2014
    circle/dashboard/static/dashboard/vm-details.js
    11 11 /* save resources */
    12 12 $('#vm-details-resources-save').click(function() {
    13 13 $('i.icon-save', this).removeClass("icon-save").addClass("icon-refresh icon-spin");
    14 var vm = $(this).data("vm");
    14 15 $.ajax({
    15 16 type: 'POST',
    16 url: location.href,
    17 url: "/dashboard/vm/" + vm + "/op/resources_change/",
    • Őry Máté @orymate commented Jul 02, 2014
      Owner

      i'd find a way without concatenating strings

      i'd find a way without concatenating strings
    Please register or sign in to reply
  • Őry Máté
    @orymate started a discussion on the diff Jul 02, 2014
    circle/dashboard/views.py
    646 class VmResourcesChangeView(VmOperationView):
    647 op = 'resources_change'
    648 icon = "save"
    649 show_in_toolbar = False
    650
    651 def post(self, request, extra=None, *args, **kwargs):
    652 if extra is None:
    653 extra = {}
    654
    655 resources = {
    656 'num_cores': "cpu-count",
    657 'priority': "cpu-priority",
    658 'ram_size': "ram-size",
    659 "max_ram_size": "ram-size", # TODO
    660 }
    661 for k, v in resources.iteritems():
    • Őry Máté @orymate commented Jul 02, 2014
      Owner

      validation missing

      validation missing
    Please register or sign in to reply
  • Bach Dániel @bachdaniel

    Status changed to closed

    Jul 04, 2014

    Status changed to closed

    Status changed to closed
    Toggle commit list
  • 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
3
3 participants
Reference: circle/cloud!108