Fix release channel selector

This commit is contained in:
Gina Häußge 2016-08-25 13:32:18 +02:00
parent b5bc03e711
commit f8386649bf
2 changed files with 9 additions and 7 deletions

View file

@ -154,8 +154,8 @@ class SoftwareUpdatePlugin(octoprint.plugin.BlueprintPlugin,
"octoprint_stable_branch": dict(branch="master", name="Stable"),
"octoprint_prerelease_branches": [
dict(branch="rc/maintenance", name="Maintenance"),
dict(branch="rc/devel", name="Devel")
dict(branch="rc/maintenance", name="Maintenance RCs"),
dict(branch="rc/devel", name="Development RCs")
],
"cache_ttl": 24 * 60,

View file

@ -112,16 +112,18 @@ $(function() {
};
self._copyConfig = function() {
var availableReleaseChannels = [];
_.each(self.settings.settings.plugins.softwareupdate.octoprint_branch_mappings(), function(mapping) {
availableReleaseChannels.push({"key": mapping.branch(), "name": gettext(mapping.name() || mapping.branch())});
});
self.config_availableReleaseChannels(availableReleaseChannels);
self.config_cacheTtl(self.settings.settings.plugins.softwareupdate.cache_ttl());
self.config_checkoutFolder(self.settings.settings.plugins.softwareupdate.octoprint_checkout_folder());
self.config_checkType(self.settings.settings.plugins.softwareupdate.octoprint_type());
self.config_releaseChannel(self.settings.settings.plugins.softwareupdate.octoprint_release_channel());
var availableReleaseChannels = [];
_.each(self.settings.settings.plugins.softwareupdate.octoprint_branch_mappings(), function(mapping) {
availableReleaseChannels.push({"key": mapping.branch, "name": gettext(mapping.name || mapping.branch)});
});
self.config_availableReleaseChannels(availableReleaseChannels);
log.info("releaseChannel:", self.config_releaseChannel(), ", availableReleaseChannels:", availableReleaseChannels);
};
self.fromCheckResponse = function(data, ignoreSeen, showIfNothingNew) {