Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
98b5208adb | |||
0224a1cd0a | |||
563edb4f5d |
15
Makefile
15
Makefile
@ -1,10 +1,14 @@
|
|||||||
build :
|
VERSION =1.1
|
||||||
|
BUILD_NUMBER_FILE = build-number.txt
|
||||||
|
BUILD_NUMBER = $$(cat $(BUILD_NUMBER_FILE))
|
||||||
|
|
||||||
|
build : increment-build-number
|
||||||
mkdir -p build/css
|
mkdir -p build/css
|
||||||
cp src/www/*.* build
|
cp src/www/*.* build
|
||||||
cp -r src/www/js build
|
cp -r src/www/js build
|
||||||
cp -r resources/* build/.
|
cp -r resources/* build/.
|
||||||
sass src/www/css/personal-display.scss build/css/personal-display.css
|
sass src/www/css/personal-display.scss build/css/personal-display.css
|
||||||
tar czf personal-display.tar.gz build
|
tar czf personal-display-$(VERSION).$(BUILD_NUMBER).tar.gz build
|
||||||
|
|
||||||
clean :
|
clean :
|
||||||
rm -r build
|
rm -r build
|
||||||
@ -12,3 +16,10 @@ clean :
|
|||||||
local-deploy: build
|
local-deploy: build
|
||||||
cp -r build ~/temp/server
|
cp -r build ~/temp/server
|
||||||
ssh jdb-server 'rm -r ~/public_html/personal-display; mv temp/build ~/public_html/personal-display'
|
ssh jdb-server 'rm -r ~/public_html/personal-display; mv temp/build ~/public_html/personal-display'
|
||||||
|
|
||||||
|
increment-build-number:
|
||||||
|
if ! test -f $(BUILD_NUMBER_FILE); then echo 0 > $(BUILD_NUMBER_FILE); fi
|
||||||
|
echo $$(($$(cat $(BUILD_NUMBER_FILE)) + 1)) > $(BUILD_NUMBER_FILE)
|
||||||
|
|
||||||
|
test-build-number:
|
||||||
|
touch $(BUILD_NUMBER).text.txt
|
||||||
|
1
build-number.txt
Normal file
1
build-number.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
0
|
@ -30,6 +30,12 @@
|
|||||||
<section id=priorities>
|
<section id=priorities>
|
||||||
<h3>Next Actions (unsorted)</h3>
|
<h3>Next Actions (unsorted)</h3>
|
||||||
</section>
|
</section>
|
||||||
|
<section id=main-buttons>
|
||||||
|
<ul>
|
||||||
|
<li><a href="#" class=pause-continue>Pause Monitoring</a></li>
|
||||||
|
<li><a href="#" class=refresh>Refresh Now</a></li>
|
||||||
|
</ul>
|
||||||
|
</section>
|
||||||
<section id=config-dialog>
|
<section id=config-dialog>
|
||||||
<form>
|
<form>
|
||||||
<h3>Configuration</h3>
|
<h3>Configuration</h3>
|
||||||
@ -63,7 +69,7 @@
|
|||||||
<div class=button-panel>
|
<div class=button-panel>
|
||||||
<div class=global-config>
|
<div class=global-config>
|
||||||
<label>Refresh (sec): </label>
|
<label>Refresh (sec): </label>
|
||||||
<input type=text class=refresh></div>
|
<input type=text class=refresh-period></div>
|
||||||
<div class=save-button><a href="#">Save and Close</a></div>
|
<div class=save-button><a href="#">Save and Close</a></div>
|
||||||
</div>
|
</div>
|
||||||
<div class=wait-overlay><img src="img/loading-spinner.gif"><br><span></span></div>
|
<div class=wait-overlay><img src="img/loading-spinner.gif"><br><span></span></div>
|
||||||
|
@ -146,7 +146,7 @@
|
|||||||
$(".category-name").parent().remove();
|
$(".category-name").parent().remove();
|
||||||
_.forEach(PD.gtdCfg.categories, this.makeCategoryItem); }
|
_.forEach(PD.gtdCfg.categories, this.makeCategoryItem); }
|
||||||
|
|
||||||
this.$el.find('.refresh').val(
|
this.$el.find('.refresh-period').val(
|
||||||
PD.refreshPeriod ? PD.refreshPeriod / 1000 : 15);
|
PD.refreshPeriod ? PD.refreshPeriod / 1000 : 15);
|
||||||
|
|
||||||
this.$el.fadeIn(); },
|
this.$el.fadeIn(); },
|
||||||
@ -322,7 +322,7 @@
|
|||||||
function(span) { return $(span).text(); });
|
function(span) { return $(span).text(); });
|
||||||
|
|
||||||
// Save global data
|
// Save global data
|
||||||
PD.refreshPeriod = parseInt(this.$el.find(".refresh").val()) * 1000;
|
PD.refreshPeriod = parseInt(this.$el.find(".refresh-period").val()) * 1000;
|
||||||
|
|
||||||
if (PD.hasHTML5LocalStorage()) {
|
if (PD.hasHTML5LocalStorage()) {
|
||||||
localStorage.setItem("tsCfg", JSON.stringify(PD.tsCfg));
|
localStorage.setItem("tsCfg", JSON.stringify(PD.tsCfg));
|
||||||
@ -337,9 +337,13 @@
|
|||||||
PD.Main = Backbone.View.extend({
|
PD.Main = Backbone.View.extend({
|
||||||
el: $("body"),
|
el: $("body"),
|
||||||
|
|
||||||
|
events: {
|
||||||
|
"click a.refresh" : "refresh"
|
||||||
|
"click a.pause-continue" : "toggleSync" },
|
||||||
|
|
||||||
initialize: function() {
|
initialize: function() {
|
||||||
|
|
||||||
_.bindAll(this, "refresh");
|
_.bindAll(this, "refresh", "toggleSync");
|
||||||
|
|
||||||
// Create our config dialog view.
|
// Create our config dialog view.
|
||||||
PD.configDialog = new PD.ConfigDialog();
|
PD.configDialog = new PD.ConfigDialog();
|
||||||
@ -366,7 +370,7 @@
|
|||||||
this.refresh();
|
this.refresh();
|
||||||
|
|
||||||
// Schedule future refreshes.
|
// Schedule future refreshes.
|
||||||
setInterval(this.refresh, PD.refreshPeriod ? PD.refreshPeriod : 15000);
|
PD.refreshIntervalId = setInterval(this.refresh, PD.refreshPeriod ? PD.refreshPeriod : 15000);
|
||||||
},
|
},
|
||||||
|
|
||||||
refresh: function() {
|
refresh: function() {
|
||||||
@ -492,7 +496,17 @@
|
|||||||
collection.remove(model); }});
|
collection.remove(model); }});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
|
|
||||||
|
toggleSync: function() {
|
||||||
|
if (PD.refreshIntervalId == null) {
|
||||||
|
PD.refreshIntervalId = setInterval(this.refresh,
|
||||||
|
PD.refreshPeriod ? PD.refreshPeriod : 15000);
|
||||||
|
$('.pause-continue').text('Pause Monitoring'); }
|
||||||
|
else {
|
||||||
|
clearInterval(PD.refreshIntervalId);
|
||||||
|
PD.refreshIntervalId = null;
|
||||||
|
$('.pause-continue').text('Resume Monitoring'); } }
|
||||||
});
|
});
|
||||||
|
|
||||||
PD.main = new PD.Main();
|
PD.main = new PD.Main();
|
||||||
|
Reference in New Issue
Block a user