Refactored requirements to only include mandatory ones and added style reference to assistant in dashboard.html

This commit is contained in:
Fabio Manganiello 2019-07-10 12:18:53 +02:00
parent f086d30e71
commit 792c24700c
3 changed files with 13 additions and 86 deletions

View File

@ -8,6 +8,7 @@
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/normalize.css') }}">
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='font-awesome/css/all.css') }}">
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/dist/dashboard.css') }}">
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/dist/webpanel/plugins/assistant.google.css') }}">
<script type="text/javascript" src="{{ url_for('static', filename='js/lib/vue.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/lib/axios.min.js') }}"></script>

View File

@ -1,72 +0,0 @@
<!doctype html>
<head>
<title>Platypush Dashboard</title>
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Lato" />
<link rel="stylesheet" href="{{ url_for('static', filename='css/skeleton.css') }}"></script>
<link rel="stylesheet" href="{{ url_for('static', filename='css/skeleton-tabs.css') }}"></script>
<link rel="stylesheet" href="{{ url_for('static', filename='css/normalize.css') }}"></script>
<link rel="stylesheet" href="{{ url_for('static', filename='font-awesome/css/font-awesome.min.css') }}"></script>
<link rel="stylesheet" href="{{ url_for('static', filename='css/application.css') }}"></script>
<link rel="stylesheet" href="{{ url_for('static', filename='css/dashboard.css') }}"></script>
<link rel="stylesheet" href="{{ url_for('static', filename='css/toggles.css') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/jquery-3.3.1.min.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/skeleton-tabs.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/application.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/dashboard.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/pushbullet.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/assistant.google.js') }}"></script>
<script type="text/javascript">
window.websocket_port = {% print(websocket_port) %};
window.has_ssl = {% print('true' if has_ssl else 'false') %};
{% if token %}
window.token = '{% print(token) %}';
{% else %}
window.token = undefined;
{% endif %}
window.config = {{ config | safe }};
window.widgets = {{ config['widgets'] | safe }}.reduce(function(map, w) { map[w.widget] = w; return map }, {})
</script>
</head>
<body>
<main>
<!-- You can send events of type platypush.message.event.web.DashboardIframeUpdateEvent
to control what is shown in the optional iframe modal -->
<div id="iframe-modal" class="modal">
<div class="modal-container">
<iframe></iframe>
</div>
</div>
<div id="widgets-container">
{% set used_columns = [0] %}
{% for widget in config['widgets'] %}
{% if used_columns[0] % 12 == 0 %}
<div class="row">
{% endif %}
<div class="widget {% print(utils.widget_columns_to_html_class(widget['columns'])) %}
{% print(widget['widget']) %}"
id="{% print(widget['id'] if 'id' in widget else widget['widget']) %}">
{% with properties=widget %}
{% include 'widgets/' + widget['widget'] + '.html' %}
{% endwith %}
</div>
{# increment counter #}
{% if used_columns.append(used_columns.pop() + widget['columns']) %}{% endif %}
{% if used_columns[0] % 12 == 0 %}
</div>
{% endif %}
{% endfor %}
</div>
<div id="notification-container"></div>
</main>
<body>

View File

@ -12,7 +12,7 @@ pyyaml
# python-prctl
# Apache Kafka backend support
kafka-python
# kafka-python
# Pushbullet backend support
git+https://github.com/rbrcsk/pushbullet.py
@ -22,6 +22,7 @@ flask
websockets
redis
python-dateutil
tz
#uwsgi
# HTTP poll backend support
@ -31,33 +32,30 @@ requests
# Database plugin support
sqlalchemy
# Dates support
python-dateutil
# RSS feeds support
feedparser
# feedparser
# PDF generation support
# weasyprint
# Philips Hue plugin support
phue
# phue
# MPD/Mopidy music server support
python-mpd2
# python-mpd2
# Belkin WeMo Switch plugin support
# ouimeaux
# Google Assistant support
# google-assistant-sdk[samples]
# google-assistant-sdk
# google-assistant-library
# Google APIs general layer support
# google-api-python-client
# Last.FM scrobbler plugin support
pylast
# pylast
# Flic buttons support
# It doesn't come with a pip package nor a setup.py,
@ -90,16 +88,16 @@ pylast
# rtmidi
# Support for inotify plugin
inotify
# inotify
# Support for MQTT
paho-mqtt
# iCal calendars support
icalendar
# icalendar
# Serial port support
pyserial
# pyserial
# Switchbot devices support
# pybluez
@ -109,7 +107,7 @@ pyserial
# pyHS100
# Support for joystick backend
inputs
# inputs
# Support for Kodi
# kodi-json
@ -126,7 +124,7 @@ inputs
# numpy
# Support for media subtitles
# git+https://github.com/agonzalezro/python-opensubtitles#egg=python-opensubtitles
# git+https://github.com/agonzalezro/python-opensubtitles
# webvtt-py
# Mopidy backend