Exemplo n.º 1
0
        public override void Execute()
        {


WriteLiteral("\r\n");









            
            #line 9 "..\..\Dashboard\Pages\QueuesPage.cshtml"
  
    Layout = new LayoutPage { Title = "Queues" };

    var monitor = JobStorage.Current.GetMonitoringApi();
    IList<QueueWithTopEnqueuedJobsDto> queues = monitor.Queues();


            
            #line default
            #line hidden
WriteLiteral("\r\n");


            
            #line 16 "..\..\Dashboard\Pages\QueuesPage.cshtml"
 if (queues.Count == 0)
{

            
            #line default
            #line hidden
WriteLiteral("    <div class=\"alert alert-warning\">\r\n        No queued jobs found. Try to enque" +
"ue a job.\r\n    </div>\r\n");


            
            #line 21 "..\..\Dashboard\Pages\QueuesPage.cshtml"
}
else
{

            
            #line default
            #line hidden
WriteLiteral(@"    <table class=""table table-striped"">
        <thead>
            <tr>
                <th>Queue</th>
                <th>Length</th>
                <th>Fetched</th>
                <th>Next jobs</th>
            </tr>
        </thead>
        <tbody>
");


            
            #line 34 "..\..\Dashboard\Pages\QueuesPage.cshtml"
             foreach (var queue in queues)
            {

            
            #line default
            #line hidden
WriteLiteral("                <tr>\r\n                    <td>\r\n                        <a class=" +
"\"label-queue\" href=\"");


            
            #line 38 "..\..\Dashboard\Pages\QueuesPage.cshtml"
                                                Write(Request.LinkTo("/queues/" + queue.Name));

            
            #line default
            #line hidden
WriteLiteral("\">\r\n                            ");


            
            #line 39 "..\..\Dashboard\Pages\QueuesPage.cshtml"
                       Write(queue.Name);

            
            #line default
            #line hidden
WriteLiteral("\r\n                        </a>\r\n                    </td>\r\n                    <t" +
"d>");


            
            #line 42 "..\..\Dashboard\Pages\QueuesPage.cshtml"
                   Write(queue.Length);

            
            #line default
            #line hidden
WriteLiteral("</td>\r\n                    <td>\r\n");


            
            #line 44 "..\..\Dashboard\Pages\QueuesPage.cshtml"
                         if (queue.Fetched.HasValue)
                        {

            
            #line default
            #line hidden
WriteLiteral("                            <a href=\"");


            
            #line 46 "..\..\Dashboard\Pages\QueuesPage.cshtml"
                                Write(Request.LinkTo("/queues/fetched/" + queue.Name));

            
            #line default
            #line hidden
WriteLiteral("\">\r\n                                ");


            
            #line 47 "..\..\Dashboard\Pages\QueuesPage.cshtml"
                           Write(queue.Fetched);

            
            #line default
            #line hidden
WriteLiteral("\r\n                            </a>\r\n");


            
            #line 49 "..\..\Dashboard\Pages\QueuesPage.cshtml"
                        }
                        else
                        {

            
            #line default
            #line hidden
WriteLiteral("                            <em>N/A</em>\r\n");


            
            #line 53 "..\..\Dashboard\Pages\QueuesPage.cshtml"
                        }

            
            #line default
            #line hidden
WriteLiteral("                    </td>\r\n                    <td>\r\n");


            
            #line 56 "..\..\Dashboard\Pages\QueuesPage.cshtml"
                         if (queue.FirstJobs.Count == 0)
                        {

            
            #line default
            #line hidden
WriteLiteral("                            <em>No jobs queued.</em>\r\n");


            
            #line 59 "..\..\Dashboard\Pages\QueuesPage.cshtml"
                        }
                        else
                        {

            
            #line default
            #line hidden
WriteLiteral(@"                            <table class=""table table-condensed table-bordered table-inner"">
                                <thead>
                                    <tr>
                                        <th class=""min-width"">Id</th>
                                        <th class=""min-width"">State</th>
                                        <th>Job</th>
                                        <th class=""align-right min-width"">Enqueued</th>
                                    </tr>
                                </thead>
                                <tbody>
");


            
            #line 72 "..\..\Dashboard\Pages\QueuesPage.cshtml"
                                     foreach (var job in queue.FirstJobs)
                                    {

            
            #line default
            #line hidden
WriteLiteral("                                        <tr class=\"");


            
            #line 74 "..\..\Dashboard\Pages\QueuesPage.cshtml"
                                               Write(!job.Value.InEnqueuedState ? "obsolete-data" : null);

            
            #line default
            #line hidden
WriteLiteral("\">\r\n                                            <td class=\"min-width\">\r\n         " +
"                                       <a href=\"");


            
            #line 76 "..\..\Dashboard\Pages\QueuesPage.cshtml"
                                                    Write(Request.LinkTo("/job/" + job.Key));

            
            #line default
            #line hidden
WriteLiteral("\">");


            
            #line 76 "..\..\Dashboard\Pages\QueuesPage.cshtml"
                                                                                        Write(HtmlHelper.JobId(job.Key));

            
            #line default
            #line hidden
WriteLiteral("</a>\r\n");


            
            #line 77 "..\..\Dashboard\Pages\QueuesPage.cshtml"
                                                 if (!job.Value.InEnqueuedState)
                                                {

            
            #line default
            #line hidden
WriteLiteral("                                                    <span title=\"Job\'s state has " +
"been changed while fetching data.\" class=\"glyphicon glyphicon-question-sign\"></s" +
"pan>\r\n");


            
            #line 80 "..\..\Dashboard\Pages\QueuesPage.cshtml"
                                                }

            
            #line default
            #line hidden
WriteLiteral("                                            </td>\r\n                              " +
"              <td class=\"min-width\">\r\n                                          " +
"      <span class=\"label label-default\" style=\"");


            
            #line 83 "..\..\Dashboard\Pages\QueuesPage.cshtml"
                                                                                     Write(JobHistoryRenderer.ForegroundStateColors.ContainsKey(job.Value.State) ? String.Format("background-color: {0};", JobHistoryRenderer.ForegroundStateColors[job.Value.State]) : null);

            
            #line default
            #line hidden
WriteLiteral("\">\r\n                                                    ");


            
            #line 84 "..\..\Dashboard\Pages\QueuesPage.cshtml"
                                               Write(job.Value.State);

            
            #line default
            #line hidden
WriteLiteral("\r\n                                                </span>\r\n                      " +
"                      </td>\r\n                                            <td>\r\n " +
"                                               <a class=\"job-method\" href=\"");


            
            #line 88 "..\..\Dashboard\Pages\QueuesPage.cshtml"
                                                                       Write(Request.LinkTo("/job/" + job.Key));

            
            #line default
            #line hidden
WriteLiteral("\">\r\n                                                    ");


            
            #line 89 "..\..\Dashboard\Pages\QueuesPage.cshtml"
                                               Write(HtmlHelper.DisplayMethod(job.Value.Job));

            
            #line default
            #line hidden
WriteLiteral("\r\n                                                </a>\r\n                         " +
"                   </td>\r\n                                            <td class=" +
"\"align-right min-width\">\r\n");


            
            #line 93 "..\..\Dashboard\Pages\QueuesPage.cshtml"
                                                 if (job.Value.EnqueuedAt.HasValue)
                                                {

            
            #line default
            #line hidden
WriteLiteral("                                                    <span data-moment=\"");


            
            #line 95 "..\..\Dashboard\Pages\QueuesPage.cshtml"
                                                                  Write(JobHelper.ToTimestamp(job.Value.EnqueuedAt.Value));

            
            #line default
            #line hidden
WriteLiteral("\">\r\n                                                        ");


            
            #line 96 "..\..\Dashboard\Pages\QueuesPage.cshtml"
                                                   Write(job.Value.EnqueuedAt);

            
            #line default
            #line hidden
WriteLiteral("\r\n                                                    </span>\r\n");


            
            #line 98 "..\..\Dashboard\Pages\QueuesPage.cshtml"
                                                }
                                                else
                                                {

            
            #line default
            #line hidden
WriteLiteral("                                                    <em>n/a</em>\r\n");


            
            #line 102 "..\..\Dashboard\Pages\QueuesPage.cshtml"
                                                }

            
            #line default
            #line hidden
WriteLiteral("                                            </td>\r\n                              " +
"          </tr>\r\n");


            
            #line 105 "..\..\Dashboard\Pages\QueuesPage.cshtml"
                                    }

            
            #line default
            #line hidden
WriteLiteral("                                </tbody>\r\n                            </table>\r\n");


            
            #line 108 "..\..\Dashboard\Pages\QueuesPage.cshtml"
                        }

            
            #line default
            #line hidden
WriteLiteral("                </td>\r\n            </tr>\r\n");


            
            #line 111 "..\..\Dashboard\Pages\QueuesPage.cshtml"
            }

            
            #line default
            #line hidden
WriteLiteral("        </tbody>\r\n    </table>\r\n");


            
            #line 114 "..\..\Dashboard\Pages\QueuesPage.cshtml"
}
            
            #line default
            #line hidden

        }
        public override void Execute()
        {


WriteLiteral("\r\n");










            
            #line 10 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
  
    Layout = new LayoutPage { Title = "Recurring jobs" };


            
            #line default
            #line hidden
WriteLiteral("\r\n");


            
            #line 14 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
 if (RecurringJobs.Count == 0)
{

            
            #line default
            #line hidden
WriteLiteral("    <div class=\"alert alert-info\">\r\n        No recurring jobs found.\r\n    </div>\r" +
"\n");


            
            #line 19 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
}
else
{

            
            #line default
            #line hidden
WriteLiteral("    <div class=\"js-jobs-list\">\r\n        <div class=\"btn-toolbar btn-toolbar-top\">" +
"\r\n            <button class=\"js-jobs-list-command btn btn-sm btn-primary\"\r\n     " +
"               data-url=\"");


            
            #line 25 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                         Write(Request.LinkTo("/recurring/trigger"));

            
            #line default
            #line hidden
WriteLiteral(@"""
                    data-loading-text=""Triggering..."">
                <span class=""glyphicon glyphicon-play-circle""></span>
                Trigger now
            </button>

            <button class=""js-jobs-list-command btn btn-sm btn-default""
                    data-url=""");


            
            #line 32 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                         Write(Request.LinkTo("/recurring/remove"));

            
            #line default
            #line hidden
WriteLiteral(@"""
                    data-loading-text=""Removing...""
                    data-confirm=""Do you really want to REMOVE ALL selected jobs?"">
                <span class=""glyphicon glyphicon-remove""></span>
                Remove
            </button>
        </div>

        <table class=""table"">
            <thead>
                <tr>
                    <th class=""min-width"">
                        <input type=""checkbox"" class=""js-jobs-list-select-all"" />
                    </th>
                    <th class=""min-width"">Id</th>
                    <th class=""min-width"">Cron</th>
                    <th>Job</th>
                    <th class=""align-right min-width"">Next execution</th>
                    <th class=""align-right min-width"">Last execution</th>
                </tr>
            </thead>
            <tbody>
");


            
            #line 54 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                 foreach (var job in RecurringJobs)
                {

            
            #line default
            #line hidden
WriteLiteral("                    <tr class=\"js-jobs-list-row hover\">\r\n                        " +
"<td>\r\n                            <input type=\"checkbox\" class=\"js-jobs-list-che" +
"ckbox\" name=\"jobs[]\" value=\"");


            
            #line 58 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                                                                                                 Write(job.Id);

            
            #line default
            #line hidden
WriteLiteral("\" />\r\n                        </td>\r\n                        <td class=\"min-width" +
"\">");


            
            #line 60 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                                         Write(job.Id);

            
            #line default
            #line hidden
WriteLiteral("</td>\r\n                        <td class=\"min-width\">");


            
            #line 61 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                                          Write(CronExpressionDescriptor.ExpressionDescriptor.GetDescription(job.Cron));

            
            #line default
            #line hidden
WriteLiteral("</td>\r\n                        <td>\r\n");


            
            #line 63 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                             if (job.Job != null)
                            {

            
            #line default
            #line hidden
WriteLiteral("                                ");

WriteLiteral(" ");


            
            #line 65 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                              Write(HtmlHelper.DisplayMethod(job.Job));

            
            #line default
            #line hidden
WriteLiteral("\r\n");


            
            #line 66 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                            }
                            else
                            {

            
            #line default
            #line hidden
WriteLiteral("                                <em>");


            
            #line 69 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                               Write(job.LoadException.InnerException.Message);

            
            #line default
            #line hidden
WriteLiteral("</em>\r\n");


            
            #line 70 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                            }

            
            #line default
            #line hidden
WriteLiteral("                        </td>\r\n                        <td class=\"align-right min" +
"-width\">\r\n");


            
            #line 73 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                             if (job.NextExecution != null)
                            {

            
            #line default
            #line hidden
WriteLiteral("                                <span data-moment=\"");


            
            #line 75 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                                               Write(JobHelper.ToTimestamp(job.NextExecution.Value));

            
            #line default
            #line hidden
WriteLiteral("\">\r\n                                    ");


            
            #line 76 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                               Write(job.NextExecution.Value);

            
            #line default
            #line hidden
WriteLiteral("\r\n                                </span>\r\n");


            
            #line 78 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                            }
                            else
                            {

            
            #line default
            #line hidden
WriteLiteral("                                <em>N/A</em>\r\n");


            
            #line 82 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                            }

            
            #line default
            #line hidden
WriteLiteral("                        </td>\r\n                        <td class=\"align-right min" +
"-width\">\r\n");


            
            #line 85 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                             if (job.LastExecution != null)
                            {

            
            #line default
            #line hidden
WriteLiteral("                                <a href=\"");


            
            #line 87 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                                    Write(Request.LinkTo("/job/" + job.LastJobId));

            
            #line default
            #line hidden
WriteLiteral("\">\r\n                                    <span class=\"label label-default label-ho" +
"ver\" data-moment=\"");


            
            #line 88 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                                                                                           Write(JobHelper.ToTimestamp(job.LastExecution.Value));

            
            #line default
            #line hidden
WriteLiteral("\" style=\"");


            
            #line 88 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                                                                                                                                                     Write(job.LastJobState != null && JobHistoryRenderer.ForegroundStateColors.ContainsKey(job.LastJobState) ? String.Format("background-color: {0};", JobHistoryRenderer.ForegroundStateColors[job.LastJobState]) : null);

            
            #line default
            #line hidden
WriteLiteral("\">\r\n                                        ");


            
            #line 89 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                                   Write(job.LastExecution.Value);

            
            #line default
            #line hidden
WriteLiteral("\r\n                                    </span>\r\n                                </" +
"a>\r\n");


            
            #line 92 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                            }
                            else
                            {

            
            #line default
            #line hidden
WriteLiteral("                                <em>N/A</em>\r\n");


            
            #line 96 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                            }

            
            #line default
            #line hidden
WriteLiteral("                        </td>\r\n                    </tr>\r\n");


            
            #line 99 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                }

            
            #line default
            #line hidden
WriteLiteral("            </tbody>\r\n        </table>\r\n    </div>\r\n");


            
            #line 103 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
}

            
            #line default
            #line hidden
WriteLiteral("    ");


        }
        public override void Execute()
        {


WriteLiteral("\r\n");











            
            #line 11 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
  
    var monitor = JobStorage.Current.GetMonitoringApi();
    JobDetailsDto job = monitor.JobDetails(JobId.ToString());

    string title = null;

    if (job != null)
    {
        title = job.Job != null ? String.Format("{0}.{1}", job.Job.Type.Name, job.Job.Method.Name) : null;
    }

    title = title ?? "Job";

    Layout = new LayoutPage { Title = title };


            
            #line default
            #line hidden
WriteLiteral("\r\n");


            
            #line 27 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
 if (job == null)
{

            
            #line default
            #line hidden
WriteLiteral("    ");

WriteLiteral(" The job with id \'");


            
            #line 29 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                   Write(JobId);

            
            #line default
            #line hidden
WriteLiteral("\' was expired or was not existed on the server.\r\n");


            
            #line 30 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
}
else
{

            
            #line default
            #line hidden
WriteLiteral("    <div class=\"job-snippet-header\">\r\n        <span class=\"job-snippet-tab\">\r\n   " +
"         Job ID: <span class=\"job-snippet-id\">");


            
            #line 35 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                                            Write(HtmlHelper.JobId(JobId.ToString(), false));

            
            #line default
            #line hidden
WriteLiteral("</span>\r\n        </span>\r\n\r\n        <span class=\"job-snippet-buttons pull-right\">" +
"\r\n            <button class=\"btn btn-xs btn-default\" data-ajax=\"");


            
            #line 39 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                                                         Write(Request.LinkTo("/actions/requeue/" + JobId));

            
            #line default
            #line hidden
WriteLiteral("\" data-loading-text=\"Enqueueing...\">Requeue</button>\r\n            <button class=\"" +
"btn btn-xs btn-death\" data-ajax=\"");


            
            #line 40 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                                                       Write(Request.LinkTo("/actions/delete/" + JobId));

            
            #line default
            #line hidden
WriteLiteral("\" data-loading-text=\"Deleting...\" data-confirm=\"Do you really want to delete this" +
" job?\">Delete</button>\r\n        </span>\r\n\r\n        <div class=\"clearfix\"></div>\r" +
"\n    </div>\r\n");



WriteLiteral("    <div class=\"job-snippet\">\r\n        <div class=\"job-snippet-code\">\r\n");


            
            #line 47 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
             if (job.CreatedAt.HasValue)
            {

            
            #line default
            #line hidden
WriteLiteral("                <div class=\"pull-right job-creation-date\">\r\n                    C" +
"reated\r\n                    <span data-moment=\"");


            
            #line 51 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                                  Write(JobHelper.ToTimestamp(job.CreatedAt.Value));

            
            #line default
            #line hidden
WriteLiteral("\"></span>\r\n                </div>\r\n");


            
            #line 53 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
            }

            
            #line default
            #line hidden

            
            #line 54 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
             if (job != null)
            {

            
            #line default
            #line hidden
WriteLiteral("                <pre><code>");


            
            #line 56 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                      Write(JobMethodCallRenderer.Render(job.Job));

            
            #line default
            #line hidden
WriteLiteral("</code></pre>\r\n");


            
            #line 57 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
            }

            
            #line default
            #line hidden
WriteLiteral("            <div class=\"clearfix\"></div>\r\n        </div>\r\n\r\n");


            
            #line 61 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
         if (job.Properties.Count > 0)
        {

            
            #line default
            #line hidden
WriteLiteral("            <div class=\"job-snippet-properties\">\r\n                <dl>\r\n");


            
            #line 65 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                     foreach (var property in job.Properties)
                    {

            
            #line default
            #line hidden
WriteLiteral("                        <dt>");


            
            #line 67 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                       Write(property.Key);

            
            #line default
            #line hidden
WriteLiteral("</dt>\r\n");



WriteLiteral("                        <dd>\r\n                            <pre>");


            
            #line 69 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                            Write(property.Value);

            
            #line default
            #line hidden
WriteLiteral("</pre>\r\n                        </dd>\r\n");


            
            #line 71 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                    }

            
            #line default
            #line hidden
WriteLiteral("                </dl>\r\n            </div>\r\n");


            
            #line 74 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
        }

            
            #line default
            #line hidden
WriteLiteral("    </div>\r\n");


            
            #line 76 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"

    if (job.History.Count > 0)
    {

            
            #line default
            #line hidden
WriteLiteral("        <h3>History</h3>\r\n");


            
            #line 80 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
        var index = 0;

        DateTime[] entriesCreationTime = job.History.Select(x => x.CreatedAt).ToArray();
        var nextEntry = 1;
        
        foreach (var entry in job.History)
        {
            var background = JobHistoryRenderer.BackgroundStateColors.ContainsKey(entry.StateName)
               ? JobHistoryRenderer.BackgroundStateColors[entry.StateName]
               : null;

            if (index == 0)
            {
                background = JobHistoryRenderer.ForegroundStateColors.ContainsKey(entry.StateName)
                    ? JobHistoryRenderer.ForegroundStateColors[entry.StateName]
                    : null;
            }


            
            #line default
            #line hidden
WriteLiteral("            <div class=\"job-history ");


            
            #line 98 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                                Write(index == 0 ? "job-history-current" : null);

            
            #line default
            #line hidden
WriteLiteral("\">\r\n                <div class=\"job-history-heading\" style=\"");


            
            #line 99 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                                                    Write(background != null ? String.Format("background-color: {0};", background) : null);

            
            #line default
            #line hidden
WriteLiteral("\">\r\n                    <span class=\"pull-right\" data-moment-title=\"");


            
            #line 100 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                                                            Write(JobHelper.ToTimestamp(entry.CreatedAt));

            
            #line default
            #line hidden
WriteLiteral("\">\r\n                        ");


            
            #line 101 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                   Write(HtmlHelper.ToHumanDuration(entry.CreatedAt - (nextEntry < entriesCreationTime.Length ? entriesCreationTime[nextEntry] : job.CreatedAt)));

            
            #line default
            #line hidden
WriteLiteral("\r\n");


            
            #line 102 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                           nextEntry++; 

            
            #line default
            #line hidden
WriteLiteral("                    </span>\r\n                    <h4 class=\"job-history-title\">\r\n" +
"                        ");


            
            #line 105 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                   Write(entry.StateName);

            
            #line default
            #line hidden
WriteLiteral("\r\n\r\n");


            
            #line 107 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                         if (!String.IsNullOrWhiteSpace(entry.Reason))
                        {

            
            #line default
            #line hidden
WriteLiteral("                            <small>");


            
            #line 109 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                              Write(entry.Reason);

            
            #line default
            #line hidden
WriteLiteral("</small>\r\n");


            
            #line 110 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                        }

            
            #line default
            #line hidden
WriteLiteral("                    </h4>\r\n                </div>\r\n\r\n");


            
            #line 114 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                 if (JobHistoryRenderer.Exists(entry.StateName))
                {
                    var rendered = JobHistoryRenderer.Render(entry.StateName, entry.Data);
                    if (rendered != null)
                    {

            
            #line default
            #line hidden
WriteLiteral("                        <div class=\"job-history-body\">\r\n                         " +
"   ");


            
            #line 120 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                       Write(rendered);

            
            #line default
            #line hidden
WriteLiteral("\r\n                        </div>\r\n");


            
            #line 122 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                    }
                }
                else
                {

            
            #line default
            #line hidden
WriteLiteral("                    <div class=\"job-history-body\">\r\n                        <dl c" +
"lass=\"dl-horizontal\">\r\n");


            
            #line 128 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                             foreach (var item in entry.Data)
                            {

            
            #line default
            #line hidden
WriteLiteral("                                <dt>");


            
            #line 130 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                               Write(item.Key);

            
            #line default
            #line hidden
WriteLiteral(":</dt>\r\n");



WriteLiteral("                                <dd>");


            
            #line 131 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                               Write(item.Value);

            
            #line default
            #line hidden
WriteLiteral("</dd>\r\n");


            
            #line 132 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                            }

            
            #line default
            #line hidden
WriteLiteral("                        </dl>\r\n                    </div>\r\n");


            
            #line 135 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                }

            
            #line default
            #line hidden
WriteLiteral("            </div>\r\n");


            
            #line 137 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"

                index++;
        }
    }
}
            
            #line default
            #line hidden

        }
        public override void Execute()
        {


WriteLiteral("\r\n");








            
            #line 8 "..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
  
    Layout = new LayoutPage { Title = "Deleted Jobs" };

    int from, perPage;

    int.TryParse(Request.Query["from"], out from);
    int.TryParse(Request.Query["count"], out perPage);

    var monitor = JobStorage.Current.GetMonitoringApi();
    Pager pager = new Pager(from, perPage, monitor.DeletedListCount())
    {
        BasePageUrl = Request.LinkTo("/deleted")
    };

    JobList<DeletedJobDto> jobs = monitor.DeletedJobs(pager.FromRecord, pager.RecordsPerPage);


            
            #line default
            #line hidden
WriteLiteral("\r\n");


            
            #line 25 "..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
 if (pager.TotalPageCount == 0)
{

            
            #line default
            #line hidden
WriteLiteral("    <div class=\"alert alert-info\">\r\n        No deleted jobs found.\r\n    </div>\r\n");


            
            #line 30 "..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
}
else
{

            
            #line default
            #line hidden
WriteLiteral("    <div class=\"js-jobs-list\">\r\n        <div class=\"btn-toolbar btn-toolbar-top\">" +
"\r\n            <button class=\"js-jobs-list-command btn btn-sm btn-primary\"\r\n     " +
"               data-url=\"");


            
            #line 36 "..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
                         Write(Request.LinkTo("/deleted/requeue"));

            
            #line default
            #line hidden
WriteLiteral("\"\r\n                    data-loading-text=\"Enqueueing...\">\r\n                <span " +
"class=\"glyphicon glyphicon-repeat\"></span>\r\n                Requeue jobs\r\n      " +
"      </button>\r\n            ");


            
            #line 41 "..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
       Write(RenderPartial(new PerPageSelector(pager)));

            
            #line default
            #line hidden
WriteLiteral(@"
        </div>
        <table class=""table"">
            <thead>
                <tr>
                    <th class=""min-width"">
                        <input type=""checkbox"" class=""js-jobs-list-select-all"" />
                    </th>
                    <th class=""min-width"">Id</th>
                    <th>Job</th>
                    <th class=""align-right"">Deleted</th>
                </tr>
            </thead>
            <tbody>
");


            
            #line 55 "..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
                 foreach (var job in jobs)
                {

            
            #line default
            #line hidden
WriteLiteral("                    <tr class=\"js-jobs-list-row ");


            
            #line 57 "..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
                                            Write(job.Value != null && !job.Value.InDeletedState ? "obsolete-data" : null);

            
            #line default
            #line hidden
WriteLiteral(" ");


            
            #line 57 "..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
                                                                                                                       Write(job.Value != null && job.Value.InDeletedState && job.Value != null ? "hover" : null);

            
            #line default
            #line hidden
WriteLiteral("\">\r\n                        <td>\r\n");


            
            #line 59 "..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
                             if (job.Value != null && job.Value.InDeletedState)
                            {

            
            #line default
            #line hidden
WriteLiteral("                                <input type=\"checkbox\" class=\"js-jobs-list-checkb" +
"ox\" name=\"jobs[]\" value=\"");


            
            #line 61 "..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
                                                                                                     Write(job.Key);

            
            #line default
            #line hidden
WriteLiteral("\" />\r\n");


            
            #line 62 "..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
                            }

            
            #line default
            #line hidden
WriteLiteral("                        </td>\r\n                        <td class=\"min-width\">\r\n  " +
"                          <a href=\"");


            
            #line 65 "..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
                                Write(Request.LinkTo("/job/" + job.Key));

            
            #line default
            #line hidden
WriteLiteral("\">\r\n                                ");


            
            #line 66 "..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
                           Write(HtmlHelper.JobId(job.Key));

            
            #line default
            #line hidden
WriteLiteral("\r\n                            </a>\r\n");


            
            #line 68 "..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
                             if (job.Value != null && !job.Value.InDeletedState)
                            {

            
            #line default
            #line hidden
WriteLiteral("                                <span title=\"Job\'s state has been changed while f" +
"etching data.\" class=\"glyphicon glyphicon-question-sign\"></span>\r\n");


            
            #line 71 "..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
                            }

            
            #line default
            #line hidden
WriteLiteral("                        </td>\r\n\r\n");


            
            #line 74 "..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
                         if (job.Value == null)
                        {

            
            #line default
            #line hidden
WriteLiteral("                            <td colspan=\"2\">\r\n                                <em" +
">Job was expired.</em>\r\n                            </td>\r\n");


            
            #line 79 "..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
                        }
                        else
                        {

            
            #line default
            #line hidden
WriteLiteral("                            <td>\r\n                                <a class=\"job-m" +
"ethod\" href=\"");


            
            #line 83 "..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
                                                       Write(Request.LinkTo("/job/" + job.Key));

            
            #line default
            #line hidden
WriteLiteral("\">\r\n                                    ");


            
            #line 84 "..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
                               Write(HtmlHelper.DisplayMethod(job.Value.Job));

            
            #line default
            #line hidden
WriteLiteral("\r\n                                </a>\r\n                            </td>\r\n");



WriteLiteral("                            <td class=\"align-right\">\r\n");


            
            #line 88 "..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
                                 if (job.Value.DeletedAt.HasValue)
                                {

            
            #line default
            #line hidden
WriteLiteral("                                    <span data-moment=\"");


            
            #line 90 "..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
                                                  Write(JobHelper.ToTimestamp(job.Value.DeletedAt.Value));

            
            #line default
            #line hidden
WriteLiteral("\">\r\n                                        ");


            
            #line 91 "..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
                                   Write(job.Value.DeletedAt);

            
            #line default
            #line hidden
WriteLiteral("\r\n                                    </span>\r\n");


            
            #line 93 "..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
                                }

            
            #line default
            #line hidden
WriteLiteral("                            </td>\r\n");


            
            #line 95 "..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
                        }

            
            #line default
            #line hidden
WriteLiteral("                    </tr>\r\n");


            
            #line 97 "..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
                }

            
            #line default
            #line hidden
WriteLiteral("            </tbody>\r\n        </table>\r\n    </div>\r\n");


            
            #line 101 "..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
    
            
            #line default
            #line hidden
            
            #line 101 "..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
Write(RenderPartial(new Paginator(pager)));

            
            #line default
            #line hidden
            
            #line 101 "..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
                                        
}

            
            #line default
            #line hidden

        }
        public override void Execute()
        {


WriteLiteral("\r\n");







            
            #line 7 "..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
  
    Layout = new LayoutPage { Title = "Scheduled Jobs" };

    int from, perPage;

    int.TryParse(Request.Query["from"], out from);
    int.TryParse(Request.Query["count"], out perPage);

    var monitor = JobStorage.Current.GetMonitoringApi();
    Pager pager = new Pager(from, perPage, monitor.ScheduledCount())
    {
        BasePageUrl = Request.LinkTo("/scheduled")
    };

    JobList<ScheduledJobDto> scheduledJobs = monitor.ScheduledJobs(pager.FromRecord, pager.RecordsPerPage);


            
            #line default
            #line hidden
WriteLiteral("\r\n");


            
            #line 24 "..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
 if (pager.TotalPageCount == 0)
{

            
            #line default
            #line hidden
WriteLiteral("    <div class=\"alert alert-info\">\r\n        There are no scheduled jobs.\r\n    </d" +
"iv>\r\n");


            
            #line 29 "..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
}
else
{

            
            #line default
            #line hidden
WriteLiteral("    <div class=\"js-jobs-list\">\r\n        <div class=\"btn-toolbar btn-toolbar-top\">" +
"\r\n            <button class=\"js-jobs-list-command btn btn-sm btn-primary\"\r\n     " +
"               data-url=\"");


            
            #line 35 "..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
                         Write(Request.LinkTo("/scheduled/enqueue"));

            
            #line default
            #line hidden
WriteLiteral(@"""
                    data-loading-text=""Enqueueing..."">
                <span class=""glyphicon glyphicon-play""></span>
                Enqueue now
            </button>

            <button class=""js-jobs-list-command btn btn-sm btn-default""
                    data-url=""");


            
            #line 42 "..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
                         Write(Request.LinkTo("/scheduled/delete"));

            
            #line default
            #line hidden
WriteLiteral(@"""
                    data-loading-text=""Deleting...""
                    data-confirm=""Do you really want to DELETE ALL selected jobs?"">
                <span class=""glyphicon glyphicon-remove""></span>
                Delete selected
            </button>

            ");


            
            #line 49 "..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
       Write(RenderPartial(new PerPageSelector(pager)));

            
            #line default
            #line hidden
WriteLiteral(@"
        </div>

        <table class=""table"">
            <thead>
                <tr>
                    <th class=""min-width"">
                        <input type=""checkbox"" class=""js-jobs-list-select-all"" />
                    </th>
                    <th class=""min-width"">Id</th>
                    <th>Enqueue</th>
                    <th>Job</th>
                    <th class=""align-right"">Scheduled</th>
                </tr>
            </thead>
");


            
            #line 64 "..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
             foreach (var job in scheduledJobs)
            {

            
            #line default
            #line hidden
WriteLiteral("                <tr class=\"js-jobs-list-row ");


            
            #line 66 "..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
                                        Write(!job.Value.InScheduledState ? "obsolete-data" : null);

            
            #line default
            #line hidden
WriteLiteral(" ");


            
            #line 66 "..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
                                                                                                Write(job.Value.InScheduledState ? "hover" : null);

            
            #line default
            #line hidden
WriteLiteral("\">\r\n                    <td>\r\n");


            
            #line 68 "..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
                         if (job.Value.InScheduledState)
                        {

            
            #line default
            #line hidden
WriteLiteral("                            <input type=\"checkbox\" class=\"js-jobs-list-checkbox\" " +
"name=\"jobs[]\" value=\"");


            
            #line 70 "..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
                                                                                                 Write(job.Key);

            
            #line default
            #line hidden
WriteLiteral("\" />\r\n");


            
            #line 71 "..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
                        }

            
            #line default
            #line hidden
WriteLiteral("                    </td>\r\n                    <td class=\"min-width\">\r\n          " +
"              <a href=\"");


            
            #line 74 "..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
                            Write(Request.LinkTo("/job/" + job.Key));

            
            #line default
            #line hidden
WriteLiteral("\">\r\n                            ");


            
            #line 75 "..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
                       Write(HtmlHelper.JobId(job.Key));

            
            #line default
            #line hidden
WriteLiteral("\r\n                        </a>\r\n");


            
            #line 77 "..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
                         if (!job.Value.InScheduledState)
                        {

            
            #line default
            #line hidden
WriteLiteral("                            <span title=\"Job\'s state has been changed while fetch" +
"ing data.\" class=\"glyphicon glyphicon-question-sign\"></span>\r\n");


            
            #line 80 "..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
                        }

            
            #line default
            #line hidden
WriteLiteral("                    </td>\r\n                    <td class=\"min-width\">\r\n          " +
"              <span data-moment=\"");


            
            #line 83 "..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
                                      Write(JobHelper.ToTimestamp(job.Value.EnqueueAt));

            
            #line default
            #line hidden
WriteLiteral("\">\r\n                            ");


            
            #line 84 "..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
                       Write(job.Value.EnqueueAt);

            
            #line default
            #line hidden
WriteLiteral("\r\n                        </span>\r\n                    </td>\r\n                   " +
" <td>\r\n                        <a class=\"job-method\" href=\"");


            
            #line 88 "..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
                                               Write(Request.LinkTo("/job/" + job.Key));

            
            #line default
            #line hidden
WriteLiteral("\">\r\n                            ");


            
            #line 89 "..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
                       Write(HtmlHelper.DisplayMethod(job.Value.Job));

            
            #line default
            #line hidden
WriteLiteral("\r\n                        </a>\r\n                    </td>\r\n                    <t" +
"d class=\"align-right\">\r\n");


            
            #line 93 "..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
                         if (job.Value.ScheduledAt != null)
                        {

            
            #line default
            #line hidden
WriteLiteral("                            <span data-moment=\"");


            
            #line 95 "..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
                                          Write(JobHelper.ToTimestamp(job.Value.ScheduledAt.Value));

            
            #line default
            #line hidden
WriteLiteral("\">\r\n                                ");


            
            #line 96 "..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
                           Write(job.Value.ScheduledAt);

            
            #line default
            #line hidden
WriteLiteral("\r\n                            </span>\r\n");


            
            #line 98 "..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
                        }

            
            #line default
            #line hidden
WriteLiteral("                    </td>\r\n                </tr>\r\n");


            
            #line 101 "..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
            }

            
            #line default
            #line hidden
WriteLiteral("        </table>\r\n    </div>\r\n");


            
            #line 104 "..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"

    
            
            #line default
            #line hidden
            
            #line 105 "..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
Write(RenderPartial(new Paginator(pager)));

            
            #line default
            #line hidden
            
            #line 105 "..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
                                        
}

            
            #line default
            #line hidden

        }
        public override void Execute()
        {


WriteLiteral("\r\n");










            
            #line 10 "..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
  
    Layout = new LayoutPage
        {
            Title = Queue.ToUpperInvariant(),
            Subtitle = "Fetched jobs",
            Breadcrumbs = new Dictionary<string, string>
                {
                    { "Queues", Request.LinkTo("/queues") },
                    { Queue.ToUpperInvariant(), Request.LinkTo("/queues/" + Queue) }
                },
            BreadcrumbsTitle = "Fetched jobs",
        };

    int from, perPage;

    int.TryParse(Request.Query["from"], out from);
    int.TryParse(Request.Query["count"], out perPage);

    var monitor = JobStorage.Current.GetMonitoringApi();
    Pager pager = new Pager(from, perPage, monitor.FetchedCount(Queue))
    {
        BasePageUrl = Request.LinkTo("/queues/fetched/" + Queue)
    };

    JobList<FetchedJobDto> fetchedJobs = monitor
        .FetchedJobs(Queue, pager.FromRecord, pager.RecordsPerPage);


            
            #line default
            #line hidden
WriteLiteral("\r\n");


            
            #line 38 "..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
 if (pager.TotalPageCount == 0)
{

            
            #line default
            #line hidden
WriteLiteral("    <div class=\"alert alert-info\">\r\n        The queue is empty.\r\n    </div>\r\n");


            
            #line 43 "..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
}
else
{

            
            #line default
            #line hidden
WriteLiteral("    <div class=\"js-jobs-list\">\r\n        <div class=\"btn-toolbar btn-toolbar-top\">" +
"\r\n            <button class=\"js-jobs-list-command btn btn-sm btn-primary\"\r\n     " +
"               data-url=\"");


            
            #line 49 "..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
                         Write(Request.LinkTo("/enqueued/requeue"));

            
            #line default
            #line hidden
WriteLiteral(@"""
                    data-loading-text=""Enqueueing..."">
                <span class=""glyphicon glyphicon-repeat""></span>
                Requeue jobs
            </button>

            <button class=""js-jobs-list-command btn btn-sm btn-default""
                    data-url=""");


            
            #line 56 "..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
                         Write(Request.LinkTo("/enqueued/delete"));

            
            #line default
            #line hidden
WriteLiteral(@"""
                    data-loading-text=""Deleting...""
                    data-confirm=""Do you really want to DELETE ALL selected jobs?"">
                <span class=""glyphicon glyphicon-remove""></span>
                Delete selected
            </button>

            ");


            
            #line 63 "..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
       Write(RenderPartial(new PerPageSelector(pager)));

            
            #line default
            #line hidden
WriteLiteral(@"
        </div>

        <table class=""table"">
            <thead>
                <tr>
                    <th class=""min-width"">
                        <input type=""checkbox"" class=""js-jobs-list-select-all"" />
                    </th>
                    <th class=""min-width"">Id</th>
                    <th class=""min-width"">State</th>
                    <th>Job</th>
                    <th class=""align-right"">Fetched</th>
                </tr>
            </thead>
            <tbody>
");


            
            #line 79 "..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
                 foreach (var job in fetchedJobs)
                {

            
            #line default
            #line hidden
WriteLiteral("                    <tr class=\"js-jobs-list-row hover\">\r\n                        " +
"<td>\r\n                            <input type=\"checkbox\" class=\"js-jobs-list-che" +
"ckbox\" name=\"jobs[]\" value=\"");


            
            #line 83 "..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
                                                                                                 Write(job.Key);

            
            #line default
            #line hidden
WriteLiteral("\" />\r\n                        </td>\r\n                        <td class=\"min-width" +
"\">\r\n                            <a href=\"");


            
            #line 86 "..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
                                Write(Request.LinkTo("/job/" + job.Key));

            
            #line default
            #line hidden
WriteLiteral("\">");


            
            #line 86 "..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
                                                                    Write(HtmlHelper.JobId(job.Key));

            
            #line default
            #line hidden
WriteLiteral("</a>\r\n                        </td>\r\n                        <td class=\"min-width" +
"\">\r\n                            <span class=\"label label-default\" style=\"");


            
            #line 89 "..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
                                                                 Write(JobHistoryRenderer.ForegroundStateColors.ContainsKey(job.Value.State) ? String.Format("background-color: {0};", JobHistoryRenderer.ForegroundStateColors[job.Value.State]) : null);

            
            #line default
            #line hidden
WriteLiteral("\">\r\n                                ");


            
            #line 90 "..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
                           Write(job.Value.State);

            
            #line default
            #line hidden
WriteLiteral("\r\n                            </span>\r\n                        </td>\r\n           " +
"             <td>\r\n                            <a class=\"job-method\" href=\"");


            
            #line 94 "..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
                                                   Write(Request.LinkTo("/job/" + job.Key));

            
            #line default
            #line hidden
WriteLiteral("\">\r\n                                ");


            
            #line 95 "..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
                           Write(HtmlHelper.DisplayMethod(job.Value.Job));

            
            #line default
            #line hidden
WriteLiteral("\r\n                            </a>\r\n                        </td>\r\n              " +
"          <td class=\"align-right\">\r\n");


            
            #line 99 "..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
                             if (job.Value.FetchedAt.HasValue)
                            {

            
            #line default
            #line hidden
WriteLiteral("                                <span data-moment=\"");


            
            #line 101 "..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
                                              Write(JobHelper.ToTimestamp(job.Value.FetchedAt.Value));

            
            #line default
            #line hidden
WriteLiteral("\">\r\n                                    ");


            
            #line 102 "..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
                               Write(job.Value.FetchedAt);

            
            #line default
            #line hidden
WriteLiteral("\r\n                                </span>\r\n");


            
            #line 104 "..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
                            }

            
            #line default
            #line hidden
WriteLiteral("                        </td>\r\n                    </tr>\r\n");


            
            #line 107 "..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
                }

            
            #line default
            #line hidden
WriteLiteral("            </tbody>\r\n        </table>\r\n    </div>\r\n");


            
            #line 111 "..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
    
            
            #line default
            #line hidden
            
            #line 111 "..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
Write(RenderPartial(new Paginator(pager)));

            
            #line default
            #line hidden
            
            #line 111 "..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
                                        
}

            
            #line default
            #line hidden

        }
Exemplo n.º 7
0
        public override void Execute()
        {


WriteLiteral("\r\n");









            
            #line 9 "..\..\Dashboard\Pages\ServersPage.cshtml"
  
    Layout = new LayoutPage { Title = "Servers" };
    
    var monitor = JobStorage.Current.GetMonitoringApi();
    IList<ServerDto> servers = monitor.Servers();    


            
            #line default
            #line hidden
WriteLiteral("\r\n");


            
            #line 16 "..\..\Dashboard\Pages\ServersPage.cshtml"
 if (servers.Count == 0)
{

            
            #line default
            #line hidden
WriteLiteral("    <div class=\"alert alert-warning\">\r\n        There are no active servers. Backg" +
"round tasks will not be processed.\r\n    </div>\r\n");


            
            #line 21 "..\..\Dashboard\Pages\ServersPage.cshtml"
}
else
{

            
            #line default
            #line hidden
WriteLiteral(@"    <table class=""table"">
        <thead>
            <tr>
                <th>Name</th>
                <th>Workers</th>
                <th>Queues</th>
                <th>Started</th>
                <th>Heartbeat</th>
            </tr>
        </thead>
        <tbody>
");


            
            #line 35 "..\..\Dashboard\Pages\ServersPage.cshtml"
             foreach (var server in servers)
            {

            
            #line default
            #line hidden
WriteLiteral("                <tr>\r\n                    <td>");


            
            #line 38 "..\..\Dashboard\Pages\ServersPage.cshtml"
                   Write(server.Name.ToUpperInvariant());

            
            #line default
            #line hidden
WriteLiteral("</td>\r\n                    <td>");


            
            #line 39 "..\..\Dashboard\Pages\ServersPage.cshtml"
                   Write(server.WorkersCount);

            
            #line default
            #line hidden
WriteLiteral("</td>\r\n                    <td>");


            
            #line 40 "..\..\Dashboard\Pages\ServersPage.cshtml"
                   Write(HtmlHelper.Raw(String.Join(" ", server.Queues.Select(HtmlHelper.QueueLabel))));

            
            #line default
            #line hidden
WriteLiteral("</td>\r\n                    <td data-moment=\"");


            
            #line 41 "..\..\Dashboard\Pages\ServersPage.cshtml"
                                Write(JobHelper.ToTimestamp(server.StartedAt));

            
            #line default
            #line hidden
WriteLiteral("\">");


            
            #line 41 "..\..\Dashboard\Pages\ServersPage.cshtml"
                                                                          Write(server.StartedAt);

            
            #line default
            #line hidden
WriteLiteral("</td>\r\n                    <td>\r\n");


            
            #line 43 "..\..\Dashboard\Pages\ServersPage.cshtml"
                         if (server.Heartbeat.HasValue)
                        {

            
            #line default
            #line hidden
WriteLiteral("                            <span data-moment=\"");


            
            #line 45 "..\..\Dashboard\Pages\ServersPage.cshtml"
                                          Write(JobHelper.ToTimestamp(server.Heartbeat.Value));

            
            #line default
            #line hidden
WriteLiteral("\">\r\n                                ");


            
            #line 46 "..\..\Dashboard\Pages\ServersPage.cshtml"
                           Write(server.Heartbeat);

            
            #line default
            #line hidden
WriteLiteral("\r\n                            </span>\r\n");


            
            #line 48 "..\..\Dashboard\Pages\ServersPage.cshtml"
                        }

            
            #line default
            #line hidden
WriteLiteral("                    </td>\r\n                </tr>\r\n");


            
            #line 51 "..\..\Dashboard\Pages\ServersPage.cshtml"
            }

            
            #line default
            #line hidden
WriteLiteral("        </tbody>\r\n    </table>\r\n");


            
            #line 54 "..\..\Dashboard\Pages\ServersPage.cshtml"
}
            
            #line default
            #line hidden

        }
        public override void Execute()
        {


WriteLiteral("\r\n");








            
            #line 8 "..\..\Dashboard\Pages\FailedJobsPage.cshtml"
  
    Layout = new LayoutPage { Title = "Failed Jobs" };

    int from, perPage;

    int.TryParse(Request.Query["from"], out from);
    int.TryParse(Request.Query["count"], out perPage);

    var monitor = JobStorage.Current.GetMonitoringApi();
    Pager pager = new Pager(from, perPage, monitor.FailedCount())
    {
        BasePageUrl = Request.LinkTo("/failed")
    };

    JobList<FailedJobDto> failedJobs = monitor
        .FailedJobs(pager.FromRecord, pager.RecordsPerPage);


            
            #line default
            #line hidden
WriteLiteral("\r\n");


            
            #line 26 "..\..\Dashboard\Pages\FailedJobsPage.cshtml"
 if (pager.TotalPageCount == 0)
{

            
            #line default
            #line hidden
WriteLiteral("    <div class=\"alert alert-success\">\r\n        You have no failed jobs at the mom" +
"ent.\r\n    </div>\r\n");


            
            #line 31 "..\..\Dashboard\Pages\FailedJobsPage.cshtml"
}
else
{

            
            #line default
            #line hidden
WriteLiteral("    <div class=\"js-jobs-list\">\r\n        <div class=\"btn-toolbar btn-toolbar-top\">" +
"\r\n            <button class=\"js-jobs-list-command btn btn-sm btn-primary\"\r\n     " +
"               data-url=\"");


            
            #line 37 "..\..\Dashboard\Pages\FailedJobsPage.cshtml"
                         Write(Request.LinkTo("/failed/requeue"));

            
            #line default
            #line hidden
WriteLiteral(@"""
                    data-loading-text=""Enqueueing..."">
                <span class=""glyphicon glyphicon-repeat""></span>
                Requeue jobs
            </button>

            <button class=""js-jobs-list-command btn btn-sm btn-default""
                    data-url=""");


            
            #line 44 "..\..\Dashboard\Pages\FailedJobsPage.cshtml"
                         Write(Request.LinkTo("/failed/delete"));

            
            #line default
            #line hidden
WriteLiteral(@"""
                    data-loading-text=""Deleting...""
                    data-confirm=""Do you really want to DELETE ALL selected jobs?"">
                <span class=""glyphicon glyphicon-remove""></span>
                Delete selected
            </button>

            ");


            
            #line 51 "..\..\Dashboard\Pages\FailedJobsPage.cshtml"
       Write(RenderPartial(new PerPageSelector(pager)));

            
            #line default
            #line hidden
WriteLiteral(@"
        </div>

        <table class=""table failed-table"">
            <thead>
                <tr>
                    <th class=""min-width"">
                        <input type=""checkbox"" class=""js-jobs-list-select-all"" />
                    </th>
                    <th class=""min-width"">Id</th>
                    <th>Failed</th>
                    <th>Job</th>
                </tr>
            </thead>
            <tbody>
");


            
            #line 66 "..\..\Dashboard\Pages\FailedJobsPage.cshtml"
                   var index = 0; 

            
            #line default
            #line hidden

            
            #line 67 "..\..\Dashboard\Pages\FailedJobsPage.cshtml"
                 foreach (var job in failedJobs)
                {

            
            #line default
            #line hidden
WriteLiteral("                    <tr class=\"js-jobs-list-row ");


            
            #line 69 "..\..\Dashboard\Pages\FailedJobsPage.cshtml"
                                            Write(!job.Value.InFailedState ? "obsolete-data" : null);

            
            #line default
            #line hidden
WriteLiteral(" ");


            
            #line 69 "..\..\Dashboard\Pages\FailedJobsPage.cshtml"
                                                                                                 Write(job.Value.InFailedState ? "hover" : null);

            
            #line default
            #line hidden
WriteLiteral("\">\r\n                        <td rowspan=\"");


            
            #line 70 "..\..\Dashboard\Pages\FailedJobsPage.cshtml"
                                 Write(job.Value.InFailedState ? "2" : "1");

            
            #line default
            #line hidden
WriteLiteral("\">\r\n");


            
            #line 71 "..\..\Dashboard\Pages\FailedJobsPage.cshtml"
                             if (job.Value.InFailedState)
                            {

            
            #line default
            #line hidden
WriteLiteral("                                <input type=\"checkbox\" class=\"js-jobs-list-checkb" +
"ox\" name=\"jobs[]\" value=\"");


            
            #line 73 "..\..\Dashboard\Pages\FailedJobsPage.cshtml"
                                                                                                     Write(job.Key);

            
            #line default
            #line hidden
WriteLiteral("\" />\r\n");


            
            #line 74 "..\..\Dashboard\Pages\FailedJobsPage.cshtml"
                            }

            
            #line default
            #line hidden
WriteLiteral("                        </td>\r\n                        <td class=\"min-width\" rows" +
"pan=\"");


            
            #line 76 "..\..\Dashboard\Pages\FailedJobsPage.cshtml"
                                                   Write(job.Value.InFailedState ? "2" : "1");

            
            #line default
            #line hidden
WriteLiteral("\">\r\n                            <a href=\"");


            
            #line 77 "..\..\Dashboard\Pages\FailedJobsPage.cshtml"
                                Write(Request.LinkTo("/job/" + job.Key));

            
            #line default
            #line hidden
WriteLiteral("\">\r\n                                ");


            
            #line 78 "..\..\Dashboard\Pages\FailedJobsPage.cshtml"
                           Write(HtmlHelper.JobId(job.Key));

            
            #line default
            #line hidden
WriteLiteral("\r\n                            </a>\r\n");


            
            #line 80 "..\..\Dashboard\Pages\FailedJobsPage.cshtml"
                             if (!job.Value.InFailedState)
                            {

            
            #line default
            #line hidden
WriteLiteral("                                <span title=\"Job\'s state has been changed while f" +
"etching data.\" class=\"glyphicon glyphicon-question-sign\"></span>\r\n");


            
            #line 83 "..\..\Dashboard\Pages\FailedJobsPage.cshtml"
                            }

            
            #line default
            #line hidden
WriteLiteral("                        </td>\r\n                        <td class=\"min-width\">\r\n");


            
            #line 86 "..\..\Dashboard\Pages\FailedJobsPage.cshtml"
                             if (job.Value.FailedAt.HasValue)
                            {

            
            #line default
            #line hidden
WriteLiteral("                                <span data-moment=\"");


            
            #line 88 "..\..\Dashboard\Pages\FailedJobsPage.cshtml"
                                              Write(JobHelper.ToTimestamp(job.Value.FailedAt.Value));

            
            #line default
            #line hidden
WriteLiteral("\">\r\n                                    ");


            
            #line 89 "..\..\Dashboard\Pages\FailedJobsPage.cshtml"
                               Write(job.Value.FailedAt);

            
            #line default
            #line hidden
WriteLiteral("\r\n                                </span>\r\n");


            
            #line 91 "..\..\Dashboard\Pages\FailedJobsPage.cshtml"
                            }

            
            #line default
            #line hidden
WriteLiteral("                        </td>\r\n                        <td>\r\n                    " +
"        <div>\r\n                                <a class=\"job-method\" href=\"");


            
            #line 95 "..\..\Dashboard\Pages\FailedJobsPage.cshtml"
                                                       Write(Request.LinkTo("/job/" + job.Key));

            
            #line default
            #line hidden
WriteLiteral("\">\r\n                                    ");


            
            #line 96 "..\..\Dashboard\Pages\FailedJobsPage.cshtml"
                               Write(HtmlHelper.DisplayMethod(job.Value.Job));

            
            #line default
            #line hidden
WriteLiteral("\r\n                                </a>\r\n                            </div>\r\n");


            
            #line 99 "..\..\Dashboard\Pages\FailedJobsPage.cshtml"
                             if (!String.IsNullOrEmpty(job.Value.ExceptionMessage))
                            {

            
            #line default
            #line hidden
WriteLiteral("                                <div style=\"color: #888;\">\r\n                     " +
"               ");


            
            #line 102 "..\..\Dashboard\Pages\FailedJobsPage.cshtml"
                               Write(job.Value.Reason);

            
            #line default
            #line hidden
WriteLiteral(" <a class=\"expander\" href=\"#\">More&nbsp;details...</a>\r\n                         " +
"       </div>\r\n");


            
            #line 104 "..\..\Dashboard\Pages\FailedJobsPage.cshtml"
                            }

            
            #line default
            #line hidden
WriteLiteral("                        </td>\r\n                    </tr>\r\n");


            
            #line 107 "..\..\Dashboard\Pages\FailedJobsPage.cshtml"
                    if (job.Value.InFailedState)
                    {

            
            #line default
            #line hidden
WriteLiteral("                        <tr>\r\n                            <td colspan=\"2\" class=\"" +
"failed-job-details\">\r\n                                <div class=\"expandable\" st" +
"yle=\"");


            
            #line 111 "..\..\Dashboard\Pages\FailedJobsPage.cshtml"
                                                           Write(index++ == 0 ? "display: block;" : null);

            
            #line default
            #line hidden
WriteLiteral("\">\r\n                                    <h4>");


            
            #line 112 "..\..\Dashboard\Pages\FailedJobsPage.cshtml"
                                   Write(job.Value.ExceptionType);

            
            #line default
            #line hidden
WriteLiteral("</h4>\r\n                                    <p>\r\n                                 " +
"       ");


            
            #line 114 "..\..\Dashboard\Pages\FailedJobsPage.cshtml"
                                   Write(job.Value.ExceptionMessage);

            
            #line default
            #line hidden
WriteLiteral("\r\n                                    </p>\r\n\r\n");


            
            #line 117 "..\..\Dashboard\Pages\FailedJobsPage.cshtml"
                                     if (!String.IsNullOrEmpty(job.Value.ExceptionDetails))
                                    {

            
            #line default
            #line hidden
WriteLiteral("                                        <pre class=\"stack-trace\">");


            
            #line 119 "..\..\Dashboard\Pages\FailedJobsPage.cshtml"
                                                            Write(HtmlHelper.MarkupStackTrace(job.Value.ExceptionDetails));

            
            #line default
            #line hidden
WriteLiteral("</pre>\r\n");


            
            #line 120 "..\..\Dashboard\Pages\FailedJobsPage.cshtml"
                                    }

            
            #line default
            #line hidden
WriteLiteral("                                </div>\r\n                            </td>\r\n      " +
"                  </tr>\r\n");


            
            #line 124 "..\..\Dashboard\Pages\FailedJobsPage.cshtml"
                    }
                }

            
            #line default
            #line hidden
WriteLiteral("            </tbody>\r\n        </table>\r\n    </div>\r\n");


            
            #line 129 "..\..\Dashboard\Pages\FailedJobsPage.cshtml"

    
            
            #line default
            #line hidden
            
            #line 130 "..\..\Dashboard\Pages\FailedJobsPage.cshtml"
Write(RenderPartial(new Paginator(pager)));

            
            #line default
            #line hidden
            
            #line 130 "..\..\Dashboard\Pages\FailedJobsPage.cshtml"
                                        
}

            
            #line default
            #line hidden

        }
        public override void Execute()
        {


WriteLiteral("\r\n");







            
            #line 7 "..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
  
    Layout = new LayoutPage { Title = "Processing Jobs" };

    int from, perPage;

    int.TryParse(Request.Query["from"], out from);
    int.TryParse(Request.Query["count"], out perPage);

    var monitor = JobStorage.Current.GetMonitoringApi();
    Pager pager = new Pager(from, perPage, monitor.ProcessingCount())
    {
        BasePageUrl = Request.LinkTo("/processing")
    };

    JobList<ProcessingJobDto> processingJobs = monitor
        .ProcessingJobs(pager.FromRecord, pager.RecordsPerPage);


            
            #line default
            #line hidden
WriteLiteral("\r\n");


            
            #line 25 "..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
 if (pager.TotalPageCount == 0)
{

            
            #line default
            #line hidden
WriteLiteral("    <div class=\"alert alert-info\">\r\n        No jobs are being processed right now" +
".\r\n    </div>\r\n");


            
            #line 30 "..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
}
else
{

            
            #line default
            #line hidden
WriteLiteral("    <div class=\"js-jobs-list\">\r\n        <div class=\"btn-toolbar btn-toolbar-top\">" +
"\r\n            <button class=\"js-jobs-list-command btn btn-sm btn-primary\"\r\n     " +
"               data-url=\"");


            
            #line 36 "..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
                         Write(Request.LinkTo("/processing/requeue"));

            
            #line default
            #line hidden
WriteLiteral(@"""
                    data-loading-text=""Enqueueing..."">
                <span class=""glyphicon glyphicon-repeat""></span>
                Requeue jobs
            </button>

            <button class=""js-jobs-list-command btn btn-sm btn-default""
                    data-url=""");


            
            #line 43 "..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
                         Write(Request.LinkTo("/processing/delete"));

            
            #line default
            #line hidden
WriteLiteral(@"""
                    data-loading-text=""Deleting...""
                    data-confirm=""Do you really want to DELETE ALL selected jobs?"">
                <span class=""glyphicon glyphicon-remove""></span>
                Delete selected
            </button>

            ");


            
            #line 50 "..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
       Write(RenderPartial(new PerPageSelector(pager)));

            
            #line default
            #line hidden
WriteLiteral(@"
        </div>

        <table class=""table"">
            <thead>
                <tr>
                    <th class=""min-width"">
                        <input type=""checkbox"" class=""js-jobs-list-select-all"" />
                    </th>
                    <th class=""min-width"">Id</th>
                    <th class=""min-width"">Server</th>
                    <th>Job</th>
                    <th class=""align-right"">Started</th>
                </tr>
            </thead>
            <tbody>
");


            
            #line 66 "..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
                 foreach (var job in processingJobs)
                {

            
            #line default
            #line hidden
WriteLiteral("                    <tr class=\"js-jobs-list-row ");


            
            #line 68 "..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
                                            Write(!job.Value.InProcessingState ? "obsolete-data" : null);

            
            #line default
            #line hidden
WriteLiteral(" ");


            
            #line 68 "..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
                                                                                                     Write(job.Value.InProcessingState ? "hover" : null);

            
            #line default
            #line hidden
WriteLiteral("\">\r\n                        <td>\r\n");


            
            #line 70 "..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
                             if (job.Value.InProcessingState)
                            {

            
            #line default
            #line hidden
WriteLiteral("                                <input type=\"checkbox\" class=\"js-jobs-list-checkb" +
"ox\" name=\"jobs[]\" value=\"");


            
            #line 72 "..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
                                                                                                     Write(job.Key);

            
            #line default
            #line hidden
WriteLiteral("\" />\r\n");


            
            #line 73 "..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
                            }

            
            #line default
            #line hidden
WriteLiteral("                        </td>\r\n                        <td class=\"min-width\">\r\n  " +
"                          <a href=\"");


            
            #line 76 "..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
                                Write(Request.LinkTo("/job/" + job.Key));

            
            #line default
            #line hidden
WriteLiteral("\">\r\n                                ");


            
            #line 77 "..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
                           Write(HtmlHelper.JobId(job.Key));

            
            #line default
            #line hidden
WriteLiteral("\r\n                            </a>\r\n");


            
            #line 79 "..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
                             if (!job.Value.InProcessingState)
                            {

            
            #line default
            #line hidden
WriteLiteral("                                <span title=\"Job\'s state has been changed while f" +
"etching data.\" class=\"glyphicon glyphicon-question-sign\"></span>\r\n");


            
            #line 82 "..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
                            }

            
            #line default
            #line hidden
WriteLiteral("                        </td>\r\n                        <td class=\"min-width\">\r\n  " +
"                          ");


            
            #line 85 "..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
                       Write(job.Value.ServerId.ToUpperInvariant());

            
            #line default
            #line hidden
WriteLiteral("\r\n                        </td>\r\n                        <td>\r\n                  " +
"          <a class=\"job-method\" href=\"");


            
            #line 88 "..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
                                                   Write(Request.LinkTo("/job/" + job.Key));

            
            #line default
            #line hidden
WriteLiteral("\">\r\n                                ");


            
            #line 89 "..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
                           Write(HtmlHelper.DisplayMethod(job.Value.Job));

            
            #line default
            #line hidden
WriteLiteral("\r\n                            </a>\r\n                        </td>\r\n              " +
"          <td class=\"align-right\">\r\n");


            
            #line 93 "..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
                             if (job.Value.StartedAt.HasValue)
                            {

            
            #line default
            #line hidden
WriteLiteral("                                <span data-moment=\"");


            
            #line 95 "..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
                                              Write(JobHelper.ToTimestamp(job.Value.StartedAt.Value));

            
            #line default
            #line hidden
WriteLiteral("\">\r\n                                    ");


            
            #line 96 "..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
                               Write(job.Value.StartedAt);

            
            #line default
            #line hidden
WriteLiteral("\r\n                                </span>\r\n");


            
            #line 98 "..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
                            }

            
            #line default
            #line hidden
WriteLiteral("                        </td>\r\n                    </tr>\r\n");


            
            #line 101 "..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
                }

            
            #line default
            #line hidden
WriteLiteral("            </tbody>\r\n        </table>\r\n    </div>\r\n");


            
            #line 105 "..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
    
            
            #line default
            #line hidden
            
            #line 105 "..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
Write(RenderPartial(new Paginator(pager)));

            
            #line default
            #line hidden
            
            #line 105 "..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
                                        
}

            
            #line default
            #line hidden

        }
Exemplo n.º 10
0
        public override void Execute()
        {


WriteLiteral("\r\n");








            
            #line 8 "..\..\Dashboard\Pages\DashboardPage.cshtml"
  
    Layout = new LayoutPage { Title = "Dashboard" };
    IDictionary<DateTime, long> succeeded = null;
    IDictionary<DateTime, long> failed = null;

    var period = Request.Query["period"]?? "day";

    var monitor = JobStorage.Current.GetMonitoringApi();
    if ("week".Equals(period, StringComparison.OrdinalIgnoreCase))
    {
        succeeded = monitor.SucceededByDatesCount();
        failed = monitor.FailedByDatesCount();
    }
    else if ("day".Equals(period, StringComparison.OrdinalIgnoreCase))
    {
        succeeded = monitor.HourlySucceededJobs();
        failed = monitor.HourlyFailedJobs();
    }


            
            #line default
            #line hidden
WriteLiteral("\r\n<h3>Realtime graph</h3>\r\n<div id=\"realtimeGraph\"></div>\r\n\r\n<h3>\r\n    <div class" +
"=\"btn-group pull-right\" style=\"margin-top: 2px;\">\r\n        <a href=\"?period=day\"" +
" class=\"btn btn-sm btn-default ");


            
            #line 33 "..\..\Dashboard\Pages\DashboardPage.cshtml"
                                                        Write("day".Equals(period, StringComparison.OrdinalIgnoreCase) ? "active" : null);

            
            #line default
            #line hidden
WriteLiteral("\">\r\n            Day\r\n        </a>\r\n        <a href=\"?period=week\" class=\"btn btn-" +
"sm btn-default ");


            
            #line 36 "..\..\Dashboard\Pages\DashboardPage.cshtml"
                                                         Write("week".Equals(period, StringComparison.OrdinalIgnoreCase) ? "active" : null);

            
            #line default
            #line hidden
WriteLiteral("\">Week</a>\r\n    </div>\r\n    History graph\r\n</h3>\r\n\r\n");


            
            #line 41 "..\..\Dashboard\Pages\DashboardPage.cshtml"
 if (succeeded != null && failed != null)
{

            
            #line default
            #line hidden
WriteLiteral("    <div id=\"historyGraph\" \r\n          data-succeeded=\"");


            
            #line 44 "..\..\Dashboard\Pages\DashboardPage.cshtml"
                     Write(JsonConvert.SerializeObject(succeeded));

            
            #line default
            #line hidden
WriteLiteral("\" \r\n          data-failed=\"");


            
            #line 45 "..\..\Dashboard\Pages\DashboardPage.cshtml"
                  Write(JsonConvert.SerializeObject(failed));

            
            #line default
            #line hidden
WriteLiteral("\">\r\n    </div>\r\n");


            
            #line 47 "..\..\Dashboard\Pages\DashboardPage.cshtml"
}
            
            #line default
            #line hidden

        }