Allow updates for the development environment
This commit is contained in:
parent
bccc4c9fa2
commit
d6cbc6a55b
|
|
@ -1 +1 @@
|
|||
1.0.0
|
||||
1.0.1
|
||||
|
|
|
|||
|
|
@ -165,10 +165,21 @@ def getPluginVersion(loc):
|
|||
c += 1
|
||||
return float(_version)
|
||||
|
||||
def getVersion():
|
||||
f = open('VERSION.md', 'r')
|
||||
version = f.read().rstrip()
|
||||
f.close()
|
||||
return version
|
||||
|
||||
def performUpgrade():
|
||||
git.cmd.Git('.').pull("https://github.com/wez3/domoboard.git")
|
||||
return "Upgrade completed."
|
||||
|
||||
def getCurrentBranch():
|
||||
repo = git.Repo('.')
|
||||
branch = repo.active_branch
|
||||
return branch.name
|
||||
|
||||
def indexPlugins(params={}):
|
||||
tmpFolder = 'static/tmp'
|
||||
indexFolderPath = 'static/tmp/pluginsIndex/'
|
||||
|
|
|
|||
|
|
@ -46,7 +46,8 @@ def generatePage():
|
|||
configValues = configValues,
|
||||
blockArray = blockArray,
|
||||
_csrf_token = session['_csrf_token'],
|
||||
version = getVersion(),
|
||||
version = api.getVersion(),
|
||||
branch = api.getCurrentBranch(),
|
||||
debug = app.debug)
|
||||
else:
|
||||
abort(404)
|
||||
|
|
@ -131,12 +132,6 @@ def appendDefaultPages(config):
|
|||
config['log'] = {'display_components': {'components': 'serverlog'}}
|
||||
return config
|
||||
|
||||
def getVersion():
|
||||
f = open('VERSION.md', 'r')
|
||||
version = f.read().rstrip()
|
||||
f.close()
|
||||
return version
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("-c", "--config", dest="configfile",
|
||||
|
|
|
|||
|
|
@ -16,11 +16,11 @@
|
|||
$(document).ready(function() {
|
||||
var interval = setInterval(function() {
|
||||
var momentNow = moment();
|
||||
|
||||
|
||||
$('#date-part').html(momentNow.locale(local_language).format('dddd D MMMM YYYY'));
|
||||
|
||||
$('#time-part').html(momentNow.format('HH:mm'));
|
||||
|
||||
|
||||
$('#time-part').html(momentNow.format('HH:mm'));
|
||||
|
||||
}, 100);
|
||||
{% if configValues["domoboard"].get("date") == "True" %}
|
||||
$('#date-part').removeClass('hide_date');
|
||||
|
|
@ -45,7 +45,7 @@
|
|||
{% endif %}
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
setInterval(checkVersion, 43200000);
|
||||
setInterval(checkVersion, 43200000, branch);
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@
|
|||
var googleMapEmbedKey = "{{ configValues["domoboard"].get("google_maps_api_key") }}"
|
||||
var local_language = "{{ configValues["domoboard"].get("language") }}"
|
||||
var version = "{{ version }}";
|
||||
var branch = "{{ branch }}";
|
||||
</script>
|
||||
<script type="text/javascript" src="/static/js/domoboard.js"></script>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue