~ubuntu-branches/ubuntu/vivid/horizon/vivid

« back to all changes in this revision

Viewing changes to openstack_dashboard/dashboards/project/data_processing/job_binaries/views.py

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2015-03-30 11:12:29 UTC
  • mfrom: (0.14.1) (0.12.2) (76.1.7 vivid-proposed)
  • Revision ID: package-import@ubuntu.com-20150330111229-08du2zlqf9khi4k5
Tags: 1:2015.1~b3-0ubuntu1
* New upstream milestone release:
  - d/control: All version requirements with upstream, drop dependency
    on lockfile.
  - Refresh xstatic assets.
  - d/p/*: Refresh.
* d/pydist-overrides: Add overrides for oslo packages.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
from horizon import tabs
26
26
 
27
27
from openstack_dashboard.api import sahara as saharaclient
 
28
from openstack_dashboard.dashboards.project.data_processing.utils \
 
29
    import helpers
28
30
 
29
31
import openstack_dashboard.dashboards.project.data_processing. \
30
32
    job_binaries.forms as job_binary_forms
40
42
class JobBinariesView(tables.DataTableView):
41
43
    table_class = jb_tables.JobBinariesTable
42
44
    template_name = 'project/data_processing.job_binaries/job_binaries.html'
 
45
    page_title = _("Job Binaries")
43
46
 
44
47
    def get_data(self):
45
48
        try:
55
58
    form_class = job_binary_forms.JobBinaryCreateForm
56
59
    success_url = reverse_lazy(
57
60
        'horizon:project:data_processing.job_binaries:index')
58
 
    classes = ("ajax-modal")
 
61
    classes = ("ajax-modal",)
59
62
    template_name = "project/data_processing.job_binaries/create.html"
 
63
    page_title = _("Create Job Binary")
 
64
 
 
65
    def get_success_url(self):
 
66
        hlps = helpers.Helpers(self.request)
 
67
        if hlps.is_from_guide():
 
68
            self.success_url = reverse_lazy(
 
69
                "horizon:project:data_processing.wizard:jobex_guide")
 
70
        return self.success_url
60
71
 
61
72
 
62
73
class JobBinaryDetailsView(tabs.TabView):
63
74
    tab_group_class = _tabs.JobBinaryDetailsTabs
64
75
    template_name = 'project/data_processing.job_binaries/details.html'
 
76
    page_title = _("Job Binary Details")
65
77
 
66
78
    def get_context_data(self, **kwargs):
67
79
        context = super(JobBinaryDetailsView, self)\