public override void Execute()
        {
            WriteLiteral("\r\n");



            #line 11 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"

            Layout = new LayoutPage(Strings.RecurringJobsPage_Title);
            List <RecurringJobDto> recurringJobs;

            int from, perPage;

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

            Pager pager = null;

            using (var connection = Storage.GetConnection())
            {
                var storageConnection = connection as JobStorageConnection;
                if (storageConnection != null)
                {
                    pager         = new Pager(from, perPage, storageConnection.GetRecurringJobCount());
                    recurringJobs = storageConnection.GetRecurringJobs(pager.FromRecord, pager.FromRecord + pager.RecordsPerPage - 1);
                }
                else
                {
                    recurringJobs = connection.GetRecurringJobs();
                }
            }



            #line default
            #line hidden
            WriteLiteral("\r\n<div class=\"row\">\r\n    <div class=\"col-md-12\">\r\n        <h1 class=\"page-header\"" +
                         ">");



            #line 39 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
            Write(Strings.RecurringJobsPage_Title);


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



            #line 40 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
            if (recurringJobs.Count == 0)
            {
            #line default
            #line hidden
                WriteLiteral("            <div class=\"alert alert-info\">\r\n                ");



            #line 43 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                Write(Strings.RecurringJobsPage_NoJobs);


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



            #line 45 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
            }
            else
            {
            #line default
            #line hidden
                WriteLiteral("            <div class=\"js-jobs-list\">\r\n                <div class=\"btn-toolbar b" +
                             "tn-toolbar-top\">\r\n");



            #line 50 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                if (!IsReadOnly)
                {
            #line default
            #line hidden
                    WriteLiteral("                        <button class=\"js-jobs-list-command btn btn-sm btn-primar" +
                                 "y\"\r\n                                data-url=\"");



            #line 53 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                    Write(Url.To("/recurring/trigger"));


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



            #line 54 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                    Write(Strings.RecurringJobsPage_Triggering);


            #line default
            #line hidden
                    WriteLiteral("\"\r\n                                disabled=\"disabled\">\r\n                        " +
                                 "    <span class=\"glyphicon glyphicon-play-circle\"></span>\r\n                     " +
                                 "       ");



            #line 57 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                    Write(Strings.RecurringJobsPage_TriggerNow);


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



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


            #line default
            #line hidden


            #line 60 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                if (!IsReadOnly)
                {
            #line default
            #line hidden
                    WriteLiteral("                        <button class=\"js-jobs-list-command btn btn-sm btn-defaul" +
                                 "t\"\r\n                                data-url=\"");



            #line 63 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                    Write(Url.To("/recurring/remove"));


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



            #line 64 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                    Write(Strings.Common_Deleting);


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



            #line 65 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                    Write(Strings.Common_DeleteConfirm);


            #line default
            #line hidden
                    WriteLiteral("\"\r\n                                disabled=\"disabled\">\r\n                        " +
                                 "    <span class=\"glyphicon glyphicon-remove\"></span>\r\n                          " +
                                 "  ");



            #line 68 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                    Write(Strings.Common_Delete);


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



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


            #line default
            #line hidden


            #line 71 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                if (pager != null)
                {
            #line default
            #line hidden
                    WriteLiteral("                        ");

                    WriteLiteral(" ");



            #line 73 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                    Write(Html.PerPageSelector(pager));


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



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


            #line default
            #line hidden
                WriteLiteral("                </div>\r\n\r\n                <div class=\"table-responsive\">\r\n       " +
                             "             <table class=\"table\">\r\n                        <thead>\r\n           " +
                             "                 <tr>\r\n");



            #line 81 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                if (!IsReadOnly)
                {
            #line default
            #line hidden
                    WriteLiteral("                                    <th class=\"min-width\">\r\n                     " +
                                 "                   <input type=\"checkbox\" class=\"js-jobs-list-select-all\"/>\r\n   " +
                                 "                                 </th>\r\n");



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


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



            #line 87 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                Write(Strings.Common_Id);


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



            #line 88 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                Write(Strings.RecurringJobsPage_Table_Cron);


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



            #line 89 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                Write(Strings.RecurringJobsPage_Table_TimeZone);


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



            #line 90 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                Write(Strings.Common_Job);


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



            #line 91 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                Write(Strings.RecurringJobsPage_Table_NextExecution);


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



            #line 92 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                Write(Strings.RecurringJobsPage_Table_LastExecution);


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



            #line 93 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                Write(Strings.Common_Created);


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



            #line 97 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                foreach (var job in recurringJobs)
                {
            #line default
            #line hidden
                    WriteLiteral("                                <tr class=\"js-jobs-list-row hover\">\r\n");



            #line 100 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                    if (!IsReadOnly)
                    {
            #line default
            #line hidden
                        WriteLiteral("                                        <td rowspan=\"");



            #line 102 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                        Write(job.Error != null ? "2" : "1");


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



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


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



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


            #line default
            #line hidden
                    WriteLiteral("                                    <td class=\"word-break width-15\">");



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


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



                    WriteLiteral("\r\n");



            #line 109 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"

                    string cronDescription = null;
                    bool   cronError       = false;

                    if (!String.IsNullOrEmpty(job.Cron))
                    {
                        try
                        {
                            RecurringJobEntity.ParseCronExpression(job.Cron);
                        }
                        catch (Exception ex)
                        {
                            cronDescription = ex.Message;
                            cronError       = true;
                        }

                        if (cronDescription == null)
                        {
#if FEATURE_CRONDESCRIPTOR
                            try
                            {
                                cronDescription = CronExpressionDescriptor.ExpressionDescriptor.GetDescription(job.Cron);
                            }
                            catch (FormatException)
                            {
                            }
#endif
                        }
                    }



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



            #line 140 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                    if (cronDescription != null)
                    {
            #line default
            #line hidden
                        WriteLiteral("                                        <code title=\"");



            #line 142 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                        Write(cronDescription);


            #line default
            #line hidden
                        WriteLiteral("\" class=\"cron-badge\">\r\n");



            #line 143 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                        if (cronError)
                        {
            #line default
            #line hidden
                            WriteLiteral("                                                <span class=\"glyphicon glyphicon-" +
                                         "exclamation-sign\"></span>\r\n");



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


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



            #line 147 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                        Write(job.Cron);


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



            #line 149 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                    }
                    else
                    {
            #line default
            #line hidden
                        WriteLiteral("                                            <code class=\"cron-badge\">");



            #line 152 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                        Write(job.Cron);


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



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


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



            #line 156 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                    if (!String.IsNullOrWhiteSpace(job.TimeZoneId))
                    {
                        string    displayName;
                        Exception exception = null;

                        try
                        {
                            var resolver = DashboardOptions.TimeZoneResolver ?? new DefaultTimeZoneResolver();
                            displayName = resolver.GetTimeZoneById(job.TimeZoneId).DisplayName;
                        }
                        catch (Exception ex)
                        {
                            displayName = null;
                            exception   = ex;
                        }



            #line default
            #line hidden
                        WriteLiteral("                                            <span title=\"");



            #line 172 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                        Write(displayName);


            #line default
            #line hidden
                        WriteLiteral("\" data-container=\"body\">");



            #line 172 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                        Write(job.TimeZoneId);


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



            #line 173 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                        if (exception != null)
                        {
            #line default
            #line hidden
                            WriteLiteral("                                                    <span class=\"glyphicon glyphi" +
                                         "con-exclamation-sign\" title=\"");



            #line 175 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                            Write(exception.Message);


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



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


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



            #line 178 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                    }
                    else
                    {
            #line default
            #line hidden
                        WriteLiteral("                                            ");

                        WriteLiteral(" UTC\r\n");



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


            #line default
            #line hidden
                    WriteLiteral("                                    </td>\r\n                                    <t" +
                                 "d class=\"word-break width-30\">\r\n");



            #line 185 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                    if (job.Job != null)
                    {
            #line default
            #line hidden
                        WriteLiteral("                                            ");

                        WriteLiteral(" ");



            #line 187 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                        Write(Html.JobName(job.Job));


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



            #line 188 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                    }
                    else if (job.LoadException != null && job.LoadException.InnerException != null)
                    {
            #line default
            #line hidden
                        WriteLiteral("                                            <em>");



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


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



            #line 192 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                    }
                    else if (job.LoadException != null)
                    {
            #line default
            #line hidden
                        WriteLiteral("                                            <em>");



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


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



            #line 196 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                    }
                    else
                    {
            #line default
            #line hidden
                        WriteLiteral("                                            <em>");



            #line 199 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                        Write(Strings.Common_NotAvailable);


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



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


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



            #line 203 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                    if (!job.NextExecution.HasValue)
                    {
                        if (job.Error != null)
                        {
            #line default
            #line hidden
                            WriteLiteral("                                                <span class=\"label label-danger t" +
                                         "ext-uppercase\">");



            #line 207 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                            Write(Strings.Common_Error);


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



            #line 208 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                        }
                        else
                        {
            #line default
            #line hidden
                            WriteLiteral("                                                <span class=\"label label-default " +
                                         "text-uppercase\" title=\"");



            #line 211 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                            Write(Strings.RecurringJobsPage_RecurringJobDisabled_Tooltip);


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



            #line 211 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                            Write(Strings.Common_Disabled);


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



            #line 212 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                        }
                    }
                    else if (job.RetryAttempt > 0)
                    {
            #line default
            #line hidden
                        WriteLiteral("                                            <span class=\"label label-warning\">");



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


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



            #line 218 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                    }
                    else
                    {
            #line default
            #line hidden

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


            #line default
            #line hidden

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


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



            #line 225 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                    if (job.LastExecution != null)
                    {
                        if (!String.IsNullOrEmpty(job.LastJobId))
                        {
            #line default
            #line hidden
                            WriteLiteral("                                                <a href=\"");



            #line 229 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                            Write(Url.JobDetails(job.LastJobId));


            #line default
            #line hidden
                            WriteLiteral("\" class=\"text-decoration-none\">\r\n");



            #line 230 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"

                            var cssSuffix = JobHistoryRenderer.GetStateCssSuffix(job.LastJobState ?? EnqueuedState.StateName);



            #line default
            #line hidden


            #line 233 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                            if (cssSuffix != null)
                            {
            #line default
            #line hidden
                                WriteLiteral("                                                        <span class=\"label label-" +
                                             "default label-hover label-state-");



            #line 235 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                                Write(cssSuffix);


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



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


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



            #line 238 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                            }
                            else
                            {
            #line default
            #line hidden
                                WriteLiteral("                                                        <span class=\"label label-" +
                                             "default label-hover\" style=\"");



            #line 241 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                                Write($"background-color: {JobHistoryRenderer.GetForegroundStateColor(job.LastJobState ?? EnqueuedState.StateName)};");


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



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


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



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


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



            #line 246 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                        }
                        else
                        {
            #line default
            #line hidden
                            WriteLiteral("                                                <em>\r\n                           " +
                                         "                         ");



            #line 250 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                            Write(Strings.RecurringJobsPage_Canceled);


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



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


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



            #line 252 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                        }
                    }
                    else
                    {
            #line default
            #line hidden
                        WriteLiteral("                                            <em>");



            #line 256 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                        Write(Strings.Common_NotAvailable);


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



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


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



            #line 260 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                    if (job.CreatedAt != null)
                    {
            #line default
            #line hidden

            #line 262 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                        Write(Html.RelativeTime(job.CreatedAt.Value));


            #line default
            #line hidden

            #line 262 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                    }
                    else
                    {
            #line default
            #line hidden
                        WriteLiteral("                                            <em>N/A</em>\r\n");



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


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



            #line 269 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                    if (job.Error != null)
                    {
            #line default
            #line hidden
                        WriteLiteral("                                        <tr>\r\n                                   " +
                                     "         <td colspan=\"");



            #line 272 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                        Write(IsReadOnly ? "6" : "7");


            #line default
            #line hidden
                        WriteLiteral("\" class=\"failed-job-details\">\r\n                                                <p" +
                                     "re class=\"stack-trace\"><code>");



            #line 273 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                        Write(Html.StackTrace(job.Error));


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



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


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



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


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



            #line 283 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                if (pager != null)
                {
            #line default
            #line hidden
                    WriteLiteral("                    ");

                    WriteLiteral(" ");



            #line 285 "..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
                    Write(Html.Paginator(pager));


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



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


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



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


            #line default
            #line hidden
            WriteLiteral("    </div>\r\n</div>    ");
        }
        public override void Execute()
        {
            WriteLiteral("\r\n");



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

            var monitor = Storage.GetMonitoringApi();
            var job     = monitor.JobDetails(JobId);

            string title = null;

            if (job != null)
            {
                title = job.Job != null?Html.JobName(job.Job) : null;

                var historyList = new List <StateHistoryDto>(job.History);
                historyList.Add(new StateHistoryDto {
                    StateName = "Created", CreatedAt = job.CreatedAt ?? default(DateTime)
                });

                job.History = historyList;
            }

            title  = title ?? Strings.Common_Job;
            Layout = new LayoutPage(title);



            #line default
            #line hidden
            WriteLiteral("\r\n<div class=\"row\">\r\n    <div class=\"col-md-3\">\r\n        ");



            #line 36 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
            Write(Html.JobsSidebar());


            #line default
            #line hidden
            WriteLiteral("\r\n    </div>\r\n    <div class=\"col-md-9\">\r\n        <h1 class=\"page-header\">");



            #line 39 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
            Write(title);


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



            #line 41 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
            if (job == null)
            {
            #line default
            #line hidden
                WriteLiteral("            <div class=\"alert alert-warning\">\r\n                ");



            #line 44 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                Write(String.Format(Strings.JobDetailsPage_JobExpired, JobId));


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



            #line 46 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
            }
            else
            {
                var currentState = job.History[0];
                if (currentState.StateName == ProcessingState.StateName)
                {
                    var server = monitor.Servers().FirstOrDefault(x => x.Name == currentState.Data["ServerId"]);
                    if (server == null)
                    {
            #line default
            #line hidden
                        WriteLiteral("                    <div class=\"alert alert-danger\">\r\n                        ");



            #line 56 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                        Write(Html.Raw(String.Format(Strings.JobDetailsPage_JobAbortedNotActive_Warning_Html, currentState.Data["ServerId"], Url.To("/servers"))));


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



            #line 58 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                    }
                    else if (server.Heartbeat.HasValue && server.Heartbeat < DateTime.UtcNow.AddMinutes(-1))
                    {
            #line default
            #line hidden
                        WriteLiteral("                    <div class=\"alert alert-warning\">\r\n                        ");



            #line 62 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                        Write(Html.Raw(String.Format(Strings.JobDetailsPage_JobAbortedWithHeartbeat_Warning_Html, server.Name)));


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



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

                if (job.ExpireAt.HasValue)
                {
            #line default
            #line hidden
                    WriteLiteral("                <div class=\"alert alert-info\">\r\n                    ");



            #line 70 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                    Write(Html.Raw(String.Format(Strings.JobDetailsPage_JobFinished_Warning_Html, JobHelper.ToTimestamp(job.ExpireAt.Value), job.ExpireAt)));


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



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

                if (job.Job != null)
                {
            #line default
            #line hidden
                    WriteLiteral("                <div class=\"job-snippet\">\r\n                    <div class=\"job-sn" +
                                 "ippet-code\">\r\n                        <pre><code><span class=\"comment\">// ");



            #line 78 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                    Write(Strings.JobDetailsPage_JobId);


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



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


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



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


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



            #line 83 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                }
                else
                {
                    var dbgParameters = job.Properties.Where(x => x.Key.StartsWith("DBG_")).ToArray();



            #line default
            #line hidden
                    WriteLiteral("                <div class=\"alert alert-warning\">\r\n                    <h4>");



            #line 89 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                    Write(Strings.Common_CannotFindTargetMethod);


            #line default
            #line hidden
                    WriteLiteral("</h4>\r\n                    <table class=\"table table-condensed job-snippet-proper" +
                                 "ties margin-bottom-0\">\r\n                        <tr>\r\n                          " +
                                 "  <td>");



            #line 92 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                    Write(Strings.JobDetailsPage_JobId);


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



            #line 93 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                    Write(Html.JobId(JobId, false));


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



            #line 95 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                    foreach (var parameter in dbgParameters)
                    {
            #line default
            #line hidden
                        WriteLiteral("                            <tr>\r\n                                <td class=\"widt" +
                                     "h-15\">");



            #line 98 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                        Write(parameter.Key.Substring(4));


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



            #line 99 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                        Write(parameter.Value);


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



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


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



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

                var displayParameters = job.Properties.Where(x => !x.Key.StartsWith("DBG_") && x.Key != "Continuations").ToArray();

                if (displayParameters.Length > 0)
                {
            #line default
            #line hidden
                    WriteLiteral("                <h3>");



            #line 110 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                    Write(Strings.JobDetailsPage_Parameters);


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



                    WriteLiteral("                <table class=\"table table-condensed job-snippet-properties\">\r\n");



            #line 112 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                    foreach (var parameter in displayParameters)
                    {
            #line default
            #line hidden
                        WriteLiteral("                        <tr>\r\n                            <td class=\"width-20 wor" +
                                     "d-break\">");



            #line 115 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                        Write(parameter.Key);


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



            #line 116 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                        Write(parameter.Value);


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



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


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



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

                if (job.Properties.TryGetValue("Continuations", out var serializedContinuations))
                {
                    var continuations = ContinuationsSupportAttribute.DeserializeContinuations(serializedContinuations);

                    if (continuations.Count > 0)
                    {
            #line default
            #line hidden
                        WriteLiteral("                    <h3>");



            #line 128 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                        Write(Strings.Common_Continuations);


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



                        WriteLiteral("                    <div class=\"table-responsive\">\r\n                        <tabl" +
                                     "e class=\"table\">\r\n                            <thead>\r\n                         " +
                                     "   <tr>\r\n                                <th class=\"min-width\">");



            #line 133 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                        Write(Strings.Common_Id);


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



            #line 134 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                        Write(Strings.Common_Condition);


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



            #line 135 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                        Write(Strings.Common_State);


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



            #line 136 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                        Write(Strings.Common_Job);


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



            #line 137 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                        Write(Strings.Common_Created);


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



            #line 141 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                        foreach (var continuation in continuations)
                        {
                            JobData jobData;

                            using (var connection = Storage.GetConnection())
                            {
                                jobData = connection.GetJobData(continuation.JobId);
                            }



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



            #line 151 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                            if (jobData == null)
                            {
            #line default
            #line hidden
                                WriteLiteral("                                        <td colspan=\"5\"><em>");



            #line 153 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                                Write(String.Format(Strings.JobDetailsPage_JobExpired, continuation.JobId));


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



            #line 154 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                            }
                            else
                            {
            #line default
            #line hidden
                                WriteLiteral("                                        <td class=\"min-width\">");



            #line 157 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                                Write(Html.JobIdLink(continuation.JobId));


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



                                WriteLiteral("                                        <td class=\"min-width\"><code>");



            #line 158 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                                Write(continuation.Options.ToString("G"));


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



                                WriteLiteral("                                        <td class=\"min-width\">");



            #line 159 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                                Write(Html.StateLabel(jobData.State));


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



                                WriteLiteral("                                        <td class=\"word-break\">");



            #line 160 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                                Write(Html.JobNameLink(continuation.JobId, jobData.Job));


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



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



            #line 161 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                                Write(Html.RelativeTime(jobData.CreatedAt));


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



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


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



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


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



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



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



            #line 172 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                if (job.History.Count > 1)
                {
            #line default
            #line hidden
                    WriteLiteral("                    <span class=\"job-snippet-buttons pull-right\">\r\n");



            #line 175 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                    if (!IsReadOnly)
                    {
            #line default
            #line hidden
                        WriteLiteral("                            <button class=\"btn btn-sm btn-default\"\r\n             " +
                                     "                       data-ajax=\"");



            #line 178 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                        Write(Url.To("/jobs/actions/requeue/" + JobId));


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



            #line 179 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                        Write(Strings.Common_Enqueueing);


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



            #line 180 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                        Write(Strings.JobDetailsPage_Requeue);


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



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


            #line default
            #line hidden


            #line 183 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                    if (!IsReadOnly)
                    {
            #line default
            #line hidden
                        WriteLiteral("                            <button class=\"btn btn-sm btn-death\"\r\n               " +
                                     "                     data-ajax=\"");



            #line 186 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                        Write(Url.To("/jobs/actions/delete/" + JobId));


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



            #line 187 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                        Write(Strings.Common_Deleting);


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



            #line 188 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                        Write(Strings.JobDetailsPage_DeleteConfirm);


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



            #line 189 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                        Write(Strings.Common_Delete);


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



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


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



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


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



            #line 195 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                Write(Strings.JobDetailsPage_State);


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



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

                var index = 0;

                foreach (var entry in job.History)
                {
                    var accentColor         = JobHistoryRenderer.GetForegroundStateColor(entry.StateName);
                    var backgroundColor     = JobHistoryRenderer.GetBackgroundStateColor(entry.StateName);
                    var cardCss             = index == 0 ? JobHistoryRenderer.GetStateCssSuffix(entry.StateName) : null;
                    var cardStyle           = index == 0 && cardCss == null ? $"border-color: {accentColor}" : null;
                    var cardTitleStyle      = index == 0 && cardCss == null ? $"color: {accentColor}" : null;
                    var cardBackgroundStyle = index == 0 && cardCss == null ? $"background-color: {backgroundColor}" : null;



            #line default
            #line hidden
                    WriteLiteral("                <div class=\"state-card ");



            #line 209 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                    Write(cardCss != null ? "state-card-state-" + cardCss : null);


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



            #line 209 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                    Write(cardStyle);


            #line default
            #line hidden
                    WriteLiteral("\">\r\n                    <h4 class=\"state-card-title\" style=\"");



            #line 210 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                    Write(cardTitleStyle);


            #line default
            #line hidden
                    WriteLiteral("\">\r\n                        <small class=\"pull-right text-muted\">\r\n");



            #line 212 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                    if (index == job.History.Count - 1)
                    {
            #line default
            #line hidden

            #line 214 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                        Write(Html.RelativeTime(entry.CreatedAt));


            #line default
            #line hidden

            #line 214 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                    }
                    else
                    {
                        var duration = Html.ToHumanDuration(entry.CreatedAt - job.History[index + 1].CreatedAt);

                        if (index == 0)
                        {
            #line default
            #line hidden
                            WriteLiteral("                                    ");

                            WriteLiteral(" ");



            #line 222 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                            Write(Html.RelativeTime(entry.CreatedAt));


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



            #line 222 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                            Write(duration);


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



            #line 223 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                        }
                        else
                        {
            #line default
            #line hidden
                            WriteLiteral("                                    ");

                            WriteLiteral(" ");



            #line 226 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                            Write(Html.MomentTitle(entry.CreatedAt, duration));


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



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


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



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


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



            #line 234 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                    if (!String.IsNullOrWhiteSpace(entry.Reason))
                    {
            #line default
            #line hidden
                        WriteLiteral("                        <p class=\"state-card-text text-muted\">");



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


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



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


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



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

                    var rendered = Html.RenderHistory(entry.StateName, entry.Data);



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



            #line 243 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                    if (rendered != null)
                    {
            #line default
            #line hidden
                        WriteLiteral("                        <div class=\"state-card-body\" style=\"");



            #line 245 "..\..\Dashboard\Pages\JobDetailsPage.cshtml"
                        Write(cardBackgroundStyle);


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



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


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



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


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



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

                    index++;
                }
            }


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