<commit_before><!-- -*- mode:jinja2 -*- -->
{% extends "base.html" %}

{% block pagetitle %}
<i class="fa fa-cog"></i> <span class="ds-primary-title">{{config['DASHBOARD_APPNAME']}}</span> <span class="ds-secondary-title">{{title}}</span>
{% endblock %}

{% block content %}

<div class="container">

  <div>
    {% include "snippets/breadcrumbs.html" %}
  </div>


  <div class="row">
    <div class="col-md-8 col-md-offset-2">

      <div class="">
        <br/>
        <br/>

      <form class="form-horizontal">
        <fieldset>

          <!-- Form Name -->
          <!-- <legend>Form Name</legend> -->


          <!-- Default Auto-Refresh Period -->
          <div class="form-group">
            <label class="col-md-4 control-label" for="selectRefresh">Default Refresh Period</label>
            <div class="col-md-4">
              <select id="selectRefresh" name="selectRefresh" class="form-control"
                      onchange="setPref('refresh', this.value)">
                {% for item in config['DASHBOARD_REFRESH_INTERVALS'] %}
                <option value="{{item[1]}}"
                        {% if item[1] == ctx.get_int('refresh', config['DEFAULT_REFRESH_INTERVAL']) %}
                  selected
                        {% endif %}
                        >{{item[0]}}</option>
                {% endfor %}
              </select>
            </div>
          </div>

          <!-- Time Zone -->
          <div class="form-group">
            <label class="col-md-4 control-label" for="selectTimeZone">Display Time Zone</label>
            <div class="col-md-4">
              <input type="hidden" id="selectTimeZone" name="selectTimeZone" class="form-control"
                      onchange="setPref('timezone', this.value)">
              </input>
            </div>
          </div>


          <!-- Chart Style -->
          <div class="form-group">
            <label class="col-md-4 control-label" for="chartRadios">Default Chart Style</label>
            <div class="col-md-4">
              <div class="radio">
                <label for="chartRadios-0">
                  <!-- Static -->
                  <input type="radio" name="chartRadios" id="chartRadios-0" value="static" {% if not ctx.prefs.interactive %} checked="checked"{% endif %} onclick="setPref('interactive', 'false')">
                    Static
                </label>
	          </div>
              <div class="radio">
                <label for="chartRadios-1">
                  <!-- Interactive -->
                  <input type="radio" name="chartRadios" id="chartRadios-1" value="interactive" {% if ctx.prefs.interactive %} checked="checked"{% endif %} onclick="setPref('interactive', 'true')">
                    Interactive
                </label>
	          </div>
            </div>
          </div>

          <!-- Chart Renderer -->
          <div class="form-group">
            <label class="col-md-4 control-label" for="chartRenderRadios">Interactive Chart Renderer</label>
            <div class="col-md-8">
              <div class="radio">
                <label for="chartRenderRadios-0">
                  <!-- Static -->
                  <input type="radio" name="chartRenderRadios" id="chartRenderRadios-0" value="static" {% if ctx.prefs.renderer=='nvd3' %} checked="checked"{% endif %} onclick="setPref('renderer', 'nvd3')">
                    nvd3
                </label>
                <p><small><a href="http://nvd3.org/" target="_blank">nvd3</a>
                renders interactive charts
                using <a href="http://d3js.org/"
                target="_blank">D3.js</a> and SVG. It supports
                particularly nice interactive features on stacked area
                charts, but can bog down the browser when there are a
                large number of charts or a long time period being
                rendered.</small></p>
	          </div>
              <div class="radio">
                <label for="chartRenderRadios-1">
                  <!-- Interactive -->
                  <input type="radio" name="chartRenderRadios" id="chartRenderRadios-1" value="interactive" {% if ctx.prefs.renderer=='flot' %} checked="checked"{% endif %} onclick="setPref('renderer', 'flot')">
                    flot
                </label>
                <p><small><a href="http://www.flotcharts.org/"
                target="_blank">flot</a> renders interactive charts
                using HTML canvas. It does not support stream graphs,
                but can be a better choice for rendering large numbers
                of graphs or length time periods.</small></p>
	          </div>
            </div>
          </div>


          <!-- Theme -->
          <div class="form-group">
            <label class="col-md-4 control-label" for="themeRadios">Theme</label>
            <div class="col-md-8">
              <div class="radio">
                <label for="themeRadios-dark">
                  <input type="radio" name="themeRadios" id="themeRadios-dark" {% if ctx.prefs.theme=='dark' %} checked="checked" {% endif %} onclick="setPref('theme', 'dark')" value="Dark">
                    Dark
                </label>
              </div>
              <div class="radio">
                <label for="themeRadios-light">
                  <input type="radio" name="themeRadios" id="themeRadios-light" {% if ctx.prefs.theme=='light' %} checked="checked" {% endif %} onclick="setPref('theme', 'light')" value="Light">
                    Light
                </label>
              </div>
              <div class="radio">
                <label for="themeRadios-solarized-light">
                  <input type="radio" name="themeRadios" id="themeRadios-solarized-light" {% if ctx.prefs.theme=='solarized-light' %} checked="checked" {% endif %} onclick="setPref('theme', 'solarized-light')" value="Solarized Light">
                    Solarized Light
                </label>
              </div>
              <div class="radio">
                <label for="themeRadios-solarized-dark">
                  <input type="radio" name="themeRadios" id="themeRadios-solarized-dark" {% if ctx.prefs.theme=='solarized-dark' %} checked="checked" {% endif %} onclick="setPref('theme', 'solarized-dark')" value="Solarized Dark">
                    Solarized Dark
                </label>
              </div>
            </div>
          </div>
        </fieldset>
      </form>

      </div>
    </div>
  </div>


  <div class="row">
  </div>

</div> <!-- container -->

<script>
 setPref = function(key, value) {
   window.location = URI(window.location)
         .setQuery(key, value)
         .href()
 }
 $('#selectRefresh').select2()
 $('#selectTimeZone').select2({
   data: Object.keys(moment.tz._zones).map(function(key) {
     var tz = moment.tz._zones[key]
     return {
       id: tz.name,
       text: tz.name
     }
   })<commit_msg>Set TZ value on load<commit_after><!-- -*- mode:jinja2 -*- -->
{% extends "base.html" %}

{% block pagetitle %}
<i class="fa fa-cog"></i> <span class="ds-primary-title">{{config['DASHBOARD_APPNAME']}}</span> <span class="ds-secondary-title">{{title}}</span>
{% endblock %}

{% block content %}

<div class="container">

  <div>
    {% include "snippets/breadcrumbs.html" %}
  </div>


  <div class="row">
    <div class="col-md-8 col-md-offset-2">

      <div class="">
        <br/>
        <br/>

      <form class="form-horizontal">
        <fieldset>

          <!-- Form Name -->
          <!-- <legend>Form Name</legend> -->


          <!-- Default Auto-Refresh Period -->
          <div class="form-group">
            <label class="col-md-4 control-label" for="selectRefresh">Default Refresh Period</label>
            <div class="col-md-6">
              <select id="selectRefresh" name="selectRefresh" class="form-control"
                      onchange="setPref('refresh', this.value)">
                {% for item in config['DASHBOARD_REFRESH_INTERVALS'] %}
                <option value="{{item[1]}}"
                        {% if item[1] == ctx.get_int('refresh', config['DEFAULT_REFRESH_INTERVAL']) %}
                  selected
                        {% endif %}
                        >{{item[0]}}</option>
                {% endfor %}
              </select>
            </div>
          </div>

          <!-- Time Zone -->
          <div class="form-group">
            <label class="col-md-4 control-label" for="selectTimeZone">Display Time Zone</label>
            <div class="col-md-6">
              <input type="hidden" id="selectTimeZone" name="selectTimeZone" class="form-control"
                      onchange="setPref('timezone', this.value)">
              </input>
            </div>
          </div>


          <!-- Chart Style -->
          <div class="form-group">
            <label class="col-md-4 control-label" for="chartRadios">Default Chart Style</label>
            <div class="col-md-4">
              <div class="radio">
                <label for="chartRadios-0">
                  <!-- Static -->
                  <input type="radio" name="chartRadios" id="chartRadios-0" value="static" {% if not ctx.prefs.interactive %} checked="checked"{% endif %} onclick="setPref('interactive', 'false')">
                    Static
                </label>
	          </div>
              <div class="radio">
                <label for="chartRadios-1">
                  <!-- Interactive -->
                  <input type="radio" name="chartRadios" id="chartRadios-1" value="interactive" {% if ctx.prefs.interactive %} checked="checked"{% endif %} onclick="setPref('interactive', 'true')">
                    Interactive
                </label>
	          </div>
            </div>
          </div>

          <!-- Chart Renderer -->
          <div class="form-group">
            <label class="col-md-4 control-label" for="chartRenderRadios">Interactive Chart Renderer</label>
            <div class="col-md-8">
              <div class="radio">
                <label for="chartRenderRadios-0">
                  <!-- Static -->
                  <input type="radio" name="chartRenderRadios" id="chartRenderRadios-0" value="static" {% if ctx.prefs.renderer=='nvd3' %} checked="checked"{% endif %} onclick="setPref('renderer', 'nvd3')">
                    nvd3
                </label>
                <p><small><a href="http://nvd3.org/" target="_blank">nvd3</a>
                renders interactive charts
                using <a href="http://d3js.org/"
                target="_blank">D3.js</a> and SVG. It supports
                particularly nice interactive features on stacked area
                charts, but can bog down the browser when there are a
                large number of charts or a long time period being
                rendered.</small></p>
	          </div>
              <div class="radio">
                <label for="chartRenderRadios-1">
                  <!-- Interactive -->
                  <input type="radio" name="chartRenderRadios" id="chartRenderRadios-1" value="interactive" {% if ctx.prefs.renderer=='flot' %} checked="checked"{% endif %} onclick="setPref('renderer', 'flot')">
                    flot
                </label>
                <p><small><a href="http://www.flotcharts.org/"
                target="_blank">flot</a> renders interactive charts
                using HTML canvas. It does not support stream graphs,
                but can be a better choice for rendering large numbers
                of graphs or length time periods.</small></p>
	          </div>
            </div>
          </div>


          <!-- Theme -->
          <div class="form-group">
            <label class="col-md-4 control-label" for="themeRadios">Theme</label>
            <div class="col-md-8">
              <div class="radio">
                <label for="themeRadios-dark">
                  <input type="radio" name="themeRadios" id="themeRadios-dark" {% if ctx.prefs.theme=='dark' %} checked="checked" {% endif %} onclick="setPref('theme', 'dark')" value="Dark">
                    Dark
                </label>
              </div>
              <div class="radio">
                <label for="themeRadios-light">
                  <input type="radio" name="themeRadios" id="themeRadios-light" {% if ctx.prefs.theme=='light' %} checked="checked" {% endif %} onclick="setPref('theme', 'light')" value="Light">
                    Light
                </label>
              </div>
              <div class="radio">
                <label for="themeRadios-solarized-light">
                  <input type="radio" name="themeRadios" id="themeRadios-solarized-light" {% if ctx.prefs.theme=='solarized-light' %} checked="checked" {% endif %} onclick="setPref('theme', 'solarized-light')" value="Solarized Light">
                    Solarized Light
                </label>
              </div>
              <div class="radio">
                <label for="themeRadios-solarized-dark">
                  <input type="radio" name="themeRadios" id="themeRadios-solarized-dark" {% if ctx.prefs.theme=='solarized-dark' %} checked="checked" {% endif %} onclick="setPref('theme', 'solarized-dark')" value="Solarized Dark">
                    Solarized Dark
                </label>
              </div>
            </div>
          </div>
        </fieldset>
      </form>

      </div>
    </div>
  </div>


  <div class="row">
  </div>

</div> <!-- container -->

<script>
 setPref = function(key, value) {
   window.location = URI(window.location)
         .setQuery(key, value)
         .href()
 }
 $('#selectRefresh').select2()
 $('#selectTimeZone').attr('value', ds.config.DISPLAY_TIMEZONE)
 $('#selectTimeZone').select2({
   data: Object.keys(moment.tz._zones).map(function(key) {
     var tz = moment.tz._zones[key]
     return {
       id: tz.name,
       text: tz.name
     }
   })
{'fraction_non_alphanumeric': 0.1633624107850912, 'fraction_numerical': 0.004758128469468675, 'mean_word_length': 1.7573047107930828, 'pattern_counts': {'":': 0, '<': 263, '<?xml version=': 0, '>': 263, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3849511', 'n_tokens_mistral': 4063, 'n_tokens_neox': 3744, 'n_words': 792}