Permalink
Browse files

included templates in package.

  • Loading branch information...
javipalanca committed Sep 3, 2018
1 parent ad30340 commit fa0b8dad1557450ea4811a101a1c754fe3931629
Showing with 74 additions and 57 deletions.
  1. +2 −0 MANIFEST.in
  2. +1 −0 setup.py
  3. +47 −47 spade/templates/agent.html
  4. +21 −7 spade/templates/behaviour.html
  5. +3 −3 spade/templates/index.html
View
@@ -7,6 +7,8 @@ include README.rst
include requirements.txt
include requirements_dev.txt
recursive-include spade/templates *
recursive-include tests *
recursive-exclude * __pycache__
recursive-exclude * *.py[co]
View
@@ -41,6 +41,7 @@ def parse_requirements(filename):
]
},
include_package_data=True,
package_data={"spade": ["templates"]},
install_requires=requirements,
license="MIT license",
zip_safe=False,
View
@@ -14,64 +14,64 @@
<div class="row">
<div class="col-md-4">
<div class="box box-widget widget-user">
<!-- Add the bg color to the header using any of the bg-* classes -->
<div class="widget-user-header bg-aqua-active">
<h3 class="widget-user-username">{{ ajid }}</h3>
</div>
<div class="widget-user-image">
<img class="img-circle" src="{{ agent.build_avatar_url(ajid) }}" alt="User Avatar">
</div>
<div class="box-footer">
<div class="row">
<div class="col-sm-4 border-right">
<div class="description-block">
<span class="description-header">STATUS</span>
{% if contact.show == "AWAY" or contact.show == "XA" or contact.show == "DND" or
contact.show == "EXTENDED_AWAY" or contact.show == "DO_NOT_DISTURB" %}
<h5 class="description-text"><i class="fa fa-circle text-yellow"></i> {{ contact.show }}</h5>
{% elif contact.show == "NONE" or contact.show == "PLAIN" or contact.show == "CHAT" or
contact.show == "FREE_FOR_CHAT" %}
<h5 class="description-text"><i class="fa fa-circle text-green"></i> ONLINE</h5>
{% else %}
<h5 class="description-text"><i class="fa fa-circle text-red"></i> OFFLINE</h5>
{% endif %}
</div>
<!-- /.description-block -->
<div class="box box-widget widget-user">
<!-- Add the bg color to the header using any of the bg-* classes -->
<div class="widget-user-header bg-aqua-active">
<h3 class="widget-user-username">{{ ajid }}</h3>
</div>
<!-- /.col -->
<div class="col-sm-4 border-right">
<div class="description-block">
<span class="description-header">ACTION</span>
<a href="/agent/{{ ajid }}/unsubscribe/">
<button type="button" class="btn btn-block btn-warning btn-xs">Unsubscribe</button>
</a>
</div>
<!-- /.description-block -->
<div class="widget-user-image">
<img class="img-circle" src="{{ agent.build_avatar_url(ajid) }}" alt="User Avatar">
</div>
<!-- /.col -->
<div class="col-sm-4">
<div class="description-block">
<h5 class="description-header">{{ amessages.__len__() }}</h5>
<span class="description-text">MESSAGES</span>
<div class="box-footer">
<div class="row">
<div class="col-sm-4 border-right">
<div class="description-block">
<span class="description-header">STATUS</span>
{% if contact.show == "AWAY" or contact.show == "XA" or contact.show == "DND" or
contact.show == "EXTENDED_AWAY" or contact.show == "DO_NOT_DISTURB" %}
<h5 class="description-text"><i class="fa fa-circle text-yellow"></i> {{ contact.show }}</h5>
{% elif contact.show == "NONE" or contact.show == "PLAIN" or contact.show == "CHAT" or
contact.show == "FREE_FOR_CHAT" %}
<h5 class="description-text"><i class="fa fa-circle text-green"></i> ONLINE</h5>
{% else %}
<h5 class="description-text"><i class="fa fa-circle text-red"></i> OFFLINE</h5>
{% endif %}
</div>
<!-- /.description-block -->
</div>
<!-- /.col -->
<div class="col-sm-4 border-right">
<div class="description-block">
<span class="description-header">ACTION</span>
<a href="/agent/{{ ajid }}/unsubscribe/">
<button type="button" class="btn btn-block btn-warning btn-xs">Unsubscribe</button>
</a>
</div>
<!-- /.description-block -->
</div>
<!-- /.col -->
<div class="col-sm-4">
<div class="description-block">
<h5 class="description-header">{{ amessages.__len__() }}</h5>
<span class="description-text">MESSAGES</span>
</div>
<!-- /.description-block -->
</div>
<!-- /.col -->
</div>
<!-- /.description-block -->
<!-- /.row -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</div>
</div>
</div>
</div>
<div class="col-md-4">
<!-- DIRECT CHAT PRIMARY -->
<div class="box box-primary direct-chat direct-chat-primary">
<div class="box-header with-border">
<h3 class="box-title">Chat</h3>
<div class="box-tools pull-right">
<span data-toggle="tooltip" title="" class="badge bg-light-blue"
data-original-title="{{ amessages.__len__() }} New Messages">{{ amessages.__len__() }}</span>
<span data-toggle="tooltip" title="" class="badge bg-light-blue"
data-original-title="{{ amessages.__len__() }} New Messages">{{ amessages.__len__() }}</span>
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i
class="fa fa-minus"></i>
</button>
@@ -151,8 +151,8 @@ <h3 class="box-title">Chat</h3>
</div>
</div>
</div>
<!-- /.row -->
</div>
<!-- /.row -->
</section>
<!-- /.content -->
{% endblock %}
@@ -7,7 +7,7 @@
<!-- Info boxes -->
<div class="row">
<div class="col-lg-3 col-xs-6">
<div class="col-lg-2 col-xs-6">
<!-- small box -->
<div class="small-box bg-green">
<div class="inner">
@@ -33,7 +33,7 @@ <h3>Template</h3>
</div>
</div>
<!-- ./col -->
<div class="col-lg-3 col-xs-6">
<div class="col-lg-2 col-xs-6">
<!-- small box -->
<div class="small-box bg-yellow">
<div class="inner">
@@ -46,7 +46,7 @@ <h3>{{ behaviour.is_killed() }}</h3>
</div>
</div>
<!-- ./col -->
<div class="col-lg-3 col-xs-6">
<div class="col-lg-2 col-xs-6">
<!-- small box -->
<div class="small-box bg-red">
<div class="inner">
@@ -59,11 +59,9 @@ <h3>{{ behaviour._exit_code }}</h3>
</div>
</div>
<!-- ./col -->
</div>
<div class="row">
{% if "Periodic" in behaviour.__str__() %}
<div class="col-lg-3 col-xs-6">
<div class="col-lg-2 col-xs-6">
<!-- small box -->
<div class="small-box bg-blue">
<div class="inner">
@@ -78,7 +76,7 @@ <h3>{{ behaviour.period.total_seconds() }}</h3>
{% endif %}
<!-- ./col -->
{% if "Timeout" in behaviour.__str__() %}
<div class="col-lg-3 col-xs-6">
<div class="col-lg-2 col-xs-6">
<!-- small box -->
<div class="small-box bg-blue">
<div class="inner">
@@ -91,7 +89,23 @@ <h3>Timeout</h3>
</div>
</div>
{% endif %}
{% if "FSM" in behaviour.__str__() %}
<div class="col-lg-2 col-xs-6">
<!-- small box -->
<div class="small-box bg-orange">
<div class="inner">
<h3>{{ behaviour.current_state}}</h3>
<p>Current State</p>
</div>
<div class="icon">
<i class="fas fa-project-diagram"></i>
</div>
</div>
</div>
{% endif %}
<!-- ./col -->
</div>
<div class="row">
<div class="col-md-4">
<!-- DIRECT CHAT PRIMARY -->
<div class="box box-primary direct-chat direct-chat-primary">
@@ -71,7 +71,7 @@ <h3 class="box-title">Contacts</h3>
<li>
<a href="/agent/{{ contact.jid }}/">
<img src="{{ contact.avatar }}" alt="User Image">
<a class="users-list-name" href="#">{{ contact.jid }}</a>
<span class="users-list-name">{{ contact.jid }}</span>
{% if contact.show == "AWAY" or contact.show == "XA" or contact.show == "DND" or
contact.show == "EXTENDED_AWAY" or contact.show == "DO_NOT_DISTURB" %}
<i class="fa fa-circle text-yellow"></i> {{ contact.show }}
@@ -88,9 +88,9 @@ <h3 class="box-title">Contacts</h3>
<!-- /.users-list -->
</div>
<!-- /.box-body -->
<div class="box-footer text-center">
<!--div class="box-footer text-center">
<a href="javascript:void(0)" class="uppercase">View All Users</a>
</div>
</div-->
<!-- /.box-footer -->
</div>
<!--/.box -->

0 comments on commit fa0b8da

Please sign in to comment.