2018-01-29 13:47:21 +01:00
|
|
|
<!doctype html>
|
|
|
|
<head>
|
2019-05-23 18:51:28 +02:00
|
|
|
<title>Platypush Web Panel</title>
|
|
|
|
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
2018-01-29 13:47:21 +01:00
|
|
|
|
2018-06-12 17:32:59 +02:00
|
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/skeleton.css') }}">
|
|
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/normalize.css') }}">
|
2019-06-03 23:37:19 +02:00
|
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='font-awesome/css/all.css') }}">
|
2019-05-23 18:51:28 +02:00
|
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/dist/webpanel.css') }}">
|
2019-12-08 16:25:03 +01:00
|
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/dist/webpanel/plugins/execute.css') }}">
|
2018-01-29 13:47:21 +01:00
|
|
|
|
|
|
|
<script type="text/javascript">
|
2019-05-15 09:31:04 +02:00
|
|
|
if (!window.config) {
|
|
|
|
window.config = {};
|
|
|
|
}
|
|
|
|
|
|
|
|
window.config = { ...window.config,
|
2019-05-23 18:51:28 +02:00
|
|
|
websocket_port: {{ websocket_port }},
|
2019-06-14 00:54:20 +02:00
|
|
|
has_ssl: {{ 'true' if has_ssl else 'false' }},
|
|
|
|
templates: JSON.parse('{{ utils.to_json(templates)|safe }}'),
|
|
|
|
scripts: JSON.parse('{{ utils.to_json(scripts)|safe }}'),
|
2019-05-15 09:31:04 +02:00
|
|
|
};
|
2018-01-29 13:47:21 +01:00
|
|
|
|
2019-06-14 00:54:20 +02:00
|
|
|
|
|
|
|
var __plugins__ = JSON.parse('{{ utils.to_json(plugins)|safe }}');
|
|
|
|
var __backends__ = JSON.parse('{{ utils.to_json(backends)|safe }}');
|
|
|
|
|
2018-01-29 13:47:21 +01:00
|
|
|
{% if token %}
|
2019-05-23 18:51:28 +02:00
|
|
|
window.config.token = '{{ token }}';
|
2018-01-29 13:47:21 +01:00
|
|
|
{% else %}
|
2019-05-15 09:31:04 +02:00
|
|
|
window.config.token = undefined;
|
2018-01-29 13:47:21 +01:00
|
|
|
{% endif %}
|
|
|
|
</script>
|
2019-05-23 18:51:28 +02:00
|
|
|
|
2019-12-01 16:18:33 +01:00
|
|
|
{% if utils.isfile(static_folder, 'js', 'lib', 'vue.js') %}
|
2019-07-19 20:00:39 +02:00
|
|
|
<script type="text/javascript" src="{{ url_for('static', filename='js/lib/vue.js') }}"></script>
|
2019-12-01 16:18:33 +01:00
|
|
|
{% else %}
|
2019-07-13 12:25:02 +02:00
|
|
|
<script type="text/javascript" src="{{ url_for('static', filename='js/lib/vue.min.js') }}"></script>
|
2019-12-01 16:18:33 +01:00
|
|
|
{% endif %}
|
|
|
|
|
2019-06-15 12:01:13 +02:00
|
|
|
<script type="text/javascript" src="{{ url_for('static', filename='js/lib/axios.min.js') }}"></script>
|
|
|
|
|
|
|
|
<script type="text/javascript" src="{{ url_for('static', filename='js/api.js') }}"></script>
|
|
|
|
<script type="text/javascript" src="{{ url_for('static', filename='js/events.js') }}"></script>
|
|
|
|
<script type="text/javascript" src="{{ url_for('static', filename='js/notifications.js') }}"></script>
|
2019-12-08 16:25:03 +01:00
|
|
|
<script type="text/javascript" src="{{ url_for('static', filename='js/autocomplete.js') }}"></script>
|
2019-06-15 12:01:13 +02:00
|
|
|
|
|
|
|
{% for style in styles.values() %}
|
|
|
|
<link rel="stylesheet" href="{{ url_for('static', filename=style['_style_file']) }}">
|
|
|
|
{% endfor %}
|
|
|
|
|
2019-05-23 18:51:28 +02:00
|
|
|
{% include 'elements.html' %}
|
2019-12-08 16:25:03 +01:00
|
|
|
{% include 'plugins/execute/index.html' %}
|
2019-05-30 02:07:28 +02:00
|
|
|
|
|
|
|
{% for plugin, conf in templates.items() %}
|
|
|
|
{% with configuration=templates[plugin] %}
|
|
|
|
{% include conf['_template_file'] %}
|
|
|
|
{% endwith %}
|
|
|
|
{% endfor %}
|
|
|
|
|
2019-12-08 16:25:03 +01:00
|
|
|
<script type="text/javascript" src="{{ url_for('static', filename='js/plugins/execute/index.js') }}"></script>
|
2019-05-30 02:07:28 +02:00
|
|
|
{% for script in scripts.values() %}
|
|
|
|
<script type="text/javascript" src="{{ url_for('static', filename=script['_script_file']) }}"></script>
|
|
|
|
{% endfor %}
|
2018-01-29 13:47:21 +01:00
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
2019-05-23 18:51:28 +02:00
|
|
|
<div id="app">
|
|
|
|
{% with plugins=templates.keys() %}
|
|
|
|
{% include 'nav.html' %}
|
|
|
|
{% endwith %}
|
|
|
|
|
|
|
|
<main>
|
|
|
|
<div class="plugins-container">
|
2019-12-08 16:25:03 +01:00
|
|
|
<plugin tag="execute" key="execute" :class="{hidden: selectedPlugin != 'execute'}"
|
|
|
|
config="{{ utils.to_json(procedures) }}"></plugin>
|
|
|
|
|
2019-05-30 02:07:28 +02:00
|
|
|
<plugin v-for="(conf, plugin) in {{ utils.to_json(templates) }}"
|
2019-09-26 11:15:18 +02:00
|
|
|
:tag="plugin.replace(/\./g, '-')"
|
2019-05-30 02:07:28 +02:00
|
|
|
:key="plugin"
|
|
|
|
:config="conf"
|
2019-07-07 20:11:32 +02:00
|
|
|
:class="{hidden: plugin != selectedPlugin}">
|
|
|
|
</plugin>
|
2018-01-30 00:54:46 +01:00
|
|
|
</div>
|
2019-05-23 18:51:28 +02:00
|
|
|
</main>
|
2019-05-28 19:15:39 +02:00
|
|
|
|
|
|
|
{% include 'notifications.html' %}
|
2019-05-23 18:51:28 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
{% include 'plugins/template.html' %}
|
|
|
|
|
|
|
|
<script type="text/javascript" src="{{ url_for('static', filename='js/application.js') }}"></script>
|
2019-05-15 09:31:04 +02:00
|
|
|
</body>
|
2018-01-29 13:47:21 +01:00
|
|
|
|