Skip to content

Commit 74cd5a1

Browse files
committed
fix: for test
1 parent 7c97a1b commit 74cd5a1

File tree

22 files changed

+642
-1081
lines changed

22 files changed

+642
-1081
lines changed

.travis.yml

-27
This file was deleted.

app/components/build-log/component.js

+18-13
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ export default Component.extend({
260260
* @method scrollTop
261261
*/
262262
scrollTop() {
263-
this.$('.wrap')[0].scrollTop = 0;
263+
this.element.querySelectorAll('.wrap')[0].scrollTop = 0;
264264
},
265265

266266
/**
@@ -269,9 +269,9 @@ export default Component.extend({
269269
*/
270270
scrollDown() {
271271
if (this.autoscroll) {
272-
const bottom = this.$('.bottom').prop('offsetTop');
272+
const bottom = this.element.querySelector('.bottom').offsetTop;
273273

274-
this.$('.wrap').prop('scrollTop', bottom);
274+
this.element.querySelector('.wrap').scrollTop = bottom;
275275
set(this, 'lastScrollTop', bottom);
276276
}
277277
},
@@ -281,7 +281,7 @@ export default Component.extend({
281281
* @method scrollStill
282282
*/
283283
scrollStill() {
284-
const container = this.$('.wrap')[0];
284+
const container = this.element.querySelectorAll('.wrap')[0];
285285

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

327327
set(this, 'isFetching', false);
@@ -370,18 +370,19 @@ export default Component.extend({
370370
set(this, 'isDownloading', true);
371371

372372
this.getLogs(true).then(() => {
373-
this.$('#downloadLink')
374-
.attr({
375-
download: `${buildId}-${stepName}.log`,
376-
href: this.logService.buildLogBlobUrl(buildId, stepName)
377-
})[0]
378-
.click();
373+
const el = this.element.querySelectorAll('#downloadLink');
374+
375+
el.forEach(e => {
376+
e.setAttribute('download', `${buildId}-${stepName}.log`);
377+
e.setAttribute('href', this.logService.buildLogBlobUrl(buildId, stepName));
378+
});
379+
el[0].click();
379380
set(this, 'isDownloading', false);
380381
});
381382
}
382383
},
383384
logScroll() {
384-
const container = this.$('.wrap')[0];
385+
const container = this.element.querySelectorAll('.wrap')[0];
385386

386387
if (
387388
!this.inProgress &&
@@ -395,7 +396,11 @@ export default Component.extend({
395396
}
396397

397398
// autoscroll when the bottom of the logs is roughly in view
398-
set(this, 'autoscroll', this.$('.bottom')[0].getBoundingClientRect().top < 1500);
399+
set(
400+
this,
401+
'autoscroll',
402+
this.element.querySelectorAll('.bottom')[0].getBoundingClientRect().top < 1500
403+
);
399404
},
400405
toggleTimeDisplay() {
401406
let index = timeTypes.indexOf(this.timeFormat);

app/components/home-hero/component.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default Component.extend({
1313
languages: langs,
1414
actions: {
1515
changeLanguage() {
16-
this.set('forkUrl', this.$('select').val());
16+
this.set('forkUrl', this.element.querySelector('select').value);
1717
}
1818
},
1919
forkUrl: langs[0].url

app/components/pipeline-list-view/component.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -150,17 +150,14 @@ export default Component.extend({
150150

151151
let startTime;
152152

153-
let status;
154-
155153
let buildId;
156154

157155
let coverageData = {};
158156

159157
if (latestBuild) {
160158
startTime = moment(latestBuild.startTime).format('lll');
161-
status = latestBuild.status;
162159
buildId = latestBuild.id;
163-
duration = this.getDuration(latestBuild.startTime, latestBuild.endTime, status);
160+
duration = this.getDuration(latestBuild.startTime, latestBuild.endTime, latestBuild.status);
164161

165162
coverageData = {
166163
jobId,

app/components/pipeline-list-view/template.hbs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<button {{action "refreshListViewJobs"}} class="refresh-btn">Refresh</button>
2-
{{#light-table table as |t|}}
2+
{{#light-table table height="inherit" as |t|}}
33
{{t.head
44
onColumnClick=(action "onColumnClick")
55
iconSortable="fa fa-sort"

app/components/tc-collection-list/component.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export default Component.extend({
104104
.sort();
105105
}
106106
}),
107-
columns: computed(function() {
107+
columns: computed(function columns() {
108108
return [
109109
{
110110
label: 'Name',

app/components/validator-input/component.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ export default Component.extend({
55
actions: {
66
nameClick() {
77
this.toggleProperty('isOpen');
8-
this.$('#validator-ace-editor').toggle('hidden');
8+
this.element
9+
.querySelectorAll('#validator-ace-editor')
10+
.forEach(el => el.classList.toggle('hidden'));
911
}
1012
}
1113
});

app/components/validator-job/component.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@ export default Component.extend({
7676
this._super(...arguments);
7777

7878
if (!this.isOpen) {
79-
this.$('div').hide();
79+
this.element.querySelectorAll('div').forEach(el => el.classList.add('hidden'));
8080
}
8181
},
8282
actions: {
8383
nameClick() {
8484
this.toggleProperty('isOpen');
85-
this.$('div').toggle('hidden');
85+
this.element.querySelectorAll('div').forEach(el => el.classList.toggle('hidden'));
8686
}
8787
}
8888
});

app/components/validator-job/styles.scss

+4
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,8 @@
5454
color: $sd-failure;
5555
}
5656
}
57+
58+
div .hidden {
59+
display: node !important;
60+
}
5761
}

app/components/validator-pipeline/component.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ export default Component.extend({
55
didInsertElement() {
66
this._super(...arguments);
77
if (!this.isOpen) {
8-
this.$('div').hide();
8+
this.element.querySelectorAll('div').forEach(el => el.classList.add('hidden'));
99
}
1010
},
1111
actions: {
1212
nameClick() {
1313
this.toggleProperty('isOpen');
14-
this.$('div').toggle('hidden');
14+
this.element.querySelectorAll('div').forEach(el => el.classList.toggle('hidden'));
1515
}
1616
}
1717
});

app/components/validator-pipeline/styles.scss

+4
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,8 @@
4545
color: $sd-failure;
4646
}
4747
}
48+
49+
div .hidden {
50+
display: node !important;
51+
}
4852
}

app/components/workflow-tooltip/component.js

+4-6
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,16 @@ export default Component.extend({
1212
this._super(...arguments);
1313

1414
const event = get(this, 'tooltipData.mouseevent');
15-
const el = this.$();
15+
const el = this.element;
1616

1717
// setting tooltip position
1818
if (el && event) {
1919
let top = event.layerY + get(this, 'tooltipData.sizes.ICON_SIZE');
2020

21-
let left = this.left ? event.layerX - 20 : event.layerX - el.outerWidth() / 2;
21+
let left = this.left ? event.layerX - 20 : event.layerX - el.offsetWidth / 2;
2222

23-
el.css({
24-
top,
25-
left
26-
});
23+
el.style.top = top;
24+
el.style.left = left;
2725
}
2826
}
2927
});

app/styles/app.scss

+2
Original file line numberDiff line numberDiff line change
@@ -178,3 +178,5 @@ body {
178178
}
179179

180180
@import 'ember-power-select';
181+
182+
@import 'ember-bootstrap/bootstrap';

config/environment.js

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ module.exports = environment => {
1313
// 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
1414
"'unsafe-inline'"
1515
],
16+
'script-src': ["'unsafe-eval'"],
1617
'manifest-src': ["'self'"],
1718
'frame-src': ["'self'"],
1819
'connect-src': ["'self'"],

0 commit comments

Comments
 (0)