<commit_before>.grid-sm
  .panel.panel-default
    p.page-title
      i.fa.fa-refresh(style="color: #e25440;")
      |  Update
.grid-sm
  .panel.panel-default
    .panel-heading.panel-title
      i.fa.fa-globe
      |  Status
    .panel-body
      p(ng-if = '!ctrl.updater.state')
        a.btn.btn-warning: i.fa.fa-question-circle(ng-if = '!ctrl.updater.state', tooltip = 'No update information available')
        | &nbsp;No update information available&nbsp;
        a.btn.btn-default(ng-class = '{disabled: ctrl.updater.isConnected}', ng-click = 'ctrl.update()')
          i.fa.fa-refresh(ng-class = '{"fa-spin": ctrl.updater.isConnected}')
      .form-group(ng-if = 'ctrl.updater.state && ctrl.updater.state === "registerNeeded"')
        a.btn.btn-warning(ng-if = 'ctrl.updater.state === "registerNeeded"'): i.fa.fa-bell-slash(tooltip = 'Your XOA is not registered for updates')
        | &nbsp;Registration needed&nbsp;
        button.btn.btn-default(ng-if = 'ctrl.updater.registerState === "registered"', ng-click = 'ctrl.updater.update()', ng-class = '{disabled: ctrl.updater.updating || ctrl.updater.upgrading}'): i.fa.fa-refresh(ng-class = '{"fa-spin": ctrl.updater.updating || ctrl.updater.upgrading}')
      .form-group(ng-if = 'ctrl.updater.state && ctrl.updater.state !== "registerNeeded"')
        a.btn.btn-info(ng-if = 'ctrl.updater.state === "connected"'): i.fa.fa-question-circle(tooltip = 'Update information may be available')
        a.btn.btn-success(ng-if = 'ctrl.updater.state === "upToDate"'): i.fa.fa-check(tooltip = 'Your XOA is up-to-date')
        a.btn.btn-primary(ng-if = 'ctrl.updater.state === "upgradeNeeded"'): i.fa.fa-bell(tooltip = 'You need to update your XOA (new version is available)')
        a.btn.btn-danger(ng-if = 'ctrl.updater.state === "error"'): i.fa.fa-exclamation-triangle(tooltip = 'Can\'t fetch update information')
        | &nbsp;
        button#update.btn.btn-info(type = 'button', ng-click = 'ctrl.update()', ng-class = '{disabled: ctrl.updater.updating || ctrl.updater.upgrading}')
          | Check for updates&nbsp;
          i.fa.fa-refresh(ng-class = '{"fa-spin": ctrl.updater.updating}')
        | &nbsp;
        button#upgrade.btn.btn-primary(ng-if = 'ctrl.updater.state === "upgradeNeeded"', type = 'button', ng-click = 'ctrl.upgrade()', ng-class = '{disabled: ctrl.updater.updating || ctrl.updater.upgrading}')
          | Upgrade&nbsp;
          i.fa.fa-cog(ng-class = '{"fa-spin": ctrl.updater.upgrading}')
      div
        p(ng-repeat = 'entry in ctrl.updater._log')
          span(ng-class = '{"text-danger": entry.level === "error", "text-muted": entry.level === "info", "text-warning": entry.level === "warning", "text-success": entry.level === "success"}') {{ entry.date }}
          | &nbsp;:&nbsp;
          span(style = 'word-wrap: break-word;', ng-bind-html = 'entry.message | ansitohtml')
  .panel.panel-default
    .panel-heading.panel-title
      i.fa.fa-pencil
      |  Registration
    .panel-body.text-center
      .text-warning(ng-if = '!ctrl.updater.state || ctrl.updater.registerState === "unknown"')
        | No registration information available.
        br
        span.big-stat
          i.fa.fa-exclamation-triangle.text-warning
      div(ng-if = 'ctrl.updater.state && ctrl.updater.registerState === "error"')
        .text-danger Can't fetch registration information.
          br
          span.big-stat
            i.fa.fa-exclamation-triangle.text-danger
        br
        .text-danger {{ ctrl.updater.registerError }}
        br
        button.btn.btn-default(type = 'button', ng-click = 'ctrl.updater.isRegistered()')
          i.fa.fa-refresh
          |  Refresh
      form(ng-if = 'ctrl.updater.state && (ctrl.renewRegister || ctrl.updater.registerState === "unregistered")', ng-submit = 'ctrl.registerXoa(ctrl.regEmail, ctrl.regPwd, ctrl.renewRegister)')
        p.form-static-control(ng-if = '!ctrl.renewRegister') XOA is not registered.
        p.form-static-control(ng-if = 'ctrl.renewRegister')
          | Forget previous registration ?&nbsp;
          button.btn.btn-default(type = 'button', ng-click = 'ctrl.renewRegister = false') Cancel
        p.small Your xen-orchestra.com email and password
        .form-group
          .input-group
            span.input-group-addon: i.fa.fa-envelope-o.fa-fw
            label.sr-only(for = 'regEmail') Email
            input#regEmail.form-control(type = 'email', placeholder = 'Email', ng-model = 'ctrl.regEmail', required)
        .form-group
          .input-group
            span.input-group-addon: i.fa.fa-key.fa-fw
            label.sr-only(for = 'regPwd') Email
            input#regPwd.form-control(type = 'password', placeholder = 'Password', ng-model = 'ctrl.regPwd', required)
        .form-group
          button.btn.btn-primary(type = 'submit')
            i.fa.fa-check
            |  Register
        p.form-static-control.text-danger {{ ctrl.updater.registerError }}
      p(ng-if = 'ctrl.updater.state && ctrl.updater.registerState === "registered" && !ctrl.renewRegister')
        | Your Xen Orchestra appliance is registered to 
        span.text-success {{ ctrl.updater.token.registrationEmail }}
        | .
        br
        br
        i.fa.fa-check-circle.fa-3x.text-success
        br
        br
        button.btn.btn-default(type = 'button', ng-click = 'ctrl.renewRegister = true') Register to someone else ?

.grid-sm(ng-if = 'ctrl.updater.state && ctrl.configuration')
  .panel.panel-default
    .panel-heading.panel-title
      i.fa.fa-cogs
      |  Settings
    .panel-body
      form(ng-submit = 'ctrl.configure(ctrl.configuration.proxyHost, ctrl.configuration.proxyPort, ctrl.configuration.proxyUser, ctrl.configuration.proxyPassword)')
        h4
          i.fa.fa-globe
          |  Proxy settings
        p
          | If you need a proxy to access the Internet&ensp;
          label
            input(type = 'checkbox', ng-model = 'ctrl.withAuth')
            &nbsp;with authentication
        fieldset.form-inline
          .form-group
            //- label.control-label Host:&nbsp;
            input.form-control(type = 'text', ng-model = 'ctrl.configuration.proxyHost', placeholder = 'Host (myproxy.example.org)')
            | &nbsp;
          .form-group
            //- label.control-label Port:&nbsp;
            input.form-control(type = 'text', ng-model = 'ctrl.configuration.proxyPort', placeholder = 'Port (3128 ?...)')
        br
        div(ng-hide = '!ctrl.withAuth')
          fieldset.form-inline(ng-disabled = '!ctrl.withAuth')
            .form-group
              input.form-control(type = 'text', ng-model = 'ctrl.configuration.proxyUser', placeholder = 'User name', required)
              | &nbsp;
            .form-group
              input.form-control(type = 'password', ng-model = 'ctrl.configuration.proxyPassword', placeholder = 'Password')
          br<commit_msg>fix a missing char in the Jade template<commit_after>.grid-sm
  .panel.panel-default
    p.page-title
      i.fa.fa-refresh(style="color: #e25440;")
      |  Update
.grid-sm
  .panel.panel-default
    .panel-heading.panel-title
      i.fa.fa-globe
      |  Status
    .panel-body
      p(ng-if = '!ctrl.updater.state')
        a.btn.btn-warning: i.fa.fa-question-circle(ng-if = '!ctrl.updater.state', tooltip = 'No update information available')
        | &nbsp;No update information available&nbsp;
        a.btn.btn-default(ng-class = '{disabled: ctrl.updater.isConnected}', ng-click = 'ctrl.update()')
          i.fa.fa-refresh(ng-class = '{"fa-spin": ctrl.updater.isConnected}')
      .form-group(ng-if = 'ctrl.updater.state && ctrl.updater.state === "registerNeeded"')
        a.btn.btn-warning(ng-if = 'ctrl.updater.state === "registerNeeded"'): i.fa.fa-bell-slash(tooltip = 'Your XOA is not registered for updates')
        | &nbsp;Registration needed&nbsp;
        button.btn.btn-default(ng-if = 'ctrl.updater.registerState === "registered"', ng-click = 'ctrl.updater.update()', ng-class = '{disabled: ctrl.updater.updating || ctrl.updater.upgrading}'): i.fa.fa-refresh(ng-class = '{"fa-spin": ctrl.updater.updating || ctrl.updater.upgrading}')
      .form-group(ng-if = 'ctrl.updater.state && ctrl.updater.state !== "registerNeeded"')
        a.btn.btn-info(ng-if = 'ctrl.updater.state === "connected"'): i.fa.fa-question-circle(tooltip = 'Update information may be available')
        a.btn.btn-success(ng-if = 'ctrl.updater.state === "upToDate"'): i.fa.fa-check(tooltip = 'Your XOA is up-to-date')
        a.btn.btn-primary(ng-if = 'ctrl.updater.state === "upgradeNeeded"'): i.fa.fa-bell(tooltip = 'You need to update your XOA (new version is available)')
        a.btn.btn-danger(ng-if = 'ctrl.updater.state === "error"'): i.fa.fa-exclamation-triangle(tooltip = 'Can\'t fetch update information')
        | &nbsp;
        button#update.btn.btn-info(type = 'button', ng-click = 'ctrl.update()', ng-class = '{disabled: ctrl.updater.updating || ctrl.updater.upgrading}')
          | Check for updates&nbsp;
          i.fa.fa-refresh(ng-class = '{"fa-spin": ctrl.updater.updating}')
        | &nbsp;
        button#upgrade.btn.btn-primary(ng-if = 'ctrl.updater.state === "upgradeNeeded"', type = 'button', ng-click = 'ctrl.upgrade()', ng-class = '{disabled: ctrl.updater.updating || ctrl.updater.upgrading}')
          | Upgrade&nbsp;
          i.fa.fa-cog(ng-class = '{"fa-spin": ctrl.updater.upgrading}')
      div
        p(ng-repeat = 'entry in ctrl.updater._log')
          span(ng-class = '{"text-danger": entry.level === "error", "text-muted": entry.level === "info", "text-warning": entry.level === "warning", "text-success": entry.level === "success"}') {{ entry.date }}
          | &nbsp;:&nbsp;
          span(style = 'word-wrap: break-word;', ng-bind-html = 'entry.message | ansitohtml')
  .panel.panel-default
    .panel-heading.panel-title
      i.fa.fa-pencil
      |  Registration
    .panel-body.text-center
      .text-warning(ng-if = '!ctrl.updater.state || ctrl.updater.registerState === "unknown"')
        | No registration information available.
        br
        span.big-stat
          i.fa.fa-exclamation-triangle.text-warning
      div(ng-if = 'ctrl.updater.state && ctrl.updater.registerState === "error"')
        .text-danger Can't fetch registration information.
          br
          span.big-stat
            i.fa.fa-exclamation-triangle.text-danger
        br
        .text-danger {{ ctrl.updater.registerError }}
        br
        button.btn.btn-default(type = 'button', ng-click = 'ctrl.updater.isRegistered()')
          i.fa.fa-refresh
          |  Refresh
      form(ng-if = 'ctrl.updater.state && (ctrl.renewRegister || ctrl.updater.registerState === "unregistered")', ng-submit = 'ctrl.registerXoa(ctrl.regEmail, ctrl.regPwd, ctrl.renewRegister)')
        p.form-static-control(ng-if = '!ctrl.renewRegister') XOA is not registered.
        p.form-static-control(ng-if = 'ctrl.renewRegister')
          | Forget previous registration ?&nbsp;
          button.btn.btn-default(type = 'button', ng-click = 'ctrl.renewRegister = false') Cancel
        p.small Your xen-orchestra.com email and password
        .form-group
          .input-group
            span.input-group-addon: i.fa.fa-envelope-o.fa-fw
            label.sr-only(for = 'regEmail') Email
            input#regEmail.form-control(type = 'email', placeholder = 'Email', ng-model = 'ctrl.regEmail', required)
        .form-group
          .input-group
            span.input-group-addon: i.fa.fa-key.fa-fw
            label.sr-only(for = 'regPwd') Email
            input#regPwd.form-control(type = 'password', placeholder = 'Password', ng-model = 'ctrl.regPwd', required)
        .form-group
          button.btn.btn-primary(type = 'submit')
            i.fa.fa-check
            |  Register
        p.form-static-control.text-danger {{ ctrl.updater.registerError }}
      p(ng-if = 'ctrl.updater.state && ctrl.updater.registerState === "registered" && !ctrl.renewRegister')
        | Your Xen Orchestra appliance is registered to 
        span.text-success {{ ctrl.updater.token.registrationEmail }}
        | .
        br
        br
        i.fa.fa-check-circle.fa-3x.text-success
        br
        br
        button.btn.btn-default(type = 'button', ng-click = 'ctrl.renewRegister = true') Register to someone else ?

.grid-sm(ng-if = 'ctrl.updater.state && ctrl.configuration')
  .panel.panel-default
    .panel-heading.panel-title
      i.fa.fa-cogs
      |  Settings
    .panel-body
      form(ng-submit = 'ctrl.configure(ctrl.configuration.proxyHost, ctrl.configuration.proxyPort, ctrl.configuration.proxyUser, ctrl.configuration.proxyPassword)')
        h4
          i.fa.fa-globe
          |  Proxy settings
        p
          | If you need a proxy to access the Internet&ensp;
          label
            input(type = 'checkbox', ng-model = 'ctrl.withAuth')
            |  with authentication
        fieldset.form-inline
          .form-group
            //- label.control-label Host:&nbsp;
            input.form-control(type = 'text', ng-model = 'ctrl.configuration.proxyHost', placeholder = 'Host (myproxy.example.org)')
            | &nbsp;
          .form-group
            //- label.control-label Port:&nbsp;
            input.form-control(type = 'text', ng-model = 'ctrl.configuration.proxyPort', placeholder = 'Port (3128 ?...)')
        br
        div(ng-hide = '!ctrl.withAuth')
          fieldset.form-inline(ng-disabled = '!ctrl.withAuth')
            .form-group
              input.form-control(type = 'text', ng-model = 'ctrl.configuration.proxyUser', placeholder = 'User name', required)
              | &nbsp;
            .form-group
              input.form-control(type = 'password', ng-model = 'ctrl.configuration.proxyPassword', placeholder = 'Password')
          br
{'fraction_non_alphanumeric': 0.1590464459097167, 'fraction_numerical': 0.0015940873849721036, 'mean_word_length': 2.476574307304786, 'pattern_counts': {'":': 16, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4609751', 'n_tokens_mistral': 4442, 'n_tokens_neox': 4431, 'n_words': 760}