parent
0a9fdb718c
commit
3d6931c523
|
@ -1,26 +0,0 @@
|
||||||
<svg id="loading" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="white">
|
|
||||||
<path opacity=".1" d="M14 0 H18 V8 H14 z" transform="rotate(0 16 16)">
|
|
||||||
<animate attributeName="opacity" from="1" to=".1" dur="1s" repeatCount="indefinite" begin="0"/>
|
|
||||||
</path>
|
|
||||||
<path opacity=".1" d="M14 0 H18 V8 H14 z" transform="rotate(45 16 16)">
|
|
||||||
<animate attributeName="opacity" from="1" to=".1" dur="1s" repeatCount="indefinite" begin="0.125s"/>
|
|
||||||
</path>
|
|
||||||
<path opacity=".1" d="M14 0 H18 V8 H14 z" transform="rotate(90 16 16)">
|
|
||||||
<animate attributeName="opacity" from="1" to=".1" dur="1s" repeatCount="indefinite" begin="0.25s"/>
|
|
||||||
</path>
|
|
||||||
<path opacity=".1" d="M14 0 H18 V8 H14 z" transform="rotate(135 16 16)">
|
|
||||||
<animate attributeName="opacity" from="1" to=".1" dur="1s" repeatCount="indefinite" begin="0.375s"/>
|
|
||||||
</path>
|
|
||||||
<path opacity=".1" d="M14 0 H18 V8 H14 z" transform="rotate(180 16 16)">
|
|
||||||
<animate attributeName="opacity" from="1" to=".1" dur="1s" repeatCount="indefinite" begin="0.5s"/>
|
|
||||||
</path>
|
|
||||||
<path opacity=".1" d="M14 0 H18 V8 H14 z" transform="rotate(225 16 16)">
|
|
||||||
<animate attributeName="opacity" from="1" to=".1" dur="1s" repeatCount="indefinite" begin="0.675s"/>
|
|
||||||
</path>
|
|
||||||
<path opacity=".1" d="M14 0 H18 V8 H14 z" transform="rotate(270 16 16)">
|
|
||||||
<animate attributeName="opacity" from="1" to=".1" dur="1s" repeatCount="indefinite" begin="0.75s"/>
|
|
||||||
</path>
|
|
||||||
<path opacity=".1" d="M14 0 H18 V8 H14 z" transform="rotate(315 16 16)">
|
|
||||||
<animate attributeName="opacity" from="1" to=".1" dur="1s" repeatCount="indefinite" begin="0.875s"/>
|
|
||||||
</path>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 1.6 KiB |
|
@ -86,4 +86,3 @@ require 'controllers/stats'
|
||||||
require 'controllers/current_user'
|
require 'controllers/current_user'
|
||||||
require 'controllers/request'
|
require 'controllers/request'
|
||||||
require 'controllers/requests'
|
require 'controllers/requests'
|
||||||
require 'controllers/caches'
|
|
||||||
|
|
|
@ -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'))
|
|
|
@ -53,9 +53,6 @@ Travis.RepoController = Travis.Controller.extend
|
||||||
viewRequests: ->
|
viewRequests: ->
|
||||||
@connectTab('requests')
|
@connectTab('requests')
|
||||||
|
|
||||||
viewCaches: ->
|
|
||||||
@connectTab('caches')
|
|
||||||
|
|
||||||
viewRequest: ->
|
viewRequest: ->
|
||||||
@connectTab('request')
|
@connectTab('request')
|
||||||
|
|
||||||
|
|
|
@ -3,11 +3,6 @@ require 'ext/ember/bound_helper'
|
||||||
safe = (string) ->
|
safe = (string) ->
|
||||||
new Handlebars.SafeString(string)
|
new Handlebars.SafeString(string)
|
||||||
|
|
||||||
Ember.Handlebars.helper('mb', (size) ->
|
|
||||||
if size
|
|
||||||
(size / 1024 / 1024).toFixed(2)
|
|
||||||
, 'size')
|
|
||||||
|
|
||||||
Travis.Tab = Ember.Object.extend
|
Travis.Tab = Ember.Object.extend
|
||||||
show: ->
|
show: ->
|
||||||
@get('tabs').forEach( (t) -> t.hide() )
|
@get('tabs').forEach( (t) -> t.hide() )
|
||||||
|
|
|
@ -59,7 +59,6 @@ Travis.Router.map ->
|
||||||
@resource 'pullRequests', path: '/pull_requests'
|
@resource 'pullRequests', path: '/pull_requests'
|
||||||
@resource 'branches', path: '/branches'
|
@resource 'branches', path: '/branches'
|
||||||
@resource 'requests', path: '/requests'
|
@resource 'requests', path: '/requests'
|
||||||
@resource 'caches', path: '/caches' if Travis.config.caches_enabled
|
|
||||||
@resource 'request', path: '/requests/:request_id'
|
@resource 'request', path: '/requests/:request_id'
|
||||||
|
|
||||||
# this can't be nested in repo, because we want a set of different
|
# this can't be nested in repo, because we want a set of different
|
||||||
|
@ -86,31 +85,6 @@ Travis.RequestsRoute = Travis.Route.extend
|
||||||
model: ->
|
model: ->
|
||||||
Travis.Request.fetch repository_id: @modelFor('repo').get('id')
|
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
|
Travis.RequestRoute = Travis.Route.extend
|
||||||
setupController: ->
|
setupController: ->
|
||||||
@_super.apply this, arguments
|
@_super.apply this, arguments
|
||||||
|
|
|
@ -1,33 +0,0 @@
|
||||||
{{#if length}}
|
|
||||||
<a href="#" {{action "deleteRepoCache"}} {{bind-attr class="isDeleting:deleting :delete-repo-caches"}}>
|
|
||||||
Delete repo cache
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<ul id="caches">
|
|
||||||
{{#each controller itemController="cachesByBranch"}}
|
|
||||||
<li class="caches-group">
|
|
||||||
<span class="branch">Branch: {{branch}}</span>
|
|
||||||
|
|
||||||
<a href="#" {{action "delete"}} {{bind-attr class="isDeleting:deleting :delete-by-branch :delete"}}>
|
|
||||||
(delete)
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<ul class="caches-list">
|
|
||||||
{{#each cache in caches itemController="cacheItem"}}
|
|
||||||
<li class="cache-info">
|
|
||||||
<span class="label">Slug:</span> {{cache.slug}},
|
|
||||||
<span class="label">Last modified:</span> {{cache.last_modified}},
|
|
||||||
<span class="label">Size:</span> {{mb cache.size}}MB
|
|
||||||
|
|
||||||
<a href="#" {{action "delete"}} {{bind-attr class="isDeleting:deleting :delete-by-slug :delete"}}>
|
|
||||||
(delete)
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{{/each}}
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
{{/each}}
|
|
||||||
</ul>
|
|
||||||
{{else}}
|
|
||||||
There are no caches for this repository.
|
|
||||||
{{/if}}
|
|
|
@ -1 +0,0 @@
|
||||||
<div class="loading"><span>Loading</span></div>
|
|
|
@ -66,16 +66,6 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</h5>
|
</h5>
|
||||||
</li>
|
</li>
|
||||||
<li id="tab_caches" {{bind-attr class="view.classCaches"}}>
|
|
||||||
<h5>
|
|
||||||
{{#if repo.slug}}
|
|
||||||
{{#link-to "caches" repo}}
|
|
||||||
Caches
|
|
||||||
{{/link-to}}
|
|
||||||
{{/if}}
|
|
||||||
</h5>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li id="tab_request" {{bind-attr class="view.classRequest"}}>
|
<li id="tab_request" {{bind-attr class="view.classRequest"}}>
|
||||||
<h5>
|
<h5>
|
||||||
{{#if request.id}}
|
{{#if request.id}}
|
||||||
|
|
|
@ -19,11 +19,6 @@
|
||||||
<li>
|
<li>
|
||||||
{{#link-to "requests" view.repo}}Requests{{/link-to}}
|
{{#link-to "requests" view.repo}}Requests{{/link-to}}
|
||||||
</li>
|
</li>
|
||||||
{{#if Travis.config.caches_enabled}}
|
|
||||||
<li>
|
|
||||||
{{#link-to "caches" view.repo}}Caches{{/link-to}}
|
|
||||||
</li>
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
<a href="#" id="status-image-popup" name="status-images" class="open-popup" {{action "statusImages" target="view"}}>
|
<a href="#" id="status-image-popup" name="status-images" class="open-popup" {{action "statusImages" target="view"}}>
|
||||||
|
|
|
@ -75,10 +75,6 @@ Travis.reopen
|
||||||
'active display-inline' if @get('tab') == 'requests'
|
'active display-inline' if @get('tab') == 'requests'
|
||||||
).property('tab')
|
).property('tab')
|
||||||
|
|
||||||
classCaches: (->
|
|
||||||
'active display-inline' if @get('tab') == 'caches'
|
|
||||||
).property('tab')
|
|
||||||
|
|
||||||
classRequest: (->
|
classRequest: (->
|
||||||
'active display-inline' if @get('tab') == 'request'
|
'active display-inline' if @get('tab') == 'request'
|
||||||
).property('tab')
|
).property('tab')
|
||||||
|
|
|
@ -2,7 +2,6 @@ jQuery.support.cors = true
|
||||||
|
|
||||||
Travis.ajax = Em.Object.create
|
Travis.ajax = Em.Object.create
|
||||||
publicEndpoints: [/\/repos\/?.*/, /\/builds\/?.*/, /\/jobs\/?.*/]
|
publicEndpoints: [/\/repos\/?.*/, /\/builds\/?.*/, /\/jobs\/?.*/]
|
||||||
privateEndpoints: [/\/repos\/\d+\/caches/]
|
|
||||||
|
|
||||||
DEFAULT_OPTIONS:
|
DEFAULT_OPTIONS:
|
||||||
accepts:
|
accepts:
|
||||||
|
@ -18,13 +17,10 @@ Travis.ajax = Em.Object.create
|
||||||
return true if Travis.ajax.pro
|
return true if Travis.ajax.pro
|
||||||
return true if method != 'GET'
|
return true if method != 'GET'
|
||||||
|
|
||||||
publicEndpoint = @publicEndpoints.find (pattern) ->
|
result = @publicEndpoints.find (pattern) ->
|
||||||
url.match(pattern)
|
url.match(pattern)
|
||||||
|
|
||||||
privateEndpoint = @privateEndpoints.find (pattern) ->
|
!result
|
||||||
url.match(pattern)
|
|
||||||
|
|
||||||
!publicEndpoint || privateEndpoint
|
|
||||||
|
|
||||||
ajax: (url, method, options) ->
|
ajax: (url, method, options) ->
|
||||||
method = method || "GET"
|
method = method || "GET"
|
||||||
|
|
|
@ -82,7 +82,6 @@ $.extend Travis,
|
||||||
ga_code: $('meta[name="travis.ga_code"]').attr('value')
|
ga_code: $('meta[name="travis.ga_code"]').attr('value')
|
||||||
code_climate: $('meta[name="travis.code_climate"]').attr('value')
|
code_climate: $('meta[name="travis.code_climate"]').attr('value')
|
||||||
code_climate_url: $('meta[name="travis.code_climate_url"]').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'
|
show_repos_hint: 'private'
|
||||||
avatar_default_url: 'https://travis-ci.org/images/mailer/mascot-avatar-40px.png'
|
avatar_default_url: 'https://travis-ci.org/images/mailer/mascot-avatar-40px.png'
|
||||||
|
|
||||||
|
|
|
@ -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
|
|
|
@ -70,7 +70,6 @@
|
||||||
#tab_build,
|
#tab_build,
|
||||||
#tab_job,
|
#tab_job,
|
||||||
#tab_request,
|
#tab_request,
|
||||||
#tab_caches,
|
|
||||||
#tab_requests
|
#tab_requests
|
||||||
display: none
|
display: none
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,5 @@ run Travis::Web::App.build(
|
||||||
pusher_key: ENV['PUSHER_KEY'],
|
pusher_key: ENV['PUSHER_KEY'],
|
||||||
ga_code: ENV['GA_CODE'],
|
ga_code: ENV['GA_CODE'],
|
||||||
root: File.expand_path('../public', __FILE__),
|
root: File.expand_path('../public', __FILE__),
|
||||||
server_start: Time.now,
|
server_start: Time.now
|
||||||
caches_enabled: ENV['CACHES_ENABLED']
|
|
||||||
)
|
)
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
<meta rel="travis.api_endpoint" href="https://api.travis-ci.org">
|
<meta rel="travis.api_endpoint" href="https://api.travis-ci.org">
|
||||||
<meta name="travis.pusher_key" value="5df8ac576dcccf4fd076">
|
<meta name="travis.pusher_key" value="5df8ac576dcccf4fd076">
|
||||||
<meta name="travis.ga_code" value="UA-24868285-1">
|
<meta name="travis.ga_code" value="UA-24868285-1">
|
||||||
<meta name="travis.caches_enabled" value="false">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Travis CI - Free Hosted Continuous Integration Platform for the Open Source Community</title>
|
<title>Travis CI - Free Hosted Continuous Integration Platform for the Open Source Community</title>
|
||||||
<link rel="dns-prefetch" href="//api.travis-ci.org">
|
<link rel="dns-prefetch" href="//api.travis-ci.org">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user