<!doctype html>
<html lang="en-US">
{{> control/partials/head-includes }}
<head><title>Update ID</title></head>
<body>
{{> control/partials/nav}}
<nav aria-label="breadcrumb">
    <ol class="breadcrumb">
        <li class="breadcrumb-item"><a href="/message-queue">Message Queue</a></li>
        <li class="breadcrumb-item"><a href="/message-queue/{{msgId}}">{{msgId}}</a></li>
        <li class="breadcrumb-item active" aria-current="page">Edit</li>
    </ol>
</nav>

<div class="container">
<h1>Update Message State</h1>
<p>Update the of a message in the message queue.  This may be useful to prevent an actor
from resuming an action when this is not desirable. Setting an old message to 'NEW' will
erase information about its owner, and inboxes will consider the message new again.</p>
<form method="post" action="/message-queue/{{msgId}}/edit">
    <table>
        <tr>
            <th>Field</th>
            <th>Value</th>
        </tr>
        <tr>
            <td><label for="msgId">msgId</label></td>
            <td><input type="text" disabled id="msgId" name="msgId" value="{{msgId}}"></td>
        </tr>
        <tr>
            <td><label for="function">function</label></td>
            <td><input type="text" disabled id="function" name="function" value="{{function}}"></td>
        </tr>
        <tr>
            <td><label for="relatedId">relatedId</label></td>
            <td><input type="text" disabled id="relatedId" name="relatedId" value="{{relatedId}}"></td>
        </tr>
        <tr>
            <td><label for="payload">payload</label></td>
            <td><textarea disabled rows="6" cols="40" id="payload" name="payload">{{payload}}</textarea></td>
        </tr>
        <tr>
            <td><label for="oldState">current state</label></td>
            <td><input type="text" disabled id="oldState" name="oldState" value="{{state}}"></td>
        </tr>
        <tr>
            <td><label for="state">new state</label></td>
            <td><select id="state" name="state">
                <option value="NEW">NEW</option>
                <option value="ACK">ACK</option>
                <option value="OK">OK</option>
                <option value="ERR">ERR</option>
                <option value="DEAD">DEAD</option>
            </select></td>
        </tr>
        <tr>
            <td colspan="2">
                <input type="submit" value="Update" style="float:right">
            </td>
        </tr>
    </table>
    </form>
    <p>Note that while setting a message to NEW or in some instances ACK typically causes an Actor
    to act on the message, setting a message in ACK to ERR or DEAD will not stop action, but only
    prevent resumption of action.  To stop a running actor, use the Actors view and press the toggle.</p>
</div>
</body>
{{> control/partials/foot-includes }}
</html>