summaryrefslogtreecommitdiff
path: root/htroot/LogReports_p.html
blob: a99a20eb47fcd31f53790b67e037946f826c0029 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>YaCy '#[clientname]#': Log Reports</title>
    #%env/templates/metas.template%#
    <style type="text/css">
      .logreport-feeds {
        margin: 0 0 16px 0;
      }
      .logreport-card {
        border: 1px solid #ddd;
        margin: 0 0 16px 0;
        background: #fff;
      }
      .logreport-header {
        background: #f5f5f5;
        border-bottom: 1px solid #ddd;
        padding: 10px 12px;
      }
      .logreport-title {
        font-weight: bold;
        margin: 0 0 4px 0;
      }
      .logreport-meta {
        color: #666;
        font-size: 0.9em;
      }
      .logreport-body {
        white-space: pre-wrap;
        word-break: break-word;
        max-height: 520px;
        overflow: auto;
        margin: 0;
        padding: 12px;
        background: #fff;
        border: 0;
        font-family: Menlo, Consolas, monospace;
        font-size: 12px;
        line-height: 1.45;
      }
      .logreport-empty {
        border: 1px solid #ddd;
        background: #f9f9f9;
        padding: 14px;
      }
      .logreport-warning {
        border: 1px solid #f0ad4e;
        border-left: 6px solid #f0ad4e;
        background: #fcf8e3;
        color: #6b4f13;
        padding: 12px;
        margin: 10px 0 16px 0;
      }
      .logreport-actions {
        margin: 0 0 16px 0;
      }
      .logreport-message {
        border: 1px solid #5bc0de;
        border-left: 6px solid #5bc0de;
        background: #eef9fc;
        color: #245269;
        padding: 12px;
        margin: 10px 0 16px 0;
      }
    </style>
  </head>
  <body id="LogReports">
    #%env/templates/header.template%#
    #%env/templates/submenuComputation.template%#

    <h2>Log Reports</h2>

    <form action="LogReports_p.html" method="get" accept-charset="UTF-8">
      <fieldset>
        <label for="count">Reports</label>
        <input type="number" name="count" id="count" min="0" max="#[maxcount]#" value="#[count]#" />
        <input type="submit" value="refresh" />
      </fieldset>
    </form>

    <form action="LogReports_p.html" method="post" accept-charset="UTF-8" class="logreport-actions">
      <input type="hidden" name="count" value="#[count]#" />
      <button type="submit" name="runReportNow" value="1" class="btn btn-primary">run report now</button>
    </form>

    #(runReportResult)#
    ::
    <div class="logreport-message">Current-hour report written: #[runReportFile]# (#[runReportDurationSeconds]# seconds)</div>
    ::
    <div class="logreport-warning">No log lines were found for the current hour.</div>
    ::
    <div class="logreport-warning">
      No production model is configured for the log-report role. Assign one in the
      <a href="LLMSelection_p.html#availableModels">Production Models Matrix</a>.
    </div>
    ::
    <div class="logreport-warning">Report generation failed after #[runReportDurationSeconds]# seconds: #[runReportFile]#</div>
    #(/runReportResult)#

    #(modelConfigured)#
    <div class="logreport-warning">
      No production model is configured for the log-report role. Log report generation stays inactive until a model is assigned in the
      <a href="LLMSelection_p.html#availableModels">Production Models Matrix</a>.
    </div>
    ::
    #(/modelConfigured)#

    <p class="logreport-feeds">
      Reports found: #[reportCount]#<br />
      Directory: #[reportdir]#<br />
      Feeds:
      <a href="#[jsonFeed]#">JSON</a>
      |
      <a href="#[rssFeed]#">RSS</a>
    </p>

    #(reportdirMissing)#
    ::
    <div class="logreport-empty">The report directory does not exist yet. Reports will appear here after the scheduler has generated the first completed hourly report.</div>
    #(/reportdirMissing)#

    #{reports}#
    <div class="logreport-card">
      <div class="logreport-header">
        <div class="logreport-title">#[title]#</div>
        <div class="logreport-meta">
          #[type]# report - #[filename]# - #[published]# - #[chars]# characters
        </div>
      </div>
      <pre class="logreport-body">#[content]#</pre>
    </div>
    #{/reports}#

    #(noReports)#
    ::
    <div class="logreport-empty">No generated log reports were found.</div>
    #(/noReports)#

    #%env/templates/footer.template%#
  </body>
</html>