Skip to content

Commit

Permalink
fix: for test
Browse files Browse the repository at this point in the history
  • Loading branch information
wahapo committed Aug 4, 2020
1 parent 7c97a1b commit 4da0662
Show file tree
Hide file tree
Showing 11 changed files with 423 additions and 758 deletions.
27 changes: 0 additions & 27 deletions .travis.yml

This file was deleted.

31 changes: 18 additions & 13 deletions app/components/build-log/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ export default Component.extend({
* @method scrollTop
*/
scrollTop() {
this.$('.wrap')[0].scrollTop = 0;
this.element.querySelectorAll('.wrap')[0].scrollTop = 0;
},

/**
Expand All @@ -269,9 +269,9 @@ export default Component.extend({
*/
scrollDown() {
if (this.autoscroll) {
const bottom = this.$('.bottom').prop('offsetTop');
const bottom = this.element.querySelector('.bottom').offsetTop;

this.$('.wrap').prop('scrollTop', bottom);
this.element.querySelector('.wrap').scrollTop = bottom;
set(this, 'lastScrollTop', bottom);
}
},
Expand All @@ -281,7 +281,7 @@ export default Component.extend({
* @method scrollStill
*/
scrollStill() {
const container = this.$('.wrap')[0];
const container = this.element.querySelectorAll('.wrap')[0];

set(
this,
Expand Down Expand Up @@ -321,7 +321,7 @@ export default Component.extend({
.then(({ done }) => {
// prevent updating logs when component is being destroyed
if (!this.isDestroyed && !this.isDestroying) {
const container = this.$('.wrap')[0];
const container = this.element.querySelectorAll('.wrap')[0];
const { inProgress, justFinished } = this;

set(this, 'isFetching', false);
Expand Down Expand Up @@ -370,18 +370,19 @@ export default Component.extend({
set(this, 'isDownloading', true);

this.getLogs(true).then(() => {
this.$('#downloadLink')
.attr({
download: `${buildId}-${stepName}.log`,
href: this.logService.buildLogBlobUrl(buildId, stepName)
})[0]
.click();
const el = this.element.querySelectorAll('#downloadLink');

el.forEach(e => {
e.setAttribute('download', `${buildId}-${stepName}.log`);
e.setAttribute('href', this.logService.buildLogBlobUrl(buildId, stepName));
});
el[0].click();
set(this, 'isDownloading', false);
});
}
},
logScroll() {
const container = this.$('.wrap')[0];
const container = this.element.querySelectorAll('.wrap')[0];

if (
!this.inProgress &&
Expand All @@ -395,7 +396,11 @@ export default Component.extend({
}

// autoscroll when the bottom of the logs is roughly in view
set(this, 'autoscroll', this.$('.bottom')[0].getBoundingClientRect().top < 1500);
set(
this,
'autoscroll',
this.element.querySelectorAll('.bottom')[0].getBoundingClientRect().top < 1500
);
},
toggleTimeDisplay() {
let index = timeTypes.indexOf(this.timeFormat);
Expand Down
5 changes: 1 addition & 4 deletions app/components/pipeline-list-view/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,17 +150,14 @@ export default Component.extend({

let startTime;

let status;

let buildId;

let coverageData = {};

if (latestBuild) {
startTime = moment(latestBuild.startTime).format('lll');
status = latestBuild.status;
buildId = latestBuild.id;
duration = this.getDuration(latestBuild.startTime, latestBuild.endTime, status);
duration = this.getDuration(latestBuild.startTime, latestBuild.endTime, latestBuild.status);

coverageData = {
jobId,
Expand Down
2 changes: 1 addition & 1 deletion app/components/pipeline-list-view/template.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<button {{action "refreshListViewJobs"}} class="refresh-btn">Refresh</button>
{{#light-table table as |t|}}
{{#light-table table height="inherit" as |t|}}
{{t.head
onColumnClick=(action "onColumnClick")
iconSortable="fa fa-sort"
Expand Down
2 changes: 1 addition & 1 deletion app/components/tc-collection-list/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export default Component.extend({
.sort();
}
}),
columns: computed(function() {
columns: computed(function columns() {
return [
{
label: 'Name',
Expand Down
2 changes: 2 additions & 0 deletions app/styles/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -178,3 +178,5 @@ body {
}

@import 'ember-power-select';

@import 'ember-bootstrap/bootstrap';
1 change: 1 addition & 0 deletions config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module.exports = environment => {
// Glimmer [ember] and ACE Editor [validator] add styles to elements at run time, this makes it impossible to precalculate all possible shas for inline styles
"'unsafe-inline'"
],
'script-src': ["'unsafe-eval'"],
'manifest-src': ["'self'"],
'frame-src': ["'self'"],
'connect-src': ["'self'"],
Expand Down
Loading

0 comments on commit 4da0662

Please sign in to comment.