mirror of
https://github.com/retspen/webvirtcloud
synced 2025-07-31 12:41:08 +00:00
Fixed pep8
This commit is contained in:
parent
b9bf14fdb5
commit
56f840c893
13 changed files with 37 additions and 18 deletions
|
|
@ -8,4 +8,4 @@ class Instance(models.Model):
|
|||
uuid = models.CharField(max_length=36)
|
||||
|
||||
def __unicode__(self):
|
||||
return self.name
|
||||
return self.name
|
||||
|
|
|
|||
|
|
@ -8,4 +8,4 @@ register = template.Library()
|
|||
def class_active(request, pattern):
|
||||
if re.search(pattern, request.path):
|
||||
return 'class="active"'
|
||||
return ''
|
||||
return ''
|
||||
|
|
|
|||
|
|
@ -234,7 +234,7 @@ def instance(request, compute_id, vname):
|
|||
conn.force_shutdown()
|
||||
msg = _("Force Off")
|
||||
addlogmsg(request.user.id, instance.id, msg)
|
||||
return HttpResponseRedirect(request.get_full_path() + '#powerforce')
|
||||
return HttpResponseRedirect(request.get_full_path() + '#powerforce')
|
||||
|
||||
if 'delete' in request.POST:
|
||||
if conn.get_status() == 1:
|
||||
|
|
@ -547,7 +547,7 @@ def inst_graph(request, compute_id, vname):
|
|||
json_net.append({'dev': net['dev'], 'data': [datasets_rx, datasets_tx]})
|
||||
datasets_net[net['dev']] = [datasets_rx, datasets_tx]
|
||||
|
||||
data = json.dumps({'cpudata': datasets['cpu'], 'blkdata': json_blk, 'netdata': json_net, 'timeline': datasets['timer']})
|
||||
data = json.dumps({'cpudata': datasets['cpu'], 'blkdata': json_blk, 'netdata': json_net, 'timeline': datasets['timer']})
|
||||
|
||||
response.cookies['cpu'] = datasets['cpu']
|
||||
response.cookies['timer'] = datasets['timer']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue