# Host definitions
#
# Autogenerated by Chef.

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

<% end -%>
<% @unmanaged_hosts.each do |n| -%>
define host {
  use server
  address <%= n['address'] %>
  host_name <%= n['id'] %>
  hostgroups <%= n['hostgroups'].join(",") %>
  notifications_enabled <%= n['notifications'] %>
}

<% end -%>

# Host definitions
#
# Autogenerated by Chef.

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

<% end -%>
<% @unmanaged_hosts.each do |n| -%>
define host {
  use server
  address <%= n['address'] %>
  host_name <%= n['id'] %>
  hostgroups <%= n['hostgroups'].join(",") %>
  notifications_enabled <%= n['notifications'] %>
}

<% end -%>

Remove the non-alerting host logic.  It doesn't really work at the moment.

Former-commit-id: f9aff2dea6756579b8c6c44b7a1cd16b3cce9eb7 [formerly d3a0cd2f64aea69957f8accb8f8b5f0c343c0acd] [formerly c4896aed3c3c5295f5116ac47705d330d8bee242 [formerly 71fc97b5211e54274ae03c5d9e85cc66f37ca8d0]]
Former-commit-id: 064bfc938b99430523a71d9f28ac56083fdd508a [formerly 94e48c6bcb140887a804e36e71909da9f22228dc]
Former-commit-id: a66ae19fd9c4173ed5ce4c126d326f8d3099614f


[Unit]
Description=Redis In-Memory Data Store
After=network.target

[Service]
Type=forking
PIDFile=/var/run/redis/redis.pid

User=redis
Group=redis

RuntimeDirectory=redis
RuntimeDirectoryMode=0700

ExecStart=/usr/bin/redis-server <%= scope.lookupvar('redis_sentinel::config_file') %> --sentinel
ExecStop=/usr/bin/redis-cli shutdown
Restart=always

[Install]
WantedBy=multi-user.target

[Unit]
Description=Redis In-Memory Data Store
After=network.target

[Service]
Type=forking
PIDFile=/var/run/redis/redis-sentinel.pid

User=redis
Group=redis

RuntimeDirectory=redis
RuntimeDirectoryMode=0700

ExecStart=/usr/bin/redis-server <%= scope.lookupvar('redis_sentinel::config_file') %> --sentinel
ExecStop=/usr/bin/redis-cli shutdown
Restart=always

[Install]
WantedBy=multi-user.target

Use the right pid file

Use the right pid file


Switch analytics temporarily to bryanbibat.net


#!/bin/bash

set -e

# Back up the shared directory, which includes uploaded images and documents
tar --exclude="*.log" -cjpf <%= @shared_filename %> -C /var/www/cyclescape shared
openssl dgst -md5 <%= @shared_filename %> > <%= @shared_filename + ".md5" %>

# Back up the database
pg_dump <%= @database %> -Z 1 -f <%= @dbdump_filename %>
openssl dgst -md5 <%= @dbdump_filename %> > <%= @dbdump_filename + ".md5" %>

# Create an Anonymous version
<% backupdb = "#{@database}_backup_#{Time.now.to_i} %>
createdb <%= backupdb %>

psql <%= backupdb %> < <%= @dbdump_filename %>
psql -d <%= backupdb %> -c <<SQL
UPDATE users SET full_name = CONCAT('someone+', id),
                 email = CONCAT('someone+', id, '@example.com'),
                 confirmation_token = NULL,
                 reset_password_token = NULL,
                 last_seen_at = NULL,
                 public_token = CONCAT('token', id)
             WHERE NOT role = 'admin'
SQL

pg_dump <%= backupdb %> -Z 1 -f <%= "anon.#{@dbdump_filename}" %>
openssl dgst -md5 <%= "anon.#{@dbdump_filename}" %> > <%= "anon.#{@dbdump_filename}.md5"" %>

dropdb <%= backupdb %>

Add creating an anonymous db dump

Add creating an anonymous db dump

Unless a developer uses the full names and emails then
it is best practise for them not to be on laptops etc.


foi:
  actions:
  - id: internal_review
    title: <%= _('Request an internal review') %>
    header: <%= _('You may have grounds for an internal review') %>
    button: <%= _('Help me send an internal review') %>
    target: { internal: 'internal_review' }

  - id: clarification
    title: <%= _('Reply for more clarification') %>
    header: <%= _('You should reply to the authority for clarification') %>
    button: <%= _('Help me send a reply') %>
    target: { internal: 'followup' }

  - id: refer_to_commissioner
    title: <%= _('Refer your request to the Information Commissioner') %>
    target: { external: '/help/unhappy#refer-to-ico' }

  - id: new_request
    title: <%= _('Make a new request') %>
    header: <%= _('Perhaps you could make a new request') %>
    button: <%= _('Help me make a new request') %>
    target: { internal: 'new_request' }

  - id: use_other_means
    title: <%= _('Use other means') %>
    header: <%= _('Using other means to answer your question') %>
    body:
      plain: <%= _('You can try pursuing your problem or your research in other ways.') %>
    target: { external: '/help/unhappy#other_means' }

  - id: generic
    title: <%= _('Send a followup') %>
    body:
      plain: >
        <%= _("We don't have any advice for your situation but you can send a followup.") %>
    target: { internal: 'followup' }

foi:
  actions:
  - id: internal_review
    title: <%= _('Request an internal review') %>
    header: <%= _('You may have grounds for an internal review') %>
    button: <%= _('Help me send an internal review') %>
    target: { internal: 'internal_review' }

  - id: clarification
    title: <%= _('Reply for more clarification') %>
    header: <%= _('You should reply to the authority for clarification') %>
    button: <%= _('Help me send a reply') %>
    target: { internal: 'followup' }

  - id: refer_to_commissioner
    title: <%= _('Refer your request to the Information Commissioner') %>
    target: { external: '/help/unhappy#refer-to-ico' }

  - id: new_request
    title: <%= _('Make a new request') %>
    header: <%= _('Perhaps you could make a new request') %>
    button: <%= _('Help me make a new request') %>
    target: { internal: 'new_request' }

  - id: use_other_means
    title: <%= _('Use other means') %>
    header: <%= _('Using other means to answer your question') %>
    body:
      plain: <%= _('You can try pursuing your problem or your research in other ways.') %>
    target: { external: '/help/unhappy#other_means' }

  - id: generic
    title: <%= _('Send a followup') %>
    body:
      plain: >
        <%= _("There's always the option of sending a followup.") %>
    target: { internal: 'followup' }

Change final statement of requests wizard to work with or without previous actions


Dear Kind, Beautiful Admins,

My little robotic brain has just spotted that <%= @campaign.initiator.name %> has told us that <%= @assignment.data[:organization_name] %> is responsible for the <%= @campaign.location.description %>.

If this seems right, then add the operator, and update the assignment. If it looks dodgy then please have a quick google.

Lots of love - the FixMyTransport Computer

Dear Kind, Beautiful Admins,

My little robotic brain has just spotted that <%= @campaign.initiator.name %> has told us that <%-if @assignment.data[:organization_name]%><%= @assignment.data[:organization_name] %> is responsible for the <%= @campaign.location.description %><%- else %><%= @assignment.data[:organization_email] %> is the email address for <%= org_names(@campaign.problem.responsible_organizations, connector='or', wrapper_start='', wrapper_end='') %><%- end %>.

If this seems right, then add the operator, and update the assignment. If it looks dodgy then please have a quick google.

Lots of love - the FixMyTransport Computer

Handle case where the user is just supplying an email address.


      <% remote_form_for result, :url => {:action => 'update_overall_comment', :id => result.id } do |f| %>
       <%= f.text_area :overall_comment, :cols => 50, :rows => 5, :id => 'overall_comment_text_area', :onkeydown => "$('overall_comment_submit').enable();" %>

         <%= f.submit t(:save_changes), :disabled => true, :id => "overall_comment_submit" %>

      <% end -%>

      <% remote_form_for result, :url => {:action => 'update_overall_comment', :id => result.id } do |f| %>
       <%= f.text_area :overall_comment, :cols => 50, :rows => 5, :id => 'overall_comment_text_area', :onkeypress => "$('overall_comment_submit').enable();" %>

         <%= f.submit t(:save_changes), :disabled => true, :id => "overall_comment_submit" %>

      <% end -%>

Revert due to a pull request not matching the review request and introducing a bug.

This reverts commit 35303336d9158c97253b02b1d10aba867bf7d1f2.
and commit a10ff514f5e1471a6790b7580b0bb0e40dae1507


<%= simple_form_for @user, :url => dashboard_user_path, remote: true, html: { class: "storytime-modal-form", data: { redirect: "index" } } do |f| %>

      <%= link_to icon("angle-left"), [:dashboard, Storytime.user_class], class: "btn btn-sm btn-default pull-left storytime-modal-trigger", remote: true %>
      <%= f.submit "Save", class: "btn btn-sm btn-primary btn-outline pull-right" %>

        <%= t('dashboard.users.edit_user_header') %>

      <%= render 'storytime/dashboard/settings_tabs.html.erb' %>

      <%= f.input :storytime_name %>
      <%= f.input :email %>
      <%= f.association :storytime_role, include_blank: true, label_method: :label %>

<% end %>

<%= simple_form_for @user.becomes(Storytime.user_class), :url => dashboard_user_path, remote: true, html: { class: "storytime-modal-form", data: { redirect: "index" } } do |f| %>

      <%= link_to icon("angle-left"), [:dashboard, Storytime.user_class], class: "btn btn-sm btn-default pull-left storytime-modal-trigger", remote: true %>
      <%= f.submit "Save", class: "btn btn-sm btn-primary btn-outline pull-right" %>

        <%= t('dashboard.users.edit_user_header') %>

      <%= render 'storytime/dashboard/settings_tabs.html.erb' %>

      <%= f.input :storytime_name %>
      <%= f.input :email %>
      <%= f.association :storytime_role, include_blank: true, label_method: :label %>

<% end %>

Add becomes to user edit form for when host app is using STI on users table


description "GOV.UK pact broker"

start on runlevel [2345]
stop on runlevel [!2345]

respawn

# If the app respawns more than 5 times in 20 seconds, it has deeper problems
# and should be killed off.
respawn limit 5 20

script
  cd <%= @deploy_dir %>/app
  exec sudo -u <%= @user %> -E \
    exec bundle exec unicorn -c unicorn.rb \
    >>/var/log/pact_broker.log \
    2>>/var/log/pact_broker.err.log
end script

description "GOV.UK pact broker"

start on runlevel [2345]
stop on runlevel [!2345]

respawn

# If the app respawns more than 5 times in 20 seconds, it has deeper problems
# and should be killed off.
respawn limit 5 20

script
  cd <%= @deploy_dir %>/app
  # Using `bash -l` to pick up profile including rbenv setup
  exec sudo -u <%= @user %> \
    bash -l -c "exec bundle exec unicorn -c <%= @deploy_dir %>/unicorn.rb" \
    >>/var/log/pact_broker.log \
    2>>/var/log/pact_broker.err.log
end script

Update upstart script to work with rbenv.

Using `bash -l` causes all the profile scripts to be loaded, and
therefore means that the necessary rbenv setup will be done.


<% case ActiveScaffold.js_framework %>
<% when :jquery %>
<% require_asset "getprototypeof" %>
<% if Jquery::Rails.const_defined? 'JQUERY_UI_VERSION' %>
<% require_asset "jquery-ui" %>
<% require_asset "jquery-ui-timepicker-addon" %>
<% elsif Jquery.const_defined? 'Ui' %>
<% require_asset "jquery.ui.core" %>
<% require_asset "jquery.ui.sortable" %>
<% require_asset "jquery.ui.draggable" %>
<% require_asset "jquery.ui.datepicker" %>
<% require_asset "jquery-ui-timepicker-addon" %>
<% end %>
<% require_asset "jquery/active_scaffold" %>
<% require_asset "jquery/jquery.editinplace" %>
<% require_asset "jquery/date_picker_bridge" %>
<% require_asset "jquery/draggable_lists" %>
<% when :prototype %>
<% require_asset "effects" %>
<% require_asset "controls" %>
<% require_asset "prototype/active_scaffold" %>
<% require_asset "prototype/dhtml_history" %>
<% require_asset "prototype/form_enhancements" %>
<% require_asset "prototype/rico_corner" %>
<% end %>
ActiveScaffold.config = <%= ActiveScaffold.js_config.to_json %>;
<% ActiveScaffold.javascripts.each {|js| require_asset js} %>
<% ActiveScaffold::Bridges.all_javascripts.each {|js| require_asset js} %>

<% case ActiveScaffold.js_framework %>
<% when :jquery %>
<% require_asset "getprototypeof" %>
<% if Jquery::Rails.const_defined? 'JQUERY_UI_VERSION' %>
<% require_asset "jquery-ui" %>
<% require_asset "jquery-ui-timepicker-addon" %>
<% elsif Jquery.const_defined? 'Ui' %>
<% require_asset "jquery.ui.core" %>
<% require_asset "jquery.ui.sortable" %>
<% require_asset "jquery.ui.draggable" %>
<% require_asset "jquery.ui.droppable" %>
<% require_asset "jquery.ui.datepicker" %>
<% require_asset "jquery-ui-timepicker-addon" %>
<% end %>
<% require_asset "jquery/active_scaffold" %>
<% require_asset "jquery/jquery.editinplace" %>
<% require_asset "jquery/date_picker_bridge" %>
<% require_asset "jquery/draggable_lists" %>
<% when :prototype %>
<% require_asset "effects" %>
<% require_asset "controls" %>
<% require_asset "prototype/active_scaffold" %>
<% require_asset "prototype/dhtml_history" %>
<% require_asset "prototype/form_enhancements" %>
<% require_asset "prototype/rico_corner" %>
<% end %>
ActiveScaffold.config = <%= ActiveScaffold.js_config.to_json %>;
<% ActiveScaffold.javascripts.each {|js| require_asset js} %>
<% ActiveScaffold::Bridges.all_javascripts.each {|js| require_asset js} %>

Fix draggable for jquery-rails 3 gem

Fix draggable for jquery-rails 3 gem


<!doctype html>

  <meta http-equiv="refresh" content="1">
  <title>
    <%= @page_title %>
  </title>

 <%= @page_title %>

    <%= @page_content %>

  <% if @node[:remote_recipe] %>

      Using tags: <%= @node[:remote_recipe][:tags].join(", ") %>

      From agent: <%= @node[:remote_recipe][:from] %>

      From instance: <%= @node[:remote_recipe][:from_uid] %>

  <% end %>

    Look ma:

No more SSH!

Execution in serial!

Run a recipe from a recipe

Update template with feedback from Jeremy


        Ember homepage
      <%= link_to_page "About", "/about" %>
      <%= link_to_page "Guides", "http://guides.emberjs.com" %>
      <%= link_to_page "API", "/api" %>
      <%= link_to_page "Community", "/community" %>
      <%= link_to_page "Blog", "/blog" %>
      <%= link_to_page "Builds", "/builds" %>

        <form>
          <input type="text" id="search-input" class="search-input" placeholder="Search ..."/>
        </form>

        Ember homepage
      <%= link_to_page "Guides", "http://guides.emberjs.com" %>
      <%= link_to_page "API", "/api" %>
      <%= link_to_page "Community", "/community" %>
      <%= link_to_page "Blog", "/blog" %>
      <%= link_to_page "Builds", "/builds" %>

        <form>
          <input type="text" id="search-input" class="search-input" placeholder="Search ..."/>
        </form>

Remove About from main navigation

Remove About from main navigation


#!/bin/bash
#
# /etc/rc.d/init.d/supervisor
#
# Manages the supervisor daemon
#
# chkconfig: 2345 90 10
# description: Supervisor is a process control utility
# processname: supervisord
# config: /etc/supervisord.conf
# pidfile: /var/run/supervisord.pid

source /etc/rc.d/init.d/functions

start() {
    echo -n "Starting supervisor: "
    status supervisord > /dev/null && echo "already running" && return 0
    daemon "<%= @supervisord %> -c <%= node['supervisor']['conffile'] %>"
    RETVAL=$?
    echo
    [ $RETVAL -ne 0 ] && return $RETVAL
    touch /var/lock/subsys/supervisor
}

stop() {
    echo -n "Shutting down supervisor: "
    killproc supervisord
    RETVAL=$?
    echo
    [ $RETVAL -ne 0 ] && return $RETVAL
    rm -f /var/lock/subsys/supervisor
}

case "$1" in
    start)
        start
    ;;
    stop)
        stop
    ;;
    status)
        status supervisord
        exit $?
    ;;
    restart)
        stop
        start
    ;;
    *)
        echo "Usage: <servicename> {start|stop|status|restart}"
        exit 1
    ;;
esac

#!/bin/bash
#
# /etc/rc.d/init.d/supervisor
#
# Manages the supervisor daemon
#
# chkconfig: 2345 90 10
# description: Supervisor is a process control utility
# processname: supervisord
# config: /etc/supervisord.conf
# pidfile: /var/run/supervisord.pid

source /etc/rc.d/init.d/functions

start() {
    echo -n "Starting supervisor: "
    status supervisord > /dev/null && echo "already running" && return 0
    daemon "<%= @supervisord %> -c <%= node['supervisor']['conffile'] %>"
    RETVAL=$?
    echo
    [ $RETVAL -ne 0 ] && return $RETVAL
    touch /var/lock/subsys/supervisor
}

stop() {
    echo -n "Shutting down supervisor: "
    status supervisord > /dev/null
    [ $? -eq 3 ] && echo "already stopped" && return 0
    killproc supervisord
    RETVAL=$?
    echo
    [ $RETVAL -ne 0 ] && return $RETVAL
    rm -f /var/lock/subsys/supervisor
}

case "$1" in
    start)
        start
    ;;
    stop)
        stop
    ;;
    status)
        status supervisord
        exit $?
    ;;
    restart)
        stop
        start
    ;;
    *)
        echo "Usage: <servicename> {start|stop|status|restart}"
        exit 1
    ;;
esac

Change stop not to display FAILED if the service is already stopped.


<% content_for :context, @edition.title %>
<% content_for :page_title, "Edit legacy URL redirects" %>

<% content_for :back_link do %>
  <%= render "govuk_publishing_components/components/back_link", {
    href: admin_edition_path(@edition)
  } %>
<% end %>

    <%= form_tag admin_edition_document_sources_path(@edition), method: :patch do %>
      <%= render "govuk_publishing_components/components/textarea", {
        label: {
          is_page_heading: true,
          heading_size: "xl",
          text: "Edit legacy URL redirects"
        },
        hint: "Enter one URL per line.",
        name: "document_sources",
        id: "document_sources",
        value: @edition.document.document_sources.map(&:url).join("\n"),
        rows: 20
      } %>
      <%= render "govuk_publishing_components/components/button", {
        text: "Save",
        margin_bottom: 8
      } %>
    <% end %>

<% content_for :page_title, "Edit legacy URL redirects" %>

<% content_for :back_link do %>
  <%= render "govuk_publishing_components/components/back_link", {
    href: admin_edition_path(@edition)
  } %>
<% end %>

    <%= @edition.title %>
    <%= form_tag admin_edition_document_sources_path(@edition), method: :patch do %>
      <%= render "govuk_publishing_components/components/textarea", {
        label: {
          is_page_heading: true,
          heading_size: "xl",
          text: "Edit legacy URL redirects"
        },
        hint: "Enter one URL per line.",
        name: "document_sources",
        id: "document_sources",
        value: @edition.document.document_sources.map(&:url).join("\n"),
        rows: 20
      } %>
      <%= render "govuk_publishing_components/components/button", {
        text: "Save",
        margin_bottom: 8
      } %>
    <% end %>

Use caption span instead of context content for new legacy url edit page

The textarea label as header means that the content_for context is not rendered. This change uses a span instead.


<% page_title @document.title + " (Response)", "Consultations"  %>
<% page_class 'consultation-response'  %>

<div class="g4f document_page <%= @document.type.downcase %>">

Consultation response

<%= @document.title %>

      <%= render partial: "document_metadata" %>
      <%= render partial: "document_contextual" %>

      <%= render partial: "document_content" %>

    <%= render partial: "document_related", locals: {
        document: @document.consultation,
        policy_topics: @policy_topics,
        related_policies: @related_policies
      } %>

Fix positioning of right column on consultation_responses.


<% categories.each do |category| %>

<%= link_to category.title, category.path %>

      <%= category.contents.map do |sub_category|
          link_to sub_category.title, sub_category.path,
                  class: "tool-category-links__link"
        end.join(', ').html_safe
      %>

<% end %>

<% categories.each do |category| %>
    <%= heading_tag(level: 4, class: 'tool-category-links__heading') do %>
      <%= link_to category.title, category.path %>
    <% end %>

      <%= category.contents.map do |sub_category|
          link_to sub_category.title, sub_category.path,
                  class: "tool-category-links__link"
        end.join(', ').html_safe
      %>

<% end %>

Switch to heading helper for accessible headings


Create new team

<% if @errors %>
  <% @errors.full_messages.each do |error| %>

<%= error %>

  <% end  %>
<% end %>

<%= form_for :team, url: teams_path do |f| %>

    <%= f.label :name, "Name:" %>
    <%= f.text_field :name %>

    <%= f.label :city, "City:" %>
    <%= f.text_field :city %>

    <%= f.label :country, "Country:" %>
    <%= f.text_field :country %>

    <%= f.label :coach, "Coach:" %>
    <%= f.text_field :coach %>

  <%= f.submit "Create Team" %>
<% end %>

Add paragraph to submit button

Add paragraph to submit button


#!/bin/bash
# -*- mode: shell-script -*-
#
# 01-bach-variables
#
# Print relevant BACH variables and hardware info on login.
#

<% mfg = node['dmi']['system']['manufacturer']
   product = node['dmi']['system']['product_name']
   gb = (node['memory']['total'].to_f / 1024 / 1024).round
   cores = node[:cpu]['0'][:cores].to_i * node[:cpu][:real] %>

cat << EOF

You have logged into a member of a BACH cluster.

<% if node[:virtualization][:role] == 'guest' %>
This is a virtual machine with <%= gb %> GB of RAM and <%= cores %> CPU cores.
<% else %>
This system is a <%= mfg %> <%= product %>.
It is equipped with <%= gb %> GB of RAM and <%= cores %> CPU cores.
<% end %>

Environment: <%= node.chef_environment %>
Zabbix URL: https://<%= node[:bcpc][:management][:vip] %>:<%= node[:bcpc][:zabbix][:web_port] %>
Graphite URL: https://<%= node[:bcpc][:management][:vip] %>:<%= node[:bcpc][:graphite][:web_port] %>
Bootstrap node IP: <%= node[:bcpc][:bootstrap][:server] %>
Roles:
<% node.run_list.each do |entry| %>
<%= "  - #{entry.to_s}" %>
<% end %>

EOF

#!/bin/bash
# -*- mode: shell-script -*-
#
# 01-bach-variables
#
# Print relevant BACH variables and hardware info on login.
#

<%
 mfg = node['dmi']['system']['manufacturer']
 product = node['dmi']['system']['product_name']
 gb = (node['memory']['total'].to_f / 1024 / 1024).round
 cores = node[:cpu]['0'][:cores].to_i * node[:cpu][:real]

 chef_bach_version =
   node.run_context.cookbook_collection['bach_common'].version rescue nil
%>

cat << EOF

You have logged into a member of a BACH cluster.

<% if node[:virtualization][:role] == 'guest' %>
This is a virtual machine with <%= gb %> GB of RAM and <%= cores %> CPU cores.
<% else %>
This system is a <%= mfg %> <%= product %>.
It is equipped with <%= gb %> GB of RAM and <%= cores %> CPU cores.
<% end %>

Chef-bach version: <%= chef_bach_version || 'UNKNOWN' %>
Environment: <%= node.chef_environment %>
Zabbix URL: https://<%= node[:bcpc][:management][:vip] %>:<%= node[:bcpc][:zabbix][:web_port] %>
Graphite URL: https://<%= node[:bcpc][:management][:vip] %>:<%= node[:bcpc][:graphite][:web_port] %>
Bootstrap node IP: <%= node[:bcpc][:bootstrap][:server] %>
Roles:
<% node.run_list.each do |entry| %>
<%= "  - #{entry.to_s}" %>
<% end %>

EOF

Add chef-bach version to the MotD

Add chef-bach version to the MotD


Add new posts

	We will add new post here!

Add new posts

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

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

Add form, textarea and button

Add form, textarea and button


<% if @articles.empty? %>

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

<% end %>
<% for article in @articles %>

      <% if article.published? %>
        <%= link_to_permalink(article, article.title, nil, 'published') %>
      <% else %>
        <%= link_to(article.title, { controller: '/articles', action: 'preview', id: article.id }, { class: 'unpublished', target: '_new' }) %>
      <% end %>
      <%= show_actions article %>

      <%= author_link(article) %>

      <%= l(article.published_at || article.created_at) %>

      <%= article.allow_comments? ? link_to("#{article.comments.ham.size} ".html_safe, controller: '/admin/feedback', id: article.id, action: 'article') : '-' %>

<% end %>
<%= display_pagination(@articles, 5, 'first', 'last') %>

<% if @articles.empty? %>

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

<% end %>
<% for article in @articles %>

      <% if article.published? %>
        <%= link_to_permalink(article, article.title, nil, 'published') %>
      <% else %>
        <%= link_to(article.title, { controller: '/articles', action: 'preview', id: article.id }, { class: 'unpublished', target: '_new' }) %>
      <% end %>
      <%= show_actions article %>

      <%= author_link(article) %>

      <%= l(article.published_at || article.created_at) %>

      <% if article.allow_comments? %>
        <%= link_to("#{article.comments.ham.size} #{t(".feedback")}".html_safe, controller: '/admin/feedback', id: article.id, action: 'article') %>
      <% else %>
        -
      <% end %>

<% end %>
<%= display_pagination(@articles, 5, 'first', 'last') %>

Replace icon in article feedback link

Replace icon in article feedback link


<li class="proposal-featured featured-proposal" id="<%= dom_id(proposal, "featured") %>">

<%= link_to truncate(proposal.title, length: 90), proposal %>

        <% if proposal.author.hidden? || proposal.author.erased? %>
          <%= t("proposals.show.author_deleted") %>
        <% else %>
          <%= proposal.author.name %>
        <% end %>
         •
        <%= t("proposals.proposal.supports", count: proposal.total_votes) %>

    <div id="<%= dom_id(proposal, "featured") %>_votes">
      <%= render 'featured_votes', proposal: proposal %>

<li class="proposal-featured featured-proposal" id="<%= dom_id(proposal, "featured") %>">

<%= link_to truncate(proposal.title, length: 90), proposal %>

        <% if proposal.author.hidden? || proposal.author.erased? %>
          <%= t("proposals.show.author_deleted") %>
        <% else %>
          <% unless proposal.official? || proposal.from_meeting? %>
            <%= proposal.author.name %>
          <% end %>
        <% end %>
         •
        <%= t("proposals.proposal.supports", count: proposal.total_votes) %>

    <div id="<%= dom_id(proposal, "featured") %>_votes">
      <%= render 'featured_votes', proposal: proposal %>

Remove author from official and meeting proposals


<%= _('More about this authority')%>

<% if !public_body.calculated_home_page.nil? %>
    <%= link_to _('Home page of authority'), public_body.calculated_home_page %>

<% end %>

<% if !public_body.publication_scheme.empty? %>
    <%= link_to _('Publication scheme'), public_body.publication_scheme %>

<% end %>

<% unless public_body.disclosure_log.empty? %>
    <%= link_to _('Disclosure log'), public_body.disclosure_log %>

<% end %>

<% if public_body.has_tag?('charity') %>
    <% public_body.get_tag_values('charity').each do |tag_value| %>
        <% if tag_value.match(/^SC/) %>
            <%= link_to _('Charity registration'), "http://www.oscr.org.uk/CharityIndexDetails.aspx?id=#{ tag_value }" %>

        <% else %>
            <%= link_to _('Charity registration'), "http://www.charity-commission.gov.uk/SHOWCHARITY/RegisterOfCharities/CharityFramework.aspx?RegisteredCharityNumber=#{ tag_value }" %>

        <% end %>
    <% end %>
<% end %>

<%= link_to _('View FOI email address'), view_public_body_email_path(public_body.url_name) %>

<%= link_to _("Ask us to update FOI email"), new_change_request_path(:body => public_body.url_name) %>

Add charity links to public bodies

Add charity links to public bodies

If the body is a charity, provide a link to its registration info


<%= _('More about this authority')%>

<% if !public_body.calculated_home_page.nil? %>
  <%= link_to _('Home page of authority'), public_body.calculated_home_page %>

<% end %>

<% if !public_body.publication_scheme.blank? %>
  <%= link_to _('Publication scheme'), public_body.publication_scheme %>

<% end %>

<% unless public_body.disclosure_log.blank? %>
  <%= link_to _('Disclosure log'), public_body.disclosure_log %>

<% end %>

<% if public_body.has_tag?('charity') %>
  <% public_body.get_tag_values('charity').each do |tag_value| %>
    <% if tag_value.match(/^SC/) %>
      <%= link_to _('Charity registration'), "http://www.oscr.org.uk/CharityIndexDetails.aspx?id=#{ tag_value }" %>

    <% else %>
      <%= link_to _('Charity registration'), "http://www.charity-commission.gov.uk/SHOWCHARITY/RegisterOfCharities/CharityFramework.aspx?RegisteredCharityNumber=#{ tag_value }" %>

    <% end %>
  <% end %>
<% end %>

<%= link_to _('View FOI email address'), view_public_body_email_path(public_body.url_name) %>

<%= link_to _("Ask us to update FOI email"), new_change_request_body_path(:body => public_body.url_name) %>

<%= _('More about this authority')%>

<% if !public_body.calculated_home_page.nil? %>
  <%= link_to _('Home page of authority'), public_body.calculated_home_page %>

<% end %>

<% if !public_body.publication_scheme.blank? %>
  <%= link_to _('Publication scheme'), public_body.publication_scheme %>

<% end %>

<% unless public_body.disclosure_log.blank? %>
  <%= link_to _('Disclosure log'), public_body.disclosure_log %>

<% end %>

<% if public_body.has_tag?('charity') %>
  <% public_body.get_tag_values('charity').each do |tag_value| %>
    <% if tag_value.match(/^SC/) %>
      <%= link_to _('Charity registration'),
                    "https://www.oscr.org.uk/search/charity-details?number=#{ tag_value }" %>

    <% else %>
      <%= link_to _('Charity registration'),
                    "http://beta.charitycommission.gov.uk/charity-details/?regid=#{ tag_value }&subid=0" %>

    <% end %>
  <% end %>
<% end %>

<%= link_to _('View FOI email address'), view_public_body_email_path(public_body.url_name) %>

<%= link_to _("Ask us to update FOI email"), new_change_request_body_path(:body => public_body.url_name) %>

Update links to the Charity Commission and Charity Register sites

Both sites have updated their URL structure so our current links to
registration pages of charities no longer work. This commit adopts the
current URL structures, although this may be fragile in the case of the
Charity Commission as they are currently linking to a beta subdomain
with a banner indicating that it is a prototype.


New article

<%= form_for :article do |f| %>

		Title

<% end %>

New article

<%= form_for :article do |f| %>

		<%= f.label :title %>

		<%= f.text_field :title %>

<% end %>

Add text form and label

Add text form and label


<% content_for :nav do %>

<%= link_to 'wiki', page_path(Rails.configuration.wiki.home_page) %>:

    <% Rails.configuration.wiki.top_pages.each do |v| %>

<%= link_to v.name, v %>

    <% end %>

<%= link_to 'changelog', log_path %>

<%= link_to 'contents', pages_path %>

      <%= render partial: 'wiki/search' %>

<% end %>
<% content_for :content do %>
  <%= yield %>
<% end %>
<%= render template: "layouts/application" %>

<% content_for :nav do %>

    <% Rails.configuration.wiki.top_pages.each do |v| %>

<%= link_to v.name, v %>

    <% end %>

<%= link_to 'changelog', log_path %>

<%= link_to 'contents', pages_path %>

      <%= render partial: 'wiki/search' %>

<% end %>
<% content_for :content do %>
  <%= yield %>
<% end %>
<%= render template: "layouts/application" %>

Remove "home" from view template

Remove "home" from view template


Search results for "<%= params[:search] %>"

<% if @corrals.empty? %>
  Sorry, nothing matches your search...
<% else %>
  <% @corrals.each do |corral| %>

<%= corral.location %>

(<%= pluralize(corral.racks, "rack") %>)

  <% end %>
<% end %>

Search results for "<%= params[:search] %>"

<% if @corrals.empty? %>
  Sorry, nothing matches your search...
<% else %>
  <% @corrals.each do |corral| %>

<%= link_to corral.location, corral_path(corral) %>

(<%= pluralize(corral.racks, "rack") %>)

  <% end %>
<% end %>

Add link_to at search result show page

Add link_to at search result show page


Gem in a Strong Box

Private Ruby Gem Server

    <%= link_to omniauth_path('google'), class: "btn btn-primary btn-lg google" do %>
      <%= icon('google', 'Login with Google') %>
    <% end %>

    <% if Rails.env.development? || Rails.env.test? %>
      <%= link_to omniauth_path('developer'), class: "btn btn-primary btn-lg developer" do %>
        <%= icon('warning', 'Login to development') %>
      <% end %>
    <% end %>

Gem in a Strong Box

Private Ruby Gem Server

    <%= link_to omniauth_path('google'), class: "btn btn-primary btn-lg google" do %>
      <%= icon('google', 'Log in with Google') %>
    <% end %>

    <% if Rails.env.development? || Rails.env.test? %>
      <%= link_to omniauth_path('developer'), class: "btn btn-primary btn-lg developer" do %>
        <%= icon('warning', 'Log in to development') %>
      <% end %>
    <% end %>

Correct "login" (as a verb) to "log in"

Correct "login" (as a verb) to "log in"

Just a tiny typo fix


backend default {
  .host = "<%= node['varnish']['backend_host'] %>";
  .port = "<%= node['varnish']['backend_port'] %>";
}

acl internal_nrel {
  "localhost";

}

sub vcl_recv {
  # Allow internal connections to force cache misses for testing/debug
  # purposes.
  if (req.http.Cache-Control ~ "no-cache" && client.ip ~ internal_nrel) {
    set req.hash_always_miss = true;
  }
}

Allow internal connection to force cache misses.


---
title: The Captain and The Truth
category:
topic: Basketball
date: 2016-09-29 07:23:54 UTC
published: false
...

First off: Avery Bradley is a bad man. In a world where Eric Bledsoe is "mini
Lebron", Avery Bradley is mini Kawhi. Speaking of:

<%# <svg id="avery-bradley-off-eff"></svg> %>
<%#  %>
<%#  %>

A **very** bad man.

But this isn't about Avery Bradley.

Add draft of Paul Pierce post

Add draft of Paul Pierce post


<!DOCTYPE html>

    <meta content='text/html; charset=UTF-8' http-equiv='Content-Type' />

Hello!

AACT User information is saved to the attached SQL files.

          <% @files.each do |file_info| %>

<%= file_info[:file_name] %>

          <% end %>

User info can be restored with the following commands:

        First verify the schema defined in the file is correct (ctgov).
        in aact_admin db:
          truncate table users;
          truncate table user_events;
        psql -d aact_admin -a -f YYYYMMDD-aact-users_table.sql
        psql -d aact_admin -a -f YYYYMMDD-aact-user_events.sql

        On the public server that hosts the publicly accessible database:
        psql -d aact -a -f YYYYMMDD-aact-user_accounts.sql

Fix display of instructions about how to reload user data into the db


<%= simple_form_for @pendant_record, url: my_pendant_records_path, remote: true do |f| %>

    <input type="search" class="search" placeholder="Search" />

      <%= render partial: 'radio_button', collection: @pendants.to_a, as: :pendant %>

  <%= f.input :photo, as: :camera %>

  <%= f.button :submit %>
<% end %>

<%= link_to 'Fake an old one :-(', new_my_fake_pendant_record_path %>

<%= simple_form_for @pendant_record, url: my_pendant_records_path do |f| %>

    <input type="search" class="search" placeholder="Search" />

      <%= render partial: 'radio_button', collection: @pendants.to_a, as: :pendant %>

  <%= f.input :photo, as: :camera %>

  <%= f.button :submit %>
<% end %>

<%= link_to 'Fake an old one :-(', new_my_fake_pendant_record_path %>

Undo remote true to fix recording pendants


<tr id="<%= spree_dom_id(variant) %>">

    <% if variant.images.present? %>
      <%= image_tag variant.images.first.attachment.url(:mini) %>
    <% end %>

   <%= variant.sku_and_options_text %>

         <%= Spree.t('sale_price_active') %>
         <%= Spree.t('price') %>
         <%= Spree.t('sale_price') %>
         <%= Spree.t('sale_price_start_at') %>
         <%= Spree.t('sale_price_end_at') %>
         <%= Spree.t('sale_price_enabled') %>

        <%= render partial: "sale_price", collection: variant.sale_prices, locals: { product: product, variant: variant } %>

<tr id="<%= spree_dom_id(variant) %>">

    <% if variant.images.present? %>
      <%= image_tag variant.images.first.attachment.url(:mini) %>
    <% end %>

   <%= variant.sku_and_options_text %>

    <%- if variant.sale_prices.any? %>

           <%= Spree.t('sale_price_active') %>
           <%= Spree.t('price') %>
           <%= Spree.t('sale_price') %>
           <%= Spree.t('sale_price_start_at') %>
           <%= Spree.t('sale_price_end_at') %>
           <%= Spree.t('sale_price_enabled') %>

          <%= render partial: "sale_price", collection: variant.sale_prices, locals: { product: product, variant: variant } %>

    <%- else %>

        <%= Spree.t(:no_resource_found, resource: plural_resource_name(Spree::SalePrice)) %>

    <% end %>

Add "No Sale Prices found" box when a variant has no sale prices


<%= render partial: 'spree/admin/shared/configuration_menu' %>

<% content_for :page_title do %>
  <%= Spree.t(:reimbursement_types) %>
<% end %>

<% if @reimbursement_types.any? %>

        <%= Spree.t(:name) %>
        <%= Spree.t(:type) %>

      <% @reimbursement_types.each do |reimbursement_type| %>
        <tr id="<%= spree_dom_id reimbursement_type %>" data-hook="reimbursement_type_row" class="<%= cycle('odd', 'even')%>">

            <%= reimbursement_type.name.humanize %>

            <%= reimbursement_type.type %>

      <% end %>

<% else %>

    <%= Spree.t(:no_resource_found, resource: I18n.t(:other, scope: 'activerecord.models.spree/reimbursement_type')) %>,
    <%= link_to Spree.t(:add_one), new_object_url %>!

<% end %>

<%= render partial: 'spree/admin/shared/configuration_menu' %>

<% content_for :page_title do %>
  <%= Spree.t(:reimbursement_types) %>
<% end %>

      <%= Spree.t(:name) %>
      <%= Spree.t(:type) %>

    <% @reimbursement_types.each do |reimbursement_type| %>
      <tr id="<%= spree_dom_id reimbursement_type %>" data-hook="reimbursement_type_row" class="<%= cycle('odd', 'even')%>">

          <%= reimbursement_type.name.humanize %>

          <%= reimbursement_type.type %>

    <% end %>

Remove links to the new action in reimbursement types.

Reimbursement types does not have a new action.


<%= form_for Spree::User.new, :as => :spree_user, :url => spree.create_new_session_path do |f| %>

      <%= f.label :email, Spree.t(:email) %>

      <%= f.email_field :email, :class => 'title', :tabindex => 1 %>

      <%= f.label :password, Spree.t(:password) %>

      <%= f.password_field :password, :class => 'title', :tabindex => 2 %>

    <%= f.check_box :remember_me, :tabindex => 3 %>
    <%= f.label :remember_me, Spree.t(:remember_me) %>

<%= f.submit Spree.t(:login), :class => 'button primary', :tabindex => 4 %>

<% end %>

<%= form_for Spree::User.new, :as => :spree_user, :url => spree.create_new_session_path do |f| %>

      <%= f.label :email, Spree.t(:email) %>

      <%= f.email_field :email, :class => 'title', :tabindex => 1, autofocus: true %>

      <%= f.label :password, Spree.t(:password) %>

      <%= f.password_field :password, :class => 'title', :tabindex => 2 %>

    <%= f.check_box :remember_me, :tabindex => 3 %>
    <%= f.label :remember_me, Spree.t(:remember_me) %>

<%= f.submit Spree.t(:login), :class => 'button primary', :tabindex => 4 %>

<% end %>

Add autofocus to login form

Add autofocus to login form

Springing from the discussion in https://github.com/spree/spree/issues/4715, this change allows the HTML5 `autofocus` attribute to put the cursor into the email field when displaying the login screen, which removes one step from the user login process.

Closes #190


## Description:
Average latency to the destination: {{dest_ip.name}} is above 10ms.

###About the source of this alert:
There are 100 app instances running in PWS in the cloudops/cloudops space that regularly ping {{dest_ip.name}}.
The application name is {{application_name.name}}.

## Escalation Path:
CloudOps. Notes: This is an indicator of network congestion.

## Possible Causes:
This is an indicator of NAT box network performance issues.

## Potential Solutions:
Last time this came up, we had to recreate the NAT box.

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

<%= cloudops_pagerduty %>

Pings to 4.2.2.1 are higher latency than normal

Question: avg(last_5m):avg:cloudops_tools.ping_status{deployment:<%= deployment %>} by {application_name,dest_ip} > 0.030

Question: avg(last_15m):avg:cloudops_tools.ping_status{deployment:<%= deployment %>} by {application_name,dest_ip} > 0.030

Extend threshold timeout to 15 min for outbound ping latency


<h1> <%= _(MezuroPlugin::ProjectContent.short_description) %> </h1>

<%
  @project = @article.title.nil? ? nil : @article.project
%>

<%= error_messages_for 'project_content' %>

<%= hidden_field_tag 'project_content[profile_id]', profile.id %>
<%= hidden_field_tag 'id', @article.id %>
<%= hidden_field_tag 'project_id', @article.project_id %>

<%= required_fields_message %>

<%= required f.text_field(:name) %>

<%= f.text_field :description %><br/>

# partial rendered in app/views/cms/edit.rhtml

[Mezuro] Comment to see where project_content cms partial is rendered


<%= form_tag("/generate_delete_transaction", remote: true) do %>
  <%= text_field_tag 'public_key', creator_address, hidden: true %>
  <%= text_field_tag 'payload', payload, hidden: true %>
  <%= text_field_tag 'priv_key', private_key, hidden: true %>
  <%= submit_tag submit_name, class: "btn btn-default", data: { disable_with: "#{submit_name.eql?('Delete') ? 'Deleting...' : 'Accepting...'}" } %>
<% end %>

<%= form_tag("/generate_delete_transaction", remote: true) do %>
  <%= text_field_tag 'public_key', creator_address, hidden: true %>
  <%= text_field_tag 'payload', payload, hidden: true %>
  <%= text_field_tag 'priv_key', private_key, hidden: true %>
  <%= submit_tag submit_name, class: "btn btn-default", data: { disable_with: "#{submit_name.eql?('Accept') ? 'Accepting...' : 'Cancelling...'}" } %>
<% end %>

Fix disable messages after name changes

Fix disable messages after name changes


Mailpenny

                <input type="text" placeholder="Search">
                <button class="ui button">Submit</button>

          <% if user_signed_in? %>

            Profile

            Inbox

              Dropdown

Action

Another Action

Something else here

Separated Link

One more separated link

          <% else %>

              <a href="<%= new_user_session_path %>" class="ui button">Log in

              <a href="<%= new_user_registration_path %>" class="ui primary button">Sign Up

          <% end %>

Convert the menu items into anchor tags

Convert the menu items into anchor tags


          <%= resource_class.human_attribute_name(:ingreso) %>:
          <%= pase.ingreso %>

          <%= resource_class.human_attribute_name(:descripcion) %>:
          <%= pase.descripcion %>

      <% #TODO: agregar Area, con link al area en cuestion" %>

          <%= resource_class.human_attribute_name(:ingreso) %>:
          <%= pase.ingreso %>

          <%= resource_class.human_attribute_name(:descripcion) %>:
          <%= pase.descripcion %>

          <%= resource_class.human_attribute_name(:area) %>:
          <%= link_to pase.area.name, backend_area_path(pase.area) %>

Add link in the Nota-> pases section to the corresponding Area it was trasnfered


<% unless content.find_out_more_chart_title.blank? %>

<%= content.find_out_more_chart_title %>

<% end %>
<div id="chart_wrapper_<%= chart %>" class="col-md-auto chart-wrapper">
  <%= chart_tag(school, chart.to_s, wrap: false, show_advice: false, chart_config: {y_axis_units: '£'}, html_class: 'analysis-chart find-out-more') %>

<div id="chart_wrapper_<%= chart %>" class="col-md-auto chart-wrapper">
  <% unless content.find_out_more_chart_title.blank? %>

<%= content.find_out_more_chart_title %>

  <% end %>
  <%= chart_tag(school, chart.to_s, wrap: false, show_advice: false, chart_config: {y_axis_units: '£'}, html_class: 'analysis-chart find-out-more') %>

Revert to h4 instead of h3

Revert to h4 instead of h3


<% page_title "Feature document" %>

Feature '<%= @edition_organisation.edition.title %>' within '<%= @edition_organisation.organisation.name %>'

<%= form_for [:admin, @edition_organisation], builder: Whitehall::FormBuilder do |form| %>
  <%= form.errors %>
  <%= form.hidden_field :featured %>
  <%= form.fields_for :image do |image_fields| %>

      <%= image_fields.label :file, 'Image', class: "control-label" %>

        <%= image_fields.file_field :file %>
        <% if image_fields.object.file_cache.present? %>
          <%= File.basename(image_fields.object.file_cache) %> already uploaded
        <% end %>
        <%= image_fields.hidden_field :file_cache %>

  <% end %>
  <%= form.text_field :alt_text, horizontal: true %>
  <%= form.save_or_cancel cancel: admin_organisation_path(@edition_organisation.organisation) %>
<% end %>

Make the form a bit less wide.

Make the form a bit less wide.


 <%= response.user ? response.user.name : 'Default' %>

      <a data-id="<%= response.id %>" class="upvote">￪
      <span data-id="<%= response.id %>"> <%= response.votes.count %> votes

<%= response.content %>

  <% if response.user.id == session[:current_user] %>
    <%= link_to 'Edit', edit_response_path(response) %>
    <%= link_to 'Delete', response, method: :delete, data: {confirm: "You sure bub?" } %>
  <% end %>

   Comments

  <% if session[:current_user] %>
    <%= link_to 'Add Comment', new_response_comment_path(response) %>
  <% end %>

  <% response.comments.each do |comment| %>
    <%= render partial: 'comment', locals: {comment: comment} %>
  <% end %>

 <%= response.user ? response.user.name : 'Default' %>

      <a data-id="<%= response.id %>" class="upvote">￪
      <% if response.votes.count == 1 %>
        <span data-id="<%= response.id %>"> <%= response.votes.count %> vote
      <% else %>
        <span data-id="<%= response.id %>"> <%= response.votes.count %> votes
      <% end %>

<%= response.content %>

  <% if response.user.id == session[:current_user] %>
    <%= link_to 'Edit', edit_response_path(response) %>
    <%= link_to 'Delete', response, method: :delete, data: {confirm: "You sure bub?" } %>
  <% end %>

   Comments

  <% if session[:current_user] %>
    <%= link_to 'Add Comment', new_response_comment_path(response) %>
  <% end %>

  <% response.comments.each do |comment| %>
    <%= render partial: 'comment', locals: {comment: comment} %>
  <% end %>

Add inflection logic for the word 'vote'.


<meta charset="UTF-8">
<script>
// IMPORTANT!!!!
// ALWAYS LOAD THIS *FIRST*
window.globalConfig = <%= raw($FRONTEND_SHARED_DATA) %> // SEE COMMENTS!;
// READ COMMENT ABOVE
</script>
<%= render "addons" %>
<meta content="width=device-width, initial-scale=1" name="viewport">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<link href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i" rel="stylesheet">
<% if Rails.env.development? &&  %>
  <script src="http://<%= ENV["API_HOST"] %>:8081/target/target-script-min.js#anonymous"></script>
<% end %>

<meta charset="UTF-8">
<script>
// IMPORTANT!!!!
// ALWAYS LOAD THIS *FIRST*
window.globalConfig = <%= raw($FRONTEND_SHARED_DATA) %> // SEE COMMENTS!;
// READ COMMENT ABOVE
</script>
<%= render "addons" %>
<meta content="width=device-width, initial-scale=1" name="viewport">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<link href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i" rel="stylesheet">
<% if Rails.env.development?   %>
  <script async src="http://<%= ENV["API_HOST"] %>:8081/target/target-script-min.js#anonymous">
  </script>
<% end %>

Add `async` attr to Weinre tag so that local dev env doesnt get bogged down


Sign up

<%= devise_error_messages! %>

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

    <%= f.input :email, required: true, autofocus: true %>
    <%= f.input :first_name, required: true, autofocus: true %>
    <%= f.input :last_name, required: true %>
    <%= f.input :company %>
    <%= f.input :account_type, collection: User.account_types.keys.to_a, selected: "Residence" %>
    <%= f.input :password, required: true, hint: ("#{@minimum_password_length} characters minimum" if @minimum_password_length) %>
    <%= f.input :password_confirmation, required: true %>

    <%= f.button :submit, "Sign up" %>

<% end %>

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

Log in

<%= devise_error_messages! %>

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

    <%= f.input :email, required: true, autofocus: true %>
    <%= f.input :first_name, required: true, autofocus: true %>
    <%= f.input :last_name, required: true %>
    <%= f.input :company %>
    <%= f.input :account_type, collection: User.account_types.keys.to_a, selected: "Residence" %>
    <%= f.input :password, required: true, hint: ("#{@minimum_password_length} characters minimum" if @minimum_password_length) %>
    <%= f.input :password_confirmation, required: true %>

    <%= f.button :submit, "Log in" %>

<% end %>

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

Replace sign in references on devise view with log in


Attributes

Characters per user

    <%= column_chart User.joins(:attribute_fields).group(:user_id).count().group_by { |n| n.last }.each_with_object({}) { |(content_count, ids), h| h[content_count] = ids.count } %>

Attributes per universe

    <%= column_chart Universe.joins(:attribute_fields).group(:universe_id).count().group_by { |n| n.last }.each_with_object({}) { |(content_count, ids), h| h[content_count] = ids.count } %>

Attribute privacy

    <%= pie_chart AttributeField.where.not(privacy: "").group(:privacy).count() %>

Attributes

Attributes per user

    <%= column_chart User.joins(:attribute_fields).group(:user_id).count().group_by { |n| n.last }.each_with_object({}) { |(content_count, ids), h| h[content_count] = ids.count } %>

  <%# TODO: attributes per each content type %>

Attribute privacy

    <%= pie_chart AttributeField.where.not(privacy: "").group(:privacy).count() %>

Fix attributes admin page 500

Fix attributes admin page 500


form_for @user

<% @wine.properties.each do |property| %>

<%= property.property %>

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

<%= option.option %>

  <% end %>
<% end %>

Add initial show quiz view

Add initial show quiz view


<% content_for :title, "A/B testing - GOV.UK" %>
<% content_for :extra_headers do %>
  <%= @requested_variant.analytics_meta_tag.html_safe %>
  <meta name="robots" content="noindex">
<% end %>

  <%= render "govuk_publishing_components/components/title", {
    title: "This is a test page"
  } %>

We sometimes test different versions of pages with different users to see which work better.
    This page shows us if the process is working.

    There are 2 versions of this page. You are viewing the
    <%= @requested_variant.variant?("A") ? 'A' : 'B' %>
    version.

Visit the GOV.UK homepage to find government services and information.

Fix A/B testing test page

Fix A/B testing test page


<%= notice %>

<%= @work_month.name %>

<%= "#{@work_month.year}-#{@work_month.month}" %>

  <% @work_month.work_days.each do |day| %>

      <%= day.date.strftime("%Y-%m-%d %a") %>
      Hours: <%= day.hours %>
      Absence: <%= day.absence %>

  <% end %>

Working days: <%= @work_month.working_days %>

Sick: <%= @work_month.sick_days %>

Home with sick child: <%= @work_month.home_with_sick_child_days %>

Vacation: <%= @work_month.vacation_days %>

Parental leave: <%= @work_month.parental_leave_days %>

<%= link_to 'Edit', edit_work_month_path(@work_month) %> |
<%= link_to 'Back', work_months_path %>

Remove the edit and back link on show page


  <%= render "mailbox/folders" %>

    <% if @pending_requests %>
      <% @pending_requests.each do |req| %>

<%= link_to req.collaborator.username, user_path(req.collaborator) %> is requesting to collaborate on <%= link_to req.project.title, project_path(req.project.title) %>

        <%= button_to project_collaboration_path(req.project, req), method: 'patch', params:{status: 'approved'}, class: "btn-floating red lighten-1" do %>
          done
        <% end %>

        <%= button_to project_collaboration_path(req.project, req), method: 'patch', params:{status: 'denied'}, class: "btn-floating light-green lighten-2" do %>
          clear
        <% end %>

        <% end %>

    <% end %>

    <% if is_conversation %>
      <%= render 'conversations/form' %>
    <% else %>
      <%= render partial: 'conversations/conversation', collection: messages %>
    <% end %>

Move closing div tag so rows display properly


    <%= link_to_back search_media_index_path if action_name == 'edit' %>
    <%= form_for :search, url: search_media_index_path, method: :get, html: {role: 'search'} do |f| %>
      <%= facets_inputs([:tg]) %>
      <%= hidden_field_tag :e, params[:e] if params[:e] %>

          <button class="btn btn-default"><%= icon_tag('search') %></button>

        <%= text_field_tag :query, params[:query], class: 'form-control input-search', placeholder: 'Search' %>

    <% end -%>

        <%= icon_tag 'plus' %> Add files...

      <input class='input-file-upload js-file-upload' type="file" name="assets[]" data-url="<%= media_index_path %>" multiple>

<%= content_for :footer do %>
  <%= render 'georgia/shared/modals/progress' %>
<% end -%>

    <%= link_to_back search_media_index_path if action_name == 'edit' %>
    <%= form_for :search, url: search_media_index_path, method: :get, html: {role: 'search'} do |f| %>
      <%= facets_inputs([:tg]) %>
      <%= hidden_field_tag :e, params[:e] if params[:e] %>

          <button class="btn btn-default"><%= icon_tag('search') %></button>

        <%= text_field_tag :query, params[:query], class: 'form-control input-search', placeholder: 'Search', autofocus: true %>

    <% end -%>

        <%= icon_tag 'plus' %> Add files...

      <input class='input-file-upload js-file-upload' type="file" name="assets[]" data-url="<%= media_index_path %>" multiple>

<%= content_for :footer do %>
  <%= render 'georgia/shared/modals/progress' %>
<% end -%>

Add autofocus on media library search bar


<%= (Date.new(2013, 10, 16) - Date.today).to_i %>

Days Left

<%= t("help.start.rider.title") %>

<%= link_to t("help.start.rider.one"), new_user_registration_path %>

<%= link_to t("help.start.rider.two"), teams_path %>

<%= link_to t("help.start.rider.three"),  new_ride_path %>

<%= t("help.start.captain.title") %>

<%= link_to t("help.start.captain.one"), new_user_registration_path %>

<%= link_to t("help.start.captain.two"), new_team_path %>

<%= t("help.start.captain.three") %>

<%= (active_competition.end_on - Date.today).to_i + 1 %>

Days Left

<%= t("help.start.rider.title") %>

<%= link_to t("help.start.rider.one"), new_user_registration_path %>

<%= link_to t("help.start.rider.two"), teams_path %>

<%= link_to t("help.start.rider.three"),  new_ride_path %>

<%= t("help.start.captain.title") %>

<%= link_to t("help.start.captain.one"), new_user_registration_path %>

<%= link_to t("help.start.captain.two"), new_team_path %>

<%= t("help.start.captain.three") %>

Use active competition end date for countdown


<% breadcrumb :new_lesson_plan_item, @lesson_plan %>

Creating a Lesson Plan Item for <%= @lesson_plan.date.strftime("%A - %-d %B %Y") %>

<% if @duplicate_from %>
  <%= form_for @lesson_plan_item, url: duplicate_lesson_plan_items_path(@lesson_plan) do |f| %>
    <%= f.label :lesson_plan_id, "New Lesson Plan" %>
    <%= f.collection_select :lesson_plan_id, current_user.lesson_plans, :id, :long_date %>

    <%= hidden_field_tag :duplicate_from, @duplicate_from %>
    <%= f.submit "Save", class: "btn btn-primary" %>
  <% end %>
<% else %>
  <%= render "form" %>
<% end %>

<% breadcrumb :new_lesson_plan_item, @lesson_plan %>

Creating a Lesson Plan Item for <%= @lesson_plan.date.strftime("%A - %-d %B %Y") %>

<% if @duplicate_from %>

  <%= form_for @lesson_plan_item, url: duplicate_lesson_plan_items_path(@lesson_plan) do |f| %>
    <%= f.label :lesson_plan_id, "New Lesson Plan" %>
    <%= f.collection_select :lesson_plan_id, current_user.lesson_plans.order(date: :desc), :id, :long_date %>

    <%= hidden_field_tag :duplicate_from, @duplicate_from %>
    <%= f.submit "Save", class: "btn btn-primary" %>
  <% end %>
<% else %>
  <%= render "form" %>
<% end %>

Order list of dates while duplicating lesson plan items.


<% unless current_user %>
    <p>
      <%= link_to "Login", new_session_path %> to upload source images and create source sets.
    </p>
<% end %>

<% unless @src_sets.empty? %>
    <%= render :partial => 'src_sets/src_sets' %>
<% end %>

<% if @src_images %>
    <%= render :partial => 'src_images/src_images' %>
<% end %>

<% if @gend_images %>
    <%= render :partial => 'gend_images/gend_images' %>
<% end %>

<% unless current_user %>

Meme Captain is new. The previous version is still available
      at <%= link_to 'http://v1.memecaptain.com/', 'http://v1.memecaptain.com/' %>. Send
      feedback
      to <%= mail_to 'matthewm@boedicker.org' %>.

      <%= link_to "Login", new_session_path %> to upload source images and create source sets.

<% end %>

<% unless @src_sets.empty? %>
    <%= render :partial => 'src_sets/src_sets' %>
<% end %>

<% if @src_images %>
    <%= render :partial => 'src_images/src_images' %>
<% end %>

<% if @gend_images %>
    <%= render :partial => 'gend_images/gend_images' %>
<% end %>

Add Meme Captain is new message.

Add Meme Captain is new message.


<%= @list.name.capitalize %>

  <% @items.each do |item|  %>

<%= item.name %>

  <% end %>

<%= link_to "Add New Item", new_list_item_path(@list) %>

<%= @list.name.capitalize %>

  <% @items.each do |item|  %>

<%= item.name %>

  <% end %>

    Item
    Date Purchased

  <% @list.items.each do |item|  %>

        <%= item.name %>
        <%= localize(item.updated_at, format: :long) %>

  <% end %>

<%= link_to "Add New Item", new_list_item_path(@list) %>

Use table for items on list show page

Use table for items on list show page


Create and Share

  <% if @place.errors.any? %>

<%= pluralize(@place.errors.count, "error") %> prohibited this place from being saved:

      <% @place.errors.full_messages.each do |msg| %>

<%= msg %>

      <% end %>

  <% end %>

  <%= form_for @place, url: places_path do |f| %>
    <%= f.hidden_field :latitude %>
    <%= f.hidden_field :longitude %>
    <%= f.fields_for @comment do |c| %>

Choose a color of your mood:

      <%= c.hidden_field :mood, id: "comment_mood" %>

Write down what you're doing:

      <%= c.text_area :things, rows: 6, placeholder: "The book you're reading...\nThe music you're listening...\nThe coffee you're drinking...\nOr something else..." %>
    <% end %>
    <%= f.submit %>
  <% end %>

Add link to new place page

Add link to new place page


This is where each individual user profile info will go.

<%= link_to "Orders", orders_path %>

 Username: <%= @user.username%>

 Email: <%= @user.email%>

<%= link_to "Edit Account", edit_user_path %> | <%= link_to "Delete Account", @user, method: :delete %>

This is where each individual user profile info will go.

<%= link_to "Orders", orders_path(user_id: @user.id) %>

 Username: <%= @user.username%>

 Email: <%= @user.email%>

<%= link_to "Edit Account", edit_user_path %> | <%= link_to "Delete Account", @user, method: :delete %>

Update link used to redirect users to Orders


  describe "<%= @resource.to_s %>" do
    let(:route) { "<%= @resource.to_s %>" }
    <%- @resource.http_methods.each do |method| %>
    describe "<%= method.method.upcase %>" do
      <% if method.request_body %>let(:request_body) do<% body = method.request_body.example.split("\n") %>
        <%= body.join("\n        ").gsub(/\:/, " =>") %>.to_json
      end
      <% end %>
      let(:response_body) do<% body = method.responses.first.bodies.first.example.split("\n") %>
        <%= body.join("\n        ").gsub(/\:/, " =>") %>.to_json
      end

      it "<%= method.description && method.description.downcase || "#{method.method}s the resource" %>" do
        <%= method.method %> route
        expect(last_response.body).to eql response_body
      end

      it "returns status <%= method.responses.first.status_code %>" do
        <%= method.method %> route
        expect(last_response.status).to eql <%= method.responses.first.status_code %>
      end
    end<%- end %>
  end

  describe "<%= @resource.to_s %>" do
    let(:route) { "<%= @resource.to_s %>" }
    <%- @resource.http_methods.each do |method| %>
    describe "<%= method.method.upcase %>" do
      <% if method.request_body %>let(:request_body) do<% body = method.request_body.example.split("\n") %>
        <%= body.join("\n        ").gsub(/\:/, " =>") %>.to_json
      end
      <% end %>
      let(:response_body) do<% body = method.responses.first.bodies.first.example.split("\n") %>
        <%= body.join("\n        ").gsub(/\:/, " =>") %>.to_json
      end

      it "<%= method.description && method.description.downcase || "#{method.method}s the resource" %>" do
        <%= method.method %> route<% if method.request_body %>, request_body<% end %>
        expect(last_response.body).to eql response_body
      end

      it "returns status <%= method.responses.first.status_code %>" do
        <%= method.method %> route<% if method.request_body %>, request_body<% end %>
        expect(last_response.status).to eql <%= method.responses.first.status_code %>
      end
    end<%- end %>
  end

Include request body if one is present

Include request body if one is present


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

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

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

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

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

		<%  %>

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

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

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

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

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

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

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

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

Add partial for cart section to welcome index


<li class='clearfix record <%= cycle("on", "on-hover") %>'>

    <%= link_to t('.said', :who => h(inquiry.name)), admin_inquiry_url(inquiry) %>
    <%= truncate(strip_tags(inquiry.message), :length => 60) -%>

    <%= link_to refinery_icon_tag('zoom.png'), admin_inquiry_url(inquiry),
                :title => t('.read_inquiry') -%>
    <%= link_to refinery_icon_tag('delete.png'), admin_inquiry_url(inquiry),
                :class => "cancel confirm-delete",
                :title => t('.remove_inquiry', :name => inquiry.name) -%>

<li class='clearfix record <%= cycle("on", "on-hover") %>'>

    <%= link_to (h(inquiry.name)), admin_inquiry_url(inquiry) %> <%= t('.said') %>
    <%= truncate(strip_tags(inquiry.message), :length => 60) -%>

    <%= link_to refinery_icon_tag('zoom.png'), admin_inquiry_url(inquiry),
                :title => t('.read_inquiry') -%>
    <%= link_to refinery_icon_tag('delete.png'), admin_inquiry_url(inquiry),
                :class => "cancel confirm-delete",
                :title => t('.remove_inquiry', :name => inquiry.name) -%>

Move said text out of link

Move said text out of link


<% content_for :title, "Mainstream browse pages" %>
<% content_for :title_side, render("govuk_publishing_components/components/button", {
  text: "Add a mainstream browse page",
  href: new_mainstream_browse_page_path,
  margin_bottom: true
}) %>

<%= pluralize(@browse_pages.count, "mainstream browse pages") %>

    <%= render "shared/list-browse-pages", pages: @browse_pages %>

<% content_for :title, "Mainstream browse pages" %>
<% content_for :title_side, render("govuk_publishing_components/components/button", {
  text: "Add a mainstream browse page",
  href: new_mainstream_browse_page_path,
  margin_bottom: true
}) %>

<%= pluralize(@browse_pages.count, "mainstream browse page") %>

    <%= render "shared/list-browse-pages", pages: @browse_pages %>

Fix mainstream browse page pluralisation


%{!?ruby_sitelibdir: %define ruby_sitelibdir %(ruby -rrbconfig -e 'puts Object.const_get(defined?(RbConfig) ? :RbConfig : :Config)::CONFIG["sitelibdir"]')}

%global confdir ext/redhat
%global initrddir /etc/rc.d/init.d
# VERSION is subbed out during rake srpm process
# %global realversion <%= version %>
# %global rpmversion <%= rpmversion %>

Name:           hiera-puppet
Version:        %{rpmversion}
Release:        <%= release -%>%{?dist}
Summary:        A data backend for Hiera that can query the internal Puppet scope for data.

Group:          System Environment/Base
License:        Apache 2.0
URL:            http://projects.puppetlabs.com/projects/%{name}/
Source0:        http://downloads.puppetlabs.com/%{name}/%{name}-%{realversion}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:      noarch
BuildRequires:  ruby >= 1.8.5
Requires:       ruby(abi) >= 1.8
Requires:       ruby >= 1.8.5
Requires:       puppet
Requires:       hiera >= 1.0.0

%description
A data backend for Hiera that can query the internal Puppet scope for data.

%prep
%setup -q  -n %{name}-%{realversion}

%build

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/%{ruby_sitelibdir}
mkdir -p $RPM_BUILD_ROOT/%{_bindir}
cp -pr lib/hiera $RPM_BUILD_ROOT/%{ruby_sitelibdir}
cp -pr lib/puppet $RPM_BUILD_ROOT/%{ruby_sitelibdir}
install -p -m0755 bin/extlookup2hiera $RPM_BUILD_ROOT/%{_bindir}

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%{_bindir}/extlookup2hiera
%{ruby_sitelibdir}/hiera/scope.rb
%{ruby_sitelibdir}/hiera/backend/puppet_backend.rb
%{ruby_sitelibdir}/puppet/parser/functions/hiera.rb
%{ruby_sitelibdir}/puppet/parser/functions/hiera_array.rb
%{ruby_sitelibdir}/puppet/parser/functions/hiera_hash.rb
%{ruby_sitelibdir}/puppet/parser/functions/hiera_include.rb
%doc CHANGELOG COPYING README.md

%changelog
* <%= spec_date %> Puppet Labs Release <info@puppetlabs.com> -  <%= rpmversion %>-<%= release %>
- Build for <%= version %>

Add Redhat packaging to hiera-puppet

Add Redhat packaging to hiera-puppet

This commit adds an erb template for a spec file to build rpms of hiera-puppet.


<% if resource.errors.any? %>

      <%= I18n.t("errors.messages.not_saved",
                 count: resource.errors.count,
                 resource: resource.class.model_name.human.downcase)
       %>

      <% resource.errors.full_messages.each do |message| %>

<%= message %>

      <% end %>

<% end %>

<% if resource.errors.any? %>

      <% resource.errors.full_messages.each do |message| %>

<%= message %>

      <% end %>

<% end %>

Remove cruft in error message to avoid I18n errors


<% if resource.save  %>
    window.location.replace('<%= store_url %>');
<% else %>
    $("#flash").html('<%= j(render partial: "shared/notice_banner", locals: { object: @user }) %>');
<% end %>

Add toastr error notices for sign_up form


My Profile

  <%= simple_form_for(resource, as: resource_name, url: user_registration_path, html: { method: :put }) do |f| %>
    <%= devise_error_messages! %>

    <%= f.input :email%>
    <%= f.input :name %>
    <%= f.input :firstname %>
    <%= f.input :lastname %>
    <%= f.input :phone %>

      <%= f.input :title %>
      <%= f.input :company %>
      <%= f.input :twitter %>
      <%= f.input :country, as: :country %>

    <%= image_tag(resource.photo.small) if resource.photo.present? %>
    <%= f.input :photo, as: :file %>

    <%= f.button :submit, class: "btn btn-primary" %>

  <% end %>

My Profile

  <%= simple_form_for(resource, as: resource_name, url: user_registration_path, html: { method: :put }) do |f| %>

    <%= f.input :email%>
    <%= f.input :name %>
    <%= f.input :firstname %>
    <%= f.input :lastname %>
    <%= f.input :phone %>

      <%= f.input :title %>
      <%= f.input :company %>
      <%= f.input :twitter %>
      <%= f.input :country, as: :country %>

    <%= image_tag(resource.photo.small) if resource.photo.present? %>
    <%= f.input :photo, as: :file %>

    <%= f.button :submit, class: "btn btn-primary" %>

  <% end %>

Remove devise error message because simple form already show reason


<%= cache_in_private([:site_index, :active_clones], :expires_in => 25.minutes) do %>
  <%= pull_box("Most active repository clones", :class => "pull-box-510") do %>

      <% @top_repository_clones.each do |repo| %>

          <%= link_to h(repo.title), project_repository_path(repo.project, repo) %>
          (<%= link_to h(repo.project.title), repo.project %>)
          <%= truncate(h(strip_tags(repo.description)), :length => 65) %>

      <% end %>

  <% end %>
<% end %>

<%= cache_in_private([:site_index, :active_clones], :expires_in => 25.minutes) do %>
  <%= pull_box("Most active repository clones", :class => "pull-box-510") do %>

      <% @top_repository_clones.each do |repo| %>
        <% project = repo.project %>

            <%= link_to(project.slug, project, :title => project.title) %>
            /
            <%= link_to(h(repo.title), project_repository_path(project, repo),
                        :title => h(strip_tags(repo.description))) %>

      <% end %>

  <% end %>
<% end %>

Update markup in active-clones box in public timeline


<form method="POST">
  <% @questions.each do |question| %>

<%=question.question_desc%>

    <%question.answers.each do |answer|%>

    <input type="radio" name="button-group" value="item" checked>

    <%=answer.answer_text %>

    <% end %>
  <% end %>
  <input type="submit" name="Submit Taken Survey" value="Submit">
</form>

<form method="POST">
  <% @questions.each do |question| %>

<%= question.question_desc %>

    <%question.answers.each do |answer|%>

        <input type="radio" name="<%= question.question_desc %>">
        <%= answer.answer_text %>

    <% end %>
  <% end %>
  <input type="submit" name="Submit Taken Survey" value="Submit">
</form>

Set questions to only accept a single answer on survey take form


<%= bootstrap_form_for protocol, url: update_url, remote: :true do |f| %>
  <%= render partial: 'shared/tiny_mce_extra_buttons.html.erb' %>
  <% if protocol.description.present? %>
    <div id="protocol_description_view"
         class="ql-editor tinymce-view"
         data-placeholder="<%= t('my_modules.protocols.protocol_status_bar.empty_description_edit_label') %>">
      <%= custom_auto_link(protocol.tinymce_render(:description),
                           simple_format: false,
                           tags: %w(img),
                           team: current_team) %>

  <% else %>
    <div id="protocol_description_view"
         class="ql-editor tinymce-view"
         data-placeholder="<%= t('my_modules.protocols.protocol_status_bar.empty_description_edit_label') %>">

  <% end %>
  <%= f.tiny_mce_editor(:description,
                        id: :protocol_description_textarea,
                        class: 'hidden',
                        hide_label: true,
                        value: sanitize_input(protocol.tinymce_render(:description)),
                        data: {
                          object_type: 'protocol',
                          object_id: protocol.id,
                          highlightjs_path: asset_path('highlightjs-github-theme') } ) %>
<% end %>

<%= bootstrap_form_for protocol, url: update_url, remote: :true do |f| %>
  <%= render partial: 'shared/tiny_mce_extra_buttons.html.erb' %>
  <% if protocol.description.present? %>
    <div id="protocol_description_view"
         class="ql-editor tinymce-view"
         data-placeholder="<%= t('my_modules.protocols.protocol_status_bar.empty_description_edit_label') %>">
      <%= custom_auto_link(protocol.tinymce_render(:description),
                           simple_format: false,
                           tags: %w(img),
                           team: current_team) %>

  <% else %>
    <div id="protocol_description_view"
         class="ql-editor tinymce-view"
         data-placeholder="<%= t('my_modules.protocols.protocol_status_bar.empty_description_edit_label') %>">

  <% end %>
  <%= f.tiny_mce_editor(:description,
                        id: :protocol_description_textarea,
                        class: 'hidden',
                        hide_label: true,
                        value: sanitize_input(protocol.tinymce_render(:description)),
                        data: {
                          object_type: 'protocol',
                          object_id: protocol.id,
                          highlightjs_path: asset_path('highlightjs-github-theme.css') } ) %>
<% end %>

Update hilightjs github theme path

Update hilightjs github theme path


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

<VirtualHost *:80>
	ServerName piwik.openstreetmap.org
	ServerAlias piwik.osm.org
	ServerAdmin webmaster@openstreetmap.org

	CustomLog /var/log/apache2/piwik.openstreetmap.org-access.log combined
	ErrorLog /var/log/apache2/piwik.openstreetmap.org-error.log

	DocumentRoot /srv/piwik.openstreetmap.org
	RedirectPermanent /index.php https://piwik.openstreetmap.org/index.php
</VirtualHost>

<VirtualHost *:443>
	ServerName piwik.openstreetmap.org
	ServerAdmin webmaster@openstreetmap.org

	SSLEngine on
	SSLProtocol all -SSLv2
	SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
	SSLCertificateFile /etc/ssl/certs/openstreetmap.pem
	SSLCertificateKeyFile /etc/ssl/private/openstreetmap.key

	CustomLog /var/log/apache2/piwik.openstreetmap.org-access.log combined
	ErrorLog /var/log/apache2/piwik.openstreetmap.org-error.log

	DocumentRoot /srv/piwik.openstreetmap.org
	Options -Indexes
</VirtualHost>

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

<VirtualHost *:80>
	ServerName piwik.openstreetmap.org
	ServerAlias piwik.osm.org
	ServerAdmin webmaster@openstreetmap.org

	CustomLog /var/log/apache2/piwik.openstreetmap.org-access.log combined
	ErrorLog /var/log/apache2/piwik.openstreetmap.org-error.log

	Options -Indexes

	DocumentRoot /srv/piwik.openstreetmap.org
	RedirectPermanent /index.php https://piwik.openstreetmap.org/index.php
</VirtualHost>

<VirtualHost *:443>
	ServerName piwik.openstreetmap.org
	ServerAdmin webmaster@openstreetmap.org

	SSLEngine on
	SSLProtocol all -SSLv2
	SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
	SSLCertificateFile /etc/ssl/certs/openstreetmap.pem
	SSLCertificateKeyFile /etc/ssl/private/openstreetmap.key

	CustomLog /var/log/apache2/piwik.openstreetmap.org-access.log combined
	ErrorLog /var/log/apache2/piwik.openstreetmap.org-error.log

	Options -Indexes

	DocumentRoot /srv/piwik.openstreetmap.org
</VirtualHost>

Disable directory indeses over http as well


<% content_for :head do %>
  <script type="text/javascript" charset="utf-8">
    $(document).ready(function(){
      var myTextArea = $('textarea.tagme').tagify();

      myTextArea.tagify('inputField').autocomplete({
        source: <%= raw resource_class.tag_counts.collect { |t| t.name } %>,
        position: { of: myTextArea.tagify('containerDiv') },
        close: function(event, ui) { myTextArea.tagify('add'); },
      });

      $('textarea.tagme').closest("form").submit( function() {
        $('textarea').tagify('serialize');
      });
    });
  </script>
  <style type="text/css" media="all">
    .ui-autocomplete {width:296px;}
  </style>
<% end %>

<%= f.input :tag_list, as: :text, input_html: { class: "tagme" } %>

<% id = "koi-#{ new_uuid }" %>

<% content_for :head do %>

  <script type="text/javascript" charset="utf-8">

    $ (document).ready (function ()
    {
      var input = $ ('#<%= id %>')

      input.tagify ()

      input.tagify ('inputField').autocomplete ({

        source: <%= raw resource_class.tag_counts_on(attr).collect { |t| t.name } %>

      , position: { of: input.tagify ('containerDiv') }

      , close: function (event, ui) { input.tagify ('add') }

      })

      input.closest ('form').submit (function (e)
      {
        input.tagify ('serialize')
      })

    })
  </script>

  <style type="text/css" media="all">
    .ui-autocomplete { width : 296px; }
  </style>
<% end %>

<%= f.input attr, as: :text, input_html: { id: id } %>

Fix for dodgy tags, and allow for other tag field names.


---
- scm:
    name: govuk_tagging_monitor
    scm:
      - git:
          url: git@github.com:alphagov/govuk-tagging-monitor.git
          basedir: govuk-tagging-monitor
          branches:
            - master
- job:
    name: govuk_tagging_monitor
    display-name: GOV.UK Tagging Monitor
    project-type: freestyle
    description: |
      This job checks new navigation pages against a set of rules. This makes
      sure we don't have invalid navigation pages being shown to users.
    scm:
      - govuk-tagging-monitor
    logrotate:
      numToKeep: 10
    triggers:
        - timed: 'H * * * *'
    builders:
      - shell: |
          #!/bin/bash
          set -eu

          export RATE_LIMIT_TOKEN="<%= @rate_limit_token -%>"
          bundle install --path "${HOME}/bundles/${JOB_NAME}" --deployment
          bundle exec rake run

---
- scm:
    name: govuk_tagging_monitor
    scm:
      - git:
          url: git@github.com:alphagov/govuk-tagging-monitor.git
          basedir: govuk-tagging-monitor
          branches:
            - master
- job:
    name: govuk_tagging_monitor
    display-name: GOV.UK Tagging Monitor
    project-type: freestyle
    description: |
      This job checks new navigation pages against a set of rules. This makes
      sure we don't have invalid navigation pages being shown to users.
    scm:
      - govuk_tagging_monitor
    logrotate:
      numToKeep: 10
    triggers:
        - timed: 'H * * * *'
    builders:
      - shell: |
          #!/bin/bash
          set -eu

          export RATE_LIMIT_TOKEN="<%= @rate_limit_token -%>"
          bundle install --path "${HOME}/bundles/${JOB_NAME}" --deployment
          bundle exec rake run

Fix scm name in govuk tagging monitor job

This will fix the following puppet error:

```
(/Stage[main]/Govuk_jenkins::Job_builder/Exec[jenkins_jobs_update]/returns)
jenkins_jobs.errors.JenkinsJobsException: Unknown entry point or macro
'govuk-tagging-monitor' for component type: 'scm'.
```


<?php
# DO NOT EDIT - This file is being maintained by Chef
wfLoadExtensions( array( 'ConfirmEdit', 'ConfirmEdit/ReCaptcha' ) );
$wgCaptchaClass = 'ReCaptcha';
$recaptcha_public_key = '<%= @public_key %>';
$recaptcha_private_key = '<%= @private_key %>';

$wgCaptchaTriggers['addurl'] = true;
$wgCaptchaTriggers['create'] = true;

$wgGroupPermissions['autoconfirmed']['skipcaptcha'] = true;

<?php
# DO NOT EDIT - This file is being maintained by Chef
wfLoadExtensions( array( 'ConfirmEdit', 'ConfirmEdit/ReCaptchaNoCaptcha' ) );
$wgCaptchaClass = 'ReCaptchaNoCaptcha';
$wgReCaptchaSendRemoteIP = true;
$recaptcha_public_key = '<%= @public_key %>';
$recaptcha_private_key = '<%= @private_key %>';

$wgCaptchaTriggers['addurl'] = true;
$wgCaptchaTriggers['create'] = true;

$wgGroupPermissions['autoconfirmed']['skipcaptcha'] = true;

Swap wiki sign up to use google ReCaptchaNoCaptcha

Swap to the more modern google No CAPTCHA reCAPTCHA away from the older
google reCAPTCHA which gathers address data for google maps.

This simple config swap assumes that the recent ConfirmEdit version we
have installed (1.4) comes with all the necessary bits to enable this
captcha class and that Google's old ReCaptcha uses the same API keys as
it's new one.

In future we might figure out a solution which also doesn't request
any javascript from google but really, not contributing to google maps
with every OSM wiki sign up would be a step in the right direction

Fixes: https://github.com/openstreetmap/operations/issues/19


<%
  left_col = "col-md-7"
  right_col = "col-md-5"
%>

<%= form_for(@step_by_step_page) do |form| %>
  <%= render "shared/steps/form_errors", resource: step_by_step_page %>

    <div class="<%= left_col %>">
      <%= form.text_field :title %>

    <div class="<%= left_col %>">
      <%= form.text_field :slug, label: "Slug (no slashes)", disabled: @step_by_step_page.persisted? %>

    <div class="<%= left_col %>">
      <%= form.text_area :introduction, class: "form-control", rows: 8 %>

    <div class="<%= left_col %>">
      <%= form.text_area :description, label: "Meta description", class: "form-control", rows: 8 %>

    <%= form.submit "Save", class: "btn btn-primary" %>

    <%= link_to 'Cancel', @step_by_step_page %>

<% end %>

<%
  left_col = "col-md-7"
  right_col = "col-md-5"
%>

<%= form_for(@step_by_step_page) do |form| %>
  <%= render "shared/steps/form_errors", resource: step_by_step_page %>

    <div class="<%= left_col %>">
      <%= form.text_field :title %>

    <div class="<%= left_col %>">
      <%= form.text_field :slug, label: "Slug (no slashes)" %>

    <div class="<%= left_col %>">
      <%= form.text_area :introduction, class: "form-control", rows: 8 %>

    <div class="<%= left_col %>">
      <%= form.text_area :description, label: "Meta description", class: "form-control", rows: 8 %>

    <%= form.submit "Save", class: "btn btn-primary" %>

    <%= link_to 'Cancel', @step_by_step_page %>

<% end %>

Make slug on step-by-step editable

Make slug on step-by-step editable

Currently you cannot edit the slug of an existing step-by-step
item.

This commit allows the slug to be edited.
I've tried this in integration and seems to work fine.

Redirects are being set up for the old slug.


<% content_for :title, "2020 Virtual Confernece" %>

College STAR Virtual Conference

Preparing students who learn differently for college success

      <%= @page_content.text.html_safe %>

          <%= link_to "Register for the Virtual Conference!",
                      new_virtual_conference_registration_path,
                      class: 'create-button' %>

Interested in presenting?

We are still <%= link_to "accepting proposals", new_virtual_conference_proposal_path %> for conference presentations and would love to hear yours!

<% content_for :title, "2020 Virtual Confernece" %>

College STAR Virtual Conference

Preparing students who learn differently for college success

      <% if policy(VirtualConferenceProposal).index? %>

<%= link_to 'View Proposals', virtual_conference_proposals_path %>

      <% end %>
      <% if policy(VirtualConferenceRegistration).index? %>

<%= link_to 'View Registrations', virtual_conference_registrations_path %>

      <% end %>

      <%= @page_content.text.html_safe %>

          <%= link_to "Register for the Virtual Conference!",
                      new_virtual_conference_registration_path,
                      class: 'create-button' %>

Interested in presenting?

We are still <%= link_to "accepting proposals", new_virtual_conference_proposal_path %> for conference presentations and would love to hear yours!

Add admin links to virtual conference page.


  <% if logged_in? %>
    <% if profile.members.include?(user) %>
      <%= button(:delete, content_tag('span', _('Leave community')), profile.leave_url,
        :class => 'leave-community',
        :title => _("Leave community"),
        :style => 'position: relative;') %>
      <%= button(:add, content_tag('span', _('Join')), profile.join_url,
        :class => 'join-community',
        :title => _("Join community"),
        :style => 'position: relative; display: none;') %>
    <% else %>
      <% unless profile.already_request_membership?(user) %>
        <%= button(:delete, content_tag('span', _('Leave community')), profile.leave_url,
          :class => 'leave-community',
          :title => _("Leave community"),
          :style => 'position: relative; display: none;') %>
        <%= button(:add, content_tag('span', _('Join')), profile.join_url,
          :class => 'join-community',
          :title => _("Join community"),
          :style => 'position: relative;') %>
      <% end %>
    <% end %>
  <% else %>
      <%= button(:add, _('Join'), profile.join_not_logged_url, :title => _('Join this community')) %>
  <% end %>

  <% if logged_in? %>
    <% if profile.members.include?(user) %>
      <%= button(:delete, content_tag('span', _('Leave community')), profile.leave_url,
        :class => 'leave-community',
        :title => _("Leave community"),
        :style => 'position: relative;') %>
      <%= button(:add, content_tag('span', __('Join this community')), profile.join_url,
        :class => 'join-community',
        :title => _("Join community"),
        :style => 'position: relative; display: none;') %>
    <% else %>
      <% unless profile.already_request_membership?(user) %>
        <%= button(:delete, content_tag('span', _('Leave community')), profile.leave_url,
          :class => 'leave-community',
          :title => _("Leave community"),
          :style => 'position: relative; display: none;') %>
        <%= button(:add, content_tag('span', __('Join this community')), profile.join_url,
          :class => 'join-community',
          :title => _("Join community"),
          :style => 'position: relative;') %>
      <% end %>
    <% end %>
  <% else %>
      <%= button(:add, _('Join'), profile.join_not_logged_url, :title => _('Join this community')) %>
  <% end %>

Change join community text to differ from login


<% if student_identifier_enabled? %>

Use a student identifier type

    <% if student_identifier_types.present? %>

          <%= select(:student_identifier_type, :id, options_for_select(student_identifier_types, selected = assignment.student_identifier_type.present? ? assignment.student_identifier_type.id : nil), include_blank: true ) %>

    <% else %>
        <%= link_to new_organization_student_identifier_type_path(@organization), class: 'btn btn-green js-navigation' do %>
            Create your first student identifier
        <% end %>
    <% end %>

<% end %>

Hide form option under flipper.

Hide form option under flipper.


Rename group

	<% form_remote_tag :url => { :action => 'rename_group', :id => @assignment.id, :grouping_id => @grouping_id} do %>

		<fieldset>
		Group Name
		<input type="text" id="new_groupname" name="new_groupname"></input>
		</fieldset>

		<%= submit_tag 'Rename group' %>
		<button onClick="modalRenameGroup.close(); return false;">Cancel</button>

	<% end %>

Rename group

	<% form_remote_tag :url => { :action => 'rename_group', :id => @assignment.id, :grouping_id => @grouping_id} do %>

		<fieldset>
		Group Name
		<input type="text" maxlength="30" id="new_groupname" name="new_groupname"></input>
		</fieldset>

		<%= submit_tag 'Rename group' %>
		<button onClick="modalRenameGroup.close(); return false;">Cancel</button>

	<% end %>

Add a 30 character maximum length on the group name input


      <%= I18n.t'new_lead_confirmation.thank_you' %>

      <%= I18n.t'new_lead_confirmation.text' %>

Add Google Adwords Conversion Code

Add Google Adwords Conversion Code


Change My Password

	<%= form_for @user, :url => password_reset_path, :method => :put, :html => { :class => "formtastic" } do |f| %>
	  <% if @user.errors.any? %>

	    <% @user.errors.full_messages.each do |msg| %>

<%= msg %>

	    <% end %>

	  <% end %>
	  <%= f.label :password %>
	  <%= f.password_field :password %>

	  <%= f.label :password_confirmation %>
	  <%= f.password_field :password_confirmation %>

	  <%= f.submit "Update my password", :class => "button" %>
	<% end %>

<%= t 'users.change-password.header' %>

  <%= simple_form_for @user, url: password_reset_path, html: {data: {remote: true}} do |f| %>
    <%= f.input :password, required: true %>
    <%= f.input :password_confirmation, required: true %>
    <%= f.button :submit, t('simple_form.labels.user.change-password') %>
  <% end %>

Change password form is same as in edit profile view.


<% content_for :page_title do %>
  <%= @school.name %>: Badges
<% end %>

Badges

      <% if @badges.empty? %>

No badges awarded yet

      <% else %>
          <% @all_badges.in_groups_of(4, false).each do |group| %>

              <% group.each do |badge| %>

                        <% image = @badges.include?(badge) ? "#{badge.image}_on.png" : "#{badge.image}_off.png" %>
                        <%= image_tag(image,
                                      height: 100, width: 100,
                                      class: 'card-image-top d-block mx-auto',
                                      title: badge.description) %>

<%= badge.custom_fields[:title] %>

<%= badge.description %>

            <% end %>

          <% end %>
      <% end %>
      <%= link_to 'School homepage', school_path(@school), class: 'btn btn-secondary' %>

Add link to school homepage

Add link to school homepage


Editing permission value

<%= form_for(@permission_value) do |f| %>
  <% if @permission_value.errors.any? %>

<%= pluralize(@permission_value.errors.count, "error") %> prohibited this record from being saved:

      <% @permission_value.errors.full_messages.each do |msg| %>

<%= msg %>

      <% end %>

  <% end %>

    <%= f.label :permission_code %>
    <%= f.text_field :permission_code, :disabled=>true, class: "form-control" %>

    <%= f.label :code %>
    <%= f.text_field :code, :disabled=>true, class: "form-control" %>

    <%= f.label :web_text %>
    <%= f.text_field :web_text, class: "form-control" %>

   <button type="submit" class="btn btn-default">Update</button>

<% end %>

<%= icon_tag :show %><%= link_to 'Show', @permission_value %> |
<%= icon_tag :back %>
<%= link_to 'Back', @permission %>

Editing permission value

<%= form_for(@permission_value) do |f| %>
  <% if @permission_value.errors.any? %>

<%= pluralize(@permission_value.errors.count, "error") %> prohibited this record from being saved:

      <% @permission_value.errors.full_messages.each do |msg| %>

<%= msg %>

      <% end %>

  <% end %>

    <%= f.label :permission_code %>
    <%= f.text_field :permission_code, :disabled=>true, class: "form-control" %>

    <%= f.label :code %>
    <%= f.text_field :code, :disabled=>true, class: "form-control" %>

    <%= f.label :web_text %>
    <%= f.text_area :web_text, class: "form-control", rows: 5 %>

   <button type="submit" class="btn btn-default">Update</button>

<% end %>

<%= icon_tag :show %><%= link_to 'Show', @permission_value %> |
<%= icon_tag :back %>
<%= link_to 'Back', @permission %>

Make web_text a textarea where it is a text field and not a string field


<% text_for :title do %>
  The estate is shared equally between the aunts or uncles.
<% end %>

<% govspeak_for :body do %>
  If an aunt or uncle has already died, their children (the cousins of the deceased) inherit in their place.
<% end %>

<% govspeak_for :next_steps do %>
  <%= render partial: 'next_step_links', locals: { next_steps: calculator.next_steps } %>
<% end %>

<% text_for :title do %>
  The estate is shared equally between the aunts or uncles.
<% end %>

<% govspeak_for :body do %>
  If an aunt or uncle has died before the deceased died, their children (the cousins of the deceased) inherit in their place.
<% end %>

<% govspeak_for :next_steps do %>
  <%= render partial: 'next_step_links', locals: { next_steps: calculator.next_steps } %>
<% end %>

Update to inheritance sentence - outcome 6


description "Proxy for Review-O-Matic Explore"

start on runlevel [2345]
stop on runlevel [!2345]

env PORT=3023
env UPSTREAM_AUTH=betademo:nottobeshared
env UPSTREAM_HOST="reviewomatic.<%= govuk_platform %>.alphagov.co.uk"

# Have to use this roundabout method of chuid'ing because lucid's upstart doesn't
# support the setuid and setgrp stanzas.
env USER=deploy
env GROUP=deploy

exec start-stop-daemon --start --chuid $USER:$USER --chdir /var/apps/review-o-matic-explore --exec /usr/bin/node server.js

description "Proxy for Review-O-Matic Explore"

start on runlevel [2345]
stop on runlevel [!2345]

env PORT=3023
env UPSTREAM_AUTH=betademo:nottobeshared
env UPSTREAM_HOST="reviewomatic.<%= govuk_platform %>.alphagov.co.uk"

# Have to use this roundabout method of chuid'ing because lucid's upstart doesn't
# support the setuid and setgrp stanzas.
env USER=deploy
env GROUP=deploy

exec start-stop-daemon --start --chuid $USER:$USER --chdir /var/apps/review-o-matic-explore --pidfile /var/run/review-o-matic-explore.pid -m --startas /usr/bin/node server.js

Use a pidfile for review-o-matic-explore


#
# mod_auth_cas is an Apache 2.0/2.2 compliant module that supports the
# CASv1 and CASv2 protocols
#

<IfModule !mod_ssl.c>
LoadModule ssl_module modules/mod_ssl.so
</IfModule>

LoadModule auth_cas_module modules/mod_auth_cas.so

CASCertificatePath <%= @certificatepath %>
CASLoginURL <%= @loginurl
CASValidateURL <%= @validateurl
CASProxyValidateURL <%= @proxyvalidateurl
CASCookiePath <%= @path %>/cache/
CASVersion <%= @version %>

#
# mod_auth_cas is an Apache 2.0/2.2 compliant module that supports the
# CASv1 and CASv2 protocols
#

<IfModule !mod_ssl.c>
LoadModule ssl_module modules/mod_ssl.so
</IfModule>

LoadModule auth_cas_module modules/mod_auth_cas.so

CASCertificatePath <%= @certificatepath %>
CASLoginURL <%= @loginurl %>
CASValidateURL <%= @validateurl %>
CASProxyValidateURL <%= @proxyvalidateurl %>
CASCookiePath <%= @path %>/cache/
CASVersion <%= @version %>

Fix a load of unterminated ERB variables


[slack]
name=Slack
baseurl=https://packagecloud.io/slacktechnologies/slack/fedora/21/$basearch
gpgcheck=1
enabled=1
gpgkey=https://slack.com/gpg/slack_pubkey_20210901.gpg
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
priority=<%= @priority %>
<% unless @exclude.empty? -%>
exclude=<%= @exclude.to_a.join(' ') %>
<% end -%>
<% unless @include.empty? -%>
includepkgs=<%= @include.to_a.join(' ') %>
<% end -%>

[slack]
name=Slack
baseurl=https://packagecloud.io/slacktechnologies/slack/fedora/21/<%= @facts['os']['architecture'] %>
gpgcheck=1
enabled=1
gpgkey=https://slack.com/gpg/slack_pubkey_20210901.gpg
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
priority=<%= @priority %>
<% unless @exclude.empty? -%>
exclude=<%= @exclude.to_a.join(' ') %>
<% end -%>
<% unless @include.empty? -%>
includepkgs=<%= @include.to_a.join(' ') %>
<% end -%>

Use fixed arch in Slack (backport from upstream)


Latest release: <%= latest_open_data_release_number %> - <%= latest_open_data_release_date %>

Download individual csv files or an archive of all of them, all downloads are gzipped:

        File name and digest

        Archive Size

        Number of rows

      Download link

  <% open_data_release(latest_open_data_release_number)[:files].each do |file| %>

          <%= file[:filename] %>

<%= file[:sha256] %>

        <%= file[:size] %>

      <%= file[:rows] %>

        <a href="<%= file[:href] %>" class='btn btn-primary'>Download

  <% end %>

Add back in open data partial

Add back in open data partial


server {
  server_name nagios nagios.* icinga icinga.* alert alert.*;

  <%- if scope.lookupvar('::aws_migration') %>
  listen 80;
  <%- else %>
  listen                    443 ssl;
  ssl_certificate           /etc/nginx/ssl/nagios.crt;
  ssl_certificate_key       /etc/nginx/ssl/nagios.key;
  <%- end %>
  include                   /etc/nginx/ssl.conf;

  index index.html;
  root /usr/share/icinga/htdocs;

  access_log /var/log/nginx/nagios-access.log timed_combined;
  access_log /var/log/nginx/nagios-json.event.access.log json_event;
  error_log /var/log/nginx/nagios-error.log;

  location /stylesheets {
    alias /etc/icinga/stylesheets;
  }

  location ~ \.cgi$ {
    root /usr/lib/cgi-bin/icinga;
    rewrite ^/cgi-bin/icinga/(.*)$ /$1;

    include /etc/nginx/fastcgi_params;

    fastcgi_param AUTH_USER $remote_user;
    fastcgi_param REMOTE_USER $remote_user;
    fastcgi_param SCRIPT_FILENAME /usr/lib/cgi-bin/icinga$fastcgi_script_name;

    fastcgi_pass fcgiwrap;
  }

}

server {
  server_name nagios nagios.* icinga icinga.* alert alert.*;

  <%- if scope.lookupvar('::aws_migration') %>
  listen 80;
  <%- else %>
  listen                    443 ssl;
  ssl_certificate           /etc/nginx/ssl/nagios.crt;
  ssl_certificate_key       /etc/nginx/ssl/nagios.key;
  <%- end %>
  include                   /etc/nginx/ssl.conf;

  index index.html;
  root /usr/share/icinga/htdocs;

  access_log /var/log/nginx/nagios-access.log timed_combined;
  access_log /var/log/nginx/nagios-json.event.access.log json_event;
  error_log /var/log/nginx/nagios-error.log;

  location /stylesheets {
    alias /etc/icinga/stylesheets;
  }

  location ~ \.cgi$ {
    root /usr/lib/cgi-bin/icinga;
    rewrite ^/cgi-bin/icinga/(.*)$ /$1;

    add_header Access-Control-Allow-Origin *;

    include /etc/nginx/fastcgi_params;

    fastcgi_param AUTH_USER $remote_user;
    fastcgi_param REMOTE_USER $remote_user;
    fastcgi_param SCRIPT_FILENAME /usr/lib/cgi-bin/icinga$fastcgi_script_name;

    fastcgi_pass fcgiwrap;
  }

}

Add Access-Control-Allow-Origin header for Icinga

This commit adds a `Access-Control-Allow-Origin` CORS header to all `.cgi` files for Icinga. This will allow the JSON output of these files to be read by other services, such as a proposed client-side implementation of Blinken.