Пример #1
0
    def __init__(
        self, ims, shift, incidents_by_activity, template_name="shift"
    ):
        BaseElement.__init__(self, ims, template_name, str(shift))

        self.shift = shift
        self.incidents_by_activity = incidents_by_activity
Пример #2
0
    def __init__(self, ims, number):
        BaseElement.__init__(
            self, ims, "incident",
            "Incident #{0}".format(number)
        )
        self.incident = self.ims.storage.read_incident_with_number(number)

        for attr_name in (
            "number",
            "priority",
            "created",
            "dispatched",
            "on_scene",
            "closed",
            "summary",
        ):
            @renderer
            def render_attr(request, tag, attr_name=attr_name):
                return tag(u"{0}".format(getattr(self.incident, attr_name)))

            setattr(self, attr_name, render_attr)
Пример #3
0
 def __init__(self, ims):
     BaseElement.__init__(self, ims, "home", "Ranger Incident Management System")
Пример #4
0
 def __init__(self, ims, name):
     BaseElement.__init__(self, ims, name, "Shift Change Report")
Пример #5
0
 def __init__(self, ims, template_name="report_shift"):
     BaseElement.__init__(self, ims, template_name, "Shift Summary")
Пример #6
0
 def __init__(self, ims, template_name="report_daily"):
     BaseElement.__init__(self, ims, template_name, "Daily Report")
Пример #7
0
 def __init__(self, ims):
     BaseElement.__init__(self, ims, "queue", "Dispatch Queue")
Пример #8
0
 def __init__(self, ims, name):
     BaseElement.__init__(self, ims, name, "Daily Report")