some new automations
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<div class='hacs-overview-container minigrid'>
|
||||
|
||||
<form action="/hacsapi/{{ hacs.token }}/repositories_reload" name="reload" method="post" accept-charset="utf-8"
|
||||
enctype="application/x-www-form-urlencoded" class="hacs-form">
|
||||
<a class="waves-effect waves-light btn modal-trigger hacsbutton" href="#"
|
||||
onclick="toggleLoading();document.getElementsByName('reload')[0].submit()">
|
||||
RELOAD DATA
|
||||
</a>
|
||||
</form>
|
||||
|
||||
<a href="#modal_upgrade_all" class="waves-effect waves-light btn modal-trigger hacsbutton"
|
||||
style="background-color: var(--google-red-500) !important; font-weight: bold;">
|
||||
UPGRADE ALL
|
||||
</a>
|
||||
|
||||
<a href='https://github.com/hacs/integration' rel='noreferrer' class='waves-effect waves-light btn hacsbutton'
|
||||
target="_blank">
|
||||
HACS REPO
|
||||
</a>
|
||||
|
||||
<a href='https://github.com/hacs/integration/issues' rel='noreferrer'
|
||||
class='waves-effect waves-light btn hacsbutton' target="_blank">
|
||||
OPEN ISSUE
|
||||
</a>
|
||||
|
||||
</div>
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
<div class='hacs-overview-container'>
|
||||
<div class="row">
|
||||
<ul class="collection with-header hacslist">
|
||||
<li class="collection-header hacscolor hacslist">
|
||||
<h5>CUSTOM REPOSITORIES</h5>
|
||||
</li>
|
||||
{% if hacs.system.status.background_task %}
|
||||
<li class="collection-item hacscolor hacslist">
|
||||
Loading custom repositories...
|
||||
</li>
|
||||
{% else %}
|
||||
{% for repository in hacs.sorted_by_repository_name %}
|
||||
{% if repository.custom %}
|
||||
<li class="collection-item hacscolor hacslist">
|
||||
<div>
|
||||
<a href="/hacsweb/{{ hacs.token }}/repository/{{repository.information.uid}}">
|
||||
<span class="hacs-badge">
|
||||
{{repository.information.category | upper}}
|
||||
</span>
|
||||
{{repository.information.full_name }}
|
||||
</a>
|
||||
{% if repository.status.installed %}
|
||||
<i title="Remove is not possible when installed."
|
||||
class="secondary-content fas fa-trash-alt disabledaction"></i>
|
||||
{% else %}
|
||||
<form action="/hacsapi/{{ hacs.token }}/repository_remove" name="remove" method="post" accept-charset="utf-8"
|
||||
enctype="application/x-www-form-urlencoded" class="hacs-form">
|
||||
<input type="hidden" name="repository_id" value="{{repository.information.uid}}">
|
||||
<a class="secondary-content" href="#"
|
||||
onclick="toggleLoading();document.getElementsByName('remove')[0].submit()"
|
||||
style=" color: var(--primary-color)">
|
||||
<i title="Remove." class="fas fa-trash-alt"></i>
|
||||
</a>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
{% if not hacs.system.status.background_task %}
|
||||
<form class="minigrid" action="/hacsapi/{{ hacs.token }}/repository_register" method="post" accept-charset="utf-8"
|
||||
enctype="application/x-www-form-urlencoded">
|
||||
<input class="custom_repository" id="custom_url" type="text" name="custom_url"
|
||||
placeholder=" ADD CUSTOM REPOSITORY" style="width: 70%; color: var(--primary-text-color)">
|
||||
<select name="repository_type" class="hacs-select custom_repository">
|
||||
<option disabled selected value>Category</option>
|
||||
{% for element_type in hacs.common.categories | sort %}
|
||||
<option class='hacscolor' value='{{element_type}}'>{{element_type | title}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
||||
<button class="btn waves-effect waves-light right" type="submit" name="add" onclick="toggleLoading()"
|
||||
style="background-color: var(--primary-color); height: 44px;">
|
||||
<i class="fas fa-save"></i>
|
||||
</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<div class='hacs-overview-container'>
|
||||
<div class="hacs-card-standalone">
|
||||
<form style="display: contents" action="/hacsapi/{{ hacs.token }}/remove_new_flag" method="post" accept-charset="utf-8" enctype="application/x-www-form-urlencoded">
|
||||
<button class="waves-effect waves-light btn hacsadminbutton" type="submit" onclick="toggleLoading()">
|
||||
REMOVE FLAGS
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
{% for repository in hacs.store.frontend|sort(attribute='name') %}
|
||||
<form style="display: contents" action="/hacsapi/{{ hacs.token }}/devrepository" method="post" accept-charset="utf-8" enctype="application/x-www-form-urlencoded">
|
||||
<input type="hidden" name="repository" value="{{repository.information.uid}}">
|
||||
<button class="waves-effect waves-light btn hacsadminbutton" type="submit" onclick="toggleLoading()">
|
||||
{{ repository.name }}
|
||||
</button>
|
||||
</form>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<div class='hacs-overview-container'>
|
||||
<div class="hacs-card-standalone">
|
||||
<form style="display: contents" action="/hacsapi/{{ hacs.token }}/set_ha_version_action" method="post" accept-charset="utf-8" enctype="application/x-www-form-urlencoded">
|
||||
<input class="hacscolor" type="text" name="ha_version" value="{{hacs.store.ha_version}}">
|
||||
<button class="waves-effect waves-light btn hacsadminbutton" type="submit" onclick="toggleLoading()">
|
||||
SET
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<div class='hacs-overview-container'>
|
||||
<div class="hacs-card-standalone">
|
||||
<form style="display: contents" action="/hacsapi/{{ hacs.token }}/dev_template" method="post" accept-charset="utf-8" enctype="application/x-www-form-urlencoded">
|
||||
<input class="hacscolor" type="text" name="repository_id" value="{{ hacs.dev_template_id }}">
|
||||
<textarea class="hacscolor" name="template" style="width:100%;height:250px;"></textarea></br>
|
||||
<button name="set" class="waves-effect waves-light btn hacsadminbutton" type="submit" onclick="toggleLoading()">
|
||||
TEST
|
||||
</button>
|
||||
<button name="clear" class="waves-effect waves-light btn hacsadminbutton" type="submit" onclick="toggleLoading()">
|
||||
CLEAR
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if hacs.dev_template %}
|
||||
<div class='hacs-overview-container'>
|
||||
<div class="hacs-card-standalone">
|
||||
{{ hacs.dev_template }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,8 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<div class='hacs-overview-container'>
|
||||
<div class="hacs-card-standalone">
|
||||
<label>{{hacs.token}}</label>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,19 @@
|
||||
<div class="hacs-overview-container hacs-color minigrid" style="margin-top: 30px;">
|
||||
<div class="hacs-card-standalone">
|
||||
<h5 style="margin-left: 5px;">DEVELOPER TOOLS</h5>
|
||||
{% for button in [
|
||||
"remove_new_flag",
|
||||
"repositories",
|
||||
"set_ha_version",
|
||||
"token",
|
||||
"template_test"
|
||||
] %}
|
||||
<form style="display: contents" action="/hacsapi/{{ hacs.token }}/devview" method="post" accept-charset="utf-8" enctype="application/x-www-form-urlencoded">
|
||||
<input type="hidden" name="view" value="{{button}}">
|
||||
<button class="waves-effect waves-light btn hacsadminbutton" type="submit" onclick="toggleLoading()">
|
||||
{{ button.replace("_"," ")}}
|
||||
</button>
|
||||
</form>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,38 @@
|
||||
{% if hacs.get_by_id("172733314").pending_restart %}
|
||||
{% set pending_restart = " <b>(RESTART PENDING!)</b>" %}
|
||||
{% else %}
|
||||
{% set pending_restart = "" %}
|
||||
{% endif %}
|
||||
|
||||
<div class='hacs-overview-container'>
|
||||
<div class="hacs-card-standalone">
|
||||
<h5>HACS (Home Assistant Community Store)</h5>
|
||||
<table class="hacs-table">
|
||||
<tr class="hacs-table-row repository">
|
||||
<td class="repository">
|
||||
<b>Version:</b>
|
||||
</td>
|
||||
<td class="repository text">
|
||||
{{hacs.version}}{{pending_restart}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="hacs-table-row repository">
|
||||
<td class="repository">
|
||||
<b>Display:</b>
|
||||
</td>
|
||||
<td class="repository">
|
||||
<form action="/hacsapi/{{ hacs.token }}/frontend_mode" name="overview_display" method="post"
|
||||
accept-charset="utf-8" enctype="application/x-www-form-urlencoded" class="hacs-form">
|
||||
<select name="view_type" class="hacs-select repository"
|
||||
onchange="toggleLoading();document.getElementsByName('overview_display')[0].submit()">
|
||||
{% for displayoption in ["Grid", "Table"] %}
|
||||
<option {{"selected" if hacs.configuration.frontend_mode == displayoption else ""}} class="hacscolor"
|
||||
value="{{displayoption}}">{{displayoption}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
{% set repositories = namespace(hidden=False) %}
|
||||
{% for repository in hacs.repositories_list_repo %}
|
||||
{% if repository.hide %}
|
||||
{% set repositories.hidden = True %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if repositories.hidden %}
|
||||
<div class='hacs-overview-container'>
|
||||
<div class="row">
|
||||
<ul class="collection with-header hacslist">
|
||||
<li class="collection-header hacscolor hacslist">
|
||||
<h5>HIDDEN REPOSITORIES</h5>
|
||||
</li>
|
||||
{% if hacs.system.status.background_task %}
|
||||
<li class="collection-item hacscolor hacslist">
|
||||
Loading hidden repositories...
|
||||
</li>
|
||||
{% else %}
|
||||
{% for repository in hacs.repositories_list_repo %}
|
||||
{% if repository.hide %}
|
||||
<li class="collection-item hacscolor hacslist">
|
||||
<div>
|
||||
<form action="/hacsapi/{{ hacs.token }}/repository_unhide" name="remove" method="post" accept-charset="utf-8"
|
||||
enctype="application/x-www-form-urlencoded" class="hacs-form">
|
||||
<input type="hidden" name="repository_id" value="{{repository.information.uid}}">
|
||||
<a href="#" onclick="toggleLoading();document.getElementsByName('remove')[0].submit()"
|
||||
style=" color: var(--primary-color)">
|
||||
<i title="Unhide" class="fas fa-plus-circle" style="padding-right: 8px"></i>
|
||||
</a>
|
||||
{{repository.repository_name}}
|
||||
<span class="hacs-badge">{{repository.repository_type}}</span>
|
||||
</form>
|
||||
</div>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user