|
102 | 102 | </g:else>
|
103 | 103 | </div>
|
104 | 104 | <div>
|
105 |
| - <b>${queryResult.frequency?.name?.toUpperCase()}</b> |
106 |
| - query result ID: <g:link controller="queryResult" action="getDetails" params="[id: queryResult.id]" target="_blank"> <span class="badge badge-primary">${queryResult.id}</span></g:link> |
| 105 | + <% |
| 106 | + def maxEmails = 15 |
| 107 | + def emailList = query.notifications?.collect { it.user?.email }?.findAll { it } ?: [] |
| 108 | + def subscribers = emailList.take(maxEmails).join('; ') // Take first 10 |
| 109 | + if (emailList.size() > maxEmails) { |
| 110 | + subscribers += ' ......' |
| 111 | + } |
| 112 | + %> |
| 113 | + <g:link controller="queryResult" action="getDetails" params="[id: queryResult.id]" target="_blank"> <span class="badge badge-primary"><i class="fa fa-info-circle" aria-hidden="true"></i> ${queryResult.id}</span></g:link> <b><i class="fa fa-calendar-check-o" aria-hidden="true"></i> ${queryResult.frequency?.name?.toUpperCase()}</b> |
| 114 | + <label title="${subscribers}"><span class="badge badge-info"> <i class="fa fa-user"></i> ${query.countSubscribers(queryResult.frequency?.name)}</span></label> |
107 | 115 |
|
108 | 116 | <g:if test="${queryResult?.lastChecked}">
|
109 | 117 | Last checked: ${queryResult?.lastChecked}
|
|
119 | 127 | <br/>
|
120 | 128 | <b><i class="fa fa-warning" style="color:#c44d34"></i> Resetting the previous and current results of this record to help testers identify new records.</b><button class="btn btn-primary" onclick="resetResultsInDB(${queryResult.id})">Reset</button>
|
121 | 129 | </g:if>
|
122 |
| - <br/> |
123 |
| - Subscribers:${query.countSubscribers(queryResult.frequency?.name)} |
| 130 | + |
124 | 131 | </div>
|
125 | 132 | <div>
|
126 | 133 | <g:each var="pv" in="${queryResult.propertyValues}">
|
127 | 134 | <span class="badge badge-light">${pv.propertyPath.id}</span> ${pv.propertyPath}<br>
|
128 |
| - <span class="badge badge-light">${pv.id}</span> Current Value: ${pv.currentValue}; Previous Value: ${pv.previousValue} <br> |
| 135 | + %{-- <span class="badge badge-light">${pv.id}</span> Current Value: ${pv.currentValue}; Previous Value: ${pv.previousValue} <br>--}% |
129 | 136 | </g:each>
|
130 | 137 | </div>
|
131 | 138 | <div style="text-align: right;">
|
|
140 | 147 | <g:if test="${queryType != 'biosecurity'}">
|
141 | 148 | <div style="padding: 5px;">
|
142 | 149 | <label>Query the latest records from the data services
|
143 |
| - <i class="fa fa-info-circle" aria-hidden="true" style="color: #c44d34;" |
| 150 | + <i class="fa fa-question-circle-o" aria-hidden="true" style="color: #c44d34;" |
144 | 151 | title="The query may use the last checked date. The query may end on that date, span a period around that date, or not used at all. e.g, if the last checked date of a Monthly Image alerts is 1 Jan 2025, this function will query the images which were uploaded from 1 Dec 2024 to current time"></i>
|
145 | 152 | , compare them with the current records in Alerts, and email me the findings.</label>
|
146 | 153 | <g:link class="btn btn-info" controller="admin" action="emailMeLastCheck" params="[queryId: query.id, frequency: queryResult.frequency?.name]" target="_blank">
|
|
167 | 174 | <g:else>
|
168 | 175 | query
|
169 | 176 | </g:else>
|
170 |
| - against the given date <i class="fa fa-info-circle" aria-hidden="true" style="color: #c44d34;" |
| 177 | + against the given date <i class="fa fa-question-circle-o" aria-hidden="true" style="color: #c44d34;" |
171 | 178 | title="It may be set as starting from that date, ending on that date, spanning a period around that date, or not used at all."></i>
|
172 | 179 | , and email new records. The date range associated with the given date is determined by the query.
|
173 | 180 |
|
|
0 commit comments