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