parent
bd9a246fcf
commit
1240664303
@ -50,7 +50,7 @@ groups = admin_only
|
||||
| prefix | Yes | The prefix for the app's url. | web prefix, e.g. http:// or https:// |
|
||||
| url | Yes | The url for your app. | web url, e.g. myapp.com |
|
||||
| open_in | Yes | open the app in the current tab, an iframe or a new tab | iframe, new_tab, this_tab |
|
||||
| icon | No | Icon for the dashboard. | /static/images/icons/yourpicture.png, external link to image |
|
||||
| icon | Yes | Icon for the dashboard. | /static/images/icons/yourpicture.png, external link to image |
|
||||
| sidebar_icon | No | Icon for the sidenav. | /static/images/icons/yourpicture.png, external link to image |
|
||||
| description | No | A short description for the app. | string |
|
||||
| data_sources | No | Data sources to be included on the app's card.*Note: you must have a data source set up in the config above this application entry. | comma separated string |
|
||||
|
@ -64,13 +64,6 @@ class Platform:
|
||||
self.authentication = None
|
||||
|
||||
def process(self):
|
||||
if self.method.upper() == "GET":
|
||||
try:
|
||||
value = get(self.resource).json()
|
||||
except Exception as e:
|
||||
value = f"{e}"
|
||||
|
||||
elif self.method.upper() == "POST":
|
||||
if self.authentication:
|
||||
if self.authentication.lower() == "digest":
|
||||
auth = HTTPDigestAuth(self.username, self.password)
|
||||
@ -79,6 +72,13 @@ class Platform:
|
||||
else:
|
||||
auth = None
|
||||
|
||||
if self.method.upper() == "GET":
|
||||
try:
|
||||
value = get(self.resource, auth=auth).json()
|
||||
except Exception as e:
|
||||
value = f"{e}"
|
||||
|
||||
elif self.method.upper() == "POST":
|
||||
payload = json.loads(self.payload.replace("'", '"'))
|
||||
value = post(self.resource, data=payload, auth=auth)
|
||||
value_template = render_template_string(self.value_template, value=value)
|
||||
|
@ -87,7 +87,6 @@ def context_processor():
|
||||
|
||||
tags_form = TagsForm()
|
||||
tags_form.tags.choices += [(tag, tag) for tag in tags]
|
||||
print(tags_form.tags.choices)
|
||||
settings = Settings.query.first()
|
||||
if settings.background == "random":
|
||||
if len(os.listdir(backgrounds_images_folder)) < 1:
|
||||
|
@ -36,6 +36,10 @@
|
||||
overflow-y: scroll !important;
|
||||
overflow-x: hidden !important;
|
||||
}
|
||||
.scrollbar-x {
|
||||
overflow-y: scroll !important;
|
||||
overflow-x: scroll !important;
|
||||
}
|
||||
|
||||
/* ELEMENT STLYES */
|
||||
body {
|
||||
|
@ -32,6 +32,7 @@ $( document ).ready(function() {
|
||||
$(".data-source-container").each(function(e) {
|
||||
var el = $(this);
|
||||
$.ajax({
|
||||
async: true,
|
||||
url: el.attr('data-url'),
|
||||
type: 'GET',
|
||||
data: {id: el.attr('data-id')},
|
||||
@ -52,4 +53,5 @@ $( document ).ready(function() {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
@ -39,7 +39,7 @@
|
||||
<h5 class="app-name-{{ app.id }}">{{ app.name }}
|
||||
</h5>
|
||||
{% if app.description %}
|
||||
<span class="theme-secondary-text">{{ app.description }}</span>
|
||||
<span class="theme-secondary-text app-description">{{ app.description }}</span>
|
||||
{% else %}
|
||||
<style>
|
||||
.app-name-{{ app.id }} {
|
||||
|
@ -59,7 +59,7 @@
|
||||
|
||||
<div class="col s12 m12 l6">
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<div class="card-content pr-2">
|
||||
|
||||
<div class="row">
|
||||
<div class="col s12 mb-2">
|
||||
@ -101,14 +101,14 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col s12 scrollbar settings-page-card-right">
|
||||
<div class="col s12 scrollbar">
|
||||
<div id="template-div" class="selectable code"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="config-readme" class="col s12 scrollbar settings-page-card-right">
|
||||
<div id="config-readme" class="col s12 scrollbar settings-page-card-right scrollbar-x">
|
||||
{{ config_readme|safe }}
|
||||
</div>
|
||||
|
||||
|
@ -1 +1 @@
|
||||
version = "v0.41"
|
||||
version = "v0.42"
|
||||
|
Loading…
x
Reference in New Issue
Block a user