]> git.ipfire.org Git - ipfire.org.git/commitdiff
accounts: Drop agent stuff
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 28 Jun 2023 15:49:12 +0000 (15:49 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 28 Jun 2023 15:49:12 +0000 (15:49 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Makefile.am
src/backend/accounts.py
src/templates/people/modules/agent.html [deleted file]
src/templates/people/sip.html
src/web/__init__.py
src/web/people.py

index 76a37282a1df3ff1e41cf1074663ff3d2a0d7346..8ab44b31a8b3b0d20ebe620319fd3e80a67e2e11 100644 (file)
@@ -289,7 +289,6 @@ templates_people_messages_DATA = \
 templates_people_messagesdir = $(templates_peopledir)/messages
 
 templates_people_modules_DATA = \
-       src/templates/people/modules/agent.html \
        src/templates/people/modules/channels.html \
        src/templates/people/modules/password.html \
        src/templates/people/modules/password.js \
index c2f19e6449d8661ee1f8019495b28d166fadaea1..b4c2a1d5e03ece5a986fd50d653d7835fd3ba3f3 100644 (file)
@@ -1070,10 +1070,6 @@ class Account(LDAPObject):
        def sip_url(self):
                return "%s@ipfire.org" % self.sip_id
 
-       @lazy_property
-       def agent_status(self):
-               return self.backend.talk.freeswitch.get_agent_status(self)
-
        def uses_sip_forwarding(self):
                if self.sip_routing_address:
                        return True
diff --git a/src/templates/people/modules/agent.html b/src/templates/people/modules/agent.html
deleted file mode 100644 (file)
index db3e2d2..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-{% set status = account.agent_status %}
-
-{% if status %}
-       <div class="card mb-3">
-               <div class="card-body ">
-                       <h6 class="card-title">{{ _("Agent Status") }}</h6>
-
-                       <p class="card-text">
-                               {% if status == "Available" or status == "Available (On Demand)" %}
-                                       <span class="text-success">
-                                               <i class="fas fa-phone"></i>
-                                               {{ _("This agent is currently available") }}
-                                       </span>
-                               {% elif status == "Logged Out" %}
-                                       <span class="text-danger">
-                                               <i class="fas fa-phone-slash"></i>
-                                               {{ _("This agent is currently logged out") }}
-                                       </span>
-                               {% elif status == "On Break" %}
-                                       <span class="text-warning">
-                                               <i class="fas fa-coffee"></i>
-                                               {{ _("This agent is currently on a break") }}
-                                       </span>
-                               {% else %}
-                                       {{ _("Unknown status: %s") % status }}
-                               {% end %}
-                       </p>
-               </div>
-       </div>
-{% end %}
index 4d134b69115c937a3a52f9aaa598f2c228907b7a..de7c059844c6305cfefa735c4e379c580406e61e 100644 (file)
@@ -7,8 +7,6 @@
 
        {% module Channels(account) %}
 
-       {% module Agent(account) %}
-
        {% module Registrations(account) %}
 
        {% if account.uses_sip_forwarding() %}
index 49c861dba8591ff93059d03e7982adc71e68ad0c..2607bdeebe85a987cf95dab5de7e57e05deed19c 100644 (file)
@@ -75,7 +75,6 @@ class Application(tornado.web.Application):
                                "DocsHeader"           : docs.HeaderModule,
 
                                # People
-                               "Agent"                : people.AgentModule,
                                "Channels"             : people.ChannelsModule,
                                "Password"             : people.PasswordModule,
                                "Registrations"        : people.RegistrationsModule,
index a7b4c43f79d651473b032a0198fbd76ac697f22f..305fb1b4d21e2c405a998a95fb17161c5db4290e 100644 (file)
@@ -58,11 +58,6 @@ class SIPHandler(base.BaseHandler):
                self.render("people/sip.html", account=account)
 
 
-class AgentModule(ui_modules.UIModule):
-       def render(self, account):
-               return self.render_string("people/modules/agent.html", account=account)
-
-
 class ChannelsModule(ui_modules.UIModule):
        def render(self, account):
                return self.render_string("people/modules/channels.html",