Fix screenshot generation

This commit is contained in:
Joseph Schorr 2014-05-19 14:14:18 -04:00
parent cbcff2adee
commit c0f3054781
4 changed files with 22 additions and 12 deletions

View file

@ -344,11 +344,6 @@ def populate_database():
'docker_tags': ['latest'], 'docker_tags': ['latest'],
'build_subdir': '', 'build_subdir': '',
} }
build = model.create_repository_build(building, token, job_config,
'701dcc3724fb4f2ea6c31400528343cd',
'build-name', trigger)
build.uuid = 'deadbeef-dead-beef-dead-beefdeadbeef'
build.save()
build2 = model.create_repository_build(building, token, job_config, build2 = model.create_repository_build(building, token, job_config,
'68daeebd-a5b9-457f-80a0-4363b882f8ea', '68daeebd-a5b9-457f-80a0-4363b882f8ea',
@ -362,6 +357,12 @@ def populate_database():
build3.uuid = 'deadduck-dead-duck-dead-duckdeadduck' build3.uuid = 'deadduck-dead-duck-dead-duckdeadduck'
build3.save() build3.save()
build = model.create_repository_build(building, token, job_config,
'701dcc3724fb4f2ea6c31400528343cd',
'build-name', trigger)
build.uuid = 'deadbeef-dead-beef-dead-beefdeadbeef'
build.save()
org = model.create_organization('buynlarge', 'quay@devtable.com', org = model.create_organization('buynlarge', 'quay@devtable.com',
new_user_1) new_user_1)
org.stripe_id = TEST_STRIPE_ID org.stripe_id = TEST_STRIPE_ID

View file

@ -1,4 +1,4 @@
var width = 1024; var width = 1060;
var height = 768; var height = 768;
var casper = require('casper').create({ var casper = require('casper').create({
@ -76,11 +76,14 @@ casper.then(function() {
this.capture(outputDir + 'repo-view.png'); this.capture(outputDir + 'repo-view.png');
}); });
casper.then(function() {
this.log('Generating repository changes screenshot.'); casper.thenClick('a[data-image="c3d710edbd3b"]', function() {
this.waitForText('And 3048 more...', function() {
this.capture(outputDir + 'image-view.png');
});
}); });
casper.thenClick('#current-image dd a', function() { casper.thenClick('.image-link', function() {
this.waitForSelector('.result-count', function() { this.waitForSelector('.result-count', function() {
this.capture(outputDir + 'repo-changes.png', { this.capture(outputDir + 'repo-changes.png', {
top: 0, top: 0,
@ -89,7 +92,8 @@ casper.thenClick('#current-image dd a', function() {
height: height height: height
}); });
}); });
}) });
casper.then(function() { casper.then(function() {
this.log('Generating repository admin screenshot.'); this.log('Generating repository admin screenshot.');

View file

@ -177,7 +177,12 @@
<span class="size-bar" style="{{ 'width:' + (image.size / getTotalSize(currentTag)) * 100 + '%' }}" <span class="size-bar" style="{{ 'width:' + (image.size / getTotalSize(currentTag)) * 100 + '%' }}"
bs-tooltip="" data-title="{{ image.size | bytes }}"></span> bs-tooltip="" data-title="{{ image.size | bytes }}"></span>
</span> </span>
<span class="size-title"><a href="javascript:void(0)" ng-click="setImage(image.id, true)">{{ image.id.substr(0, 12) }}</a></span> <span class="size-title">
<a class="image-size-link" href="javascript:void(0)" ng-click="setImage(image.id, true)"
data-image="{{ image.id.substr(0, 12) }}">
{{ image.id.substr(0, 12) }}
</a>
</span>
</div> </div>
</div> </div>
@ -199,7 +204,7 @@
<div class="image-section"> <div class="image-section">
<i class="fa fa-code section-icon" bs-tooltip="tooltip.title" data-title="Full Image ID"></i> <i class="fa fa-code section-icon" bs-tooltip="tooltip.title" data-title="Full Image ID"></i>
<span class="section-info"> <span class="section-info">
<a href="{{'/repository/' + repo.namespace + '/' + repo.name + '/image/' + currentImage.id}}">{{ currentImage.id }}</a> <a class="image-link" href="{{'/repository/' + repo.namespace + '/' + repo.name + '/image/' + currentImage.id}}">{{ currentImage.id }}</a>
</span> </span>
</div> </div>

Binary file not shown.