<dashboard>
  <label>Lookups</label>
  <row>
    <panel>
      <title>Edit Schedules</title>
      <html>
          <p>
            Click buttons below to edit the alert schedule lookup files.<br/>
            <i>Note: this requires the  <a href="https://splunkbase.splunk.com/app/1724/" target="_blank">Lookup File Editor App for Splunk Enterprise</a></i>
          </p>
          <a class="btn btn-primary edit-done" href="/app/lookup_editor/lookup_edit?owner=nobody&amp;namespace=alert_schedule&amp;lookup=schedules.csv&amp;type=csv" target="_blank">
            Schedules
          </a>
          <a class="btn btn-primary edit-done" href="/app/lookup_editor/lookup_edit?owner=nobody&amp;namespace=alert_schedule&amp;lookup=schedule_hours.csv&amp;type=csv" target="_blank">
            Hours
          </a>
          <a class="btn btn-primary edit-done" href="/app/lookup_editor/lookup_edit?owner=nobody&amp;namespace=alert_schedule&amp;lookup=schedule_holidays.csv&amp;type=csv" target="_blank">
            Holidays
          </a>
          <a class="btn btn-primary edit-done" href="/app/lookup_editor/lookup_edit?owner=nobody&amp;namespace=alert_schedule&amp;lookup=schedule_maintenance_windows.csv&amp;type=csv" target="_blank">
            Maintenance Windows
          </a>
          <br/><br/>
          <h2>Lookup Files Help</h2>
          <b>Schedules lookup</b>
          <ul>
            <li><b>schedule_id:</b> can be anything you want it to be as long as it consistent through all of the lookup files. This is the "primary key" which drives all of the functionality. Note: The included default lookups use contry codes because that was what worked for the original use case this was developed for.</li>
            <li><b>schedule_description:</b> is a user friendly name for the schedule.  This does not drive any functionality and is essentially optional</li>
            <li><b>schedule_timezone:</b> is the timezone (format %Z) that will be used to specify times when configuring the schedule.  This will be used to translate the "local" time of the user running the alert search to the one specified for the schedule.  This allows the schedules to be configured using the local time of where the schedule originates.</li>
          </ul>
          <b>Schedule Hours lookup</b>
          <ul>
            <li><b>schedule_id:</b> this needs to correspond to one of the schedule_ids specified in the schedules.csv file referenced above</li>
            <li><b>calendar_day_of_week:</b> numeric day of the week 0-6 corresponds to Sunday-Saturday.  If there are multiple regular work periods on a day (e.g. Tokyo Stock Exchange), this can be supported by including a second row for the corresponding day.</li>
            <li><b>start_time:</b> start time of the regualr work day period entered as a 24 Hour value (format %H:%M) in the schedule's Timezone (specified in the schedules.csv)</li>
            <li><b>end_time:</b> end time of the regualr work day period entered as a 24 Hour value (format %H:%M) in the schedule's Timezone (specified in the schedules.csv)</li>
          </ul>
          <b>Schedule Holidays lookup</b>
          <ul>
            <li><b>schedule_id:</b> this needs to correspond to one of the schedule_ids specified in the schedules.csv file referenced above</li>
            <li><b>holiday_description</b> is a user friendly description of the holiday. This does not drive any functionality and is essentially optional</li>
            <li><b>holiday_date:</b> specific date (format %d/%m/%y) the holiday falls on</li>
            <li><b>start_time:</b> start time of the holiday entered as a 24 Hour value (format %H:%M) in the schedule's Timezone (specified in the schedules.csv)</li>
            <li><b>end_time:</b> end time of the holiday entered as a 24 Hour value (format %H:%M) in the schedule's Timezone (specified in the schedules.csv)</li>
          </ul>
          <b>Schedule Maintenance Windows lookup</b>
          <ul>
            <li><b>schedule_id:</b> this needs to correspond to one of the schedule_ids specified in the schedules.csv file referenced above</li>
            <li><b>mw_description:</b> is a user friendly description of the maintenance window. This does not drive any functionality and is essentially optional</li>
            <li><b>start_time:</b> start date and time of the maintenance window (format %d/%m/%y %H:%M) in the schedule's Timezone (specified in the schedules.csv)</li>
            <li><b>end_time:</b> end date and time of the maintenance window (format %d/%m/%y %H:%M) in the schedule's Timezone (specified in the schedules.csv)</li>
          </ul>        
        </html>
	  </panel>
	</row>
</dashboard>