Animated progress bar, refresh fix.

This commit is contained in:
Robin Ward 2014-05-07 13:51:18 -04:00
parent 899f64874a
commit 6a22a873dd
4 changed files with 15 additions and 6 deletions

View File

@ -19,7 +19,11 @@ define("docker-manager/components/progress-bar",
function(__exports__) {
"use strict";
__exports__["default"] = Em.Component.extend({
classNameBindings: [':progress'],
classNameBindings: [':progress', ':progress-striped', 'active'],
active: function() {
return parseInt(this.get('percent'), 10) !== 100;
}.property('percent'),
barStyle: function() {
var percent = parseInt(this.get('percent'), 10);
@ -295,8 +299,8 @@ define("docker-manager/models/repo",
var Repo = Em.Object.extend({
upToDate: function() {
return this.get('version') === this.get('latest.version');
}.property('version', 'latest.version'),
return !this.get('upgrading') & (this.get('version') === this.get('latest.version'));
}.property('upgrading', 'version', 'latest.version'),
shouldCheck: function() {
if (Em.isNone(this.get('version'))) { return false; }

View File

@ -15,6 +15,7 @@ class DockerManager::Upgrader
def upgrade
return unless @repo.start_upgrading
percent(0)
clear_logs
# HEAD@{upstream} is just a fancy way how to say origin/master (in normal case)

View File

@ -1,5 +1,9 @@
export default Em.Component.extend({
classNameBindings: [':progress'],
classNameBindings: [':progress', ':progress-striped', 'active'],
active: function() {
return parseInt(this.get('percent'), 10) !== 100;
}.property('percent'),
barStyle: function() {
var percent = parseInt(this.get('percent'), 10);

View File

@ -5,8 +5,8 @@ var loaded = [];
var Repo = Em.Object.extend({
upToDate: function() {
return this.get('version') === this.get('latest.version');
}.property('version', 'latest.version'),
return !this.get('upgrading') & (this.get('version') === this.get('latest.version'));
}.property('upgrading', 'version', 'latest.version'),
shouldCheck: function() {
if (Em.isNone(this.get('version'))) { return false; }