:tocdepth: 3 .. _sec-web: Web Interface ************* The GDS web interface allows to configure, interact and review the dissemination process. The access to the web interface is protected by a user login with password. The super user with administrator rights is typically created by the :ref:`commandline tool` during installation. Figure :num:`fig-web-main` shows the main page which is visible right after the login. It offers to * :ref:`Configuration the dissemination and manage user accounts` * :ref:`Disseminate events interactively` * :ref:`View the dissemination and configuration log ` In addition the web interface ships with a :ref:`sec-web-adm` which is accessible for administrative users from the configuration area. .. _fig-web-main: .. figure:: media/web-main.png :width: 20cm Web interface of GDS Typically, the interface is available on localhost or other hosts through port 8000 or a path configured by the web server. Examples: .. code-block:: sh http://localhost:8000 https://localhost/gds https://[other host]/gds Figure :num:`fig-web-adm-main` shows the central administration page with the main sections: * ``ADMINISTRATION``: Access the dissemination and configuration :ref:`logs` * ``AUTHENTICATION AND AUTHORIZATION``: :ref:`Add/modify login users and groups` * ``GDS``: Provide access to the :ref:`GDS related configuration ` On the right panel the recent actions of the current user are shown. .. _fig-web-adm-main: .. figure:: media/web-adm-main.* :width: 20cm Central administration page allowing to setup the authentication (``Auth``) and the :ref:`GDS related configuration ` .. _sec-web-adm: Login Management ================ The web interface provides a user management which allows to assign fine-grained privileges to users or groups of users. So for instance the dissemination task can be strictly separated from the configuration part. Modifications to the configuration are tracked per user to be able to relate certain changes. If the web interface is available under http://localhost/gds then the login management will be available under http://localhost/gds/admin. Figure :num:`fig-web-adm-perm` shows the ``Permissions`` section of the user configuration. At first 3 different status types may be toggled: * **Active** -- Defines whether or not the user is allowed to login * **Staff status** -- Only staff users are allowed to enter the admin site * **Superuser status** -- Grants all permissions to the user regardless of what is configured in any following dialog box After assigning these rough status categories fine-granular permissions may be granted trough the ``User permission`` edit fields by moving available options (on the left) to activated options (on the right). An option is identified by ``group name | object name | action``. All options related to GDS are prefixed by the group name ``gds`` and may be filtered by simply entering ``gds`` in the filter box. For each GDS object the actions ``add``, ``change`` and ``delete`` are available. In addition to the standard object related options three special options are provided which control the access to the dissemination and log part sites: * ``gds | event log | Can view event log`` * ``gds | event log | Can access event log perspective`` * ``gds | event log | Can publish events`` * ``gds | queue | Can view and trigger automatic queues`` The sample configuration in figure :num:`fig-web-adm-perm` shows the setup for an user who is allowed to disseminate and to review the dissemination log but who may not alter any configuration. .. _fig-web-adm-perm: .. figure:: media/web-adm-perm.* :width: 20cm Define user or group specific permissions .. _sec-web-conf: Configuration ============= The central configuration page is shown in figure :num:`fig-web-adm-main`. Below the header GDS all types of configuration objects are listed. These objects are linked together and often related objects may directly be changed when editing a specific option. Figure :num:`fig-be-db-schema` in section :ref:`sec-be-db` shows an database relationship model of these configuration objects. ======================================= =========== Configuration object Description ======================================= =========== :ref:`sec-web-conf-queue` A collection of combined dissemination rules: criteria, regions, services, subscribers, subscriptions, etc. :ref:`sec-web-conf-crit` Event parameters defining the events to be considered :ref:`sec-web-conf-extcrit` Additional criteria defined in the :ref:`GDS back-end` to expand the functionality of :ref:`sec-web-conf-crit` :ref:`sec-web-conf-region` Geographic regions for selecting events :ref:`sec-web-conf-serv` Methods for sending bulletins, e.g., email, SMS, Twitter, web, etc. :ref:`sec-web-conf-fil` Content definition of the bulletins including text, language, attached images :ref:`sec-web-conf-ssb` Rules for delaying and updating of notifications :ref:`sec-web-conf-sub` Receivers to which bulletins are sent ======================================= =========== .. _sec-web-conf-queue: Queues ------ The central configuration unit is a ``Queue`` having a set of :ref:`Criteria ` and :ref:`Subscriptions ` associated to. The received earthquake parameters are evaluated against the configured ``Criteria``. If any of the ``Queue's`` ``Criteria`` match then the ``Queue`` itself match and processing of the configured ``Subscriptions`` is triggered. One may consider a ``Queue`` as an *OR*-clause of ``Criteria`` where each ``Criterion`` is a *AND*-clause of earthquake parameters. If no ``Criterion`` is defined the ``Queue`` will never match. Figure :num:`fig-web-conf-queue` shows an example of a ``Queue`` configuration. .. _fig-web-conf-queue: .. figure:: media/web-conf-queue.* :width: 20cm Central configuration page listing available types configuration objects Properties ^^^^^^^^^^ ======================================= =========== Property Description ======================================= =========== **Name** Name (mandatory) of the ``Queue``, used in the web interface for referring and at the GDS back-end command interface for sending a bulletin to all ``Subscriptions`` of this ``Queue`` Description Description of the ``Queue`` Manual If activated, this ``Queue`` is not active for automatic dissemination and will only match for manual dissemination procedures triggered through the web interface :ref:`Criteria ` Set of ``Criteria`` defining the dissemination rules of this ``Queue``. :ref:`Subscriptions ` Set of ``Subscriptions`` subscribed to this ``Queue`` ======================================= =========== .. _sec-web-conf-crit: Criteria -------- A ``Criterion`` is the building block of the dissemination condition of a :ref:`sec-web-conf-queue`. In fact a ``Criterion`` is always associated to one particular ``Queue``. A ``Criterion`` allows to define a set of event parameters. It matches only if all defined parameters match. Figure :num:`fig-web-conf-queue` shows the definition of ``Criteria`` inside the ``Queue`` configuration. Nevertheless ``Criteria`` may also be created in a separated form and assigned there to existing ``Queues``. .. _fig-web-conf-criteria: .. figure:: media/web-conf-criteria.png :width: 20cm Configuration page for setting the criteria Criterion Properties ^^^^^^^^^^^^^^^^^^^^ =========================== =========== Property Description =========================== =========== **Name** Name (mandatory) of the ``Criterion``, used only in the web interface for referring Enabled If deactivated, this ``Criterion`` will not be evaluated :ref:`sec-web-conf-queue` ``Queue`` (mandatory) this ``Criterion`` belongs to :ref:`sec-web-conf-region` Geographic bounding box, bounding circle or polygon area :ref:`sec-web-conf-extcrit` ``External Criterion`` allowing to define enhanced dissemination rules Evaluation Mode Defines how the event needs to be evaluated (automatic or manually) Evaluation Status Multiple choice definitions on evaluation status of an event Event Type Multiple choice definitions of event type Phase Count Upper and lower bounds for the number of stations participating in the earthquake location solution Magnitude Count Upper and lower bounds for the number of stations participating in the magnitude solution Magnitude Upper and lower bounds for the preferred magnitude Depth Upper and lower bounds for the hypocenter depth Max. RMS Maximum allowed standard error of the earthquake location, typically range: 0-3 ``Comments`` Set of ``Comment`` definitions. :term:`SeisComP` allows to specify an arbitrary number of event or origin related comments. Each comment consists of an ID and a value. The GDS supports defining dissemination rules on basis of the available comments. =========================== =========== Comment Properties ^^^^^^^^^^^^^^^^^^ ============= =========== Property Description ============= =========== **ID** ID (mandatory) of the comment as specified in :term:`SeisComP` String Value Exact string value of the comment Numeric Value Upper and lower bounds of the numeric comment Required If activated, the comment must exist in order to evaluate the whole ``Criterion`` to true. ============= =========== .. note:: String and numeric parameters may not be mixed. If neither a string nor a numeric value is defined, then the comment match on empty values. .. _sec-web-conf-extcrit: External Criteria ----------------- Sometimes the event properties available in the (standard) :ref:`sec-web-conf-crit` may not suffice. In this case the dissemination decision (or part of it) may be delegated to an external application which reads :term:`SCML` on `standard input` and signals a match respectively mismatch with it's exit code. For performance reasons an ``External Criterion`` is evaluated after the regular :ref:`Criterion ` parameters. If referenced by multiple :ref:`Criteria ` it is executed once. Properties ^^^^^^^^^^ =================================== ====================================================================================================================================================================================== Property Description =================================== ====================================================================================================================================================================================== **Name** Name (mandatory) of the ``External Criterion``. For the name defined here a corresponding entry in the GDS server configuration must exist which defines the application to execute. Description Description of the ``External Criterion`` :ref:`Criteria ` Set of ``Criteria`` this ``External Criterion`` is used by =================================== ====================================================================================================================================================================================== .. _sec-web-conf-region: Regions ------- A ``Region`` defines the geographic bounding box, bounding circle, a set of polygon areas or a region name the earthquake must be located in. One or many polygons may be defined in an external BNA file. Since version 2016.333 SeisComP map applications allow drawing and exporting of polygons by holding the ``Ctrl`` key pressed. If the polygon is stored under @CONFIGDIR@/bna it will be plotted by SeisComP applications and by the GIS, see https://docs.gempa.de/seiscomp/current/apps/global_gui.html#map-vector-layers If bonding box, bounding circle, polygons or region name are combined then all definitions must match in order to evaluate a ``Region`` to true. For performance reasons ``Regions`` are evaluated after the regular ``Criterion`` parameters. Also a ``Region`` is only evaluated once, even if referenced by multiple :ref:`Criteria `. The bounding box and bounding circle tests are rather fast and may be configured as a pre-test to avoid rather complex polygon tests. Furthermore a lazy initialization strategy is used for the polygon data. It is read upon first usage or if the file modification time changed. Figure :num:`fig-web-conf-region` shows a possible configuration for the region of Germany. A bounding box is used for a rough estimate while the accurate border is defined in an external BNA polygon file. .. _fig-web-conf-region: .. figure:: media/web-conf-region.* :width: 20cm Geographic region of Germany defined by bounding box and BNA polygon file Properties ^^^^^^^^^^ =================================== =========== Property Description =================================== =========== **Name** Name (mandatory) of the ``Region``, used only in the web interface for referring Description Description of the ``Region`` BBox Latitude Upper and lower bounds for the latitude of the bounding box BBox Longitude Upper and lower bounds for the longitude of the bounding box, date line crossing is supported BCircle Latitude Latitude of the bounding circle center BCircle Longitude Longitude of the bounding circle center BCircle Radius Radius in degree of the bounding circle BNA Polygon Path to a `BNA file `_ containing one or many polygon definitions. Event Region Name Region name reported in the event. Regular expressions supported, e.g., use '.*Chile.*|*.Peru.*' to filter for events in Chile and Peru. :ref:`Criteria ` Set of ``Criteria`` this ``Region`` is used by =================================== =========== .. _sec-web-conf-serv: Services -------- A ``Service`` defines one dissemination path (e.g., email, fax, SMS, web, ...). For the name defined here a corresponding entry must exits in the :ref:`GDS back-end ` configuration file which defines a spool directory as well as a content template and a :term:`Spooler` application. The ``Service`` is one part of a :ref:`sec-web-conf-sub`. .. _fig-web-conf-service: .. figure:: media/web-conf-service.png :width: 20cm Configuration page for setting the serices Properties ^^^^^^^^^^ ======================================= =========== Property Description ======================================= =========== **Name** Name (mandatory) of the ``Service``, used in the web interface when subscribing to a ``Queue`` and at the :ref:`GDS back-end ` for associating configuration parameters and in the name of content and address files Description Description of the ``Service`` Log Bulletins If enabled, all bulletins sent by this ``Service`` are logged in the database for later review, see :ref:`sec-web-log-proc` Log Cleanup Mode Defines what log information (if any) is purged during a cleanup run. Log Retention Time Number of days before a log entry is released for cleanup. The clean up is only performed if a cleanup mode is selected. HA Redundant Output Multiple GDS instances may operate in high availability mode. In such configurations GDS slave instances will only trigger if the master instance fails to disseminate an event in a given timeout. By setting this parameter to 'True' the slave instances will no longer wait for the master and produce a redundant output. :ref:`Subscriptions ` Set of ``Subscriptions`` this ``Subscriber`` is used by ======================================= =========== The parameter ``Log Cleanup Mode`` may be set to the following values: ======================== =========== Cleanup Mode Description ======================== =========== Complete Cleanup :ref:`sec-web-log-proc` and :ref:`sec-web-log-serv` Bulletins and Recipients Delete logged bulletins from :ref:`sec-web-log-proc` and cleanup :ref:`sec-web-log-serv` Bulletins Delete logged bulletins from :ref:`sec-web-log-proc` Recipients Cleanup :ref:`sec-web-log-serv` ======================== =========== .. note:: In addition to the cleanup modes described above a hidden cleanup routine for the main entries of the :ref:`History and Events Perspective ` exists. If all :ref:`sec-web-log-proc` entries of an history/event entry have been deleted (Cleanup Mode *Complete*) and the entry is older than 30 days then the main entry it is also removed from the history/event perspective. .. note:: The clean up of the log is scheduled and performed by the :ref:`GDS back-end `. The interval between two cleanup runs is controlled through the configuration parameter *cleanupInterval*. By default cleanup Runs are **disabled**. .. _sec-web-conf-fil: Filters ------- Filters are **custom content templates**. They are rarely used configuration object. Commonly for each ``Service`` a content template is defined in the :ref:`GDS back-end ` configuration. Nevertheless a (custom) ``Filter`` allows to override the default ``Service`` template on a per ``Subscription`` bases. For the name defined here a corresponding entry must exist in the GDS server configuration which defines the content ``Filter`` application. The ``Filter`` is one (optional) part of a :ref:`sec-web-conf-sub`. Properties ^^^^^^^^^^ ======================================= =========== Property Description ======================================= =========== **Name** Name (mandatory) of the ``Filter``, used in the web interface when subscribing to a ``Queue`` and at the :ref:`GDS back-end ` for associating configuration parameters and in the name of content and address files Description Description of the ``Filter`` :ref:`Subscriptions ` Set of ``Subscriptions`` subscribed to this ``Filter`` ======================================= =========== .. _sec-web-conf-ssb: Subscriber ---------- A ``Subscriber`` is **not** a login account but a receiver or a receiver class used when subscribing to queues. A ``Subscriber`` defines the dissemination order and optional delay values. The actual dissemination target, e.g., phone number, email address, is defined in the :ref:`sec-web-conf-sub` .. _fig-web-conf-subscribers: .. figure:: media/web-conf-subscribers.png :width: 20cm Configuration page for setting the subscribers. Properties ^^^^^^^^^^ ======================================= =========== Property Description ======================================= =========== **Name** Name (mandatory) of the ``Subscriber``, used in the web interface when subscribing to a ``Queue`` and at the :ref:`GDS back-end ` inside address files Description Description of the ``Subscriber`` Enabled Controls if the subscriber and all of its subscription are allowed to triggered **Priority** Defines the dissemination priority (order), where 1 is the lowest and 10 the highest priority (mandatory) Delay Upper and lower bounds for the timespan between the event and the current time in minutes Delta Origin Time (seconds) Definition of significant change in origin time, see ``Resend Mode`` of :ref:`Subscription ` Delta Epicenter (degree) Definition of significant change in epicenter, see ``Resend Mode`` of :ref:`Subscription ` Delta Depth (kilometer) Definition of significant change in earthquake depth, see ``Resend Mode`` of :ref:`Subscription ` Delta Magnitude Definition of significant change of magnitude value, see ``Resend Mode`` of :ref:`Subscription ` Significant Change Properties Additional event properties representing a significant change, see ``Resend Mode`` of :ref:`Subscription ` :ref:`Subscriptions ` Set of ``Subscriptions`` subscribed to this ``Subscriber`` ======================================= =========== .. note:: The *Delay* values, if set, are required to match before any ``Subscription`` using this ``Subscriber`` is triggered. If the upper bound is exceeded the dissemination for the current and all following event revisions is stopped even if the significant change settings are met. If the lower bound is not reached yet the ``Subscriptions`` for the current revision are withheld and either triggered by a timer at the configured threshold or they are superseeded by the next revision of the same event received meanwhile. .. note:: It is sufficient for one *Significant Change* property to match in order to re-trigger ``Subscriptions`` with ``Resend Mode`` set to *On significant change*. .. _sec-web-conf-sub: Subscriptions ------------- A ``Subscription`` is made to a particular :ref:`sec-web-conf-queue` and is defined by :ref:`sec-web-conf-serv`, :ref:`sec-web-conf-ssb` and target (recipient) references. If required the default ``Service`` template may be replaced by a ``Subscription`` specific template allowing to generate different content for certain ``Subscribers``, see section :ref:`sec-web-conf-fil`. A ``Subscription`` can be configured to be triggered only once or for each update (revision) of an earthquake. Typically an SMS is only sent out once where as an earthquake information web page will be updated with every earthquake revision. Figure :num:`fig-web-conf-queue` shows the definition of ``Subscriptions`` inside the ``Queue`` configuration. Nevertheless ``Subscriptions`` may also be created in a separated form. .. _fig-web-conf-subscriptions: .. figure:: media/web-conf-subscriptions.png :width: 20cm Configuration page for setting the subscriptions Properties ^^^^^^^^^^ ========================= =========== Property Description ========================= =========== :ref:`sec-web-conf-queue` ``Queue`` to subscribe to (mandatory) :ref:`sec-web-conf-ssb` ``Subscriber`` (mandatory), defines the dissemination order and optionally delay values :ref:`sec-web-conf-serv` The dissemination path to use, e.g., SMS, email (mandatory) :ref:`sec-web-conf-fil` Custom Filter, rarely used to override the default ``Service`` content template **Target** The ``Service`` specific dissemination target (mandatory), e.g., phone number, email address Description Description of this subscription, e.g., name of the contact person **Resend mode** Defines under which circumstances an event update is disseminated again, see below. ========================= =========== The parameter ``Recent Mode`` may be set to the following values: Defines how event updates are treated. ======================== =========== Recent Mode Description ======================== =========== Only once Triggers only once per earthquake (given a ``Queue`` matches at all). On every match Triggers for every matching update. Once matched Triggers for every update starting with the first matching revision regardless if the following updates match or not. On sig. change Triggers for all matching refinements if they introduce a significant change as specified in the ``Delta`` and ``Significant Change`` properties of the :ref:`sec-web-conf-ssb` settings. Once M. & SIG Once matched and on significant change as described above. ======================== =========== .. _sec-web-diss: Dissemination ============= The GDS web interface allows to disseminate bulletins interactively at all levels: 1. :ref:`Select an earthquake ` #. :ref:`Select a particular earthquake revision ` #. :ref:`Select / review a list of subscriptions ` a. activate or deactivate :ref:`individual subscriptions ` #. :ref:`Revise and preview the final content ` of individual subscriptions #. Finally press the :ref:`Disseminate button` to sent all bulletins .. _sec-web-diss-event: Earthquake Selection -------------------- After clicking on the dissemination button of the main page, a list of earthquakes is shown. The earthquakes can be shown in a 1. **Calendar view**: Figure :num:`fig-web-diss-event`. One may browse through the list of events by selecting the year, month or day in the calendar shown at the top. #. **Table** sorted with respect to the latest event: Figure :num:`fig-web-diss-event-recent`. The views can be selected above the table header on the top right. In each table the event details are shown with the time of the last successful dissemination. If no attempt to disseminate was successfully the column *Dissemination Time* will remain empty. Clicking on the dissemination time navigates to the corresponding log entry (see section :ref:`sec-web-log-proc`). To continue with manual dissemination click in the linked event ID. .. _fig-web-diss-event: .. figure:: media/web-diss-event.png :width: 20cm Dissemination: Earthquake selection in calendar view. .. _fig-web-diss-event-recent: .. figure:: media/web-diss-event_recent.png :width: 20cm Dissemination: Earthquake selection with respect to the most recent event. .. note:: The lists may be resorted by clicking on the header of the columns. .. _sec-web-diss-rev: Revision Selection ------------------ After selecting an earthquake a list of available revisions of this particular event is shown (Figure :num:`fig-web-diss-rev`). The revision list describes how the earthquake solution evolved and distinguishes for instance between manually and automatic solutions. In general higher revision numbers represent a more stable and precise solution. The column ``Type`` often is empty. It is used to distinguish special earthquake states. E.g., fake events are labeled as ``not existing``. By clicking on the last column (``XML``) a complete earthquake representation may be download as a XML document. Selecting any other column will lead to step 3, the :ref:`sec-web-diss-sub`. .. _fig-web-diss-rev: .. figure:: media/web-diss-rev.* :width: 20cm Dissemination: Revision selection .. _sec-web-diss-sub: Subscription Selection ---------------------- After selecting an earthquake revision the dissemination page is shown (Figure :num:`fig-web-diss-sub`). It contains a list of available ``Queues`` and there ``Subscriptions``. ``Queues`` without a single ``Subscription`` are not shown. By default the ``Subscriptions`` of a ``Queue`` are hidden but may be displayed by clicking on the expand symbol (|icon-expand|) at the right of the ``Queue's`` headline. If at least one ``Subscriptions`` of a ``Queue`` is selected, then also the ``Queue's`` selection box is check. Vice visa all ``Subscriptions`` of a ``Queue`` may be toggled at once by clicking on the selection box of the ``Queue``. .. |icon-expand| image:: media/icons/expand_arrow.png .. _fig-web-diss-sub: .. figure:: media/web-diss-sub.png :width: 20cm Dissemination: Subscription selection The toggle button allows to activate or to deactivate subscriptions. The state of the toggle button describes the selection or pre-selection: * toggle button off: no subscription matches * toggle button on: all subscription matches * toggle button undecided: subscriptions with and without a match exist A mismatch occurs when any of the configured dissemination rules are violated: * queue * criteria * region * external criterion * subscription Otherwise a mismatch is declared. **Actions before dissemination:** * Select or deselect a subscription * Review and change any existing **subscription** by pressing the ``button to toggle`` the subscription list view above the match column * Press the ``tools button`` to ``review and adjust the dissemination criteria``. * Press the ``Load bulletins`` button to :ref:`revise the content of the messages `. After reviewing or changing the ``Subscription`` selection the event may be disseminated by pressing the red ``Disseminate`` button. The next page shown is the corresponding :ref:`procedure log ` page showing the current state of the dissemination. To update the view reload the webpage (``F5``). Pre-selection of Queues and Subscriptions ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ When opening the dissemination page the selected earthquake revision information is matched against available :ref:`Queues ` and there :ref:`Criteria `. The filter chain used here equals the automatic chain (applied for new revisions received from QuakeLink) with the exception that ``manual`` ``Queues`` are matched in addition. A partially selected ``Subscription`` set of one ``Queue`` may originate from: * different ``resend mode`` option of the :ref:`sec-web-conf-sub` * different ``delay`` values of the :ref:`sec-web-conf-ssb` If modified manually, the system pre-selection may be restored by reloading the page. .. _sec-web-diss-edit: Content Revision ---------------- Prior to dissemination the user may switch to the edit mode which allows him to review and optional alter the bulletin content. The edit mode is reachable via the link ``Load bulletins`` in the subscriptions panel. .. _fig-web-diss-edit: .. figure:: media/web-diss-edit.png :width: 20cm Editing prior to dissemination: plain text, HTML, preview, attachments Figure :num:`fig-web-diss-edit` shows the edit mode of the email bulletin. It was selected by clicking on the email button in the *Disseminate* menu. Other bulletins may be selected. In order to show other bulletins there must exist the corresponding services configured in the GDS module configuration as well as the subscription configured using the GDS web interface. The email bulletin is special because it provides the two content types ``HTML`` and ``Text`` which may be switched via the corresponding buttons in the header. Also attachments may be created or reviewed (footer). The email bulletin also allows to attach figures generated by gempa's GIS module. The generation of the figures is controlled by the :ref:`filter back-end `. .. note:: The text being reviewed is the output of the primary content filter command, see :ref:`sec-be-gds-fil`. If a secondary filter is configured the edited text will be sent to this filter for final formatting prior to dissemination. Regardless of the presents of a secondary filter, the :ref:`sec-web-diss-edit-prev` function may be used to check the final content. .. _sec-web-diss-edit-type: Supported Content Types ^^^^^^^^^^^^^^^^^^^^^^^ The content revision feature is for now limited to the following content types: * :ref:`gempa Bulletin ` (application/gds) -- A content format consisting of header and body parts. The :ref:`sec-be-tools` package provides a library for creating and parsing this format. For editing gempa Bulletins the `TinyMCE `_ component is used. * Python dictionary -- A serialized (``str()``) Python dictionary will be displayed a key value table with editable value fields. This content type is only useful in combination with a secondary filter which final formats the values. * plain text -- Any text content (including XML) may be edited in a standard HTML text area. .. _sec-web-diss-edit-prev: Preview ^^^^^^^ If all changes are applied the user may click on the preview button (|icon-preview|) in the top-left corner of the header to see the finally formatted content. Previewing the final content is especially useful if a :ref:`secondary filter ` is configured. A secondary filter finally formats the content which was created by the primary filter and which was optionally modified by the user. .. |icon-preview| image:: media/icons/preview.png .. _sec-web-log: Logging ======= GDS logs every action which has been done in its database. The logs include: * Automatic and manually triggered disseminations. * :ref:`Configuration changes ` The dissemination log may be accessed from the :ref:`main page` by clicking on the ``Log``. From the dissemination windows it can be directly accessed by clicking on the ``Procedure Log`` or the ``Event Log`` buttons in the upper right corner. There exist 2 different dissemination log perspectives which lead to the same information on the dissemination history: * :ref:`Event`: List of disseminated events. After selecting one event a list of disseminated event revisions is shown. From there the particular dissemination procedure may be selected. * :ref:`Procedure`: List of dissemination procedures ordered by dissemination time. By clicking on one list item the dissemination procedure is directly shown. .. note:: If a bulletin is disseminated without a event reference, e.g., by an external application using the :ref:`sec-be-gds-cli`, then it may not be found in the Event perspective. .. _sec-web-log-event: Event perspective ----------------- The event perspective lists all the events for which disseminations exist along with the dissemination status. Figure :num:`fig-web-log-evt` displays an example of the event perspective. .. _fig-web-log-evt: .. figure:: media/web-log-evt.* :width: 20cm Event perspective of the dissemination log grouping entries by earthquake .. _sec-web-log-proc: Procedure perspective --------------------- The procedure perspective lists all dissemination procedures which were either triggered automatically by the GDS back-end or interactively through the web interface. The perspective lists all triggered :ref:`sec-web-conf-serv`-:ref:`sec-web-conf-fil` combinations where each entry represents one disseminated bulletin. .. _fig-web-log-proc: .. figure:: media/web-log-proc.* :width: 20cm Procedure perspective listing all disseminations with their state. .. _fig-web-log-serv: .. figure:: media/web-log-serv.* :width: 20cm Procedure log listing all service-filter combinations triggered during a particular dissemination. The example in figure :num:`fig-web-log-proc` shows the dissemination of revision 26 of event gfz2012sjqp. It was sent out to the ``Services`` ``sms``, ``email`` and ``web``. Two ``sms`` entries exist because at least one ``Subscription`` overrides the default ``Service`` filter with a custom one which causes a separate bulletin to be generated. The :ref:`State ` of the first log entry is set to ``warning`` which indicates an error for some ``Subscriptions``. The text in the Message column originates from the :ref:`sec-be-gds-spool` application. Message exceeding the available column width are truncated but may be read completely in the info box of the :ref:`sec-web-log-serv`. By clicking on one ``Service`` entry the :ref:`sec-web-log-serv-lst` may be opened for further investigation. If the ``Log Bulletins`` property of the corresponding :ref:`sec-web-conf-serv` is enabled, then the last column provides direct access to the :ref:`sec-web-log-serv-msg` (|icon-download|). .. |icon-download| image:: media/icons/download.png .. _sec-web-log-serv: Service Log ----------- The ``Service`` log corresponds to one disseminated bulletin of one :ref:`sec-web-conf-serv`-:ref:`sec-web-conf-fil` combination. At the top of the page an info box displays the :ref:`Status ` and the complete ``Service`` log message. Below the info box either the :ref:`sec-web-log-serv-lst` or :ref:`sec-web-log-serv-msg` is shown. .. _sec-web-log-serv-lst: Receiver List ^^^^^^^^^^^^^ Each list entry represents one :ref:`sec-web-conf-sub` respectively one recipient. The example in figure :num:`fig-web-log-serv-lst` shows two recipients of the ``sms`` ``Service``. The bulletin was successfully transmitted to the first recipient but failed to sent to the second one due to the reason explained in the message column. .. _fig-web-log-serv-lst: .. figure:: media/web-log-serv-lst.* :width: 20cm Service log listing the dissemination result of all corresponding receivers If available one may switch to the :ref:`sec-web-log-serv-msg` using the link at the bottom of the page. .. _sec-web-log-serv-msg: Bulletin Content ^^^^^^^^^^^^^^^^ If the :ref:`sec-web-conf-serv` property ``Log Bulletins`` is enabled then the disseminated bulletin content is stored in the database and may be reviewed in the ``Service`` log. Figure :num:`fig-web-log-serv-msg` displays the content of an SMS sent out. This view supports the same content types described in section :ref:`sec-web-diss-edit`. All content, even if of unsupported type, may be downloaded as a file using the link at the bottom of the page. .. _fig-web-log-serv-msg: .. figure:: media/web-log-serv-msg.* :width: 20cm Service log showing the content of the disseminated bulletin .. _sec-web-log-stat: Status Indication ----------------- All log pages use the same color and icon scheme to indicate the dissemination state or result which are: * |icon-success| **Success** -- White background, green icon. All bulletins have been successfully disseminated to all ``Subscriptions``. * |icon-pending| **Pending** -- Gray background and icon. The dissemination was triggered but no result has yet been received from the spooler. * |icon-warning| **Warning** -- Yellow background and icon. The dissemination was triggered but the spooler failed in sending out the bulletins to some ``Subscriptions``. * |icon-error| **Error** -- Red background and icon. The dissemination failed completely. The error may either result from the content filter or from the Spooler. .. |icon-pending| image:: media/icons/icon_pending.png :width: 0.5cm .. |icon-success| image:: media/icons/icon_success.png :width: 0.5cm .. |icon-warning| image:: media/icons/icon_warning.png :width: 0.5cm .. |icon-error| image:: media/icons/icon_error.png :width: 0.5cm The dissemination states are always aggregated to the worst. If for example the dissemination to one ``Service`` failed and the state is set to ``error`` then the state of the corresponding :ref:`sec-web-log-proc` containing all ``Services`` is also set to ``error``. Consequently the state is propagated up to the :ref:`History and Event perspective `. .. _fig-web-log-time: Times ----- The dissemination log distinguishes between four different time specification which all use the UTC timezone: * **Origin Time** -- Time of the earthquake, used in event list of Event perspective. * **Trigger Time** -- Time the dissemination was triggered (started) either automatically or interactively. This time is used in the History perspective and in the revision list of the Event perspective. * **Spool Time** -- Time the bulletin was placed in the spooler directory of a ``Service``. This time is used in the :ref:`sec-web-log-proc` and typically equals the ``Trigger Time``. The difference between the Trigger and Spool time result from processing time needed by the content filters. * **Sent Time** -- Time the bulletin was either sent by the :ref:`sec-be-gds-spool` or an error occurred. This time is used in the :ref:`sec-web-log-serv`. The difference between the Spool and Sent time result from the configured spool interval and from the time needed by the Spooler to actually send the bulletins. For now the GDS internal Spooler threads report the same time for all recipients. This behavior might change in the future. .. _sec-web-log-config: Configuration Log ----------------- The configuration log is only available to administrative users (see :ref:`sec-web-adm`). In the configuration log all changes are listed in a sorted order where they can be viewed (fig :num:`fig-web-log-config`). .. _fig-web-log-config: .. figure:: media/web-log-config.png :width: 20cm Configuration log with a detailed list sorted by time