Esempio n. 1
0
  <tr>
   <td valign="top" align="center" bgcolor="#cccccc">
      <br>
"""

# The form handler is embeded inside the web page
# since it is quite short and straight-forward
form = cgi.FieldStorage()
if form.has_key('delCheck'):
    msgDel = form.getlist('delCheck')
    for md in msgDel:
        md = md.split('|')
        header = md[0]
        machine = md[1]
        status, result = MsgOpUtils.removeMsg(header, machine)
        if status == 0:
            logger.info('Operator Messages: %s was deleted' % (header))
        else:
            logger.error('Operator Messages: %s could not be deleted' % (header))

print """    </td>
  </tr>
  <tr>
    <td valign="top" align="center" bgcolor="#cccccc">
        <blockquote>
            <font size="6"><b><pre>Available messages:</pre></b></font>
        </blockquote><br>
    </td>
  </tr>
  <tr>
Esempio n. 2
0
            <font size="6"><b><pre>%s</pre></b></font>
        </blockquote><br>
    </td>
  </tr>
  <tr>
    <td valign="top" bgcolor="#cccccc">
""" % (displayMsg)

ackURL = "pxMsgDetails.py?msg=" + msg + "&machine=" + machine + "&opt=1"
rmURL = "pxMsgDetails.py?msg=" + msg + "&machine=" + machine + "&opt=2"
if opt == '1':
    MsgOpUtils.acknowledgeMsg(msg, machine)
    logger.info("Operator Messages: %s was acknowledged." % msg)
    returnToMainPage()
elif opt == '2':
    status, output = MsgOpUtils.removeMsg(msg, machine)
    if status == 0:
        logger.info('Operator Messages: %s was deleted' % (msg))
    else:
        logger.error('Operator Messages: %s could not be deleted' % (header))
    returnToMainPage()

print """
    <script LANGUAGE="JavaScript">
        function confirmSubmit()
        {
            var answer=confirm("Are you sure?");
            if (answer)
	            return true;
            else
	            return false;
Esempio n. 3
0
            <font size="6"><b><pre>%s</pre></b></font>
        </blockquote><br>
    </td>
  </tr>
  <tr>
    <td valign="top" bgcolor="#cccccc">
""" % (displayMsg)

ackURL = "pxMsgDetails.py?msg=" + msg + "&machine=" + machine + "&opt=1"
rmURL = "pxMsgDetails.py?msg=" + msg + "&machine=" + machine + "&opt=2"
if opt == '1':
    MsgOpUtils.acknowledgeMsg(msg, machine)
    logger.info("Operator Messages: %s was acknowledged." % msg)
    returnToMainPage()
elif opt == '2':
    status, output = MsgOpUtils.removeMsg(msg, machine)
    if status == 0:
        logger.info('Operator Messages: %s was deleted' % (msg))
    else:
        logger.error('Operator Messages: %s could not be deleted' % (header))
    returnToMainPage()

print """
    <script LANGUAGE="JavaScript">
        function confirmSubmit()
        {
            var answer=confirm("Are you sure?");
            if (answer)
	            return true;
            else
	            return false;
Esempio n. 4
0
  <tr>
   <td valign="top" align="center" bgcolor="#cccccc">
      <br>
"""

# The form handler is embeded inside the web page
# since it is quite short and straight-forward
form = cgi.FieldStorage()
if form.has_key('delCheck'):
    msgDel = form.getlist('delCheck')
    for md in msgDel:
        md = md.split('|')
        header = md[0]
        machine = md[1]
        status, result = MsgOpUtils.removeMsg(header, machine)
        if status == 0:
            logger.info('Operator Messages: %s was deleted' % (header))
        else:
            logger.error('Operator Messages: %s could not be deleted' %
                         (header))

print """    </td>
  </tr>
  <tr>
    <td valign="top" align="center" bgcolor="#cccccc">
        <blockquote>
            <font size="6"><b><pre>Available messages:</pre></b></font>
        </blockquote><br>
    </td>
  </tr>