<!DOCTYPE html>

  <title>Secure DICOM Nodelist for OsiriX | OsiriX Nodes</title>
  <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true %>
  <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
  <%= csrf_meta_tags %>

        <%= link_to 'OsiriX Nodes', root_url, class: 'navbar-brand' %>

          <% if user_signed_in? %>

<%= link_to 'Sign out', destroy_user_session_path, method: :delete %>

          <% else %>

<%= link_to 'Sign up', new_user_registration_path %>

<%= link_to 'Sign in', new_user_session_path %>

          <% end %>

<%= notice %>

<%= alert %>

       <%= yield %>

  <% if Rails.env.production? %>
    <%= render 'layouts/footer' %>
  <% end %>

<!DOCTYPE html>

  <title>Secure DICOM Nodelist for OsiriX | OsiriX Nodes</title>
  <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true %>
  <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
  <%= csrf_meta_tags %>

        <%= link_to 'OsiriX Nodes', root_url, class: 'navbar-brand' %>

          <% if user_signed_in? %>

<%= link_to 'Sign out', destroy_user_session_path, method: :delete %>

          <% else %>

<%= link_to 'Sign in', new_user_session_path %>

          <% end %>

<%= notice %>

<%= alert %>

       <%= yield %>

  <% if Rails.env.production? %>
    <%= render 'layouts/footer' %>
  <% end %>

Remove sign up link from toolbar

Remove sign up link from toolbar


        <% if parent_taxon.present? %>

            <%= link_to parent_taxon.title, parent_taxon.base_path %>

        <% end %>
        <%= taxon.title %>

<%= taxon.description %>

          <% if parent_taxon.present? %>
            <%= link_to parent_taxon.title, parent_taxon.base_path %>
          <% else %>
            <%= link_to 'Home', Plek.find('www') %>
          <% end %>

        <%= taxon.title %>

<%= taxon.description %>

Add link to Home when no parent taxon exists


<script type="text/javascript">
  window.DEFAULT_SETTINGS = {
    apiUrl: '<%= application_base_url %>',
    csrfToken: '<%= form_authenticity_token %>',
    jwt: '<%= jwt_token %>'
  };
</script>

<%-
  settings = {
    apiUrl: application_base_url,
    csrfToken: form_authenticity_token
  }
  if signed_in?
    settings[:userId] = current_user.id
    settings[:email] = current_user.email
    settings[:displayName] = current_user.display_name
    settings[:jwt] = jwt_token
  end
%>
<script type="text/javascript">
  window.DEFAULT_SETTINGS = <%= settings.to_json.html_safe %>;
</script>

Use json for default settings.

Use json for default settings.


<% if google_maps_qs.present? %>
  <script type='text/javascript' src="//maps.google.com/maps/api/js?<%= google_maps_qs %>&v=3.26"></script>
<% end %>

<% if google_maps_qs.present? %>
  <script type='text/javascript' src="//maps.google.com/maps/api/js?<%= google_maps_qs %>&v=3.27"></script>
<% end %>

Use Google Maps Javascript API v3.27 (stable)


<% stylesheet 'backend/tagit/tagit-autocomplete' %>
<% stylesheet 'backend/tagit/tagit' %>
<% javascript 'backend/tagit.min' %>
<% javascript 'backend/plugins/tagbox' %>
<% javascript 'backend/tags' %>

<% hide_label ||= true %>
<% locale ||= params[:translation_locale] ? params[:translation_locale] : nil %>

<fieldset class="radius">
  <legend><%= t 'b.tags' %></legend>

  <!-- TODO check this markup (I believe this is still bootstrap. -->
  <%= label_tag(:tags, t('b.tags'), class: 'control-label col-sm-2') unless hide_label %>
  <%= text_field_tag :tags, model.tags_string(locale), data: { tagbox: true, items_path: backend_tags_path, locale: locale, type: model.class.name, id: model.id, base_path: backend_tags_path } %>
</fieldset>

<% stylesheet 'backend/tagit/tagit-autocomplete' %>
<% stylesheet 'backend/tagit/tagit' %>
<% javascript 'backend/tagit.min' %>
<% javascript 'backend/plugins/tagbox' %>
<% javascript 'backend/tags' %>

<% hide_label = local_assigns.has_key?(:hide_label) ? local_assigns[:hide_label] : true %>
<% locale = local_assigns.has_key?(:translation_locale) ? local_assigns[:translation_locale] : nil %>

<fieldset class="radius">
  <legend><%= t 'b.tags' %></legend>

  <!-- TODO check this markup (I believe this is still bootstrap. -->
  <%= label_tag(:tags, t('b.tags'), class: 'control-label col-sm-2') unless hide_label %>
  <%= text_field_tag :tags, model.tags_string(locale), data: { tagbox: true, items_path: backend_tags_path, locale: locale, type: model.class.name, id: model.id, base_path: backend_tags_path } %>
</fieldset>

Use the correct way to check for local assigns.


<% if @comment.errors.any? %>
    sweetAlert("Oops...", "<%= @comment.errors.full_messages.to_sentence %>", "error");
<% else %>
    $("#comment_comment").val("");
    $("#<%= dom_id(@repo) %>").find(".commentList").prepend("<%=escape_javascript(render("repos/comment", :comment => @comment))%>");
    $("#<%= dom_id(@comment) %>").effect('highlight', 500);
    $('time[data-time-ago]').timeago();
<% end %>

<% if @comment.errors.any? %>
    sweetAlert("Oops...", "<%= @comment.errors.full_messages.to_sentence %>", "error");
<% else %>
    $("#comment-input").val("");
    $("#<%= dom_id(@repo) %>").find(".commentList").prepend("<%=escape_javascript(render("repos/comment", :comment => @comment))%>");
    $("#<%= dom_id(@comment) %>").effect('highlight', 500);
    $('time[data-time-ago]').timeago();
<% end %>

Fix clearing comment form after comment sent


  <% @tattoos.each do |tat| %>

<a class="th" href=<%= tat.image.url %>> <img src=<%= tat.image.url(:small) %>>

<%= tat.why %>

Artist <%= tat.artist_id %>

Shop: <%= tat.shop_id %>

Date Received: <%= tat.when %>

Favorite it!

  <% end %>

Add block grid to organize pricing tables.


<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
    <title><%= t("site.title", default: "Default Title") %></title>
    <meta http-equiv="description" content="<%= t("site.meta_description", default: "") %>" />
    <meta http-equiv="keywords" content="<%= t("site.meta_keywords", default: "") %>" />
    <%= stylesheet_link_tag    "application", :media => "all" %>
    <%= javascript_include_tag "application" %>
    <%= csrf_meta_tags %>
  </head>
  <body>

  <header>
    <%= render_navigation_menu navigation_menu_for(:header_navigation) %>
  </header>

  <%= yield :title if content_for?(:title) %>
  <%= yield %>

  <footer>
    <%= render_navigation_menu navigation_menu_for(:footer_navigation) %>
  </footer>

  </body>
</html>

<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
    <title><%= t("site.title", default: "Default Title") %></title>
    <meta http-equiv="description" content="<%= t("site.meta_description", default: "") %>" />
    <meta http-equiv="keywords" content="<%= t("site.meta_keywords", default: "") %>" />
    <%= stylesheet_link_tag    "application", :media => "all" %>
    <%= javascript_include_tag "application" %>
    <%= csrf_meta_tags %>
  </head>
  <body>

  <header>
    <%= navigation_menu_with menu: :header_navigation %>
  </header>

  <%= yield :title if content_for?(:title) %>
  <%= yield %>

  <footer>
    <%= navigation_menu_with menu: :footer_navigation %>
  </footer>

  </body>
</html>

Fix dummy app navigation integration

Fix dummy app navigation integration


# Generated by Chef
# host definitions

define host {
  use server
  address <%= node['ipaddress'] %>
  host_name <%= node['hostname'] %>
  hostgroups <%= node['nagios']['server_role'] %>
}

<% @nodes.each do |n| -%>
<% unless n.name == node.name -%>
define host {
  use server
  address <%= n['ipaddress'] %>
  host_name <%= n['hostname'] %>
<% if n.run_list.roles.nil? || n.run_list.roles.length == 0 -%>
  hostgroups all
<% elsif node['nagios']['multi_environment_monitoring'] == "true" -%>
	<% if node['nagios']['multi_os_monitoring'] == "true" -%>
		hostgroups <%= n.run_list.roles.to_a.join(",") %>,<%= n.chef_environment %>,<%= n.os %>
	<% else -%>
	  hostgroups <%= n.run_list.roles.to_a.join(",") %>,<%= n.chef_environment %>
	<% end -%>
<% elsif node['nagios']['multi_os_monitoring'] == "true" -%>
hostgroups <%= n.run_list.roles.to_a.join(",") %>,<%= n.os %>
<% else -%>
  hostgroups <%= n.run_list.roles.to_a.join(",") %>
<% end -%>
}
<% end -%>

<% end -%>

Fix formatting so the ERB writes out correctly

Former-commit-id: a358d315b6eb27c916c12839cc12d17f8d5d68b4 [formerly 9b5c7dac31254afa9a497616162f6fa4622e87fd] [formerly c2c12c072c85a3d42ad11b3b9f1865f9a0e19571 [formerly 6a0453a7558815ed8a59c8b10c5b60d2e4c58906]]
Former-commit-id: 6f8c8e9f0841c58384bb911fd7eefff1b941938b [formerly e354ad533208e8ab14fadf4ad5fe8516d4235140]
Former-commit-id: 31eca9b630e146ea01d196255ce3cb1ffecce5a8


      <% @categories.each do |category| %>

          <%= category[:category] %>
          <%= category[:budget] %>
          <%= category[:spent] %>
          <%= category[:remainder] %>

      <% end %>

      <% @accounts.each do |account| %>

          <%= account[:account] %>
          <%= account[:starting] %>
          <%= account[:ending] %>
          <%= account[:change] %>

      <% end %>

        Deposits
        <%= @totals[:credits] %>

        Expenses
        <%= @totals[:debits] %>

Tweak totals row on month dashboard

Tweak totals row on month dashboard


<% begin %>
  <% classes = [] %>
  <% classes << block.model_name.singular.dasherize %>
  <% classes << 'block' %>
  <% classes << (block.first? ? 'block--first' : '') %>
  <% classes << (block.last? ? 'block--last' : '') %>
  <% classes << "block-category--#{block.class.kind.category.to_s.parameterize}" %>
  <% classes << block.try(:css_class) %>

  <% options = {} %>
  <% options[:id] = block.block_id %>
  <% options[:class] = classes.join(' ') %>
  <% options[:data] = (block.try(:data_attributes).presence || {}).merge(kind: block.model_name.name) %>
  <% options[:style] = block.try(:css_styles) %>

  <%= content_tag :div, **options do %>
    <%= render "blocks/#{block.model_name.singular}/show", block: block %>
  <% end %>
<% rescue Exception => e %>
  <%= forest_admin_error(e) %>
<% end %>

<% begin %>
  <% classes = [] %>
  <% classes << block.model_name.singular.dasherize %>
  <% classes << 'block' %>
  <% classes << (block.first? ? 'block--first' : '') %>
  <% classes << (block.last? ? 'block--last' : '') %>
  <% classes << "block-category--#{block.class.kind.category.to_s.parameterize}" %>
  <% classes << "block-record-type--#{block.class.kind.record_type.to_s.parameterize}" %>
  <% classes << block.try(:css_class) %>

  <% options = {} %>
  <% options[:id] = block.block_id %>
  <% options[:class] = classes.join(' ') %>
  <% options[:data] = (block.try(:data_attributes).presence || {}).merge(kind: block.model_name.name) %>
  <% options[:style] = block.try(:css_styles) %>

  <%= content_tag :div, **options do %>
    <%= render "blocks/#{block.model_name.singular}/show", block: block %>
  <% end %>
<% rescue Exception => e %>
  <%= forest_admin_error(e) %>
<% end %>

Add block record type class to blocks partial


Notes

<% @page.notes.each do |note| %>

    <%= note.body %>
    <%= link_to "edit", edit_note_path(note) if note.user == current_user %>
    <%= link_to "delete", note, :method => :delete, :confirm => "Are you sure?" if note.user == current_user %>

    by: <%= link_to(note.user.display_name, { :controller => "user", :action => "profile", :user_id => note.user.id }) %>

<% end %>

Notes

<% @page.notes.each do |note| %>

    <%= note.body %>
    <%= link_to "edit", edit_note_path(note) if note.user == current_user %>
    <%= link_to "delete", note, :method => :delete, :confirm => "Are you sure?" if note.user == current_user %>

    	by: <%= link_to(note.user.display_name, { :controller => "user", :action => "profile", :user_id => note.user.id }) %>
    	<%= time_ago_in_words(note.created_at)%>  ago

<% end %>

Add relative time to comments on pages

Add relative time to comments on pages


  We aim to cover Federal and ACT public authorities with more State and local authorities coming soon.

  <%= raw(_('Are we missing a public authority?') % [help_requesting_path + '#missing_body']) %>

  <%= link_to _('List of all authorities (CSV)'), all_public_bodies_csv_url() %>

  We aim to cover Federal, ACT and NT public authorities with more State and local authorities coming soon.

  <%= raw(_('Are we missing a public authority?') % [help_requesting_path + '#missing_body']) %>

  <%= link_to _('List of all authorities (CSV)'), all_public_bodies_csv_url() %>

Update Sidebar to include NT

Update Sidebar to include NT


<%= @flow_state.current_question_number %> <%= question.title %>

    <%= form_tag smart_answer_path_for_responses(@flow_state.completed_questions, :edition => nil), :method => :get do %>
      <%= hidden_field_tag :edition, @edition if @edition.present? %>

        <%= raw question.body %>

        <% if @flow_state.error? %>

Please answer this question

        <% end %>

          <% question.options.each do |option| %>

              <label for="response_<%= option.slug %>">
                <%= radio_button_tag "response", option.slug, (option.slug == params[:previous_response]), :id => "response_#{ option.slug }" %>
                <%= option.label %>

          <% end %>

        <button type="submit" class="medium button">Next step</button>

    <% end %>

<%= @flow_state.current_question_number %> <%= question.title %>

    <%= form_tag smart_answer_path_for_responses(@flow_state.completed_questions, :edition => nil), :method => :get do %>
      <%= hidden_field_tag :edition, @edition if @edition.present? %>

        <%= raw question.body %>

        <% if @flow_state.error? %>

Please answer this question

        <% end %>

          <% question.options.each do |option| %>

              <label for="response_<%= option.slug %>" class="selectable">
                <%= radio_button_tag "response", option.slug, (option.slug == params[:previous_response]), :id => "response_#{ option.slug }" %>
                <%= option.label %>

          <% end %>

        <button type="submit" class="medium button">Next step</button>

    <% end %>

Use preferred radio button style in simple smartansers

As per http://govuk-elements.herokuapp.com/#guide-forms use radio buttons
with a large hit area indicated by a grey square. These are easier to select
with a mouse or touch devices.


Thank you for submitting your return request.

Your request will be processed promptly.

Thank you for submitting your return request.

Please allow a few days for processing.

Upon approval, you will receive an Return Authorization Number
and instructions for shipping.

Add additional content to 'return request submitted' email


<% if spree_current_user %>

<%= Spree.t(:logged_in_as) %>: <%= spree_current_user.email %>

<%= link_to Spree.t(:account), spree.edit_user_path(spree_current_user) %>

<%= link_to Spree.t(:logout), spree.admin_logout_path %>

    <% if spree.respond_to? :root_path %>

         <%= link_to Spree.t(:back_to_store), spree.root_path, :target => '_blank' %>

    <% end %>

<% end %>

Swap .inline-menu for specific hook

Swap .inline-menu for specific hook

.inline-menu has some unfortunate baggage, we'll just add a class
to style this guy directly.


#
# Copyright <%= Time.now.year %> YOUR NAME
#
# All Rights Reserved.
#

name "<%= config[:name] %>"
maintainer "CHANGE ME"
homepage "https://CHANGE-ME.com"

install_dir "<%= config[:install_dir] %>"
build_version Omnibus::BuildVersion.semver
build_iteration 1

# creates required build directories
dependency "preparation"

# <%= config[:name] %> dependencies/components
# dependency "somedep"

# version manifest file
dependency "version-manifest"

exclude "\.git*"
exclude "bundler\/git"

#
# Copyright <%= Time.now.year %> YOUR NAME
#
# All Rights Reserved.
#

name "<%= config[:name] %>"
maintainer "CHANGE ME"
homepage "https://CHANGE-ME.com"

install_dir "<%= config[:install_dir] %>"
build_version Omnibus::BuildVersion.semver
build_iteration 1

# creates required build directories
dependency "preparation"

# <%= config[:name] %> dependencies/components
# dependency "somedep"

# version manifest file
dependency "version-manifest"

exclude "**/.git"
exclude "**/bundler/git"

Fix the default exclude pattern in software to prefix **


 #!/bin/bash
 exec 2>&1
 echo 'mq-worker-gerrittypo3org starting.'
 cd "<%= @options[:deploy_base] %>/current/"
 exec chpst -ugerrit:gerrit \
     bundle exec bin/worker

Remove indentation in runsv run file

Remove indentation in runsv run file

that costed me an hour.. idiot.


<%= render :partial => 'spree/admin/shared/order_tabs', :locals => { :current => 'Adjustments' } %>

<% content_for :page_title do %>
    <%= t(:adjustment) %>
<% end %>

<% content_for :page_actions do %>

<%= button_link_to t(:new_adjustment), new_admin_order_adjustment_url(@order), :icon => 'icon-plus' %>

<%= button_link_to t(:back_to_orders_list), admin_orders_path, :icon => 'icon-arrow-left' %>

<% end %>

<%= render :partial => 'adjustments_table' %>

<%= button_link_to t(:continue), @order.cart? ? new_admin_order_payment_url(@order) : admin_orders_url, :icon => 'icon-arrow-right' %>

<%= render :partial => 'spree/admin/shared/order_tabs', :locals => { :current => 'Adjustments' } %>

<% content_for :page_title do %>
    <%= t(:adjustments) %>
<% end %>

<% content_for :page_actions do %>

<%= button_link_to t(:new_adjustment), new_admin_order_adjustment_url(@order), :icon => 'icon-plus' %>

<%= button_link_to t(:back_to_orders_list), admin_orders_path, :icon => 'icon-arrow-left' %>

<% end %>

<%= render :partial => 'adjustments_table' %>

<%= button_link_to t(:continue), @order.cart? ? new_admin_order_payment_url(@order) : admin_orders_url, :icon => 'icon-arrow-right' %>

Fix page title in adjustments/index

Fix page title in adjustments/index


<!DOCTYPE html>

    <title>Guardian</title>
    <%= csrf_meta_tags %>

    <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track': 'reload' %>

    <%= javascript_include_tag 'application' %>

    <% if current_user %>
      <%= link_to('Logout', destroy_user_session_path, :method => :delete) %>
    <% else %>
      <%= link_to 'Register', new_user_registration_path %>
      <%= link_to 'Login', new_user_session_path %>
    <% end %>

<%= notice %>

<%= alert %>

    <%= yield %>

<!DOCTYPE html>
<html>
  <head>
    <title>Guardian</title>
    <%= csrf_meta_tags %>

    <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track': 'reload' %>

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
    <%= javascript_include_tag 'application' %>
  </head>

  <body>
    <%= yield %>
  </body>
</html>

Remove nav buttons from layout

Remove nav buttons from layout


<!DOCTYPE html>
<html>
<head>
  <title>DudeOverflow</title>
  <%= stylesheet_link_tag    'application', media: 'all' %>
  <%= javascript_include_tag 'application' %>
  <%= csrf_meta_tags %>
</head>
<body>
  <% if flash[:notice] %>
    <%= flash[:notice] %>
  <% end %>

<%= yield %>

</body>
</html>

<!DOCTYPE html>
<html>
<head>
  <title>DudeOverflow</title>
  <%= stylesheet_link_tag    'application', media: 'all' %>
  <%= javascript_include_tag 'application' %>
  <%= csrf_meta_tags %>
</head>
<body>
  <% if flash[:notice] %>
    <%= flash[:notice] %>
  <% end %>
  <% if logged_in? %>
    <p> Logged in as: <%= link_to current_user.username, current_user %> </p>
    <%= link_to 'Logout', logout_path, method: 'delete' %>
  <% end %>

<%= yield %>

</body>
</html>

Add logout link if user is logged in

Add logout link if user is logged in


<%= form_for ([:manage, @skill_category, @skill]), :html => { :class => 'form-horizontal' } do |f| %>

    <%= f.label :name, :class => 'control-label col-sm-2' %>

      <%= f.text_field :name, :class => 'text_field form-control' %>

    <%= f.label :skill_category_id, :class => 'control-label col-sm-2' %>

      <%= f.collection_select :skill_category_id, SkillCategory.all, :id, :name, {}, :class => 'text_field form-control' %>

      <%= f.submit nil, :class => 'btn btn-primary' %>
      <%= link_to t('.cancel', :default => t("helpers.links.cancel")),
                    manage_skills_path, :class => 'btn btn-default' %>

<% end %>

<%= form_for ([:manage, @skill_category, @skill]) do |f| %>

    <%= f.label :name, :class => 'control-label' %>
    <%= f.text_field :name, :class => 'text_field form-control' %>

    <%= f.label :skill_category_id, :class => 'control-label' %>
    <%= f.collection_select :skill_category_id, SkillCategory.all, :id, :name, {}, :class => 'text_field form-control' %>

    <%= f.submit nil, :class => 'btn btn-primary' %>
    <%= link_to t('.cancel', :default => t("helpers.links.cancel")),
                  manage_skills_path, :class => 'btn btn-default' %>

<% end %>

Make skills form partial use vertical orientation, not horizontal

Signed-off-by: Max Fierke <0706025b2bbcec1ed8d64822f4eccd96314938d0@maxfierke.com>


#!/bin/bash -e

set -e

job_dir=/var/vcap/jobs/cf-mysql-broker
run_dir=/var/vcap/sys/run/quota-enforcer
log_dir=/var/vcap/sys/log/quota-enforcer
package_dir=/var/vcap/packages/quota-enforcer
pidfile=$run_dir/quota-enforcer.pid

source /var/vcap/packages/common/utils.sh

case $1 in

  start)
    pid_guard $pidfile "quota-enforcer"

    mkdir -p $run_dir
    mkdir -p $log_dir

    echo $$ > $pidfile

    $package_dir/bin/cf-mysql-quota-enforcer \
        -configPath=$job_dir/bin/quota_enforcer_config.yml \
     >>$log_dir/quota_enforcer.stdout.log 2>>$log_dir/quota_enforcer.stderr.log
    ;;

  stop)
    kill_and_wait $pidfile
    ;;

  *)
    echo "Usage: cf-mysql-quota-enforcer_ctl {start|stop}"
    ;;

esac

#!/bin/bash -e

set -e

job_dir=/var/vcap/jobs/cf-mysql-broker
run_dir=/var/vcap/sys/run/quota-enforcer
log_dir=/var/vcap/sys/log/quota-enforcer
package_dir=/var/vcap/packages/quota-enforcer
pidfile=$run_dir/quota-enforcer.pid

source /var/vcap/packages/common/utils.sh

case $1 in

  start)
    pid_guard $pidfile "quota-enforcer"

    mkdir -p $run_dir
    mkdir -p $log_dir

    $package_dir/bin/cf-mysql-quota-enforcer \
        -pidFile=$pidfile \
        -configPath=$job_dir/bin/quota_enforcer_config.yml \
     >>$log_dir/quota_enforcer.stdout.log 2>>$log_dir/quota_enforcer.stderr.log
    ;;

  stop)
    kill_and_wait $pidfile
    ;;

  *)
    echo "Usage: cf-mysql-quota-enforcer_ctl {start|stop}"
    ;;

esac

Write PID of quota-enforcer process rather than wrapper script.

- Quota-enforcer process now writes own pid to pidfile
- Allows monit to kill and restart the enforcer process rather than the
wrapper

[Fixes #99640614]

Signed-off-by: Frank Kotsianas <46dc4204864162cbc55f90455292577144d430e9@pivotal.io>


Add new post

	We will add new post here

Add new post

	<form>
		<textarea class="form-control" rows="6"></textarea>

	  	<button type="submit" class="btn btn-primary">Submit</button>
	</form>

Add text area and button

Add text area and button


---
vapps:
  - name: <%= vapp_name %>
    vdc_name: <%= vdc_name %>
    catalog: <%= catalog %>
    catalog_item: <%= vapp_template %>
    vm:
      hardware_config:
        memory: 4096
        cpu: 2
      metadata:
        is_integer: -999
        is_string: Hello World
        is_datetime: <%= date_metadata %>
        is_true: true
        is_false: false
        integration_test_vm: true
      extra_disks:
      - size: '1024'
        name: Hard disk 2
      - size: '2048'
        name: Hard disk 3
      network_connections:
      - name: <%= network1 %>
        ip_address: <%= network1_ip %>
      - name: <%= network2 %>
        ip_address: <%= network2_ip %>
      bootstrap:
        script_path: <%= bootstrap_script %>
        vars:
          message: hello world
      storage_profile:
        name: <%= storage_profile %>
        href: <%= storage_profile_href %>

Remove href from example input

Remove href from example input


<%= Alchemy.t('Filter') %>

    <%= select_tag(
      'resource_filter',
      options_for_select(
        resource_filter_select, search_filter_params[:filter]
      ),
      include_blank: Alchemy.t(:all, scope: ['resources', resource_name, 'filters']),
      data: { remote: !!request.xhr? },
      class: 'alchemy_selectbox'
    ) %>

<%= local_assigns[:label] || Alchemy.t('Filter') %>

    <%= select_tag(
      'resource_filter',
      options_for_select(
        resource_filter_select, search_filter_params[:filter]
      ),
      include_blank: Alchemy.t(:all, scope: ['resources', resource_name, 'filters']),
      data: { remote: !!request.xhr? },
      class: 'alchemy_selectbox'
    ) %>

Allow to pass a label into filter bar partial


#!/bin/sh

# DO NOT EDIT - This file is being maintained by Chef

T=$(mktemp -d -t -p /var/tmp lists.XXXXXXXXXX)
D=$(date +%Y-%m-%d)
B=lists-$D.tar.gz

mkdir $T/lists-$D
ln -s /var/lib/mailman $T/lists-$D/mailman

export RSYNC_RSH="ssh -ax"

nice tar --create --dereference --directory=$T lists-$D | nice gzip --rsyncable -9 > $T/$B
nice rsync --preallocate --fuzzy $T/$B backup::backup

rm -rf $T

#!/bin/sh

# DO NOT EDIT - This file is being maintained by Chef

T=$(mktemp -d -t -p /var/tmp lists.XXXXXXXXXX)
D=$(date +%Y-%m-%d)
B=lists-$D.tar.gz

mkdir $T/lists-$D
ln -s /var/lib/mailman $T/lists-$D/mailman

export RSYNC_RSH="ssh -ax"

nice tar --create --dereference --warning=no-file-changed --directory=$T lists-$D | nice gzip --rsyncable -9 > $T/$B
nice rsync --preallocate --fuzzy $T/$B backup::backup

rm -rf $T

Disable file changed warnings for mailman backup


<%= div_for suggestion, :class => 'excursion-home' do %>

      <%= link_to excursion_thumb_for(suggestion, 130), suggestion, :class => "container" %>

          <%= excursion.slide_count %>

          <%= link_to suggestion.title, suggestion %>

          <%= truncate suggestion.description, :length => 90 %>

<% end %>

<%= div_for suggestion, :class => 'excursion-home' do %>

      <%= link_to excursion_thumb_for(suggestion, 130), suggestion, :class => "container" %>

          <%= suggestion.slide_count %>

          <%= link_to suggestion.title, suggestion %>

          <%= truncate suggestion.description, :length => 90 %>

<% end %>

Fix excursion sugestions. Heads up @juanka0087 for variable names


<!doctype html>
<title>Brushing Example</title>
<link rel="stylesheet" type="text/css" href="/stylesheets/d3.parcoords.css">
<link rel="stylesheet" type="text/css" href="/stylesheets/style.css">

 A zip code's share (%) of businesses of each type

<button id="btnReset">Reset Brushes</button>

<!doctype html>
<title>Brushing Example</title>
<link rel="stylesheet" type="text/css" href="/stylesheets/d3.parcoords.css">
<link rel="stylesheet" type="text/css" href="/stylesheets/style.css">

 A count of businesses by Miami zip code

<button id="btnReset">Reset Brushes</button>

Make title text match graph

Make title text match graph


      <% @table.columns.each do |column| %>
        <%= column %>
      <% end %>

    <% @records.each do |record| %>

        <% record.each do |key, value| %>
          <% type = @schema[key][:db_type] %>

          <% if type == 'text' %>

              <textarea style="max-width: 200px"><%= CGI.escapeHTML(value.to_s) %></textarea>

          <% elsif type.match /integer|numeric/ %>

              <input value="<%= CGI.escapeHTML(value.to_s) %>" style="max-width: 300px; text-align: right">

          <% else %>

              <input value="<%= CGI.escapeHTML(value.to_s) %>" style="max-width: 300px">

          <% end %>
        <% end %>

    <% end %>

      <% @table.columns.each do |column| %>
        <%= column %>
      <% end %>

    <% @records.each do |record| %>

        <% record.each do |key, value| %>
          <% type = @schema[key][:db_type] %>

          <% if type.match /text|hstore/ %>

              <textarea style="max-width: 200px"><%= CGI.escapeHTML(value.to_s) %></textarea>

          <% elsif type.match /integer|numeric/ %>

              <input value="<%= CGI.escapeHTML(value.to_s) %>" style="max-width: 300px; text-align: right">

          <% else %>

              <input value="<%= CGI.escapeHTML(value.to_s) %>" style="max-width: 300px">

          <% end %>
        <% end %>

    <% end %>

Use textareas for `hstore` columns

Use textareas for `hstore` columns


<%
  # One minute corresponds to 3 pixels => 1 pixel is 20 seconds
  height = (performance.duration.to_f / 20).round
  margin = ((performance.rounded_duration - performance.duration).to_f / 20).round
  if performance.stage_time
    top = (performance.stage_time.hour - 9) * 180 + performance.stage_time.min * 3
  else
    # List unscheduled performances in 20 min distance
    top = performance_counter * 60 + 120
  end

  mouseover_text = ""
  # Add participant names to mouseover text
  performance.participants.each do |p|
    mouseover_text << p.full_name
    mouseover_text << ", " unless p == performance.participants.last
  end
%>
<div
  id="<%= performance.id %>"
  data-category-id="<%= performance.category.id %>"
  class="draggable-performance"
  style="height: <%= height %>px; margin-bottom: <%= margin %>px; top: <%= top %>px;"
  title="<%= mouseover_text %>"
>

    <%= l performance.stage_time, format: :time unless performance.stage_time.nil? %>
    <%= performance.category.slug %>
    <%= performance.age_group %>

    <%= format_duration(performance.duration) %>

<%
  # One minute corresponds to 3 pixels => 1 pixel is 20 seconds
  height = (performance.duration.to_f / 20).round
  margin = ((performance.rounded_duration - performance.duration).to_f / 20).round
  if performance.stage_time
    top = (performance.stage_time.hour - 9) * 180 + performance.stage_time.min * 3
  else
    # List unscheduled performances in 20 min distance
    top = performance_counter * 60 + 120
  end

  mouseover_text = ""
  # Add participant names to mouseover text
  performance.participants.each do |p|
    mouseover_text << p.full_name
    mouseover_text << ", " unless p == performance.participants.last
  end
%>
<div
  id="<%= performance.id %>"
  data-category-id="<%= performance.category.id %>"
  class="draggable-performance"
  style="height: <%= height %>px; margin-bottom: <%= margin %>px; top: <%= top %>px;"
  title="<%= mouseover_text %>"
>

    <%= l performance.stage_time, format: :time unless performance.stage_time.nil? %>
    <%= performance.category.slug %>
    <%= performance.age_group %>

  <%= flag_tag performance.associated_country.try(:country_code) %>

    <%= format_duration(performance.duration) %>

Add country flags to scheduler performances


<%= c.hidden_field :id %>
<%= c.hidden_field :question_group_id %>

Column #<%= 1 + c.index %> heading

  <%=  c.input :text, as: :string, label: false, placeholder: "column #{1+c.index}"  %>

Column #<%=1 + c.index %> choices

  <%=  c.input  :answers_textbox, :as => :text,
                :wrapper_html => {:class=>'answers_collection'}, :label => false %>

Fix issue in grid dropdown forms.

Fix issue in grid dropdown forms.

Not sure how this snuck in.  Missing br.


      Flynn

          <li class="<%= active_nav_class("/") %>">
            Hello

          <li class="<%= active_nav_class("/docs") %>">
            Docs

          <li class="<%= active_nav_class("/blog") %>">
            Blog

          <li class="<%= active_nav_class("/docs/architecture") %>">
            Architecture

          <li class="<%= active_nav_class("/docs/roadmap") %>">
            Roadmap

          <li class="<%= active_nav_class("/docs/contributing") %>">
            Contributing

website: Add nav links (Architecture, Roadmap, Contributing)


License

<% if @resource.current_state.blank? || @resource.rights.empty? %>

    This work will be licensed under a
    <% lic = StashEngine::License.by_id(current_tenant.default_license) %>
    <%= link_to lic['name'], lic['uri'] %> license.

<% elsif @resource.current_state.resource_state == 'in_progress' %>
    <% @resource.rights.each do |r| %>

        This work will be licensed under a
        <%= link_to r.rights, r.rights_uri %> license.

    <% end %>
<% end %>

License

<% if @resource.current_state.blank? || @resource.rights.empty? %>
  <%= render partial: "licenses/#{current_tenant.default_license}_review" %>
<% elsif @resource.current_state.resource_state == 'in_progress' %>
    <% @resource.rights.each do |r|
      l_id = StashEngine::License.by_uri(r.rights_uri)['id'] %>
      <%= render partial: "licenses/#{l_id}_review" %>
    <% end %>
<% end %>

Use a different partial for displaying of license in review rather than the same as in landing page because they are different text and layout.


<%# encoding: utf-8 %>
window.I18nViz = {
  regex:             new RegExp(/--([a-z0-9_\.]+)--/i),
  global_regex:      new RegExp(/--([a-z0-9_\.]+)--/gi),
  external_tool_url: '<%= I18nViz.external_tool_url %>'
}

Fix encoding issue (raised by ERB) happening when providing URLs containing UTF-8 characters.

This commit fix #2


<%= require "json"; JSON.pretty_generate({
  type: "service_account",
  project_id: @project_id,
  private_key_id: @private_key_id,
  private_key: @private_key,
  client_email: @client_email,
  client_id: @client_id,
  auth_uri: "https://accounts.google.com/o/oauth2/auth",
  token_uri: "https://accounts.google.com/o/oauth2/token",
  auth_provider_x509_cert_url: "https://www.googleapis.com/oauth2/v1/certs",
  client_x509_cert_url: @client_x509_cert_url,
}) %>

Use JSON module to generate valid JSON

Use JSON module to generate valid JSON

Currently we use erb to expand variables into strings in the JSON
for Google API credentials. This can sometimes end up generating
malformed JSON (specifically in the case where the private key
contains newline characters because JSON doesn't support multiline
strings). Instead of generating JSON in this way we can let the
JSON library generate the JSON blob thus handling all the special
cases of JSON for us.


$("<%= escape_javascript(render(:partial=>'each_note',:locals=>{:note=>@note})) %>").prependTo("#all-notes").hide().fadeIn(1000);
$("#tags").html("<%= escape_javascript(render(:partial=>'tags',:locals=>{:tags=>@tags})) %>");
var all_notes = document.querySelector('#all-notes');
var first_note = all_notes.children[0];
loadContentColors([first_note]);

//insert error messages accordingly
<% if !flash[:notice].blank? %>
    $("#flash").html("
<%= escape_javascript(flash[:notice]) %>
");
    <%= flash[:notice] = nil %>
<% elsif !flash[:alert].blank? %>
    $("#flash").html("
<%= escape_javascript(flash[:alert]) %>
");
    <%= flash[:alert]=nil %>
<% elsif !flash[:warning].blank? %>
    $("#flash").html("
<%= escape_javascript(flash[:warning]) %>
");
    <%= flash[:warning] = nil %>
<% end %>

$("<%= escape_javascript(render(:partial=>'each_note',:locals=>{:note=>@note})) %>").prependTo("#all-notes").hide().fadeIn(1000);
$("#tags").html("<%= escape_javascript(render(:partial=>'tags',:locals=>{:tags=>@tags})) %>");
var all_notes = document.querySelector('#all-notes');
var first_note = all_notes.children[0];
loadContentColors([first_note]);

//empty the textbox after creation
var textBox = document.getElementById('new-note');

textBox.value='';
//insert error messages accordingly
<% if !flash[:notice].blank? %>
    $("#flash").html("
<%= escape_javascript(flash[:notice]) %>
");
    <%= flash[:notice] = nil %>
<% elsif !flash[:alert].blank? %>
    $("#flash").html("
<%= escape_javascript(flash[:alert]) %>
");
    <%= flash[:alert]=nil %>
<% elsif !flash[:warning].blank? %>
    $("#flash").html("
<%= escape_javascript(flash[:warning]) %>
");
    <%= flash[:warning] = nil %>
<% end %>

Fix Empty the textbox after note creation


<%= image_tag("BHC Strapline.jpg", alt: "BHC Strapline", id: "strapline") %>

<%= image_tag("BHC Strapline.jpg", alt: "BHC Strapline", id: "strapline", class: "img-responsive center-block") %>

Change logic to centre login image

Change logic to centre login image


/var/log/containers/*/*log /var/log/containers/*/*/*log {
  <%= @rotation %>
  rotate <%= @rotate %>
  maxage <%= @purge_after_days %>
  # minsize 1 is required for GDPR compliance, all files in
  # /var/log/containers not managed with logrotate will be purged!
  minsize 1
  # Do not use size as it's not compatible with time-based rotation rules
  # required for GDPR compliance.
  maxsize <%= @maxsize %>
  missingok
  notifempty
<%- if @delaycompress %>
  delaycompress
<%- end %>
<%- if @compress %>
  compress
<%- end %>
  sharedscripts
  postrotate
    /usr/bin/find /var/log/containers -type f \
    \( -mtime +<%= @purge_after_days %> -or \
    -atime +<%= @purge_after_days %> -or \
    -ctime +<%= @purge_after_days %> \) -exec rm -f {} \;;
    /sbin/lsof -nPs +L1 +D /var/log/containers 2>&1|\
    awk '/\S+\s+[0-9]+\s.*\/var\/log\/containers\/.*\(deleted\)/ {print $2}' |\
    sort -u | /bin/xargs -n1 -r -t kill -HUP
  endscript
}

/var/log/containers/*/*log /var/log/containers/*/*/*log {
  <%= @rotation %>
  rotate <%= @rotate %>
  maxage <%= @purge_after_days %>
  # minsize 1 is required for GDPR compliance, all files in
  # /var/log/containers not managed with logrotate will be purged!
  minsize 1
  # Do not use size as it's not compatible with time-based rotation rules
  # required for GDPR compliance.
  maxsize <%= @maxsize %>
  missingok
  notifempty
<%- if @delaycompress %>
  delaycompress
<%- end %>
<%- if @compress %>
  compress
<%- end %>
  sharedscripts
  postrotate
    /usr/bin/find /var/log/containers -type f \
    \( -mtime +<%= @purge_after_days %> -or \
    -atime +<%= @purge_after_days %> -or \
    -ctime +<%= @purge_after_days %> \) -exec rm -f {} \;;
    /sbin/lsof -nPs +L1 +D /var/log/containers 2>/dev/null|\
    grep -v /var/log/httpd/ |\
    awk '/\S+\s+[0-9]+\s.*\/var\/log\/.*\(deleted\)/ {print $2}' |\
    sort -u | /bin/xargs -n1 -r -t kill -HUP;
    /sbin/lsof -nPs +L1 +D /var/log/containers 2>/dev/null|\
    awk '/\S+\s+[0-9]+\s.*\/var\/log\/httpd\/.*\(deleted\)/ {print $2}' |\
    sort -u | /bin/xargs -n1 -r -t kill -USR1
  endscript
}

Fix postrotate filter and httpd reloading signal

The change I5029a4b9c76268455812696290aaf82f1a0c2c23 had caused a
regression so that the filter is stopped working and matches nothing.

The postscript command is executed inside of the logrotate-crond
container, like this way:

()[root@5c78303fb8c2 /]# /sbin/lsof -nPs +L1 +D /var/log/containers
2>&1 | awk '/\S+\s+[0-9]+\s.*\/var\/log\/.*\(deleted\)/ {print}'

neutron-s ... /var/log/neutron/server.log.1 (deleted)
httpd .../var/log/httpd/keystone_wsgi_admin_access.log.1 (deleted)

So you can see that the real path should be examined for deleted
(open and unlined) logs is /var/log/ and not /var/log/containers. The
latter is only used to apply the logrotation over the bind-mounted
host path. It cannot affect any host logs outside of
/var/log/containers, so the change
I5029a4b9c76268455812696290aaf82f1a0c2c23 needs to be partially
discarded.

Additionally, send USR1 instead of HUP to reload httpd in containers
gracefully. That part follows-up the reverted
I15fa0eab1625ac63fd57b6a6d5cd22a6ac85f221 as we want to keep that
change and it fits the subject bug scope as well.

Change-Id: Ibb017463b0fbbccda035aeb1fff5f6998bbf2d1e
Closes-Bug: #1776533
Related-Bug: #1785659


<%= javascript_include_tag "application" %>
<% if Dir.exists? "lib/registration_engine/app/assets" %>
<%= javascript_include_tag "registration_engine/application" %>
<% end %>

Include registration JS if exists

Include registration JS if exists


<% provide(:title, @user.name) %>

Home

  <%= @user.feedback_due %>
  <% if @user.feedback_due <= Date.today %>
      Your feedback was due <%= (Date.today - @user.feedback_due).to_i %> day(s) ago

      <%= link_to 'Leave feedback', new_feedback_path %>
  <% else %>
      Your feedback is due in <%= (@user.feedback_due - Date.today).to_i %> day(s)
  <% end %>

  <% @user.initiatives.each do |i| %>

<%= link_to i.name, i %>

      <% i.users.each do |x| %>
          <%= link_to x.name, x %>
          <% if x.privilege == 1 %>
              <%= x.telephone %>
          <% end %>
      <% end %>

<%= i.location %>

<%= i.description %>

  <% end %>

<% provide(:title, @user.name) %>

Home

  <% if @user.feedback_due <= Date.today %>
      Your feedback was due <%= (Date.today - @user.feedback_due).to_i %> day(s) ago

      <%= link_to 'Leave feedback', new_feedback_path, class: 'btn btn-success' %>
  <% else %>
      Your feedback is due in...

      <%= link_to (Date.today - @user.feedback_due).to_i.to_s + ' days', new_feedback_path, class: 'btn btn-warning disabled' %>
  <% end %>

  <% @user.initiatives.each do |i| %>

<%= link_to i.name, i %>

      <% i.users.each do |x| %>
          <%= link_to x.name, x %>
          <% if x.privilege == 1 %>
              <%= x.telephone %>
          <% end %>
      <% end %>

<%= i.location %>

<%= i.description %>

  <% end %>

Add styling to feedback button(s).

Add styling to feedback button(s).


<%= paginator.render do %>
  <nav class="text-xs-center">
    <ul class="pagination">
      <%= first_page_tag unless current_page.first? %>
      <%= prev_page_tag unless current_page.first? %>
      <% each_page do |page| %>
        <% if page.left_outer? || page.right_outer? || page.inside_window? %>
          <%= page_tag page %>
        <% end %>
      <% end %>
      <%= next_page_tag unless current_page.last? %>
      <%= last_page_tag unless current_page.last? %>
    </ul>
  </nav>
<% end %>

<%= paginator.render do %>
  <nav>
    <ul class="pagination justify-content-center">
      <%= first_page_tag unless current_page.first? %>
      <%= prev_page_tag unless current_page.first? %>
      <% each_page do |page| %>
        <% if page.left_outer? || page.right_outer? || page.inside_window? %>
          <%= page_tag page %>
        <% end %>
      <% end %>
      <%= next_page_tag unless current_page.last? %>
      <%= last_page_tag unless current_page.last? %>
    </ul>
  </nav>
<% end %>

Fix centering of pagination under bootstrap alpha6

Previously our pagination was centered, but this was broken in the
upgrade to bootstrap 4.0.0.alpha6 because text-xs-center was removed.


<%= link_to(t(:write_first_time, :name => assignment.data[:name]), new_campaign_outgoing_message_path(@campaign, :assignment_id => assignment.id)) %>

Add 'write-to-other' as an incomplete assignment.


<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <title>No Frills Sleep Tracker</title>
    <script type="text/javascript" src="/js/bundle.js"></script>
  </head>
  <body>
    <%= yield %>
  </body>
</html>

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="mobile-web-app-capable" content="yes">
    <title>No Frills Sleep Tracker</title>
    <script type="text/javascript" src="/js/bundle.js"></script>
  </head>
  <body>
    <%= yield %>
  </body>
</html>

Enable Chrome on Android to run in fullscreen


<%= render 'spree/admin/shared/shipping_tabs' %>

<% admin_breadcrumb(t('spree.settings')) %>
<% admin_breadcrumb(t('spree.admin.tab.shipping')) %>
<% admin_breadcrumb(link_to plural_resource_name(Spree::StockLocation), spree.admin_stock_locations_path) %>
<% admin_breadcrumb(@stock_location.name) %>

<% content_for :page_actions do %>
<% end %>

<%= render partial: 'spree/shared/error_messages', locals: { target: @stock_location } %>

<%= form_for [:admin, @stock_location] do |f| %>
  <%= render :partial => 'form', :locals => { :f => f } %>
  <%= render :partial => 'spree/admin/shared/edit_resource_links' %>
<% end %>

<%= render 'spree/admin/shared/shipping_tabs' %>

<% admin_breadcrumb(t('spree.settings')) %>
<% admin_breadcrumb(t('spree.admin.tab.shipping')) %>
<% admin_breadcrumb(link_to plural_resource_name(Spree::StockLocation), spree.admin_stock_locations_path) %>
<% admin_breadcrumb(@stock_location.name) %>

<% content_for :page_actions do %>

    <% if can?(:display, Spree::StockMovement) %>

        <%= link_to plural_resource_name(Spree::StockMovement), admin_stock_location_stock_movements_path(@stock_location.id), class: 'btn btn-primary'  %>

    <% end %>

<% end %>

<%= render partial: 'spree/shared/error_messages', locals: { target: @stock_location } %>

<%= form_for [:admin, @stock_location] do |f| %>
  <%= render :partial => 'form', :locals => { :f => f } %>
  <%= render :partial => 'spree/admin/shared/edit_resource_links' %>
<% end %>

Add stock movements link into stock location edit page


<% content_for :tabs do %>
  <nav>
    <ul class="tabs" data-hook="admin_settings_shipping_tabs">
      <% if can?(:display, Spree::ShippingMethod) %>
        <%= settings_tab_item Spree::ShippingMethod.model_name.human(count: :other), admin_shipping_methods_path %>
      <% end %>

      <% if can?(:display, Spree::ShippingCategory) %>
        <%= settings_tab_item Spree::ShippingCategory.model_name.human(count: :other), admin_shipping_categories_path %>
      <% end %>

      <% if can?(:display, Spree::StockLocation) %>
        <%= settings_tab_item Spree::StockLocation.model_name.human(count: :other), spree.admin_stock_locations_path %>
      <% end %>
    </ul>
  </nav>
<% end %>

Add a shipping tabs sub section partial

Add a shipping tabs sub section partial

This partial will be responsible for configuration menu settings related
to shipping.


<IfModule passenger_module>
  PassengerRoot <%= @gempath %>/passenger-<%= @version %>
<% if @version >= "4.0.1" %>
  PassengerDefaultRuby <%= @rvm_prefix %>rvm/wrappers/<%= @ruby_version %>/ruby
<% else %>
  PassengerRuby <%= @rvm_prefix %>rvm/wrappers/<%= @ruby_version %>/ruby
<% end %>
  PassengerMaxPoolSize <%= @maxpoolsize %>
  PassengerPoolIdleTime <%= @poolidletime %>
  PassengerMaxInstancesPerApp <%= @maxinstancesperapp %>
<% if @version >= '3.0.0' %>
  PassengerMinInstances <%= @mininstances %>
  PassengerSpawnMethod <%= @spawnmethod %>
<% end %>
</IfModule>

<IfModule passenger_module>
  PassengerRoot <%= @gempath %>/passenger-<%= @version %>
<% if @version >= "4.0.1" %>
  PassengerDefaultRuby <%= @rvm_prefix %>rvm/wrappers/<%= @ruby_version %>/ruby
<% else %>
  PassengerRuby <%= @rvm_prefix %>rvm/wrappers/<%= @ruby_version %>/ruby
<% end %>
  PassengerMaxPoolSize <%= @maxpoolsize %>
  PassengerPoolIdleTime <%= @poolidletime %>
  PassengerMaxInstancesPerApp <%= @maxinstancesperapp %>
<% if @version >= "3.0.0" %>
  PassengerMinInstances <%= @mininstances %>
  PassengerSpawnMethod <%= @spawnmethod %>
<% end %>
</IfModule>

Resolve errors and warnings from linter

Resolve errors and warnings from linter


<?php

define('SS_ENVIRONMENT_TYPE', 'dev');

/* Database connection */
define('SS_DATABASE_SERVER', 'localhost');
define('SS_DATABASE_USERNAME', 'root');
define('SS_DATABASE_PASSWORD', '<%= @node["mysql_root_password"] %>');

/* Configure a default username and password to access the CMS on all sites in this environment. */
define('SS_DEFAULT_ADMIN_USERNAME', 'admin');
define('SS_DEFAULT_ADMIN_PASSWORD', 'password');

global $_FILE_TO_URL_MAPPING;
$_FILE_TO_URL_MAPPING['<%= @node["sprout"]["home"] %>/Sites'] = "http://localhost/";

define('SS_SEND_ALL_EMAILS_TO', '<%= @node["sprout"]["username"] %>@dna.co.nz');

define('SS_PGSQL_DATABASE_SERVER', 'localhost');
define('SS_PGSQL_DATABASE_USERNAME', 'postgres');
define('SS_PGSQL_DATABASE_PASSWORD', '');

<?php

define('SS_ENVIRONMENT_TYPE', 'dev');

/* Database connection */
define('SS_DATABASE_SERVER', 'localhost');
define('SS_DATABASE_USERNAME', 'root');
define('SS_DATABASE_PASSWORD', '<%= @node["mysql_root_password"] %>');

/* Configure a default username and password to access the CMS on all sites in this environment. */
define('SS_DEFAULT_ADMIN_USERNAME', 'admin');
define('SS_DEFAULT_ADMIN_PASSWORD', 'password');

global $_FILE_TO_URL_MAPPING;
$_FILE_TO_URL_MAPPING['<%= @node["sprout"]["home"] %>/Sites'] = "http://localhost/";

define('SS_SEND_ALL_EMAILS_TO', '<%= @node["current_user"] %>@dna.co.nz');

define('SS_PGSQL_DATABASE_SERVER', 'localhost');
define('SS_PGSQL_DATABASE_USERNAME', 'postgres');
define('SS_PGSQL_DATABASE_PASSWORD', '');

Fix default SS email address

Fix default SS email address


#!/bin/bash

CHAIN="portforwarding-release"

function forward_exists {
	set -e
	chain=$1
	iptables -t nat -C ${chain} -j ${CHAIN} 2>/dev/null
}

if ! iptables -t nat -L ${CHAIN} >/dev/null 2>&1; then
	iptables -t nat -N ${CHAIN}
fi

# if rule doesnt exists in prerouting, add it
if forward_exists PREROUTING; then
	iptables -t nat -A PREROUTING -j ${CHAIN}
fi

# if rule doesnt exist in output, add it
if forward_exists OUTPUT; then
	iptables -t nat -A OUTPUT -j ${CHAIN}
fi

<% p("port_forwarding.rules").each do |rule| %>
sudo iptables -t nat -A portforwarding-release -p tcp -d <%= spec.networks.send(spec.networks.methods(false).first).ip %> --dport <%= rule['external_port'] %> -j DNAT --to <%= rule['internal_ip'] %>:<%= rule['internal_port'] %>
<% end %>

#!/bin/bash

CHAIN="portforwarding-release"

function forward_exists {
	set -e
	chain=$1
	iptables -t nat -C ${chain} -j ${CHAIN} 2>/dev/null
}

if ! iptables -t nat -L ${CHAIN} >/dev/null 2>&1; then
	iptables -t nat -N ${CHAIN}
fi

# if rule doesnt exists in prerouting, add it
if ! forward_exists PREROUTING; then
	iptables -t nat -A PREROUTING -j ${CHAIN}
fi

# if rule doesnt exist in output, add it
if ! forward_exists OUTPUT; then
	iptables -t nat -A OUTPUT -j ${CHAIN}
fi

<% p("port_forwarding.rules").each do |rule| %>
sudo iptables -t nat -A portforwarding-release -p tcp -d <%= spec.networks.send(spec.networks.methods(false).first).ip %> --dport <%= rule['external_port'] %> -j DNAT --to <%= rule['internal_ip'] %>:<%= rule['internal_port'] %>
<% end %>

Fix conditionals that check for the PREROUTING and OUTPUT chain jumps


server {
  server_name deploy.*;
  listen 80;
  return 301 https://$host/;
}

server {
  listen 443 ssl;
  server_name deploy.*;

  ssl_certificate     /etc/nginx/ssl/jenkins.crt;
  ssl_certificate_key /etc/nginx/ssl/jenkins.key;

  location / {
    proxy_pass http://localhost:8080;

    add_header "Strict-Transport-Security" "max-age=31536000";

    location /api/json {
      proxy_pass http://localhost:8080;

      add_header "Access-Control-Allow-Origin" "*";
      add_header "Access-Control-Allow-Methods" "GET, POST, OPTIONS";
      add_header "Access-Control-Allow-Headers" "origin, authorization, cookie, accept";
      add_header "Access-Control-Allow-Credentials" "true";
    }

  }
}

Remove HTTP virtual host from Jenkins

Remove HTTP virtual host from Jenkins

Remove the redundant HTTP (non-SSL) virtual host from Jenkins.

We firewalled access to port 80 on Jenkins in this commit:
https://github.gds/gds/govuk-provisioning/commit/60fecd1e45559e7a19229bd43ac841a961a1a25a

See the discussion here for an explanation of why:
https://github.gds/gds/govuk-provisioning/pull/81#discussion-diff-3664


#!/bin/bash

if [ $1 = "postcustomization" ]; then
  echo 'ubuntu:<%= vars[:pass_hash] %>' | chpasswd -e

  dpkg-reconfigure openssh-server
  set -e
  exec >/var/log/userdata.log 2>&1
  export DEBIAN_FRONTEND=noninteractive
  E="/etc/environment"
  echo "LC_ALL=en_GB.UTF-8" > $E

  R="/etc/resolv.conf"
  echo "nameserver 8.8.8.8" >$R
  echo "nameserver 8.8.4.4" >>$R

  U="hkp://keyserver.ubuntu.com:80"
  REPO="/etc/apt/sources.list.d/gds-govuk-precise.list"
  GDSPPA="http://ppa.launchpad.net/gds/govuk/ubuntu"
  sed -i '/^deb cdrom/d' /etc/apt/sources.list
  wget http://apt.puppetlabs.com/puppetlabs-release-precise.deb
  dpkg -i puppetlabs-release-precise.deb
  echo "deb $GDSPPA precise main" >> $REPO
  echo "deb-src $GDSPPA precise main" >> $REPO
  apt-key adv --keyserver $U --recv-keys '914D5813'
  apt-get update

  export PATH=$PATH:/usr/local/bin
  apt-get -y install puppet ruby1.9.3
  service puppet stop
  DISKS=`ls /dev/sd? | tail -n +2`

fi

#!/bin/bash

if [ $1 = "postcustomization" ]; then
  echo 'ubuntu:<%= vars[:pass_hash] %>' | chpasswd -e

  dpkg-reconfigure openssh-server
  set -e
  exec >/var/log/userdata.log 2>&1
  export DEBIAN_FRONTEND=noninteractive
  E="/etc/environment"
  echo "LC_ALL=en_GB.UTF-8" > $E

  R="/etc/resolv.conf"
  echo "nameserver 8.8.8.8" >$R
  echo "nameserver 8.8.4.4" >>$R

  U="hkp://keyserver.ubuntu.com:80"
  REPO="/etc/apt/sources.list.d/gds-govuk-precise.list"
  GDSPPA="http://ppa.launchpad.net/gds/govuk/ubuntu"
  sed -i '/^deb cdrom/d' /etc/apt/sources.list
  wget http://apt.puppetlabs.com/puppetlabs-release-precise.deb
  dpkg -i puppetlabs-release-precise.deb
  echo "deb $GDSPPA precise main" >> $REPO
  echo "deb-src $GDSPPA precise main" >> $REPO
  apt-key adv --keyserver $U --recv-keys '914D5813'
  apt-get update

  export PATH=$PATH:/usr/local/bin
  apt-get -y install puppet ruby1.9.3
  service puppet stop

fi

Remove unused DISKS partitioning line

Remove unused DISKS partitioning line

The line being removed from the bootstrap script listed all block-list devices
in /dev/ beginning sd*. Since we no longer do disk partitioning here, we no
longer need this.


<% content_for :extra_classes, flush: true do %>timeline__item--affirmative<% end %>
<% content_for :title, flush: true do %>
    <%= a.related_content.document_type.name %> added
    <%= " by #{a.owner.name}" unless a.owner.blank? %>
<% end %>
<% content_for :description, flush: true do %>
    <a href="<%= a.related_content.document.url %>" class="file file--<%= a.related_content.nice_content_type[:generic_type].parameterize %>">

            <%= a.related_content.document_file_name %>

            <%= a.related_content.description %>

            <%= number_to_human_size(a.related_content.document_file_size) %>

<% end %>

<% content_for :extra_classes, flush: true do %>timeline__item--affirmative<% end %>
<% content_for :title, flush: true do %>
    <%= a.related_content.document_type.name %> added
    <%= " by #{a.owner.name}" unless a.owner.blank? %>
<% end %>
<% content_for :description, flush: true do %>
    <a href="<%= document_path(a.related_content) %>" class="file file--<%= a.related_content.nice_content_type[:generic_type].parameterize %>">

            <%= a.related_content.document_file_name %>

            <%= a.related_content.description %>

            <%= number_to_human_size(a.related_content.document_file_size) %>

<% end %>

Use document_path for docs in study timelines


<?xml version="1.0" encoding="utf-8" ?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>usesthis.admin.interviews</id>
	<updated><%= @interviews[0].published_on.strftime('%FT%TZ') %></updated>
	<author><name>Daniel Bogan</name></author>
	<% for interview in @interviews %>
	<entry>
		<id>http://<%= interview.slug %>.usesthis.com/</id>
		<title><%= interview.name %></title>
		<link href="http://<%= interview.slug %>.usesthis.com/" />
		<link rel="edit" href="/interviews/<%= interview.slug %>" />
		<published><%= interview.published_on.strftime('%FT%TZ') %></published>
		<updated><%= interview.published_on.strftime('%FT%TZ') %></updated>
		<content type="text"><%= CGI.escapeHTML(interview.answers) %></content>
	</entry>
	<% end %>
</feed>

<?xml version="1.0" encoding="utf-8" ?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>usesthis.admin.interviews</id>
	<updated><%= (@interviews[0].published_on ? @interviews[0].published_on : @interviews[0].date_create).strftime('%FT%TZ') %></updated>
	<author><name>Daniel Bogan</name></author>
	<% for interview in @interviews %>
	<entry>
		<id>http://<%= interview.slug %>.usesthis.com/</id>
		<title><%= interview.name %></title>
		<link href="http://<%= interview.slug %>.usesthis.com/" />
		<link rel="edit" href="/interviews/<%= interview.slug %>" />
		<published><%= (interview.published_on ? interview.published_on : interview.date_create).strftime('%FT%TZ') %></published>
		<updated><%= (interview.published_on ? interview.published_on : interview.date_create).strftime('%FT%TZ') %></updated>
		<content type="text"><%= CGI.escapeHTML(interview.answers) %></content>
	</entry>
	<% end %>
</feed>

Use the date_create value if we don't have a published date.


<!-- Piwik -->
<script type="text/javascript">
  var pkBaseURL = (("https:" == document.location.protocol) ? "https://<%= url %>/" : "http://<%= url %>/");
  document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
  </script><script type="text/javascript">
  try {
    var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", <%= id_site %>);
    piwikTracker.trackPageView();
    piwikTracker.enableLinkTracking();
  } catch( err ) {}
</script>
<!-- End Piwik Tag -->

<!-- Piwik -->
<script type="text/javascript">
  var _paq = _paq || [];
  _paq.push(["trackPageView"]);
  _paq.push(["enableLinkTracking"]);

  (function() {
    var u = (("https:" == document.location.protocol) ? "https://<%= url %>/" : "http://<%= url %>/");
    _paq.push(["setTrackerUrl", u+"piwik.php"]);
    _paq.push(["setSiteId", <%= id_site %>]);
    var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
    g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
  })();
</script>
<!-- End Piwik Tag -->

Update piwik's javascript tracking code to the latest version.


[Match]
Name=wg0

[Network]
Address=<%= node[:networking][:wireguard][:address] %>/128

[Route]
Destination=fd43:e709:ea6d:1::/64
<% node[:networking][:wireguard][:peers].each do |peer| -%>
<% Array(peer[:allowed_ips]).sort.each do |ip| -%>
<% unless ip =~ /^fd43:e709:ea6d:1::/ -%>

[Route]
Destination=<%= ip %>
<% end -%>
<% end -%>
<% end -%>

Add routes to wireguard peers

Add routes to wireguard peers


address=/.local/127.0.0.1
server=/consul/127.0.0.1#8600
no-resolv
no-poll

<% ns_server_ips.each do |ip| %>
server=<%= ip %>
<% end %>

server=8.8.8.8

Remove extra dns matching for now

Remove extra dns matching for now


  <%= form_tag(picks_path, method: "post") do %>
    <% if !session[:user_id] %>
      <%= email_field_tag 'pick[email]',nil, placeholder: 'email' %>
    <% end %>
  <%= text_field_tag 'pick[game]',nil, placeholder: 'game' %>
  <%= number_field_tag 'pick[number1]',nil, placeholder:'0' %>
  <%= number_field_tag 'pick[number2]',nil, placeholder:'0' %>
  <%= number_field_tag ' pick[number3]',nil, placeholder:'0' %>
  <%= number_field_tag 'pick[number4]',nil, placeholder:'0' %>
  <%= number_field_tag 'pick[number5]',nil, placeholder:'0' %>
  <%= number_field_tag 'pick[number6]',nil, placeholder:'0' %>
  <%= date_field_tag 'pick[draw_date]',nil, placeholder: 'date' %>
  <%= check_box_tag 'pick[multiplier]'%>
  <%= submit_tag 'lotifyme' %>
  <%= submit_tag 'signup' %>

  <% end %>

  <%= form_tag(picks_path, method: "post") do %>
    <% if !session[:user_id] %>
      <%= email_field_tag 'pick[email]',nil, placeholder: 'email' %>
    <% end %>

  <%= text_field_tag 'pick[game]',nil, placeholder: 'game' %>

        <%= number_field_tag 'pick[number1]',nil, placeholder:'0', class: "large-2 columns" %>

        <%= number_field_tag 'pick[number2]',nil, placeholder:'0', class: "large-2 columns" %>

        <%= number_field_tag ' pick[number3]',nil, placeholder:'0', class: "large-2 columns" %>

        <%= number_field_tag 'pick[number4]',nil, placeholder:'0', class: "large-2 columns" %>

        <%= number_field_tag 'pick[number5]',nil, placeholder:'0', class: "large-2 columns" %>

        <%= number_field_tag 'pick[number6]',nil, placeholder:'0', class: "large-2 columns" %>

  <%= date_field_tag 'pick[draw_date]',nil, placeholder: 'date' %>
  <%= check_box_tag 'pick[multiplier]'%>

  <%= submit_tag 'lotifyme' %>
  <%= submit_tag 'signup' %>

  <% end %>

Put all pick number entriees on 1 row.

Put all pick number entriees on 1 row.


<a href="<%= root_path %>">Home

Generate an appointment report

Generate an appointment report

<%= form_for @appointment_report, method: 'GET', target: '_blank', 'data-disable-with': nil, layout: :basic do |f| %>
  <%=
    f.select(
      :where,
      options_for_select(@where_options),
      {},
      class: 't-where',
      data: { module: 'advanced-select' }
    )
  %>
  <%=
    f.text_field(
      :date_range,
      class: 't-date-range',
      label: 'Is in date range',
      data: {
	module: 'date-range-picker',
	config: {
	  autoUpdateInput: false,
	  locale: {
	    cancelLabel: 'Clear',
	    format: 'DD/MM/YYYY'
	  }
	}
      }
    )
  %>
  <% # Use manual html here so that data-disable-with isn't added. %>
  <input type="submit" name="commit" value="Download" class="t-download btn btn-primary">
<% end %>

<a href="<%= root_path %>">Home

Generate an appointment report

Generate an appointment report

<%= form_for @appointment_report, method: 'GET', target: '_blank', 'data-disable-with': nil, layout: :basic do |f| %>
  <%=
    f.select(
      :where,
      options_for_select(@where_options),
      {},
      class: 't-where',
      data: { module: 'advanced-select', config: { allowClear: false } }
    )
  %>
  <%=
    f.text_field(
      :date_range,
      class: 't-date-range',
      label: 'Is in date range',
      data: {
	module: 'date-range-picker',
	config: {
	  autoUpdateInput: false,
	  locale: {
	    cancelLabel: 'Clear',
	    format: 'DD/MM/YYYY'
	  }
	}
      }
    )
  %>
  <% # Use manual html here so that data-disable-with isn't added. %>
  <input type="submit" name="commit" value="Download" class="t-download btn btn-primary">
<% end %>

Remove clear button on report dropdown which is not needed


  <%= link_to path_to_item,
:method => :delete,
class: 'btn btn-danger delete-confirm-button', style: 'display: none;' do %>
        Confirm
    <% end %>

  <%= link_to '#', class: 'btn btn-danger delete-button' do %>
    <% if defined?(display_label) %>
      <%= display_label %>
    <% else %>

    <% end %>
  <% end %>

  <%= link_to path_to_item, method: :delete, class: 'btn btn-danger delete-confirm-button', style: 'position: relative; display: none;' do %>
    Confirm
  <% end %>

Make the code slightly more consistent.

Make the code slightly more consistent.


<!DOCTYPE html>

    <title><%= name.capitalize %></title>

Welcome to <%= name.capitalize %>!

    <%%= yield %>

<!DOCTYPE html>

    <title><%= name.capitalize %></title>

Welcome to <%= name.capitalize %>!

Home

About

    <%%= yield %>

Add nav to generator template

Add nav to generator template


  <%= form_with(url: patients_path, local: true, method: 'get', skip_enforcing_utf8: true) do %>
    <%= search_field_tag :search, params[:search],
      size: 23,
      results: 5,
      autosave: "search_#{current_user.username}",
      autocorrect: 'off',
      placeholder: t('.search_patients') %>
  <% end %>

<% if @patient %>
  <%= render partial: 'card' unless @patient.new_record? %>
<% end %>

<% if @recent %>

<%= t('.recent_patients') %>

    <% cache @recent do %>

        <%= render partial: 'shared/recent_patients',
          collection: @recent, as: :recent_patient, cached: true %>

    <% end %>

<% end %>

  <%= form_with(url: patients_path, local: true, method: 'get') do %>
    <%= search_field_tag :search, params[:search],
      size: 23,
      results: 5,
      autosave: "search_#{current_user.username}",
      autocorrect: 'off',
      placeholder: t('.search_patients') %>
  <% end %>

<% if @patient %>
  <%= render partial: 'card' unless @patient.new_record? %>
<% end %>

<% if @recent %>

<%= t('.recent_patients') %>

    <% cache @recent do %>

        <%= render partial: 'shared/recent_patients',
          collection: @recent, as: :recent_patient, cached: true %>

    <% end %>

<% end %>

Revert "Disable utf-8 enforcer, as we do not support IE<8"

This reverts commit 3d4f64492146840e5ab8ee6b10a44af55707ff69.


Question: max(last_5m):avg:datadog.nozzle.gorouter.ms_since_last_registry_update{deployment:<%= metron_agent_deployment %>} by {ip}  > 30000

## Description:
 It's been at least 30 seconds since a router received a "router.register" message from an app. <%= cloudops_pagerduty %>.

## Escalation Path:
  DIEGO Team.

## Possible Causes:
## Potential Solutions:

##Feedback:
 Have feedback for this alert? [File an issue](https://github.com/pivotal-cf/datadog-config/issues/new)

<%= environment %> CF: routes not being registered

## Description:
 It's been at least 30 seconds since a router received a "router.register" message from an app..

## Escalation Path:
  DIEGO Team.

## Possible Causes:
## Potential Solutions:

##Feedback:
 Have feedback for this alert? [File an issue](https://github.com/pivotal-cf/datadog-config/issues/new) @slack-cloudops-us-pws

Question: max(last_5m):avg:datadog.nozzle.gorouter.ms_since_last_registry_update{deployment:<%= metron_agent_deployment %>} by {ip} > 30000

Send this alert to Slack instead of PagerDuty

[#148471023]

Signed-off-by: Nicholas Calugar <3c1e5caf264206c462dfd677807c430d59fb30df@pivotal.io>


<%# alternate version of facets on form that renders using multi-select.
    Has to copy and paste more code from blacklight than default, making
    it somewhat more fragile.
    Logic taken from facets_helper_behavior.rb, #render_facet_partials and
    #render_facet_limit.
%>

<% facets_from_request(facet_field_names).each do |display_facet| %>
    <% if should_render_facet?(display_facet) %>

            <%= label_tag display_facet.name.parameterize, class: "col-sm-3 control-label", id: "#{display_facet.name.parameterize}_label"  do %>
                <%= facet_field_label(display_facet.name) %>
            <% end %>

                <%= content_tag(:select, :multiple => true,
                    :name   => "f_inclusive[#{display_facet.name}][]",
                    :id     => display_facet.name.parameterize,
                    :class  => "form-control advanced-search-facet-select") do %>
                    <% display_facet.items.each do |facet_item| %>
                        <%= content_tag :option, :value => facet_item.value, :selected => facet_value_checked?(display_facet.name, facet_item.value) do %>
                            <%= facet_item.label %>  (<%= number_with_delimiter facet_item.hits %>)
                        <% end %>
                    <% end %>
                <% end %>

    <% end %>
<% end %>

Fix advanced search facet width

Fix advanced search facet width


---
pageable: true
per_page: 10
---
<% if paginate && num_pages > 1 %>

Page <%= page_number %> of <%= num_pages %>

  <% if prev_page %>

<%= link_to 'Previous page', prev_page %>

  <% end %>
<% end %>

<% page_articles.each_with_index do |article, i| %>

<%= link_to article.title, article %> <%= article.date.strftime('%b %e') %>

  <%= article.body %>
<% end %>

<% if paginate %>
  <% if next_page %>

<%= link_to 'Next page', next_page %>

  <% end %>
<% end %>

---
title    : Blog
pageable : true
---

<% # View the Blog layout for full context %>

Move content from Blog index to blog__home layout partial


[global]
# Time between retries for failed endpoint operations.
#EndpointRetryTimeMillis = 500
# Time between complete resyncs
#ResyncIntervalSecs = 1800
# Plugin and ACL manager addresses
PluginAddress = <%= @controller %>
ACLAddress    = <%= @controller %>
# Metadata IP (or host) and port. If no metadata configuration, set to None
#MetadataAddr  = 127.0.0.1
#MetadataPort  = 9697

[log]
# Log file path.
LogFilePath = /var/log/calico/felix.log
# Log severities for the Felix log and for syslog.
#LogSeverityFile   = INFO
#LogSeveritySys    = ERROR
#LogSeverityScreen = ERROR

[connection]
# Time with no data on a connection after which we give up on the
# remote entity
#ConnectionTimeoutMillis = 40000
# Time between sending of keepalives
#ConnectionKeepaliveIntervalMillis = 2000

[global]
# Time between retries for failed endpoint operations.
#EndpointRetryTimeMillis = 500
# Time between complete resyncs
#ResyncIntervalSecs = 1800
# Hostname to use in messages - defaults to server hostname
#FelixHostname = hostname
# Plugin and ACL manager addresses
PluginAddress = <%= @controller %>
ACLAddress    = <%= @controller %>
# Metadata IP (or host) and port. If no metadata configuration, set to None
#MetadataAddr  = 127.0.0.1
#MetadataPort  = 9697
# Address to bind to - either "*" or an IPv4 address (or hostname)
#LocalAddress = *

[log]
# Log file path.
LogFilePath = /var/log/calico/felix.log
# Log severities for the Felix log and for syslog.
#LogSeverityFile   = INFO
#LogSeveritySys    = ERROR
#LogSeverityScreen = ERROR

[connection]
# Time with no data on a connection after which we give up on the
# remote entity
#ConnectionTimeoutMillis = 40000
# Time between sending of keepalives
#ConnectionKeepaliveIntervalMillis = 2000

Update config file with correct fields.

Update config file with correct fields.


Control Panel

        Metric
        Status
        Action

      <% @metrics.each do |metric| %>

          <%= metric.to_s.titlecase %>

          <button>X</button>

      <% end %>

Control Panel

        Metric
        Status
        Action

      <% @metrics.each do |metric| %>

          <%= metric.to_s.titlecase %>

          <button class="btn"></button>

      <% end %>

Use icons for the buttons

Use icons for the buttons

Just added an icon as button label.

Signed-off-by: Konrad Reiche <4ff0213f56e2082fcd8c882d04c546881c579ce4@gmail.com>


<% if ENV.has_key? "DOCUMENT_ROOT" and ENV['DOCUMENT_ROOT'] != nil %>
root <%= ENV['DOCUMENT_ROOT'] %>;
<% else %>
root /app/web;
<% end %>

location / {
    # try to serve file directly, fallback to rewrite
    try_files $uri @rewriteapp;
}

location @rewriteapp {
    # rewrite all to app.php
    rewrite ^(.*)$ /app.php/$1 last;
}

location ~ ^/(app|app_dev)\.php(/|$) {
    fastcgi_pass php;
    fastcgi_split_path_info ^(.+\.php)(/.*)$;
    include fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param HTTPS off;
    fastcgi_buffers 256 4k;
}

<% if ENV.has_key? "DOCUMENT_ROOT" and ENV['DOCUMENT_ROOT'].to_s != "" %>
root <%= ENV['DOCUMENT_ROOT'] %>;
<% else %>
root /app/web;
<% end %>

location / {
    # try to serve file directly, fallback to rewrite
    try_files $uri @rewriteapp;
}

location @rewriteapp {
    # rewrite all to app.php
    rewrite ^(.*)$ /app.php/$1 last;
}

location ~ ^/(app|app_dev)\.php(/|$) {
    fastcgi_pass php;
    fastcgi_split_path_info ^(.+\.php)(/.*)$;
    include fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param HTTPS off;
    fastcgi_buffers 256 4k;
}

Use != '' instead of != nil

Use != '' instead of != nil


Main Navigation

      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
        Toggle navigation

      </button>

        Downey Development and Design

Skills

Blog

Projects

History

Interests

Résumé

Contact

Add heading tag for screen reader table of contents


Chapters

    <% if govspeak_headers(edition.body).any? %>

        <% govspeak_headers(edition.body).each do |header| %>

<%= link_to header.text, public_document_path(edition, anchor: header.id) %>

        <% end %>

    <% end %>

  <% if govspeak_headers(edition.body).any? %>

Chapters

        <% govspeak_headers(edition.body).each do |header| %>

<%= link_to header.text, public_document_path(edition, anchor: header.id) %>

        <% end %>

  <% end %>

Hide Chapter heading if no chapters exist


<% if cached_recently_viewed_products.any? %>

<%= Spree.t(:recently_viewed_products) %>

      <% cached_recently_viewed_products.each do |product| %>

<%= link_to product.name, product %>

      <% end -%>

<% end %>

Change frontend layout to use list-group class.


<% content_for :head do %>
  <script type="text/javascript">
    jQuery(document).ready(function(){
      $("label:contains('<%= payment_method.name %>')").hide();
      $("label:contains('<%= payment_method.name %>') input").disable();
    });
  </script>
<% end %>

Add backend source-form partial for paypalec.

This fixes #9


<% if attachable.respond_to?(:translated_locales) && attachable.translated_locales.many? %>
  <%= form.label :locale, 'This attachment displays in' %>
  <%= form.select :locale, options_for_locales(attachable.translated_locales), include_blank: 'All languages' %>
<% end %>
<%= form.text_field :isbn, label_text: 'ISBN' %>
<%= form.text_field :unique_reference %>
<div class="paper-number clearfix">
  <%= form.text_field :command_paper_number, class: 'paper-number' %>
  <%= form.check_box :unnumbered_command_paper, label_text: 'Unnumbered' %>
</div>
<% if attachable.can_have_attached_house_of_commons_papers? %>
  <%= render 'admin/attachments/hoc_reference_fields', form: form %>
<% end %>
<%= form.text_field :order_url, label_text: 'Order URL' %>
<%= form.text_field :price, label_text: "Price in £s" %>

<% if attachable.respond_to?(:translated_locales) && attachable.translated_locales.many? %>
  <%= form.label :locale, 'Display language' %>

This determines the translations of the publication that the attachment will appear in.

  <%= form.select :locale, options_for_locales(attachable.translated_locales), include_blank: 'All languages' %>
<% end %>
<%= form.text_field :isbn, label_text: 'ISBN' %>
<%= form.text_field :unique_reference %>

  <%= form.text_field :command_paper_number, class: 'paper-number' %>
  <%= form.check_box :unnumbered_command_paper, label_text: 'Unnumbered' %>

<% if attachable.can_have_attached_house_of_commons_papers? %>
  <%= render 'admin/attachments/hoc_reference_fields', form: form %>
<% end %>
<%= form.text_field :order_url, label_text: 'Order URL' %>
<%= form.text_field :price, label_text: "Price in £s" %>

Update locale label on attachment edit form

To clarify the purpose of the language field.


<%= semantic_form_for @booking do |f| %>
  <%= error_messages_for 'booking' %>

  <%= f.inputs do %>
    <%= f.input :value_date %>
    <%= f.input :amount, :input_html => {:size => 12, :style => 'text-align: right'} %>
    <%= f.input :title %>
    <%= f.input :credit_account %>
    <%= f.input :debit_account %>
    <%= f.input :comments, :input_html => {:rows => 5} %>
  <% end %>

  <%= f.buttons do %>
    <%= f.commit_button %>
  <% end %>
<% end %>

<%= semantic_form_for @booking do |f| %>
  <%= f.semantic_errors %>

  <%= f.inputs do %>
    <%= f.input :value_date %>
    <%= f.input :amount, :input_html => {:size => 12, :style => 'text-align: right'} %>
    <%= f.input :title %>
    <%= f.input :credit_account %>
    <%= f.input :debit_account %>
    <%= f.input :comments, :input_html => {:rows => 5} %>
  <% end %>

  <%= f.buttons do %>
    <%= f.commit_button %>
  <% end %>
<% end %>

Use semantic_errors in bookings form.

Use semantic_errors in bookings form.


<!DOCTYPE HTML>
<!--[if lt IE 8]><html class="no-js oldIE" lang="en-US"><![endif]-->
<!--[if IE 8]><html class="no-js lt-ie9" lang="en-US"><![endif]-->
<!--[if IE 9]><html class="no-js ie9" lang="en-US"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--><html id="cypress3" lang="en-US" class="no-js not-ie"><!--<![endif]-->
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title><%= make_title %></title>
  <meta name="description" content="" />
  <meta name="keywords" content="" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <style type="text/css">
    <%= Rails.application.assets.find_asset('application.css').to_s.html_safe %>
  </style>
</head>
<body>
  <main aria-label="main section" id="main-content" class="container" role="main" tabindex="-1">
    <div class="col-sm-12">
      <%= yield %>
    </div>
  </main>
</body>

</html>

<!DOCTYPE HTML>
<!--[if lt IE 8]><html class="no-js oldIE" lang="en-US"><![endif]-->
<!--[if IE 8]><html class="no-js lt-ie9" lang="en-US"><![endif]-->
<!--[if IE 9]><html class="no-js ie9" lang="en-US"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--><html id="cypress3" lang="en-US" class="no-js not-ie"><!--<![endif]-->
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title><%= make_title %></title>
  <meta name="description" content="" />
  <meta name="keywords" content="" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <style type="text/css">
    <%= Rails.application.assets_manifest.find_sources('application.css').first.to_s.html_safe %>
  </style>
</head>
<body>
  <main aria-label="main section" id="main-content" class="container" role="main" tabindex="-1">
    <div class="col-sm-12">
      <%= yield %>
    </div>
  </main>
</body>

</html>

Fix the report layout so it can find the application.css asset in dev and prod


All

Teenage voices on first financial decisions

Staying on in education

Moving into work

Saving and borrowing

Add aria roles to nav filter

Add aria roles to nav filter


  <% if can? :admin, Spree::Product %>
    <%= tab :products, match_path: '/products' %>
  <% end %>
  <% if can? :admin, Spree::OptionType %>
    <%= tab :option_types, match_path: '/option_types' %>
  <% end %>
  <% if can? :admin, Spree::Property %>
    <%= tab :properties %>
  <% end %>
  <% if can? :admin, Spree::Prototype %>
    <%= tab :prototypes %>
  <% end %>
  <% if can? :admin, Spree::Taxonomy %>
    <%= tab :taxonomies %>
  <% end %>
  <% if can? :admin, Spree::Taxon %>
    <%= tab :taxons %>
  <% end %>

  <% if can? :admin, Spree::Product %>
    <%= tab :products, match_path: '/products' %>
  <% end %>
  <% if can? :admin, Spree::OptionType %>
    <%= tab :option_types, match_path: '/option_types' %>
  <% end %>
  <% if can? :admin, Spree::Property %>
    <%= tab :properties %>
  <% end %>
  <% if can? :admin, Spree::Prototype %>
    <%= tab :prototypes %>
  <% end %>
  <% if can? :display, Spree::Taxonomy %>
    <%= tab :taxonomies %>
  <% end %>
  <% if can? :admin, Spree::Taxon %>
    <%= tab :taxons %>
  <% end %>

Allow other admins to see the taxonomies

The taxonomy index already has precautions against letting users edit
and delete taxonomies. There are cases where it will be valuable for
admins without permission to edit or delete taxonomies to see what
taxonomies exist.

This may be a change we should be making in other areas of the admin as
well.


#!/bin/sh

# DO NOT EDIT - This file is being maintained by Chef

# setup

PLANETDIR="<%= @directory %>/planet"
LOGDIR="${PLANETDIR}/log"
PLANETPREV="${PLANETDIR}/planet-previous.pbf"
PLANETCURR="${PLANETDIR}/planet.pbf"
PLANETNEW="${PLANETDIR}/planet-new.pbf"

# start logging

exec > "${LOGDIR}/$(date +%Y%m%d-%H%M).log" 2>&1

retval=1
while [ $retval -eq 1 ]; do
    pyosmium-up-to-date -v -o $PLANETNEW $PLANETCURR
    retval=$?
done

if [ $retval -ne 0 ]; then
  exit $retval
fi

# cleanup

mv "$PLANETCURR" "$PLANETPREV"
mv "$PLANETNEW" "$PLANETCURR"

# expire old logs

find "${LOGDIR}" -mtime +28 -delete

#!/bin/sh

# DO NOT EDIT - This file is being maintained by Chef

# setup

PLANETDIR="<%= @directory %>/planet"
LOGDIR="${PLANETDIR}/log"
PLANETPREV="${PLANETDIR}/planet-previous.pbf"
PLANETCURR="${PLANETDIR}/planet.pbf"
PLANETNEW="${PLANETDIR}/planet-new.pbf"
PLANETTMP="${PLANETDIR}/planet-tmp.pbf"

# start logging

exec > "${LOGDIR}/$(date +%Y%m%d-%H%M).log" 2>&1

pyosmium-up-to-date -v -o $PLANETNEW $PLANETCURR
retval=$?

while [ $retval -eq 1 ]; do
    mv "$PLANETNEW" "$PLANETTMP"
    pyosmium-up-to-date -v -o $PLANETNEW $PLANETTMP
    retval=$?
    rm "$PLANETTMP"
done

if [ $retval -ne 0 ]; then
  exit $retval
fi

# cleanup

mv "$PLANETCURR" "$PLANETPREV"
mv "$PLANETNEW" "$PLANETCURR"

# expire old logs

find "${LOGDIR}" -mtime +28 -delete

Make taginfo handle planet updates that need multiple passes correctly


<% text_for :title do %>
  Is your employer asking you to work or to start work from 4 July 2020?
<% end %>

<% options(
  "yes": "Yes",
  "no": "No",
) %>

<% text_for :title do %>
  Is your employer asking you to return to work?
<% end %>

<% options(
  "yes": "Yes",
  "no": "No",
) %>

Update content for return to work question

This is for the coronavirus employee risk assessment flow.


TLS Backend Handshake Errors

Gorouter backend TLS handshake failed! This really should not happen. Did you just deploy something bad?
Get in touch with routing.

 @slack-cloudops-us-pws <%= cloudops_pagerduty %>

Question: avg(last_5m):per_minute(sum:datadog.nozzle.gorouter.backend_tls_handshake_failed{*}) > 1

Question: avg(last_10m):per_minute(sum:datadog.nozzle.gorouter.backend_tls_handshake_failed{*}) > 2

Adjust thresholds for TLS Handshake Errors

The intention being to avoid single spikes during deployment (seems to
be a known issue).


<% if(template = section[:template])
  tilt_template = Tilt.new(template.gsub(/\s*/, ''))
  output = tilt_template.render
end %>
<%= output %>

<%
require 'json'
if(template = section[:template])
  data = {}
  if(json = section[:data])
    data = JSON.parse(json)
  end
  tilt_template = Tilt.new(template.gsub(/\s*/, ''))
  output = tilt_template.render(Object.new, data)
end %>
<%= output %>

Add data rendering to templates

Add data rendering to templates


	<% @articles.each do |article| %>

<%= link_to article.title, article_path(article) %>

				<%= article.text %>

			Created at <%= article.created_at %>.
				<% if if user_signed_in? then article.author_id == current_user.id end %>
					You can <%= link_to t('edit_article.link_edit'), edit_article_path(article) %> or <%= link_to t('edit_article.link_delete'), article_path(article), method: :delete, data: { confirm: t('edit_article.confirm_del') } %> it.
				<% end %>

	<% end %>

	<% @articles.each do |article| %>

<%= link_to article.title, article_path(article) %>

				<%= article.text %>

			Created at <%= article.created_at %>.
				<% if if user_signed_in? then article.author_id == current_user.id end %>
					<%= t('edit_article.you_can') %>
					<%= link_to t('edit_article.link_edit'), edit_article_path(article) %>
					<%= t('edit_article.or') %>
					<%= link_to t('edit_article.link_delete'), article_path(article), method: :delete, data: { confirm: t('edit_article.confirm_del') } %>
					<%= t('edit_article.it') %>
				<% end %>

	<% end %>

Add locales on articles index page

Add locales on articles index page


<%= javascript_include_tag "rickshaw" %>
<%= javascript_include_tag "underscore.min" %>

<%= stylesheet_link_tag    "graphs_stacked" %>

	<% (1..@metrics.length-1).each do |n| %>
		<div class="axis1" id="axis<%=n%>" style="left: <%= 700 + 60 * n %>px" >
			<div class="stub stub_right" id="axis<%=n%>_stub">

	<% end %>

Put slider and chart into col div to prevent slider slipping off to the left on epic window width, batman


Choose a Standup

  <% @standups.each do |standup| %>

      <%= link_to standup.title, standup %>
      <%= link_to 'Edit', edit_standup_path(standup) %>

  <% end %>

<%= link_to('New Standup', new_standup_path) %>

Add some styling to the Standups index page


<footer>
  © Daniel, Nathan, Peter, Stefan | <i class="fa fa-github"></i> <%= link_to 'GitHub Repo', 'https://github.com/great-horned-owls-2014/dbc-what-is-this' %>
</footer>

<footer>
  DBC NYC 2014 © Daniel, Nathan, Peter, Stefan | <i class="fa fa-github"></i> <%= link_to 'GitHub Repo', 'https://github.com/great-horned-owls-2014/dbc-what-is-this' %>
</footer>

Add dbc info to footer

Add dbc info to footer


RuLu

<%= link_to 'Speakers & talks', '/speakers' %>

<%= link_to 'Sponsors', '/sponsors' %>

<%= link_to 'Location', '/location' %>

<%= link_to 'Blog', '/blog' %>

<%= link_to 'About', '/about' %>

<%= link_to "Get your ticket", '/tickets' %>

<%= image_tag 'twitter.png' %>

<%= image_tag 'lanyrd.png' %>

RuLu

<%= link_to 'Speakers', '/speakers' %>

<%= link_to 'Sponsors', '/sponsors' %>

<%= link_to 'Location', '/location' %>

<%= link_to 'Schedule', '/schedule' %>

<%= link_to 'Blog', '/blog' %>

<%= link_to 'About', '/about' %>

<%= link_to "Get your ticket", '/tickets' %>

<%= image_tag 'twitter.png' %>

<%= image_tag 'lanyrd.png' %>

Add schedule to the nav bar

Add schedule to the nav bar


<% if order.line_items.exists? %>

      <%= Spree::LineItem.human_attribute_name(:name) %>
      <%= Spree::LineItem.human_attribute_name(:price) %>
      <%= Spree::LineItem.human_attribute_name(:quantity) %>
      <%= Spree::LineItem.human_attribute_name(:total_price) %>

      <% order.line_items.each do |item| %>

        <tr class="line-item" id="line-item-<%= item.id %>">

            <%= mini_image(item.variant) %>

            <%= item.variant.product.name %>
<%= "(" + variant_options(item.variant) + ")" unless item.variant.option_values.empty? %>

            <%= item.single_money.to_html %>

            <%= item.quantity %>

            <%= line_item_shipment_price(item, item.quantity) %>

      <% end %>

<% end %>

<% if order.line_items.exists? %>

      <%= Spree::LineItem.human_attribute_name(:name) %>
      <%= Spree::LineItem.human_attribute_name(:price) %>
      <%= Spree::LineItem.human_attribute_name(:quantity) %>
      <%= Spree::LineItem.human_attribute_name(:total_price) %>

      <% order.line_items.each do |item| %>
        <tr class="line-item" id="line-item-<%= item.id %>">

            <%= render 'spree/admin/shared/image',
              image: (item.variant.gallery.images.first || item.variant.product.gallery.images.first),
              size: :mini %>

            <%= item.variant.product.name %>
<%= "(" + variant_options(item.variant) + ")" unless item.variant.option_values.empty? %>

            <%= item.single_money.to_html %>

            <%= item.quantity %>

            <%= line_item_shipment_price(item, item.quantity) %>

      <% end %>

<% end %>

Remove deprecated mini_image and use share image view instead


<% if spree_current_user %>

      <%= link_to spree.edit_admin_user_path(spree_current_user) do %>

        <%= spree_current_user.email %>
      <% end %>

      <%= link_to spree.admin_logout_path do %>

        <%= Spree.t(:logout) %>
      <% end %>

    <% if spree.respond_to? :root_path %>

        <%= link_to spree.root_path, target: '_blank' do %>

          <%= Spree.t(:back_to_store) %>
        <% end %>

    <% end %>

<% end %>

<% if spree_current_user %>

      <% if can?(:admin, try_spree_current_user) %>
        <%= link_to spree.edit_admin_user_path(try_spree_current_user) do %>

          <%= try_spree_current_user.email %>
        <% end %>
      <% else %>

          <%= try_spree_current_user.email %>

      <% end %>

      <%= link_to spree.admin_logout_path do %>

        <%= Spree.t(:logout) %>
      <% end %>

    <% if spree.respond_to? :root_path %>

        <%= link_to spree.root_path, target: '_blank' do %>

          <%= Spree.t(:back_to_store) %>
        <% end %>

    <% end %>

<% end %>

Disable backend footer profile edit link if role cannot edit users


<%= hidden_user_explanation label: 'Not a valid FOI request',
                            state: 'not_foi',
                            message: 'not_foi' %>

<%= hidden_user_explanation label: 'Contains personal information',
                            state: 'not_foi',
                            message: 'personal_information' %>

<%= hidden_user_explanation label: 'Subject access request',
                            state: 'not_foi',
                            message: 'subject_access_request' %>

<% if @info_request.public_body_id == 7 %>
    <%= hidden_user_explanation label: 'Immigration correspondence',
                                state: 'not_foi',
                                message: 'immigration_correspondence' %>
<% end %>

<%= hidden_user_explanation label: 'A vexatious request',
                            state: 'vexatious',
                            message: 'vexatious' %>

<%= hidden_user_explanation label: 'Not a valid FOI request',
                            state: 'not_foi',
                            message: 'not_foi' %>

<%= hidden_user_explanation label: 'Personal correspondence',
                            state: 'not_foi',
                            message: 'personal_correspondence' %>

<%= hidden_user_explanation label: 'Subject access request',
                            state: 'not_foi',
                            message: 'subject_access_request' %>

<% if @info_request.public_body_id == 7 %>
    <%= hidden_user_explanation label: 'Immigration correspondence',
                                state: 'not_foi',
                                message: 'immigration_correspondence' %>
<% end %>

<%= hidden_user_explanation label: 'A vexatious request',
                            state: 'vexatious',
                            message: 'vexatious' %>

Change hidden explanation label to 'Personal correspondence'

Reflects change made in core: mysociety/alaveteli@72776e94


---
vapps:
  - name: <%= vapp_name_1 %>
    vdc_name: <%= vdc_name_1 %>
    catalog: <%= catalog %>
    catalog_item: <%= vapp_template %>
    vm:
      hardware_config:
        memory: 4096
        cpu: 2
      bootstrap:
        script_path: <%= bootstrap_script %>
        vars:
          message: hello world
      storage_profile: <%= storage_profile %>
  - name: <%= vapp_name_2 %>
    vdc_name: <%= vdc_name_2 %>
    catalog: <%= catalog %>
    catalog_item: <%= vapp_template %>
    vm:
      hardware_config:
        memory: 4096
        cpu: 2
      bootstrap:
        script_path: <%= bootstrap_script %>
        vars:
          message: hello world
      storage_profile: <%= storage_profile %>
  - name: <%= vapp_name_3 %>
    vdc_name: <%= vdc_name_1 %>
    catalog: <%= catalog %>
    catalog_item: <%= vapp_template %>
    vm:
      hardware_config:
        memory: 4096
        cpu: 2
      metadata:
        storage_profile_test_vm: true
      bootstrap:
        script_path: <%= bootstrap_script %>
        vars:
          message: hello world
  - name: <%= vapp_name_4 %>
    vdc_name: <%= vdc_name_1 %>
    catalog: <%= catalog %>
    catalog_item: <%= vapp_template %>
    vm:
      hardware_config:
        memory: 4096
        cpu: 2
      metadata:
        storage_profile_test_vm: true
      bootstrap:
        script_path: <%= bootstrap_script %>
        vars:
          message: hello world
      storage_profile: <%= nonsense_storage_profile %>

---
vapps:
  - name: <%= vapp_name_1 %>
    vdc_name: <%= vdc_name_1 %>
    catalog: <%= catalog %>
    catalog_item: <%= vapp_template %>
    vm:
      hardware_config: &hardware_config
        memory: 4096
        cpu: 2
      bootstrap: &bootstrap
        script_path: <%= bootstrap_script %>
        vars:
          message: hello world
      storage_profile: <%= storage_profile %>
  - name: <%= vapp_name_2 %>
    vdc_name: <%= vdc_name_2 %>
    catalog: <%= catalog %>
    catalog_item: <%= vapp_template %>
    vm:
      hardware_config:
        <<: *hardware_config
      bootstrap:
        <<: *bootstrap
      storage_profile: <%= storage_profile %>
  - name: <%= vapp_name_3 %>
    vdc_name: <%= vdc_name_1 %>
    catalog: <%= catalog %>
    catalog_item: <%= vapp_template %>
    vm:
      hardware_config:
        <<: *hardware_config
      metadata:
        storage_profile_test_vm: true
      bootstrap:
        <<: *bootstrap
  - name: <%= vapp_name_4 %>
    vdc_name: <%= vdc_name_1 %>
    catalog: <%= catalog %>
    catalog_item: <%= vapp_template %>
    vm:
      hardware_config:
        <<: *hardware_config
      metadata:
        storage_profile_test_vm: true
      bootstrap:
        <<: *bootstrap
      storage_profile: <%= nonsense_storage_profile %>

Use anchors instead of repeating data

Use anchors instead of repeating data


<% content_for :body do %>
  $!You must register the birth according to the regulations in <%= registration_country_name_lowercase_prefix %>.$!

  You can’t usually register your child’s birth with the Foreign and Commonwealth Office (FCO) Overseas Registration Unit. This is because unmarried fathers can’t pass on British nationality to a child born before 1 July 2006.

  You may still be able to apply for [British citizenship](https://www.gov.uk/browse/citizenship/citizenship) for the child.

  You may however be able to register the birth if either:

  - you’ve married the other parent since the child was born (depending on where the father was considered to be permanently living at the time of the birth)
  - the country where the father was considered to be permanently living at the time of the birth did not distinguish between married and unmarried parents

  Contact the Overseas Registration Unit for advice at <birthregistrationenquiries@fco.gov.uk>.
<% end %>

<% content_for :body do %>
  $!You must register the birth according to the regulations in <%= registration_country_name_lowercase_prefix %>.$!

  You can’t usually register your child’s birth with the Foreign and Commonwealth Office (FCO) Overseas Registration Unit. This is because unmarried fathers can’t pass on British nationality to a child born before 1 July 2006.

  You may still be able to apply for [British citizenship](https://www.gov.uk/browse/citizenship/citizenship) for the child.

  You may however be able to register the birth if either:

  - you’ve married the other parent since the child was born (depending on the father's [legal country of domicile](/government/publications/legitimation-and-domicile) at the time of the birth)
  - the country where the father was [legally domiciled](/government/publications/legitimation-and-domicile) at the time of the birth did not distinguish between married and unmarried parents

  Contact the Overseas Registration Unit for advice at <birthregistrationenquiries@fco.gov.uk>.
<% end %>

Update the home office result in register a birth


    <%= t('.title') %>

<%= t('sign_up.info') %>

    <%= simple_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
        <%= f.error_notification %>

          <%= f.input :email, required: true, autofocus: true, input_html: { class: 'ltr' } %>
          <%= f.input :password, required: true, hint: ("#{@minimum_password_length} characters minimum" if @minimum_password_length), input_html: { class: 'ltr' } %>
          <%= f.input :password_confirmation, required: true, input_html: { class: 'ltr' } %>

          <%= f.button :submit, t('buttons.sign_up'), class: 'btn btn-primary btn-block btn-lg' %>

    <% end %>

    <%= render "devise/shared/links" %>

    <%= t('.title') %>

    <a href="<%= user_google_oauth2_omniauth_authorize_path %>" class="btn btn-block btn-secondary btn-danger">
      <%= t('links.google_login') %>
      <%= icon 'google' %>

<%= t('sign_up.info') %>

    <%= simple_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
        <%= f.error_notification %>

          <%= f.input :email, required: true, autofocus: true, input_html: { class: 'ltr' } %>
          <%= f.input :password, required: true, hint: ("#{@minimum_password_length} characters minimum" if @minimum_password_length), input_html: { class: 'ltr' } %>
          <%= f.input :password_confirmation, required: true, input_html: { class: 'ltr' } %>

          <%= f.button :submit, t('buttons.sign_up'), class: 'btn btn-primary btn-block btn-lg' %>

    <% end %>

    <%= render "devise/shared/links" %>

Add google oauth to signup page;

Add google oauth to signup page;


#
# General development shortcuts
#

function tld; tail -f log/development.log; end

#
# ViaViela Portal
#

function vvpdb
  curl -o production.dump (heroku pgbackups:url -a portal-production)
  pg_restore --verbose --clean --no-acl --no-owner -h localhost -d viaviela_portal_development production.dump
end

function vvprestore
  pg_restore --verbose --clean --no-acl --no-owner -h localhost -d viaviela_portal_development $argv
end

Add some project specific shortcuts

Add some project specific shortcuts


input {
  lumberjack {
    port => 5043
    ssl_certificate => "/var/lib/logstash/lumberjack.crt"
    ssl_key => "/var/lib/logstash/lumberjack.key"
  }
}

filter {
  if [type] == "apache" {
    grok {
      match => [ "message", "%{COMBINEDAPACHELOG} %{NUMBER:duration:int}us %{WORD:request_id} %{NOTSPACE:ssl_protocol} %{NOTSPACE:ssl_cipher}" ]
    }
    date {
      match => [ "timestamp", "dd/MMM/yyyy:HH:mm:ss Z" ]
    }
  } else if [type] == "rails" {
    json {
      source => "message"
    }
  }
}

output {
  elasticsearch {
    host => [ "127.0.0.1" ]
  }
}

input {
  lumberjack {
    port => 5043
    ssl_certificate => "/var/lib/logstash/lumberjack.crt"
    ssl_key => "/var/lib/logstash/lumberjack.key"
  }
}

filter {
  if [type] == "apache" {
    grok {
      match => [ "message", "%{COMBINEDAPACHELOG} %{NUMBER:duration:int}us %{WORD:request_id} %{NOTSPACE:ssl_protocol} %{NOTSPACE:ssl_cipher}" ]
    }
    date {
      match => [ "timestamp", "dd/MMM/yyyy:HH:mm:ss Z" ]
    }
  } else if [type] == "rails" {
    json {
      source => "message"
    }
  }
}

output {
  elasticsearch {
    host => [ "127.0.0.1" ]
    cluster => "<%= node[:elasticsearch][:cluster][:name] %>"
  }
}

Set the elasticsearch cluster name for logstash


Hi <%= @user.name %>,

A new issue with the title "<%= @issue.title %>" has been reported near
your <%= @category.name %> location.

You can view the issue at:
<%= url_for(@issue) %>

Regards,
Cyclescape

You have received this message because your preferences indicate that you
would like us to notify you when new issues are reported near your
given locations.

To stop this notification, edit your user preferences at:
<%= edit_user_prefs_url(@user) %>

You can add or remove your locations at:
<%= user_locations_url %>

Hi <%= @user.name %>,

A new issue with the title "<%= @issue.title %>" has been reported near
your <%= @category.name %> location.

You can view the issue at:
<%= issue_url(@issue) %>

Regards,
Cyclescape

You have received this message because your preferences indicate that you
would like us to notify you when new issues are reported near your
given locations.

To stop this notification, edit your user preferences at:
<%= edit_user_prefs_url(@user) %>

You can add or remove your locations at:
<%= user_locations_url %>

Set correct issue URL on notification email.