/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to mandos-monitor

  • Committer: Teddy Hogeborn
  • Date: 2010-09-26 17:36:30 UTC
  • Revision ID: teddy@fukt.bsnet.se-20100926173630-zk7pe17fp2bv6zr7
* DBUS-API: Document new "LastApprovalRequest" client property.

* mandos (Client.last_approval_request): New attribute.
  (Client.need_approval): New method.
  (ClientDBus.need_approval): - '' -
  (ClientDBus.NeedApproval): Call self.need_approval().
  (ClientDBus.LastApprovalRequest_dbus_property): New D-Bus property.

* mandos-monitor: Show timeout counter during approval delay.
  (MandosClientWidget._update_timer_callback_lock): New.
  (MandosClientWidget.property_changed): Override to also call
                                         using_timer if
                                         ApprovalPending property is
                                         changed.
  (MandosClientWidget.using_timer): New method.
  (MandosClientWidget.checker_completed): Use "using_timer".
  (MandosClientWidget.need_approval): - '' -
  (MandosClientWidget.update): Show approval delay timer.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/python
2
2
# -*- mode: python; coding: utf-8 -*-
3
 
4
 
# Mandos Monitor - Control and monitor the Mandos server
5
 
6
 
# Copyright © 2009,2010 Teddy Hogeborn
7
 
# Copyright © 2009,2010 Björn Påhlsson
8
 
9
 
# This program is free software: you can redistribute it and/or modify
10
 
# it under the terms of the GNU General Public License as published by
11
 
# the Free Software Foundation, either version 3 of the License, or
12
 
# (at your option) any later version.
13
 
#
14
 
#     This program is distributed in the hope that it will be useful,
15
 
#     but WITHOUT ANY WARRANTY; without even the implied warranty of
16
 
#     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
 
#     GNU General Public License for more details.
18
 
19
 
# You should have received a copy of the GNU General Public License
20
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
21
 
22
 
# Contact the authors at <mandos@fukt.bsnet.se>.
23
 
24
3
 
25
4
from __future__ import division, absolute_import, with_statement
26
5
 
51
30
domain = 'se.bsnet.fukt'
52
31
server_interface = domain + '.Mandos'
53
32
client_interface = domain + '.Mandos.Client'
54
 
version = "1.2"
 
33
version = "1.0.15"
55
34
 
56
35
# Always run in monochrome mode
57
36
urwid.curses_display.curses.has_colors = lambda : False
367
346
        elif key == u"d":
368
347
            self.proxy.Approve(dbus.Boolean(False, variant_level=1),
369
348
                                  dbus_interface = client_interface)
370
 
        elif key == u"R" or key == u"_" or key == u"ctrl k":
 
349
        elif key == u"r" or key == u"_" or key == u"ctrl k":
371
350
            self.server_proxy_object.RemoveClient(self.proxy
372
351
                                                  .object_path)
373
352
        elif key == u"s":
686
665
                                      .join((u"Clients:",
687
666
                                             u"+: Enable",
688
667
                                             u"-: Disable",
689
 
                                             u"R: Remove",
 
668
                                             u"r: Remove",
690
669
                                             u"s: Start new checker",
691
670
                                             u"S: Stop checker",
692
671
                                             u"C: Checker OK",