diff --git a/assets/images/ui/round-spinner.svg b/assets/images/ui/round-spinner.svg deleted file mode 100644 index d9501046..00000000 --- a/assets/images/ui/round-spinner.svg +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/scripts/app/controllers.coffee b/assets/scripts/app/controllers.coffee index 718b331b..0c74d1e3 100644 --- a/assets/scripts/app/controllers.coffee +++ b/assets/scripts/app/controllers.coffee @@ -86,4 +86,3 @@ require 'controllers/stats' require 'controllers/current_user' require 'controllers/request' require 'controllers/requests' -require 'controllers/caches' diff --git a/assets/scripts/app/controllers/caches.coffee b/assets/scripts/app/controllers/caches.coffee deleted file mode 100644 index 9f10a5f1..00000000 --- a/assets/scripts/app/controllers/caches.coffee +++ /dev/null @@ -1,61 +0,0 @@ -Travis.CachesController = Ember.ArrayController.extend - isDeleting: false - needs: ['repo'] - repo: Ember.computed.alias('controllers.repo.repo') - - actions: - deleteRepoCache: -> - return if @get('isDeleting') - - if confirm('Are you sure?') - @set('isDeleting', true) - - deletingDone = => @set('isDeleting', false) - - repo = @get('repo') - Travis.ajax.ajax("/repos/#{repo.get('id')}/caches", "DELETE").then(deletingDone, deletingDone).then => - @clear() - -Travis.CachesByBranchController = Ember.ObjectController.extend - isDeleting: false - needs: ['repo', 'caches'] - repo: Ember.computed.alias('controllers.repo.repo') - - actions: - delete: -> - return if @get('isDeleting') - - if confirm('Are you sure?') - @set('isDeleting', true) - - data = { branch: @get('branch') } - - deletingDone = => @set('isDeleting', false) - - repo = @get('repo') - Travis.ajax.ajax("/repos/#{repo.get('id')}/caches", "DELETE", data: data).then(deletingDone, deletingDone).then => - model = @get('model') - @get('controllers.caches').removeObject(model) - -Travis.CacheItemController = Ember.ObjectController.extend - isDeleting: false - needs: ['repo', 'caches'] - repo: Ember.computed.alias('controllers.repo.repo') - - actions: - delete: -> - return if @get('isDeleting') - - if confirm('Are you sure?') - @set('isDeleting', true) - - data = { branch: @get('branch'), slug: @get('slug') } - - deletingDone = => @set('isDeleting', false) - - repo = @get('repo') - Travis.ajax.ajax("/repos/#{repo.get('id')}/caches", "DELETE", data: data).then(deletingDone, deletingDone).then => - model = @get('model') - @get('parent.caches').removeObject(model) - if @get('parent.caches.length') == 0 - @get('controllers.caches').removeObject(@get('parent')) diff --git a/assets/scripts/app/controllers/repo.coffee b/assets/scripts/app/controllers/repo.coffee index 79733236..5113fa52 100644 --- a/assets/scripts/app/controllers/repo.coffee +++ b/assets/scripts/app/controllers/repo.coffee @@ -53,9 +53,6 @@ Travis.RepoController = Travis.Controller.extend viewRequests: -> @connectTab('requests') - viewCaches: -> - @connectTab('caches') - viewRequest: -> @connectTab('request') diff --git a/assets/scripts/app/helpers/handlebars.coffee b/assets/scripts/app/helpers/handlebars.coffee index 6d183b4a..cbd630be 100644 --- a/assets/scripts/app/helpers/handlebars.coffee +++ b/assets/scripts/app/helpers/handlebars.coffee @@ -3,11 +3,6 @@ require 'ext/ember/bound_helper' safe = (string) -> new Handlebars.SafeString(string) -Ember.Handlebars.helper('mb', (size) -> - if size - (size / 1024 / 1024).toFixed(2) -, 'size') - Travis.Tab = Ember.Object.extend show: -> @get('tabs').forEach( (t) -> t.hide() ) diff --git a/assets/scripts/app/routes.coffee b/assets/scripts/app/routes.coffee index b30fb1fe..1d933d54 100644 --- a/assets/scripts/app/routes.coffee +++ b/assets/scripts/app/routes.coffee @@ -59,7 +59,6 @@ Travis.Router.map -> @resource 'pullRequests', path: '/pull_requests' @resource 'branches', path: '/branches' @resource 'requests', path: '/requests' - @resource 'caches', path: '/caches' if Travis.config.caches_enabled @resource 'request', path: '/requests/:request_id' # this can't be nested in repo, because we want a set of different @@ -86,31 +85,6 @@ Travis.RequestsRoute = Travis.Route.extend model: -> Travis.Request.fetch repository_id: @modelFor('repo').get('id') -Travis.CachesRoute = Travis.Route.extend - setupController: -> - @_super.apply this, arguments - @controllerFor('repo').activate('caches') - - model: -> - repo = @modelFor('repo') - Travis.ajax.get("/repos/#{repo.get('id')}/caches").then( (data) -> - groups = {} - data["caches"].forEach (cacheData) -> - branch = cacheData["branch"] - group = groups[branch] - unless group - group = groups[branch] = Ember.Object.create(branch: branch, caches: []) - cache = Ember.Object.create(cacheData) - cache.set('parent', group) - group.get('caches').pushObject(cache) - - result = [] - for branch, caches of groups - result.push caches - - result - ) - Travis.RequestRoute = Travis.Route.extend setupController: -> @_super.apply this, arguments diff --git a/assets/scripts/app/templates/caches.hbs b/assets/scripts/app/templates/caches.hbs deleted file mode 100644 index 7b5bdfda..00000000 --- a/assets/scripts/app/templates/caches.hbs +++ /dev/null @@ -1,33 +0,0 @@ -{{#if length}} - - Delete repo cache - - - -{{else}} - There are no caches for this repository. -{{/if}} diff --git a/assets/scripts/app/templates/repo/loading.hbs b/assets/scripts/app/templates/repo/loading.hbs deleted file mode 100644 index 0277cf2e..00000000 --- a/assets/scripts/app/templates/repo/loading.hbs +++ /dev/null @@ -1 +0,0 @@ -
Loading
diff --git a/assets/scripts/app/templates/repos/show/tabs.hbs b/assets/scripts/app/templates/repos/show/tabs.hbs index e19bde6e..6951874f 100644 --- a/assets/scripts/app/templates/repos/show/tabs.hbs +++ b/assets/scripts/app/templates/repos/show/tabs.hbs @@ -66,16 +66,6 @@ {{/if}} -
  • -
    - {{#if repo.slug}} - {{#link-to "caches" repo}} - Caches - {{/link-to}} - {{/if}} -
    -
  • -
  • {{#if request.id}} diff --git a/assets/scripts/app/templates/repos/show/tools.hbs b/assets/scripts/app/templates/repos/show/tools.hbs index f917795f..b5846fa9 100644 --- a/assets/scripts/app/templates/repos/show/tools.hbs +++ b/assets/scripts/app/templates/repos/show/tools.hbs @@ -19,11 +19,6 @@
  • {{#link-to "requests" view.repo}}Requests{{/link-to}}
  • - {{#if Travis.config.caches_enabled}} -
  • - {{#link-to "caches" view.repo}}Caches{{/link-to}} -
  • - {{/if}} diff --git a/assets/scripts/app/views/repo/show.coffee b/assets/scripts/app/views/repo/show.coffee index 487e8602..1073e379 100644 --- a/assets/scripts/app/views/repo/show.coffee +++ b/assets/scripts/app/views/repo/show.coffee @@ -75,10 +75,6 @@ Travis.reopen 'active display-inline' if @get('tab') == 'requests' ).property('tab') - classCaches: (-> - 'active display-inline' if @get('tab') == 'caches' - ).property('tab') - classRequest: (-> 'active display-inline' if @get('tab') == 'request' ).property('tab') diff --git a/assets/scripts/lib/travis/ajax.coffee b/assets/scripts/lib/travis/ajax.coffee index af514ead..84c29a0b 100644 --- a/assets/scripts/lib/travis/ajax.coffee +++ b/assets/scripts/lib/travis/ajax.coffee @@ -2,7 +2,6 @@ jQuery.support.cors = true Travis.ajax = Em.Object.create publicEndpoints: [/\/repos\/?.*/, /\/builds\/?.*/, /\/jobs\/?.*/] - privateEndpoints: [/\/repos\/\d+\/caches/] DEFAULT_OPTIONS: accepts: @@ -18,13 +17,10 @@ Travis.ajax = Em.Object.create return true if Travis.ajax.pro return true if method != 'GET' - publicEndpoint = @publicEndpoints.find (pattern) -> + result = @publicEndpoints.find (pattern) -> url.match(pattern) - privateEndpoint = @privateEndpoints.find (pattern) -> - url.match(pattern) - - !publicEndpoint || privateEndpoint + !result ajax: (url, method, options) -> method = method || "GET" diff --git a/assets/scripts/travis.coffee b/assets/scripts/travis.coffee index 726fad3b..f209166a 100644 --- a/assets/scripts/travis.coffee +++ b/assets/scripts/travis.coffee @@ -82,7 +82,6 @@ $.extend Travis, ga_code: $('meta[name="travis.ga_code"]').attr('value') code_climate: $('meta[name="travis.code_climate"]').attr('value') code_climate_url: $('meta[name="travis.code_climate_url"]').attr('value') - caches_enabled: $('meta[name="travis.caches_enabled"]').attr('value') == 'true' show_repos_hint: 'private' avatar_default_url: 'https://travis-ci.org/images/mailer/mascot-avatar-40px.png' diff --git a/assets/styles/caches.sass b/assets/styles/caches.sass deleted file mode 100644 index 35ef1fee..00000000 --- a/assets/styles/caches.sass +++ /dev/null @@ -1,43 +0,0 @@ -.delete-repo-caches.deleting - background-color: #bbb - background-image: inline-image('ui/round-spinner.svg') - background-repeat: no-repeat - background-position: center - background-size: 20px - text-indent: -9999px - -.delete-repo-caches - display: inline-block - margin: 6px 0 15px 0 - color: #ffffff - background-color: #932828 - border-radius: 4px - padding: 4px 15px 4px 15px - font-size: 13px - cursor: pointer - -#caches - .delete - color: #EA0000 - .delete.deleting:after - content: "" - background-image: inline-image('ui/spinner.svg') - background-repeat: no-repeat - background-position: center - background-size: 13px - width: 13px - height: 10px - display: inline-block - .caches-group - padding-bottom: 5px - - .branch - font-size: 14px - font-weight: bold - - .caches-group .label - font-weight: bold - - .caches-list - padding-top: 5px - padding-left: 14px diff --git a/assets/styles/tabs.sass b/assets/styles/tabs.sass index c4e19229..230bba11 100644 --- a/assets/styles/tabs.sass +++ b/assets/styles/tabs.sass @@ -52,7 +52,7 @@ h5 line-height: 25px - + #tab_new.display display: inline-block @@ -70,7 +70,6 @@ #tab_build, #tab_job, #tab_request, - #tab_caches, #tab_requests display: none @@ -98,6 +97,6 @@ h5 min-width: 0px a - padding: 0px 2px + padding: 0px 2px #tab_branches display: none diff --git a/config.ru b/config.ru index 5210c220..fff7ffb2 100644 --- a/config.ru +++ b/config.ru @@ -31,6 +31,5 @@ run Travis::Web::App.build( pusher_key: ENV['PUSHER_KEY'], ga_code: ENV['GA_CODE'], root: File.expand_path('../public', __FILE__), - server_start: Time.now, - caches_enabled: ENV['CACHES_ENABLED'] + server_start: Time.now ) diff --git a/public/index.html b/public/index.html index 204e31ee..4f5bb6dc 100644 --- a/public/index.html +++ b/public/index.html @@ -6,7 +6,6 @@ - Travis CI - Free Hosted Continuous Integration Platform for the Open Source Community