diff --git a/Gemfile.lock b/Gemfile.lock index 5055ddda..5c8eae9f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -43,7 +43,7 @@ GIT GIT remote: git://github.com/travis-ci/travis-api.git - revision: 8abc3309372e8a9c4e3506cbf45362c49e91b24d + revision: 2b290b9571db627cd796b4d11d5c6153b8d649c1 specs: travis-api (0.0.1) backports (~> 2.5) @@ -61,7 +61,7 @@ GIT GIT remote: git://github.com/travis-ci/travis-core.git - revision: 94dbbf2fea57b56383e26152ae3a4cece02d2df0 + revision: 05ea6a6696b3be32839afcaa126afaf3f2522536 branch: sf-travis-api specs: travis-core (0.0.1) diff --git a/assets/images/ui/close.png b/assets/images/ui/close.png new file mode 100644 index 00000000..40d1f626 Binary files /dev/null and b/assets/images/ui/close.png differ diff --git a/assets/scripts/app/models/build.coffee b/assets/scripts/app/models/build.coffee index 07d601e0..2500cae7 100644 --- a/assets/scripts/app/models/build.coffee +++ b/assets/scripts/app/models/build.coffee @@ -1,6 +1,6 @@ require 'travis/model' -@Travis.Build = Travis.Model.extend Travis.DurationCalculations, +@Travis.Build = Travis.Model.extend Travis.DurationCalculations, Travis.Ajax, eventType: DS.attr('string') repoId: DS.attr('number') commitId: DS.attr('number') @@ -26,6 +26,10 @@ require 'travis/model' @get('data.job_ids.length') > 1 ).property('data.job_ids.length') + isFinished: (-> + @get('state') == 'finished' + ).property('state') + requiredJobs: (-> @get('jobs').filter (data) -> !data.get('allowFailure') ).property('jobs.@each.allowFailure') @@ -41,6 +45,10 @@ require 'travis/model' $.map(headers.concat(keys), (key) -> return $.camelize(key)) ).property('config') + requeue: (-> + @post '/requests', build_id: @get('id') + ) + @Travis.Build.reopenClass byRepoId: (id, parameters) -> @find($.extend(parameters || {}, repository_id: id)) diff --git a/assets/scripts/app/models/user.coffee b/assets/scripts/app/models/user.coffee index 62f1aa4d..5e453fd0 100644 --- a/assets/scripts/app/models/user.coffee +++ b/assets/scripts/app/models/user.coffee @@ -27,7 +27,7 @@ require 'travis/model' permissions: (-> unless @permissions @permissions = Ember.ArrayProxy.create() - @ajax '/users/permissions', 'get', success: (data) => @permissions.set('content', data).permissions + @ajax '/users/permissions', 'get', success: (data) => @permissions.set('content', data.permissions) @permissions ).property() diff --git a/assets/scripts/app/templates/jobs/list.hbs b/assets/scripts/app/templates/jobs/list.hbs index 43f3a751..c0be30be 100644 --- a/assets/scripts/app/templates/jobs/list.hbs +++ b/assets/scripts/app/templates/jobs/list.hbs @@ -43,6 +43,7 @@ {{#unless view.required}}
Allowed Failures are items in your build matrix that are allowed to diff --git a/assets/scripts/app/templates/repos/show/tools.hbs b/assets/scripts/app/templates/repos/show/tools.hbs index db0ba4b4..36aaedf2 100644 --- a/assets/scripts/app/templates/repos/show/tools.hbs +++ b/assets/scripts/app/templates/repos/show/tools.hbs @@ -1,29 +1,41 @@
- - {{#if view.branches.isLoaded}} - {{view Ember.Select contentBinding="view.branches" selectionBinding="view.branch" optionLabelPath="content.commit.branch" optionValuePath="content.commit.branch"}} - {{else}} - - {{/if}} -
-- - -
-- - -
-- - -
-- - -
-+ + {{#if view.branches.isLoaded}} + {{view Ember.Select contentBinding="view.branches" selectionBinding="view.branch" optionLabelPath="content.commit.branch" optionValuePath="content.commit.branch"}} + {{else}} + + {{/if}} +
++ + +
++ + +
++ + +
++ + +
%@%@
\\n'.fmt(path, path, number, number, line);\n });\n return result.trim();\n },\n deansi: function(log) {\n var ansi, text;\n log = log.replace(/\\r\\r/g, '\\r').replace(/\\033\\[K\\r/g, '\\r').replace(/^.*\\r(?!$)/gm, '').replace(/\u001b\\[2K/g, '').replace(/\\033\\(B/g, \"\");\n ansi = ansiparse(log);\n text = '';\n ansi.forEach(function(part) {\n var classes;\n classes = [];\n part.foreground && classes.push(part.foreground);\n part.background && classes.push('bg-' + part.background);\n part.bold && classes.push('bold');\n part.italic && classes.push('italic');\n return text += (classes.length ? '' + part.text + '' : part.text);\n });\n return text.replace(/\\033/g, '');\n },\n fold: function(log) {\n log = this.unfold(log);\n $.each(Travis.Log.FOLDS, function(name, pattern) {\n return log = log.replace(pattern, function() {\n return '\\n Trying to authenticate with GitHub.\\n
\\n{{else}}\\n\\n Sign in with GitHub\\n
\\n{{/if}}\\n\\n\\n\");\n\nEmber.TEMPLATES['builds/list'] = Ember.Handlebars.compile(\"{{#if builds.isLoaded}}\\n{{t builds.name}} | \\n{{t builds.commit}} | \\n{{t builds.message}} | \\n{{t builds.duration}} | \\n{{t builds.finished_at}} | \\n\\n \\n {{#if id}}\\n \\n {{number}}\\n \\n {{/if}}\\n | \\n\\n \\n {{formatCommit commit}}\\n \\n | \\n \\n\\n {{formatDuration duration}}\\n | \\n\\n {{formatTime finishedAt}}\\n | \\n {{/view}}\\n {{/each}}\\n \\n
---|
\\n {{view view.ShowMoreButton}}\\n
\\n{{else}}\\n{{key}} | \\n {{/each}}\\n\\n \\n {{#if job.id}}\\n {{number}}\\n {{/if}}\\n | \\n\\n {{formatDuration duration}}\\n | \\n\\n {{formatTime finishedAt}}\\n | \\n {{#each value in configValues}}\\n{{value}} | \\n {{/each}}\\n {{/view}}\\n {{/each}}\\n \\n
---|
\\n Allowed Failures are items in your build matrix that are allowed to\\n fail without causing the entire build to be shown as failed.\\n
\\n\\n You can define allowed failures in the build matrix as follows:\\n
\\nmatrix:\\n allow_failures:\\n - rvm: ruby-head\\n
\\n This lets you add in experimental and preparatory builds to test against versions or\\n configurations that you are not ready to officially support.\\n
\\n\\n \\n \\n {{{formatLog log.body}}}\\n\\n {{#if sponsor.name}}\\n
\\n {{t builds.messages.sponsored_by}}\\n {{sponsor.name}}\\n
\\n {{/if}}\\n\\n To top\\n{{else}}\\n\\n Please read our guide.\\n It will only take a few minutes :)\\n
\\n\\n You can find detailled docs on our about site.\\n
\\n\\n If you need help please don't hesitate to join\\n #travis on irc.freenode.net\\n or our mailinglist.\\n
\\n\\n Repositories:\\n {{view.content.reposCount}}\\n
\\n {{/collection}}\\n\\n {{{t profiles.show.message.your_repos}}}\\n
\\n\\n{{#if hooks.isLoaded}}\\n {{#if user.isSyncing}}\\n \\n {{else}}\\n \\n\\n{{hook.description}}
\\n\\n \\n\\n {{t repositories.duration}}:\\n {{formatDuration lastBuildDuration}},\\n {{t repositories.finished_at}}:\\n {{formatTime lastBuildFinishedAt}}\\n
\\n\\n{{description}}
\\n{{description}}
\\n\\n\\n \\n {{#if view.branches.isLoaded}}\\n {{view Ember.Select contentBinding=\\\"view.branches\\\" selectionBinding=\\\"view.branch\\\" optionLabelPath=\\\"content.commit.branch\\\" optionValuePath=\\\"content.commit.branch\\\"}}\\n {{else}}\\n \\n {{/if}}\\n
\\n\\n \\n \\n
\\n\\n \\n \\n
\\n\\n \\n \\n
\\n\\n \\n \\n
\\n\\n \\n {{{t layouts.application.sponsors_link}}}\\n \\n
\\n\");\n\nEmber.TEMPLATES['sponsors/links'] = Ember.Handlebars.compile(\"%@%@
\\n'.fmt(path, path, number, number, line);\n });\n return result.trim();\n },\n deansi: function(log) {\n var ansi, text;\n log = log.replace(/\\r\\r/g, '\\r').replace(/\\033\\[K\\r/g, '\\r').replace(/^.*\\r(?!$)/gm, '').replace(/\u001b\\[2K/g, '').replace(/\\033\\(B/g, \"\");\n ansi = ansiparse(log);\n text = '';\n ansi.forEach(function(part) {\n var classes;\n classes = [];\n part.foreground && classes.push(part.foreground);\n part.background && classes.push('bg-' + part.background);\n part.bold && classes.push('bold');\n part.italic && classes.push('italic');\n return text += (classes.length ? '' + part.text + '' : part.text);\n });\n return text.replace(/\\033/g, '');\n },\n fold: function(log) {\n log = this.unfold(log);\n $.each(Travis.Log.FOLDS, function(name, pattern) {\n return log = log.replace(pattern, function() {\n return '\\n Trying to authenticate with GitHub.\\n
\\n{{else}}\\n\\n Sign in with GitHub\\n
\\n{{/if}}\\n\\n\\n\");\n\nEmber.TEMPLATES['builds/list'] = Ember.Handlebars.compile(\"{{#if builds.isLoaded}}\\n{{t builds.name}} | \\n{{t builds.commit}} | \\n{{t builds.message}} | \\n{{t builds.duration}} | \\n{{t builds.finished_at}} | \\n\\n \\n {{#if id}}\\n \\n {{number}}\\n \\n {{/if}}\\n | \\n\\n \\n {{formatCommit commit}}\\n \\n | \\n \\n\\n {{formatDuration duration}}\\n | \\n\\n {{formatTime finishedAt}}\\n | \\n {{/view}}\\n {{/each}}\\n \\n
---|
\\n {{view view.ShowMoreButton}}\\n
\\n{{else}}\\n{{key}} | \\n {{/each}}\\n\\n \\n {{#if job.id}}\\n {{number}}\\n {{/if}}\\n | \\n\\n {{formatDuration duration}}\\n | \\n\\n {{formatTime finishedAt}}\\n | \\n {{#each value in configValues}}\\n{{value}} | \\n {{/each}}\\n {{/view}}\\n {{/each}}\\n \\n
---|
\\n Allowed Failures are items in your build matrix that are allowed to\\n fail without causing the entire build to be shown as failed.\\n
\\n\\n You can define allowed failures in the build matrix as follows:\\n
\\nmatrix:\\n allow_failures:\\n - rvm: ruby-head\\n
\\n This lets you add in experimental and preparatory builds to test against versions or\\n configurations that you are not ready to officially support.\\n
\\n\\n \\n \\n {{{formatLog log.body}}}\\n\\n {{#if sponsor.name}}\\n
\\n {{t builds.messages.sponsored_by}}\\n {{sponsor.name}}\\n
\\n {{/if}}\\n\\n To top\\n{{else}}\\n\\n Please read our guide.\\n It will only take a few minutes :)\\n
\\n\\n You can find detailled docs on our about site.\\n
\\n\\n If you need help please don't hesitate to join\\n #travis on irc.freenode.net\\n or our mailinglist.\\n
\\n\\n Repositories:\\n {{view.content.reposCount}}\\n
\\n {{/collection}}\\n\\n {{{t profiles.show.message.your_repos}}}\\n
\\n\\n{{#if hooks.isLoaded}}\\n {{#if user.isSyncing}}\\n \\n {{else}}\\n \\n\\n{{hook.description}}
\\n\\n \\n\\n {{t repositories.duration}}:\\n {{formatDuration lastBuildDuration}},\\n {{t repositories.finished_at}}:\\n {{formatTime lastBuildFinishedAt}}\\n
\\n\\n{{description}}
\\n{{description}}
\\n\\n\\n \\n {{#if view.branches.isLoaded}}\\n {{view Ember.Select contentBinding=\\\"view.branches\\\" selectionBinding=\\\"view.branch\\\" optionLabelPath=\\\"content.commit.branch\\\" optionValuePath=\\\"content.commit.branch\\\"}}\\n {{else}}\\n \\n {{/if}}\\n
\\n\\n \\n \\n
\\n\\n \\n \\n
\\n\\n \\n \\n
\\n\\n \\n \\n
\\n\\n \\n {{{t layouts.application.sponsors_link}}}\\n \\n
\\n\");\n\nEmber.TEMPLATES['sponsors/links'] = Ember.Handlebars.compile(\"%@%@
\\n'.fmt(path, path, number, number, line);\n });\n return result.trim();\n },\n deansi: function(log) {\n var ansi, text;\n log = log.replace(/\\r\\r/g, '\\r').replace(/\\033\\[K\\r/g, '\\r').replace(/^.*\\r(?!$)/gm, '').replace(/\u001b\\[2K/g, '').replace(/\\033\\(B/g, \"\");\n ansi = ansiparse(log);\n text = '';\n ansi.forEach(function(part) {\n var classes;\n classes = [];\n part.foreground && classes.push(part.foreground);\n part.background && classes.push('bg-' + part.background);\n part.bold && classes.push('bold');\n part.italic && classes.push('italic');\n return text += (classes.length ? '' + part.text + '' : part.text);\n });\n return text.replace(/\\033/g, '');\n },\n fold: function(log) {\n log = this.unfold(log);\n $.each(Travis.Log.FOLDS, function(name, pattern) {\n return log = log.replace(pattern, function() {\n return '\\n Trying to authenticate with GitHub.\\n
\\n{{else}}\\n\\n Sign in with GitHub\\n
\\n{{/if}}\\n\\n\\n\");\n\nEmber.TEMPLATES['builds/list'] = Ember.Handlebars.compile(\"{{#if builds.isLoaded}}\\n{{t builds.name}} | \\n{{t builds.commit}} | \\n{{t builds.message}} | \\n{{t builds.duration}} | \\n{{t builds.finished_at}} | \\n\\n \\n {{#if id}}\\n \\n {{number}}\\n \\n {{/if}}\\n | \\n\\n \\n {{formatCommit commit}}\\n \\n | \\n \\n\\n {{formatDuration duration}}\\n | \\n\\n {{formatTime finishedAt}}\\n | \\n {{/view}}\\n {{/each}}\\n \\n
---|
\\n {{view view.ShowMoreButton}}\\n
\\n{{else}}\\n{{key}} | \\n {{/each}}\\n\\n \\n {{#if job.id}}\\n {{number}}\\n {{/if}}\\n | \\n\\n {{formatDuration duration}}\\n | \\n\\n {{formatTime finishedAt}}\\n | \\n {{#each value in configValues}}\\n{{value}} | \\n {{/each}}\\n {{/view}}\\n {{/each}}\\n \\n
---|
\\n Allowed Failures are items in your build matrix that are allowed to\\n fail without causing the entire build to be shown as failed.\\n
\\n\\n You can define allowed failures in the build matrix as follows:\\n
\\nmatrix:\\n allow_failures:\\n - rvm: ruby-head\\n
\\n This lets you add in experimental and preparatory builds to test against versions or\\n configurations that you are not ready to officially support.\\n
\\n\\n \\n \\n {{{formatLog log.body}}}\\n\\n {{#if sponsor.name}}\\n
\\n {{t builds.messages.sponsored_by}}\\n {{sponsor.name}}\\n
\\n {{/if}}\\n\\n To top\\n{{else}}\\n\\n Please read our guide.\\n It will only take a few minutes :)\\n
\\n\\n You can find detailled docs on our about site.\\n
\\n\\n If you need help please don't hesitate to join\\n #travis on irc.freenode.net\\n or our mailinglist.\\n
\\n\\n Repositories:\\n {{view.content.reposCount}}\\n
\\n {{/collection}}\\n\\n {{{t profiles.show.message.your_repos}}}\\n
\\n\\n{{#if hooks.isLoaded}}\\n {{#if user.isSyncing}}\\n \\n {{else}}\\n \\n\\n{{hook.description}}
\\n\\n \\n\\n {{t repositories.duration}}:\\n {{formatDuration lastBuildDuration}},\\n {{t repositories.finished_at}}:\\n {{formatTime lastBuildFinishedAt}}\\n
\\n\\n{{description}}
\\n{{description}}
\\n\\n\\n \\n {{#if view.branches.isLoaded}}\\n {{view Ember.Select contentBinding=\\\"view.branches\\\" selectionBinding=\\\"view.branch\\\" optionLabelPath=\\\"content.commit.branch\\\" optionValuePath=\\\"content.commit.branch\\\"}}\\n {{else}}\\n \\n {{/if}}\\n
\\n\\n \\n \\n
\\n\\n \\n \\n
\\n\\n \\n \\n
\\n\\n \\n \\n
\\n\\n \\n {{{t layouts.application.sponsors_link}}}\\n \\n
\\n\");\n\nEmber.TEMPLATES['sponsors/links'] = Ember.Handlebars.compile(\"%@%@
\\n'.fmt(path, path, number, number, line);\n });\n return result.trim();\n },\n deansi: function(log) {\n var ansi, text;\n log = log.replace(/\\r\\r/g, '\\r').replace(/\\033\\[K\\r/g, '\\r').replace(/^.*\\r(?!$)/gm, '').replace(/\u001b\\[2K/g, '').replace(/\\033\\(B/g, \"\");\n ansi = ansiparse(log);\n text = '';\n ansi.forEach(function(part) {\n var classes;\n classes = [];\n part.foreground && classes.push(part.foreground);\n part.background && classes.push('bg-' + part.background);\n part.bold && classes.push('bold');\n part.italic && classes.push('italic');\n return text += (classes.length ? '' + part.text + '' : part.text);\n });\n return text.replace(/\\033/g, '');\n },\n fold: function(log) {\n log = this.unfold(log);\n $.each(Travis.Log.FOLDS, function(name, pattern) {\n return log = log.replace(pattern, function() {\n return '\\n Trying to authenticate with GitHub.\\n
\\n{{else}}\\n\\n Sign in with GitHub\\n
\\n{{/if}}\\n\\n\\n\");\n\nEmber.TEMPLATES['builds/list'] = Ember.Handlebars.compile(\"{{#if builds.isLoaded}}\\n{{t builds.name}} | \\n{{t builds.commit}} | \\n{{t builds.message}} | \\n{{t builds.duration}} | \\n{{t builds.finished_at}} | \\n\\n \\n {{#if id}}\\n \\n {{number}}\\n \\n {{/if}}\\n | \\n\\n \\n {{formatCommit commit}}\\n \\n | \\n \\n\\n {{formatDuration duration}}\\n | \\n\\n {{formatTime finishedAt}}\\n | \\n {{/view}}\\n {{/each}}\\n \\n
---|
\\n {{view view.ShowMoreButton}}\\n
\\n{{else}}\\n{{key}} | \\n {{/each}}\\n\\n \\n {{#if job.id}}\\n {{number}}\\n {{/if}}\\n | \\n\\n {{formatDuration duration}}\\n | \\n\\n {{formatTime finishedAt}}\\n | \\n {{#each value in configValues}}\\n{{value}} | \\n {{/each}}\\n {{/view}}\\n {{/each}}\\n \\n
---|
\\n Allowed Failures are items in your build matrix that are allowed to\\n fail without causing the entire build to be shown as failed.\\n
\\n\\n You can define allowed failures in the build matrix as follows:\\n
\\nmatrix:\\n allow_failures:\\n - rvm: ruby-head\\n
\\n This lets you add in experimental and preparatory builds to test against versions or\\n configurations that you are not ready to officially support.\\n
\\n\\n \\n \\n {{{formatLog log.body}}}\\n\\n {{#if sponsor.name}}\\n
\\n {{t builds.messages.sponsored_by}}\\n {{sponsor.name}}\\n
\\n {{/if}}\\n\\n To top\\n{{else}}\\n\\n Please read our guide.\\n It will only take a few minutes :)\\n
\\n\\n You can find detailled docs on our about site.\\n
\\n\\n If you need help please don't hesitate to join\\n #travis on irc.freenode.net\\n or our mailinglist.\\n
\\n\\n Repositories:\\n {{view.content.reposCount}}\\n
\\n {{/collection}}\\n\\n {{{t profiles.show.message.your_repos}}}\\n
\\n\\n{{#if hooks.isLoaded}}\\n {{#if user.isSyncing}}\\n \\n {{else}}\\n \\n\\n{{hook.description}}
\\n\\n \\n\\n {{t repositories.duration}}:\\n {{formatDuration lastBuildDuration}},\\n {{t repositories.finished_at}}:\\n {{formatTime lastBuildFinishedAt}}\\n
\\n\\n{{description}}
\\n{{description}}
\\n\\n\\n \\n {{#if view.branches.isLoaded}}\\n {{view Ember.Select contentBinding=\\\"view.branches\\\" selectionBinding=\\\"view.branch\\\" optionLabelPath=\\\"content.commit.branch\\\" optionValuePath=\\\"content.commit.branch\\\"}}\\n {{else}}\\n \\n {{/if}}\\n
\\n\\n \\n \\n
\\n\\n \\n \\n
\\n\\n \\n \\n
\\n\\n \\n \\n
\\n\\n \\n {{{t layouts.application.sponsors_link}}}\\n \\n
\\n\");\n\nEmber.TEMPLATES['sponsors/links'] = Ember.Handlebars.compile(\"