Exemple #1
0
    def __init__(self, *args, **kwargs):
        super(ApplicationBuildForm, self).__init__(*args, **kwargs)
        self.helper = FormHelper()
        self.helper.form_id = 'form-build-application'
        self.helper.form_class = 'form-horizontal'  # FIXME : horizontal?
        self.helper.form_action = reverse('craneui.views.build_application')
        self.helper.help_text_inline = True
        self.fields['hosts'].choices = \
          [(x.id, x.name) for x in get_available_hosts()]

        # FIXME : inline interpreter/version
        self.helper.layout = Layout(
            'os',
            #               Div(
            #                    Div(Field('interpreter', css_class="span12", id="application_interpreter"), css_class="span6"),
            #                    Div(Field('version', css_class="span12", id="application_version", label=""), css_class="span6")
            #               ,css_class="row-fluid"),
            Field('interpreter', id="application_interpreter"),
            Field('version', id="application_version", label=""),
            'application',
            'git_url',
            'port',
            'database_name',
            'before_launch',
            'launch',
            'after_launch',
            'hosts')
Exemple #2
0
      def __init__(self, *args, **kwargs):
          super(ApplicationBuildForm, self).__init__(*args, **kwargs)
          self.helper = FormHelper()
          self.helper.form_id = 'form-build-application'
          self.helper.form_class = 'form-horizontal' # FIXME : horizontal?
          self.helper.form_action = reverse('craneui.views.build_application')
          self.helper.help_text_inline = True
          self.fields['hosts'].choices = \
            [(x.id, x.name) for x in get_available_hosts()]

          # FIXME : inline interpreter/version
          self.helper.layout = Layout(
               'os',
#               Div(
#                    Div(Field('interpreter', css_class="span12", id="application_interpreter"), css_class="span6"),
#                    Div(Field('version', css_class="span12", id="application_version", label=""), css_class="span6")
#               ,css_class="row-fluid"),
               Field('interpreter',id="application_interpreter"),
               Field('version', id="application_version", label=""),
               'application',
               'git_url',
               'port',
               'database_name',
               'before_launch',
               'launch',
               'after_launch',
               'hosts'
               )
Exemple #3
0
 def __init__(self, *args, **kwargs):
     super(OsBuildForm, self).__init__(*args, **kwargs)
     self.helper = FormHelper()
     self.helper.form_id = 'form-build-os'
     self.helper.form_class = 'form-horizontal'  # FIXME : horizontal?
     self.helper.form_action = reverse('craneui.views.build_os')
     self.helper.help_text_inline = True
     self.fields['hosts'].choices = \
       [(x.id, x.name) for x in get_available_hosts()]
Exemple #4
0
 def __init__(self, *args, **kwargs):
     super(OsBuildForm, self).__init__(*args, **kwargs)
     self.helper = FormHelper()
     self.helper.form_id = 'form-build-os'
     self.helper.form_class = 'form-horizontal' # FIXME : horizontal?
     self.helper.form_action = reverse('craneui.views.build_os')
     self.helper.help_text_inline = True
     self.fields['hosts'].choices = \
       [(x.id, x.name) for x in get_available_hosts()]
Exemple #5
0
 def __init__(self, *args, **kwargs):
     super(CreateContainerForm, self).__init__(*args, **kwargs)
     self.helper = FormHelper()
     self.helper.form_id = 'form-create-container'
     self.helper.form_class = 'form-horizontal'
     self.helper.form_action = reverse('craneui.views.create_container')
     self.helper.help_text_inline = True
     self.fields['application'].choices = [('', '----------')] + \
         [x for x in get_application_images()]
     self.fields['hosts'].choices = \
         [(x.id, x.name) for x in get_available_hosts()]
Exemple #6
0
 def __init__(self, *args, **kwargs):
    super(CreateContainerForm, self).__init__(*args, **kwargs)
    self.helper = FormHelper()
    self.helper.form_id = 'form-create-container'
    self.helper.form_class = 'form-horizontal'
    self.helper.form_action = reverse('craneui.views.create_container')
    self.helper.help_text_inline = True
    self.fields['application'].choices = [('', '----------')] + \
        [x for x in get_application_images()]
    self.fields['hosts'].choices = \
        [(x.id, x.name) for x in get_available_hosts()]
Exemple #7
0
      def __init__(self, *args, **kwargs):
          super(InterpreterBuildForm, self).__init__(*args, **kwargs)
          self.helper = FormHelper()
          self.helper.form_id = 'form-build-interpreter'
          self.helper.form_class = 'form-horizontal' # FIXME : horizontal?
          self.helper.form_action = reverse('craneui.views.build_interpreter')
          self.helper.help_text_inline = True
          self.fields['hosts'].choices = \
            [(x.id, x.name) for x in get_available_hosts()]

          # FIXME : inline interpreter/version
          self.helper.layout = Layout(
               'os',
               Field('interpreter', css_class="input-small", id="interpreter_interpreter"),
               Field('version', css_class="input-small", id="interpreter_version", label=""),
               'hosts')
Exemple #8
0
    def __init__(self, *args, **kwargs):
        super(InterpreterBuildForm, self).__init__(*args, **kwargs)
        self.helper = FormHelper()
        self.helper.form_id = 'form-build-interpreter'
        self.helper.form_class = 'form-horizontal'  # FIXME : horizontal?
        self.helper.form_action = reverse('craneui.views.build_interpreter')
        self.helper.help_text_inline = True
        self.fields['hosts'].choices = \
          [(x.id, x.name) for x in get_available_hosts()]

        # FIXME : inline interpreter/version
        self.helper.layout = Layout(
            'os',
            Field('interpreter',
                  css_class="input-small",
                  id="interpreter_interpreter"),
            Field('version',
                  css_class="input-small",
                  id="interpreter_version",
                  label=""), 'hosts')