Changeset 8129


Ignore:
Timestamp:
Mar 14, 2023, 11:42:59 AM (7 months ago)
Author:
Nicklas Nordborg
Message:

References #2295: Add API for services to send log messages that can be displayed by the web client

Added an "Update" button to the "View log" dialog.

Location:
branches/3.19-stable
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/3.19-stable/src/core/net/sf/basedb/util/extensions/logging/ExtensionsLog.java

    r8127 r8129  
    232232      if (entry.getLevel() == LogLevel.ERROR) numErrors++;
    233233     
    234       if (numEntries++ > maxEntries)
     234      if (++numEntries > maxEntries)
    235235      {
    236236        // Remove one entry
  • branches/3.19-stable/www/admin/extensions/details.jsp

    r8128 r8129  
    149149      String logIcon = "service_log.png";
    150150      String logSummary = "This extension doesn't have any log";
     151      int numEntries = 0;
    151152      ExtensionsLog log = ExtensionsLog.getLog(extensionId, false);
    152153      if (log != null)
    153154      {
     155        numEntries = log.getNumEntries();
    154156        logSummary = "View the log for this extension; "+
    155           log.getNumEntries() +" entries; " +
     157          numEntries +" entries; " +
    156158          log.getNumErrors()+" errors; "+
    157159          log.getNumWarnings()+" warnings";
     
    181183        tooltip="<%=logSummary%>"
    182184        visible="<%=log != null%>"
    183         title="View log&hellip;"
     185        title="<%="View log ("+numEntries+")&hellip;"%>"
    184186      />
    185187      <tbl:button
  • branches/3.19-stable/www/admin/extensions/view_log.js

    r8128 r8129  
    3232    // Close button
    3333    Buttons.addClickHandler('close', App.closeWindow);
    34      
     34   
     35    Buttons.addClickHandler('btnUpdate', App.reloadWindow);
    3536    Buttons.addClickHandler('btnClearLog', vlog.clearLog);
    3637    Events.addEventHandler('enableDebug', 'change', vlog.setOptions);
  • branches/3.19-stable/www/admin/extensions/view_log.jsp

    r8128 r8129  
    8787        <tbl:toolbar>
    8888          <tbl:button
     89            id="btnUpdate"
     90            title="Update"
     91            image="refresh.png"
     92            tooltip="Re-load this page"
     93          />
     94          <tbl:button
    8995            id="btnClearLog"
    9096            title="Clear the log"
    9197            image="delete.png"
     98            tooltip="Delete all entries from the log"
    9299          />
    93100          <tbl:label style="padding-right: 1em;">
     
    151158          <%
    152159        }
     160        if (entryNo == 0)
     161        {
     162          %>
     163          <tbl:panel subclass="bg-filled-50">
     164            <div class="messagecontainer note">
     165            No entries in this log.
     166            </div>
     167          </tbl:panel>
     168          <%
     169        }
    153170        %>
    154171        </tbl:rows>
Note: See TracChangeset for help on using the changeset viewer.