Merge pull request #432 from travis-ci/ps-remove-deprecations
Remove deprecations in preparation for 2.x update
This commit is contained in:
commit
c96a4602cd
|
@ -7,6 +7,16 @@ export default DS.ActiveModelAdapter.extend({
|
||||||
host: config.apiEndpoint,
|
host: config.apiEndpoint,
|
||||||
coalesceFindRequests: true,
|
coalesceFindRequests: true,
|
||||||
|
|
||||||
|
// Before Ember Data 2.0 the default behaviour of running `findAll` was to get
|
||||||
|
// new records only when there're no records in the store. This will change
|
||||||
|
// to a different strategy in 2.0: when you run `findAll` it will not get any
|
||||||
|
// new data initially, but it will try loading new data in the background.
|
||||||
|
//
|
||||||
|
// I'm disabling the new behaviour for now.
|
||||||
|
shouldBackgroundReloadRecord() {
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
|
||||||
ajaxOptions(url, type, options) {
|
ajaxOptions(url, type, options) {
|
||||||
var base, hash, token;
|
var base, hash, token;
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ export default ApplicationAdapter.extend({
|
||||||
buildURL(type, id, record) {
|
buildURL(type, id, record) {
|
||||||
var delimiter, repoId, url;
|
var delimiter, repoId, url;
|
||||||
url = this._super.apply(this, arguments);
|
url = this._super.apply(this, arguments);
|
||||||
if (record && (repoId = Ember.get(record, 'repo.id'))) {
|
if (record && record.belongsTo('repo') && (repoId = record.belongsTo('repo').id)) {
|
||||||
delimiter = url.indexOf('?') !== -1 ? '&' : '?';
|
delimiter = url.indexOf('?') !== -1 ? '&' : '?';
|
||||||
url = "" + url + delimiter + "repository_id=" + repoId;
|
url = "" + url + delimiter + "repository_id=" + repoId;
|
||||||
}
|
}
|
||||||
|
@ -15,12 +15,12 @@ export default ApplicationAdapter.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
updateRecord(store, type, record) {
|
updateRecord(store, type, record) {
|
||||||
var data, id, serializer;
|
var data, serializer;
|
||||||
data = {};
|
data = {};
|
||||||
serializer = store.serializerFor(type.typeKey);
|
serializer = store.serializerFor(type.modelName);
|
||||||
serializer.serializeIntoHash(data, type, record);
|
serializer.serializeIntoHash(data, type, record);
|
||||||
id = Ember.get(record, 'id');
|
var id = record.id;
|
||||||
return this.ajax(this.buildURL(type.typeKey, id, record), "PATCH", {
|
return this.ajax(this.buildURL(type.modelName, id, record), "PATCH", {
|
||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,24 +4,24 @@ import ApplicationAdapter from 'travis/adapters/application';
|
||||||
export default ApplicationAdapter.extend({
|
export default ApplicationAdapter.extend({
|
||||||
namespace: 'settings',
|
namespace: 'settings',
|
||||||
|
|
||||||
find(store, type, id, record) {
|
findRecord(store, type, id, record) {
|
||||||
return this.ajax(this.urlPrefix() + '/ssh_key/' + id, 'GET');
|
return this.ajax(this.urlPrefix() + '/ssh_key/' + id, 'GET');
|
||||||
},
|
},
|
||||||
|
|
||||||
deleteRecord(store, type, record) {
|
deleteRecord(store, type, record) {
|
||||||
var id;
|
var id = record.id;
|
||||||
id = Ember.get(record, 'id');
|
|
||||||
return this.ajax(this.urlPrefix() + '/ssh_key/' + id, "DELETE");
|
return this.ajax(this.urlPrefix() + '/ssh_key/' + id, "DELETE");
|
||||||
},
|
},
|
||||||
|
|
||||||
createRecord(store, type, record) {
|
createRecord(store, type, record) {
|
||||||
var data, id, serializer;
|
var data, serializer;
|
||||||
data = {};
|
data = {};
|
||||||
serializer = store.serializerFor(type.typeKey);
|
serializer = store.serializerFor(type.modelName);
|
||||||
serializer.serializeIntoHash(data, type, record, {
|
serializer.serializeIntoHash(data, type, record, {
|
||||||
includeId: true
|
includeId: true
|
||||||
});
|
});
|
||||||
id = Ember.get(record, 'id');
|
|
||||||
|
var id = record.id;
|
||||||
return this.ajax(this.urlPrefix() + '/ssh_key/' + id, "PATCH", {
|
return this.ajax(this.urlPrefix() + '/ssh_key/' + id, "PATCH", {
|
||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
|
|
|
@ -5,7 +5,7 @@ import config from './config/environment';
|
||||||
|
|
||||||
Ember.MODEL_FACTORY_INJECTIONS = true;
|
Ember.MODEL_FACTORY_INJECTIONS = true;
|
||||||
|
|
||||||
Ember.LinkView.reopen({
|
Ember.LinkComponent.reopen({
|
||||||
attributeBindings: ['alt']
|
attributeBindings: ['alt']
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ export default Ember.Component.extend({
|
||||||
var model = this.get('store').recordForId('ssh_key', id);
|
var model = this.get('store').recordForId('ssh_key', id);
|
||||||
|
|
||||||
if (model) {
|
if (model) {
|
||||||
this.get('store').dematerializeRecord(model._internalModel);
|
this.get('store').unloadRecord(model);
|
||||||
var typeMap = this.get('store').typeMapFor(model.constructor);
|
var typeMap = this.get('store').typeMapFor(model.constructor);
|
||||||
var idToRecord = typeMap.idToRecord;
|
var idToRecord = typeMap.idToRecord;
|
||||||
delete idToRecord[id];
|
delete idToRecord[id];
|
||||||
|
@ -62,7 +62,8 @@ export default Ember.Component.extend({
|
||||||
}
|
}
|
||||||
this.set('isSaving', true);
|
this.set('isSaving', true);
|
||||||
if (this.isValid()) {
|
if (this.isValid()) {
|
||||||
ssh_key = this.get('model').setProperties({
|
ssh_key = this.get('model');
|
||||||
|
ssh_key.setProperties({
|
||||||
description: this.get('description'),
|
description: this.get('description'),
|
||||||
value: this.get('value')
|
value: this.get('value')
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
|
import Ember from 'ember';
|
||||||
import { colorForState } from 'travis/utils/helpers';
|
import { colorForState } from 'travis/utils/helpers';
|
||||||
import BasicView from 'travis/views/basic';
|
|
||||||
import Polling from 'travis/mixins/polling';
|
import Polling from 'travis/mixins/polling';
|
||||||
|
|
||||||
export default BasicView.extend(Polling, {
|
export default Ember.Component.extend({
|
||||||
classNameBindings: ['color'],
|
classNameBindings: ['color'],
|
||||||
buildBinding: 'controller.build',
|
pollModels: 'build',
|
||||||
pollModels: 'controller.build',
|
|
||||||
|
|
||||||
color: function() {
|
color: function() {
|
||||||
return colorForState(this.get('build.state'));
|
return colorForState(this.get('build.state'));
|
|
@ -1,12 +1,15 @@
|
||||||
import BasicView from 'travis/views/basic';
|
import Ember from 'ember';
|
||||||
import Polling from 'travis/mixins/polling';
|
import Polling from 'travis/mixins/polling';
|
||||||
|
|
||||||
export default BasicView.extend(Polling, {
|
export default Ember.Component.extend({
|
||||||
|
store: Ember.inject.service('store'),
|
||||||
|
|
||||||
pollHook: function(store) {
|
pollHook: function(store) {
|
||||||
var contentType, repositoryId;
|
var contentType, repositoryId;
|
||||||
contentType = this.get('controller.contentType');
|
contentType = this.get('contentType');
|
||||||
repositoryId = this.get('controller.repo.id');
|
repositoryId = this.get('repo.id');
|
||||||
store = this.get('controller.store');
|
store = this.get('store');
|
||||||
|
|
||||||
if (contentType === 'builds') {
|
if (contentType === 'builds') {
|
||||||
return store.query('build', {
|
return store.query('build', {
|
||||||
event_type: 'push',
|
event_type: 'push',
|
|
@ -8,7 +8,7 @@ export default Ember.Component.extend({
|
||||||
actionType: 'Save',
|
actionType: 'Save',
|
||||||
showValueField: Ember.computed.alias('public'),
|
showValueField: Ember.computed.alias('public'),
|
||||||
|
|
||||||
value: function(key, value) {
|
value: function(key) {
|
||||||
if (this.get('envVar.public')) {
|
if (this.get('envVar.public')) {
|
||||||
return this.get('envVar.value');
|
return this.get('envVar.value');
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -3,36 +3,24 @@ import Ember from 'ember';
|
||||||
export default Ember.Component.extend({
|
export default Ember.Component.extend({
|
||||||
logBinding: 'job.log',
|
logBinding: 'job.log',
|
||||||
|
|
||||||
didInsertElement() {
|
didReceiveAttrs: function(options) {
|
||||||
return this.setupLog();
|
this._super(...arguments);
|
||||||
},
|
|
||||||
|
|
||||||
logDidChange: function() {
|
if(options.oldAttrs && options.oldAttrs.job) {
|
||||||
return this.setupLog();
|
this.teardownLog(options.oldAttrs.job.value);
|
||||||
}.observes('log'),
|
}
|
||||||
|
|
||||||
logWillChange: function() {
|
if(options.newAttrs && options.newAttrs.job) {
|
||||||
return this.teardownLog();
|
this.setupLog(options.newAttrs.job.value);
|
||||||
}.observesBefore('log'),
|
|
||||||
|
|
||||||
willDestroyElement() {
|
|
||||||
return this.teardownLog();
|
|
||||||
},
|
|
||||||
|
|
||||||
teardownLog() {
|
|
||||||
var job;
|
|
||||||
job = this.get('job');
|
|
||||||
if (job) {
|
|
||||||
return job.unsubscribe();
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
setupLog() {
|
teardownLog(job) {
|
||||||
var job;
|
job.unsubscribe();
|
||||||
job = this.get('job');
|
},
|
||||||
if (job) {
|
|
||||||
|
setupLog(job) {
|
||||||
job.get('log').fetch();
|
job.get('log').fetch();
|
||||||
return job.subscribe();
|
job.subscribe();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -3,10 +3,8 @@ import { colorForState } from 'travis/utils/helpers';
|
||||||
import { githubCommit } from 'travis/utils/urls';
|
import { githubCommit } from 'travis/utils/urls';
|
||||||
import Polling from 'travis/mixins/polling';
|
import Polling from 'travis/mixins/polling';
|
||||||
|
|
||||||
export default Ember.View.extend(Polling, {
|
export default Ember.Component.extend({
|
||||||
pollModels: 'controller.job.build',
|
pollModels: 'job.build',
|
||||||
repoBinding: 'controller.repo',
|
|
||||||
jobBinding: 'controller.job',
|
|
||||||
commitBinding: 'job.commit',
|
commitBinding: 'job.commit',
|
||||||
currentItemBinding: 'job',
|
currentItemBinding: 'job',
|
||||||
|
|
||||||
|
@ -16,5 +14,5 @@ export default Ember.View.extend(Polling, {
|
||||||
|
|
||||||
urlGithubCommit: function() {
|
urlGithubCommit: function() {
|
||||||
return githubCommit(this.get('repo.slug'), this.get('commit.sha'));
|
return githubCommit(this.get('repo.slug'), this.get('commit.sha'));
|
||||||
}.property('repo.slug', 'commit.sha'),
|
}.property('repo.slug', 'commit.sha')
|
||||||
});
|
});
|
|
@ -68,14 +68,14 @@ export default Ember.Component.extend({
|
||||||
console.log('log view: did insert');
|
console.log('log view: did insert');
|
||||||
}
|
}
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
return this.createEngine();
|
Ember.run.scheduleOnce('afterRender', this, 'createEngine');
|
||||||
},
|
},
|
||||||
|
|
||||||
willDestroyElement() {
|
willDestroyElement() {
|
||||||
if (Log.DEBUG) {
|
if (Log.DEBUG) {
|
||||||
console.log('log view: will destroy');
|
console.log('log view: will destroy');
|
||||||
}
|
}
|
||||||
return this.teardownLog();
|
Ember.run.scheduleOnce('afterRender', this, 'teardownLog');
|
||||||
},
|
},
|
||||||
|
|
||||||
teardownLog(log) {
|
teardownLog(log) {
|
||||||
|
@ -121,7 +121,7 @@ export default Ember.Component.extend({
|
||||||
this.engine.limit = this.limit;
|
this.engine.limit = this.limit;
|
||||||
this.logFolder = new LogFolder(this.$('#log'));
|
this.logFolder = new LogFolder(this.$('#log'));
|
||||||
this.lineSelector = new LinesSelector(this.$('#log'), this.scroll, this.logFolder);
|
this.lineSelector = new LinesSelector(this.$('#log'), this.scroll, this.logFolder);
|
||||||
return this.observeParts(log);
|
this.observeParts(log);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -158,7 +158,7 @@ export default Ember.Component.extend({
|
||||||
if (Log.DEBUG) {
|
if (Log.DEBUG) {
|
||||||
console.log('log view: parts did change');
|
console.log('log view: parts did change');
|
||||||
}
|
}
|
||||||
if (this.get('state') !== 'inDOM') {
|
if (this.get('_state') !== 'inDOM') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ref = parts.slice(start, start + added);
|
ref = parts.slice(start, start + added);
|
||||||
|
|
|
@ -1,18 +1,17 @@
|
||||||
import BasicView from 'travis/views/basic';
|
|
||||||
import Ember from 'ember';
|
import Ember from 'ember';
|
||||||
|
|
||||||
export default BasicView.extend({
|
export default Ember.Component.extend({
|
||||||
popup: Ember.inject.service(),
|
popup: Ember.inject.service(),
|
||||||
classNames: ['application'],
|
classNames: ['application'],
|
||||||
|
|
||||||
click(event) {
|
click(event) {
|
||||||
var targetAndParents;
|
var targetAndParents = $(event.target).parents().andSelf();
|
||||||
targetAndParents = $(event.target).parents().andSelf();
|
|
||||||
if (!(targetAndParents.hasClass('open-popup') || targetAndParents.hasClass('popup'))) {
|
if (!(targetAndParents.hasClass('open-popup') || targetAndParents.hasClass('popup'))) {
|
||||||
this.get('popup').close();
|
this.get('popup').close();
|
||||||
}
|
}
|
||||||
if (!targetAndParents.hasClass('menu') && !targetAndParents.is('#tools > a')) {
|
if (!targetAndParents.hasClass('menu') && !targetAndParents.is('#tools > a')) {
|
||||||
return $('.menu').removeClass('display');
|
$('.menu').removeClass('display');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
6
app/components/profile-accounts-wrapper.js
Normal file
6
app/components/profile-accounts-wrapper.js
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
import Ember from 'ember';
|
||||||
|
|
||||||
|
export default Ember.Component.extend({
|
||||||
|
classNames: ['profile-orglist', 'columns', 'medium-4'],
|
||||||
|
tagName: 'aside',
|
||||||
|
});
|
7
app/components/repo-wrapper.js
Normal file
7
app/components/repo-wrapper.js
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
import Polling from 'travis/mixins/polling';
|
||||||
|
import Ember from 'ember';
|
||||||
|
|
||||||
|
export default Ember.Component.extend(Polling, {
|
||||||
|
pollModels: 'repo',
|
||||||
|
classNameBindings: ['isLoading:loading']
|
||||||
|
});
|
|
@ -1,13 +1,14 @@
|
||||||
import Ember from 'ember';
|
import Ember from 'ember';
|
||||||
|
|
||||||
export default Ember.View.extend({
|
export default Ember.Component.extend({
|
||||||
templateName: 'repos/list/tabs',
|
auth: Ember.inject.service(),
|
||||||
tabBinding: 'controller.tab',
|
|
||||||
currentUserBinding: 'controller.currentUser.model',
|
currentUserBinding: 'auth.currentUser',
|
||||||
|
|
||||||
classRecent: function() {
|
classRecent: function() {
|
||||||
if (this.get('tab') === 'recent') {
|
if (this.get('tab') === 'recent') {
|
||||||
return 'active';
|
return 'active';
|
||||||
} else if (this.get('tab') === 'search' && this.get('controller').auth.get('signedIn')) {
|
} else if (this.get('tab') === 'search' && this.get('auth.signedIn')) {
|
||||||
return 'hidden';
|
return 'hidden';
|
||||||
}
|
}
|
||||||
}.property('tab'),
|
}.property('tab'),
|
24
app/components/status-images.js
Normal file
24
app/components/status-images.js
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
import Ember from 'ember';
|
||||||
|
import { format as formatStatusImage } from 'travis/utils/status-image-formats';
|
||||||
|
|
||||||
|
export default Ember.Component.extend({
|
||||||
|
popup: Ember.inject.service(),
|
||||||
|
|
||||||
|
id: 'status-images',
|
||||||
|
attributeBindings: ['id'],
|
||||||
|
classNames: ['popup', 'status-images'],
|
||||||
|
formats: ['Image URL', 'Markdown', 'Textile', 'Rdoc', 'AsciiDoc', 'RST', 'Pod', 'CCTray'],
|
||||||
|
|
||||||
|
actions: {
|
||||||
|
close() {
|
||||||
|
return this.get('popup').close();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
statusString: function() {
|
||||||
|
let format = this.get('format') || this.get('formats.firstObject'),
|
||||||
|
branch = this.get('branch') || 'master';
|
||||||
|
|
||||||
|
return formatStatusImage(format, this.get('repo.slug'), branch);
|
||||||
|
}.property('format', 'repo.slug', 'branch')
|
||||||
|
});
|
3
app/components/travis-layout.js
Normal file
3
app/components/travis-layout.js
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
import Ember from 'ember';
|
||||||
|
|
||||||
|
export default Ember.Component.extend({});
|
|
@ -1,3 +1,3 @@
|
||||||
import Ember from 'ember';
|
import Ember from 'ember';
|
||||||
|
|
||||||
export default Ember.ArrayController.extend();
|
export default Ember.Controller.extend();
|
||||||
|
|
|
@ -1,49 +1,33 @@
|
||||||
import Ember from 'ember';
|
import Ember from 'ember';
|
||||||
|
|
||||||
export default Ember.ArrayController.extend({
|
export default Ember.Controller.extend({
|
||||||
sortAscending: false,
|
sortAscending: false,
|
||||||
sortProperties: ['number'],
|
sortProperties: ['number'],
|
||||||
repoController: Ember.inject.controller('repo'),
|
repoController: Ember.inject.controller('repo'),
|
||||||
repoBinding: 'repoController.repo',
|
repoBinding: 'repoController.repo',
|
||||||
tabBinding: 'repoController.tab',
|
tabBinding: 'repoController.tab',
|
||||||
isLoadedBinding: 'content.isLoaded',
|
isLoadedBinding: 'model.isLoaded',
|
||||||
isLoadingBinding: 'content.isLoading',
|
isLoadingBinding: 'model.isLoading',
|
||||||
|
|
||||||
showMore() {
|
showMore() {
|
||||||
var id, number, type;
|
var id, number, type;
|
||||||
id = this.get('repo.id');
|
id = this.get('repo.id');
|
||||||
number = this.get('lastObject.number');
|
number = this.get('model.lastObject.number');
|
||||||
type = this.get('tab') === "builds" ? 'push' : 'pull_request';
|
type = this.get('tab') === "model" ? 'push' : 'pull_request';
|
||||||
return this.get('content').load(this.olderThanNumber(id, number, type));
|
return this.get('model').load(this.olderThanNumber(id, number, type));
|
||||||
},
|
},
|
||||||
|
|
||||||
displayShowMoreButton: function() {
|
displayShowMoreButton: function() {
|
||||||
return this.get('tab') !== 'branches' && parseInt(this.get('lastObject.number')) > 1;
|
return this.get('tab') !== 'branches' && parseInt(this.get('model.lastObject.number')) > 1;
|
||||||
}.property('tab', 'lastObject.number'),
|
}.property('tab', 'model.lastObject.number'),
|
||||||
|
|
||||||
displayPullRequests: function() {
|
displayPullRequests: function() {
|
||||||
if (this.get('tab') === 'pull_requests') {
|
return this.get('tab') === 'pull_requests';
|
||||||
if (Ember.isEmpty(this.get('repo.pullRequests.content'))) {
|
}.property('tab'),
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}.property('tab', 'repo.builds', 'repo.pullRequests'),
|
|
||||||
|
|
||||||
displayBranches: function() {
|
displayBranches: function() {
|
||||||
if (this.get('tab') === 'branches') {
|
return this.get('tab') === 'branches';
|
||||||
if (Ember.isEmpty(this.get('repo.branches.content.content'))) {
|
}.property('tab'),
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}.property('tab', 'repo.builds', 'repo.branches'),
|
|
||||||
|
|
||||||
noticeData: function() {
|
noticeData: function() {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -1,3 +1,15 @@
|
||||||
import Ember from 'ember';
|
import Ember from 'ember';
|
||||||
|
|
||||||
export default Ember.Controller.extend();
|
export default Ember.Controller.extend({
|
||||||
|
layoutName: Ember.computed({
|
||||||
|
get(key) {
|
||||||
|
if(this._layoutName) {
|
||||||
|
return 'layouts/' + this._layoutName;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
set(key, value) {
|
||||||
|
return this._layoutName = value;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
|
@ -1,3 +1,15 @@
|
||||||
import Ember from 'ember';
|
import Ember from 'ember';
|
||||||
|
|
||||||
export default Ember.Controller.extend();
|
export default Ember.Controller.extend({
|
||||||
|
layoutName: Ember.computed({
|
||||||
|
get(key) {
|
||||||
|
if(this._layoutName) {
|
||||||
|
return 'layouts/' + this._layoutName;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
set(key, value) {
|
||||||
|
return this._layoutName = value;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
|
@ -1,11 +1,16 @@
|
||||||
import Ember from 'ember';
|
import Ember from 'ember';
|
||||||
import { githubRepo } from 'travis/utils/urls';
|
import { githubRepo, statusImage } from 'travis/utils/urls';
|
||||||
|
import config from 'travis/config/environment';
|
||||||
|
|
||||||
|
|
||||||
export default Ember.Controller.extend({
|
export default Ember.Controller.extend({
|
||||||
|
popup: Ember.inject.service(),
|
||||||
|
|
||||||
jobController: Ember.inject.controller('job'),
|
jobController: Ember.inject.controller('job'),
|
||||||
buildController: Ember.inject.controller('build'),
|
buildController: Ember.inject.controller('build'),
|
||||||
buildsController: Ember.inject.controller('builds'),
|
buildsController: Ember.inject.controller('builds'),
|
||||||
reposController: Ember.inject.controller('repos'),
|
reposController: Ember.inject.controller('repos'),
|
||||||
|
reposBinding: 'reposController.repos',
|
||||||
currentUserBinding: 'auth.currentUser',
|
currentUserBinding: 'auth.currentUser',
|
||||||
|
|
||||||
classNames: ['repo'],
|
classNames: ['repo'],
|
||||||
|
@ -14,6 +19,21 @@ export default Ember.Controller.extend({
|
||||||
builds: Ember.computed.alias('buildsController.content'),
|
builds: Ember.computed.alias('buildsController.content'),
|
||||||
job: Ember.computed.alias('jobController.job'),
|
job: Ember.computed.alias('jobController.job'),
|
||||||
|
|
||||||
|
isEmpty: function() {
|
||||||
|
return this.get('repos.isLoaded') && this.get('repos.length') === 0;
|
||||||
|
}.property('repos.isLoaded', 'repos.length'),
|
||||||
|
|
||||||
|
statusImageUrl: function() {
|
||||||
|
return statusImage(this.get('repo.slug'));
|
||||||
|
}.property('repo.slug'),
|
||||||
|
|
||||||
|
actions: {
|
||||||
|
statusImages() {
|
||||||
|
this.get('popup').open('status-images');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
slug: function() {
|
slug: function() {
|
||||||
return this.get('repo.slug');
|
return this.get('repo.slug');
|
||||||
}.property('repo.slug'),
|
}.property('repo.slug'),
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import Ember from 'ember';
|
import Ember from 'ember';
|
||||||
import limit from 'travis/utils/computed-limit';
|
|
||||||
import Repo from 'travis/models/repo';
|
import Repo from 'travis/models/repo';
|
||||||
import Config from 'travis/config/environment';
|
import Config from 'travis/config/environment';
|
||||||
|
|
||||||
|
@ -202,7 +201,7 @@ var Controller = Ember.Controller.extend({
|
||||||
Ember.run.cancel(this.searchLater);
|
Ember.run.cancel(this.searchLater);
|
||||||
}
|
}
|
||||||
this.searchLater = Ember.run.later(this, (function() {
|
this.searchLater = Ember.run.later(this, (function() {
|
||||||
this.transitionTo('main.search', phrase.replace(/\//g, '%2F'));
|
this.transitionToRoute('main.search', phrase.replace(/\//g, '%2F'));
|
||||||
}), 500);
|
}), 500);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import Ember from 'ember';
|
import Ember from 'ember';
|
||||||
|
|
||||||
export default Ember.ArrayController.extend({
|
export default Ember.Controller.extend({
|
||||||
repoController: Ember.inject.controller('repo'),
|
repoController: Ember.inject.controller('repo'),
|
||||||
|
|
||||||
lintUrl: function() {
|
lintUrl: function() {
|
||||||
|
|
|
@ -102,5 +102,17 @@ export default Ember.Controller.extend({
|
||||||
},
|
},
|
||||||
showCta: function() {
|
showCta: function() {
|
||||||
return !this.get('auth.signedIn') && !this.get('config.pro') && !this.get('landingPage');
|
return !this.get('auth.signedIn') && !this.get('config.pro') && !this.get('landingPage');
|
||||||
}.property('auth.signedIn', 'landingPage')
|
}.property('auth.signedIn', 'landingPage'),
|
||||||
|
|
||||||
|
classProfile: function() {
|
||||||
|
var classes = ['profile menu'];
|
||||||
|
|
||||||
|
if (this.get('tab') === 'profile') {
|
||||||
|
classes.push('active');
|
||||||
|
}
|
||||||
|
|
||||||
|
classes.push(this.get('controller.auth.state') || 'signed-out');
|
||||||
|
|
||||||
|
return classes.join(' ');
|
||||||
|
}.property('tab', 'auth.state')
|
||||||
});
|
});
|
||||||
|
|
|
@ -3,6 +3,12 @@ import Ember from 'ember';
|
||||||
export default Ember.Mixin.create({
|
export default Ember.Mixin.create({
|
||||||
polling: Ember.inject.service(),
|
polling: Ember.inject.service(),
|
||||||
|
|
||||||
|
init() {
|
||||||
|
this.set('currentPollModels', {});
|
||||||
|
|
||||||
|
return this._super(...arguments);
|
||||||
|
},
|
||||||
|
|
||||||
didInsertElement() {
|
didInsertElement() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
return this.startPolling();
|
return this.startPolling();
|
||||||
|
@ -17,16 +23,20 @@ export default Ember.Mixin.create({
|
||||||
return this.pollModel(key);
|
return this.pollModel(key);
|
||||||
},
|
},
|
||||||
|
|
||||||
pollModelWillChange(sender, key, value) {
|
|
||||||
return this.stopPollingModel(key);
|
|
||||||
},
|
|
||||||
|
|
||||||
pollModel(property) {
|
pollModel(property) {
|
||||||
var addToPolling, model;
|
var model = this.get(property),
|
||||||
addToPolling = () => {
|
currentPollModels = this.get('currentPollModels');
|
||||||
|
|
||||||
|
if(currentPollModels[property]) {
|
||||||
|
this.get('polling').stopPolling(currentPollModels[property]);
|
||||||
|
}
|
||||||
|
currentPollModels[property] = model;
|
||||||
|
|
||||||
|
var addToPolling = () => {
|
||||||
return this.get('polling').startPolling(model);
|
return this.get('polling').startPolling(model);
|
||||||
};
|
};
|
||||||
if (model = this.get(property)) {
|
|
||||||
|
if (model) {
|
||||||
if (model.then) {
|
if (model.then) {
|
||||||
return model.then(function(resolved) {
|
return model.then(function(resolved) {
|
||||||
return addToPolling(resolved);
|
return addToPolling(resolved);
|
||||||
|
@ -38,8 +48,8 @@ export default Ember.Mixin.create({
|
||||||
},
|
},
|
||||||
|
|
||||||
stopPollingModel(property) {
|
stopPollingModel(property) {
|
||||||
var model;
|
var model = this.get(property);
|
||||||
if (model = this.get(property)) {
|
if (model) {
|
||||||
return this.get('polling').stopPolling(model);
|
return this.get('polling').stopPolling(model);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -54,7 +64,6 @@ export default Ember.Mixin.create({
|
||||||
pollModels.forEach( (property) => {
|
pollModels.forEach( (property) => {
|
||||||
this.pollModel(property);
|
this.pollModel(property);
|
||||||
this.addObserver(property, this, 'pollModelDidChange');
|
this.addObserver(property, this, 'pollModelDidChange');
|
||||||
return Ember.addBeforeObserver(this, property, this, 'pollModelWillChange');
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (this.pollHook) {
|
if (this.pollHook) {
|
||||||
|
@ -63,15 +72,15 @@ export default Ember.Mixin.create({
|
||||||
},
|
},
|
||||||
|
|
||||||
stopPolling() {
|
stopPolling() {
|
||||||
var pollModels;
|
var pollModels = this.get('pollModels');
|
||||||
if (pollModels = this.get('pollModels')) {
|
|
||||||
|
if (pollModels) {
|
||||||
if (!Ember.isArray(pollModels)) {
|
if (!Ember.isArray(pollModels)) {
|
||||||
pollModels = [pollModels];
|
pollModels = [pollModels];
|
||||||
}
|
}
|
||||||
pollModels.forEach( (property) => {
|
pollModels.forEach( (property) => {
|
||||||
this.stopPollingModel(property);
|
this.stopPollingModel(property);
|
||||||
this.removeObserver(property, this, 'pollModelDidChange');
|
this.removeObserver(property, this, 'pollModelDidChange');
|
||||||
return Ember.removeBeforeObserver(this, property, this, 'pollModelWillChange');
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return this.get('polling').stopPollingHook(this);
|
return this.get('polling').stopPollingHook(this);
|
||||||
|
|
|
@ -220,7 +220,7 @@ Repo.reopenClass({
|
||||||
return promise;
|
return promise;
|
||||||
} else {
|
} else {
|
||||||
login = reposIdsOrlogin;
|
login = reposIdsOrlogin;
|
||||||
return store.find('repo', {
|
return store.query('repo', {
|
||||||
member: login,
|
member: login,
|
||||||
orderBy: 'name'
|
orderBy: 'name'
|
||||||
});
|
});
|
||||||
|
@ -253,7 +253,7 @@ Repo.reopenClass({
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
return store.find('repo', {
|
return store.query('repo', {
|
||||||
search: query,
|
search: query,
|
||||||
orderBy: 'name'
|
orderBy: 'name'
|
||||||
});
|
});
|
||||||
|
@ -299,7 +299,7 @@ Repo.reopenClass({
|
||||||
return repo;
|
return repo;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
promise = store.find('repo', {
|
promise = store.query('repo', {
|
||||||
slug: slug
|
slug: slug
|
||||||
}).then(function(repos) {
|
}).then(function(repos) {
|
||||||
return repos.get('firstObject') || (function() {
|
return repos.get('firstObject') || (function() {
|
||||||
|
|
|
@ -5,7 +5,7 @@ export default TravisRoute.extend({
|
||||||
|
|
||||||
renderTemplate() {
|
renderTemplate() {
|
||||||
$('body').attr('id', 'auth');
|
$('body').attr('id', 'auth');
|
||||||
return this.render('auth.signin');
|
return this.render('signin');
|
||||||
},
|
},
|
||||||
|
|
||||||
deactivate() {
|
deactivate() {
|
||||||
|
|
|
@ -9,11 +9,6 @@ export default Ember.Service.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
close() {
|
close() {
|
||||||
var view;
|
|
||||||
if (view = Ember.View.currentPopupView) {
|
|
||||||
view.destroy();
|
|
||||||
Ember.View.currentPopupView = null;
|
|
||||||
}
|
|
||||||
return $('.popup').removeClass('display');
|
return $('.popup').removeClass('display');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
{{#if allHooks.isLoaded}}
|
{{#if allHooks.isLoaded}}
|
||||||
|
|
||||||
<header>
|
<header>
|
||||||
|
|
||||||
{{#if config.billingEndpoint}}
|
{{#if config.billingEndpoint}}
|
||||||
<div class="cta-btn">
|
<div class="cta-btn">
|
||||||
{{#if view.subscribed}}
|
{{#if subscribeButtonInfo.subscribed}}
|
||||||
<a class="btn btn-activated" href={{billingUrl}}>
|
<a class="btn btn-activated" href={{billingUrl}}>
|
||||||
Subscription active!
|
Subscription active!
|
||||||
</a>
|
</a>
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#if view.education}}
|
{{#if subscribeButtonInfo.education}}
|
||||||
<a class="btn btn-activated" href={{billingUrl}}>
|
<a class="btn btn-activated" href={{billingUrl}}>
|
||||||
Educational account!
|
Educational account!
|
||||||
</a>
|
</a>
|
||||||
|
@ -42,19 +43,19 @@
|
||||||
<ol class="row">
|
<ol class="row">
|
||||||
<li class="columns medium-4">
|
<li class="columns medium-4">
|
||||||
<figure>
|
<figure>
|
||||||
<img src="/images/ui/hooks-step-1-01.svg" alt="">
|
<img src="/images/ui/hooks-step-1-01.svg" alt="Flick the repo switch">
|
||||||
<figcaption>Flick the repository switch on</figcaption>
|
<figcaption>Flick the repository switch on</figcaption>
|
||||||
</figure>
|
</figure>
|
||||||
</li>
|
</li>
|
||||||
<li class="columns medium-4">
|
<li class="columns medium-4">
|
||||||
<figure>
|
<figure>
|
||||||
<img src="/images/ui/hooks-step-2-01.svg" alt="">
|
<img src="/images/ui/hooks-step-2-01.svg" alt="Add .travis.yml file">
|
||||||
<figcaption>Add .travis.yml file to your repository</figcaption>
|
<figcaption>Add .travis.yml file to your repository</figcaption>
|
||||||
</figure>
|
</figure>
|
||||||
</li>
|
</li>
|
||||||
<li class="columns medium-4">
|
<li class="columns medium-4">
|
||||||
<figure>
|
<figure>
|
||||||
<img src="/images/ui/hooks-step-3-01.svg" alt="">
|
<img src="/images/ui/hooks-step-3-01.svg" alt="Do a git push">
|
||||||
<figcaption>Trigger your first build with a git push</figcaption>
|
<figcaption>Trigger your first build with a git push</figcaption>
|
||||||
</figure>
|
</figure>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -1 +1,3 @@
|
||||||
{{outlet}}
|
{{#popup-click-handler}}
|
||||||
|
{{outlet}}
|
||||||
|
{{/popup-click-handler}}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{{#build-wrapper build=build}}
|
||||||
{{#if loading}}
|
{{#if loading}}
|
||||||
{{loading-indicator}}
|
{{loading-indicator}}
|
||||||
{{else}}
|
{{else}}
|
||||||
|
@ -16,3 +17,4 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
{{/build-wrapper}}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{{#if content.isLoaded}}
|
{{#builds-wrapper contentType=contentType repo=repo}}
|
||||||
|
{{#if model.isLoaded}}
|
||||||
<ul class="build-list">
|
<ul class="build-list">
|
||||||
{{#each controller as |build|}}
|
{{#each model as |build|}}
|
||||||
{{builds-item build=build}}
|
{{builds-item build=build}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{no-builds repo=noticeData isPR=displayPullRequests isBranch=displayBranches}}
|
{{no-builds repo=noticeData isPR=displayPullRequests isBranch=displayBranches}}
|
||||||
|
@ -18,3 +19,4 @@
|
||||||
{{else}}
|
{{else}}
|
||||||
{{loading-indicator}}
|
{{loading-indicator}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
{{/builds-wrapper}}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<p>You're only two steps away from using Travis:</p>
|
<p>You're only two steps away from using Travis:</p>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li> Hook up {{#link-to "profile.index" class="signed-in"}}one or more of your GitHub repositories{{/link-to}} with Travis.</li>
|
<li> Hook up {{#link-to "profile" class="signed-in"}}one or more of your GitHub repositories{{/link-to}} with Travis.</li>
|
||||||
<li> Push some code!</li>
|
<li> Push some code!</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
<div class="tabnav tabnav--sidebar" role="tablist">
|
<div class="tabnav tabnav--sidebar" role="tablist">
|
||||||
<ul class="tab tabs--sidebar">
|
<ul class="tab tabs--sidebar">
|
||||||
<li id="tab_owned" class={{view.classOwned}}>
|
<li id="tab_owned" class={{classOwned}}>
|
||||||
<a href="#" {{action "showMyRepositories"}}>My Repositories</a>
|
<a href="#" {{action showMyRepositories}}>My Repositories</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
{{#if config.pro}}
|
{{#if config.pro}}
|
||||||
<li id="tab_running" class={{view.classRunning}}>
|
<li id="tab_running" class={{classRunning}}>
|
||||||
<a href="#" {{action "showRunningJobs"}}>Running ({{startedJobsCount}}/{{allJobsCount}})</a>
|
<a href="#" {{action showRunningJobs}}>Running ({{startedJobsCount}}/{{allJobsCount}})</a>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<li id="tab_new" class={{view.classNew}}>
|
<li id="tab_new" class={{classNew}}>
|
||||||
{{#link-to "profile" trackEvent="add-repository-from-list" title="Add New Repository"}}
|
{{#link-to "profile" trackEvent="add-repository-from-list" title="Add New Repository"}}
|
||||||
<span class="icon icon--plus"></span>
|
<span class="icon icon--plus"></span>
|
||||||
{{/link-to}}
|
{{/link-to}}
|
25
app/templates/components/status-images.hbs
Normal file
25
app/templates/components/status-images.hbs
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
<a href="#" class="close" {{action "close"}}></a>
|
||||||
|
<p>
|
||||||
|
<label>Branch:</label>
|
||||||
|
{{#if branches.isLoaded}}
|
||||||
|
{{#x-select value=branch}}
|
||||||
|
{{#each branches as |branch|}}
|
||||||
|
{{#x-option value=branch.commit.branch}}{{branch.commit.branch}}{{/x-option}}
|
||||||
|
{{/each}}
|
||||||
|
{{/x-select}}
|
||||||
|
{{else}}
|
||||||
|
{{loading-indicator}}
|
||||||
|
{{/if}}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<label>
|
||||||
|
{{#x-select value=format}}
|
||||||
|
{{#each formats as |format|}}
|
||||||
|
{{#x-option value=format}}{{format}}{{/x-option}}
|
||||||
|
{{/each}}
|
||||||
|
{{/x-select}}
|
||||||
|
|
||||||
|
</label>
|
||||||
|
{{status-image-input value=statusString class="url" rows=3}}
|
||||||
|
</p>
|
|
@ -1 +1,3 @@
|
||||||
{{outlet}}
|
{{#travis-layout layoutName="layouts/dashboard" class="dashboard"}}
|
||||||
|
{{outlet}}
|
||||||
|
{{/travis-layout}}
|
||||||
|
|
|
@ -1,27 +0,0 @@
|
||||||
<form class="env-var" {{action "save" on="submit"}}>
|
|
||||||
{{#travis-field "name"}}
|
|
||||||
{{#label for="name" class="name"}}Name:{{/label}}
|
|
||||||
{{input value=name class="env-name" placeholder="Name"}} {{travis-errors "name"}}
|
|
||||||
{{/travis-field}}
|
|
||||||
<span class="equals">=</span>
|
|
||||||
{{#if showValueField}}
|
|
||||||
<div class="field value value--extra">
|
|
||||||
{{#label for="value" class="value"}}Value:{{/label}}
|
|
||||||
{{input value=value class="env-value" placeholder="Value"}}
|
|
||||||
</div>
|
|
||||||
{{else}}
|
|
||||||
<div class="field name">
|
|
||||||
<span class="value value-display secure">{{value}}</span>
|
|
||||||
</div>
|
|
||||||
{{/if}}
|
|
||||||
<div class="field field--switch">
|
|
||||||
{{travis-switch active=public}}
|
|
||||||
{{#label for="secure" class="public"}}Display value in build logs{{/label}}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="actions">
|
|
||||||
<input type="submit" value={{actionType}} class="submit-env-var {{if isSaving 'saving'}}" disabled={{isSaving}} />
|
|
||||||
<span class="or">or</span>
|
|
||||||
<a href="#" class="cancel-env-var" {{action "cancel"}}>Cancel</a>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
|
@ -1 +0,0 @@
|
||||||
{{#link-to "env_vars.new" class="add-env-var"}}Add a new variable{{/link-to}}
|
|
|
@ -1 +0,0 @@
|
||||||
{{partial 'env_vars/form'}}
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{{#travis-layout layoutName="layouts/error" class="error error404"}}
|
||||||
<div class="error-bg full-size">
|
<div class="error-bg full-size">
|
||||||
<div class="hill-left full-size"></div>
|
<div class="hill-left full-size"></div>
|
||||||
<div class="hill-right full-size"></div>
|
<div class="hill-right full-size"></div>
|
||||||
|
@ -8,3 +9,4 @@
|
||||||
<h1>404: Something's Missing</h1>
|
<h1>404: Something's Missing</h1>
|
||||||
<p>We're sorry! It seems like this page cannot be found.</p>
|
<p>We're sorry! It seems like this page cannot be found.</p>
|
||||||
</div>
|
</div>
|
||||||
|
{{/travis-layout}}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{{#travis-layout layoutName="layouts/simple"}}
|
||||||
<div id="first_sync" class="row first-sync">
|
<div id="first_sync" class="row first-sync">
|
||||||
<div class="column medium-6 medium-centered">
|
<div class="column medium-6 medium-centered">
|
||||||
{{#if isSyncing}}
|
{{#if isSyncing}}
|
||||||
|
@ -23,3 +24,4 @@
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{{/travis-layout}}
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
{{#each view.errors as |error|}}{{error.message}}{{/each}}
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{{#travis-layout layoutName="layouts/landing-page" class="landing-pro"}}
|
||||||
<div id="landing" class="landing wrapper">
|
<div id="landing" class="landing wrapper">
|
||||||
<section class="section--hero section--grey">
|
<section class="section--hero section--grey">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
|
@ -89,3 +90,4 @@
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
{{/travis-layout}}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{{#travis-layout layoutName="layouts/landing-page"}}
|
||||||
<div id="landing" class="landing">
|
<div id="landing" class="landing">
|
||||||
<div class="row hero z-1">
|
<div class="row hero z-1">
|
||||||
<div class="landing-centered-wrapper">
|
<div class="landing-centered-wrapper">
|
||||||
|
@ -248,3 +249,4 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{{/travis-layout}}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{{#travis-layout layoutName="layouts/simple"}}
|
||||||
<div id="insufficient-permissions">
|
<div id="insufficient-permissions">
|
||||||
<img src="/images/travis-crying.png" class="sad-travis" width="150">
|
<img src="/images/travis-crying.png" class="sad-travis" width="150">
|
||||||
|
|
||||||
|
@ -23,3 +24,4 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{{/travis-layout}}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{{#job-wrapper repo=repo job=job}}
|
||||||
{{#if job.isLoaded}}
|
{{#if job.isLoaded}}
|
||||||
|
|
||||||
{{build-header item=job user=auth.currentUser commit=job.commit repo=repo}}
|
{{build-header item=job user=auth.currentUser commit=job.commit repo=repo}}
|
||||||
|
@ -9,3 +10,4 @@
|
||||||
{{loading-indicator}}
|
{{loading-indicator}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
{{/job-wrapper}}
|
||||||
|
|
|
@ -1 +1,3 @@
|
||||||
{{loading-indicator}}
|
{{#travis-layout layoutName=layoutName}}
|
||||||
|
{{loading-indicator}}
|
||||||
|
{{/travis-layout}}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{{#travis-layout layoutName="layouts/landing-page" class="landing-pro"}}
|
||||||
<div id="landing" class="landing wrapper">
|
<div id="landing" class="landing wrapper">
|
||||||
<section class="section--white">
|
<section class="section--white">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
|
@ -143,3 +144,4 @@
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
{{/travis-layout}}
|
||||||
|
|
|
@ -1 +1,3 @@
|
||||||
{{outlet}}
|
{{#travis-layout layoutName="layouts/home" class="main"}}
|
||||||
|
{{outlet}}
|
||||||
|
{{/travis-layout}}
|
||||||
|
|
|
@ -1 +1,3 @@
|
||||||
The requested page was not found.
|
{{#travis-layout layoutName="layouts/simple"}}
|
||||||
|
The requested page was not found.
|
||||||
|
{{/travis-layout}}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{{#travis-layout layoutName="layouts/profile" class="owner"}}
|
||||||
<header class="owner-header row">
|
<header class="owner-header row">
|
||||||
<div class="owner-avatar">
|
<div class="owner-avatar">
|
||||||
<img src={{avatarURL}} alt="" width="125" height="125">
|
<img src={{avatarURL}} alt="" width="125" height="125">
|
||||||
|
@ -36,3 +37,4 @@
|
||||||
</section> --}}
|
</section> --}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{{/travis-layout}}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{{#travis-layout layoutName="layouts/landing-page" class="landing-pro"}}
|
||||||
<div id="landing" class="landing wrapper">
|
<div id="landing" class="landing wrapper">
|
||||||
<section class="section--white">
|
<section class="section--white">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
|
@ -133,3 +134,4 @@
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
{{/travis-layout}}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{{#profile-accounts-wrapper}}
|
||||||
<section class="profile-orgs">
|
<section class="profile-orgs">
|
||||||
<ul>
|
<ul>
|
||||||
{{org-item account=user}}
|
{{org-item account=user}}
|
||||||
|
@ -18,3 +19,4 @@
|
||||||
<a href={{config.githubOrgsOauthAccessSettingsUrl}} title="Organizations Oauth Access Settings on GitHub">Review and add</a> your authorized organizations.</p>
|
<a href={{config.githubOrgsOauthAccessSettingsUrl}} title="Organizations Oauth Access Settings on GitHub">Review and add</a> your authorized organizations.</p>
|
||||||
</section>
|
</section>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
{{/profile-accounts-wrapper}}
|
|
@ -1,3 +1,5 @@
|
||||||
|
{{#travis-layout layoutName="layouts/profile" class="profile-view"}}
|
||||||
<article class="profile-main">
|
<article class="profile-main">
|
||||||
{{outlet}}
|
{{outlet}}
|
||||||
</article>
|
</article>
|
||||||
|
{{/travis-layout}}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{{#if view.isEmpty}}
|
{{#repo-wrapper repo=repo isLoading=isLoading}}
|
||||||
|
{{#if isEmpty}}
|
||||||
{{repos-empty}}
|
{{repos-empty}}
|
||||||
{{else}}
|
{{else}}
|
||||||
|
|
||||||
|
@ -7,11 +8,11 @@
|
||||||
<header>
|
<header>
|
||||||
<h1 class="repo-title">{{#link-to "owner" repo.owner}}{{repo.owner}}{{/link-to}} / {{#link-to "repo" repo}}{{repo.name}}{{/link-to}}</h1>
|
<h1 class="repo-title">{{#link-to "owner" repo.owner}}{{repo.owner}}{{/link-to}} / {{#link-to "repo" repo}}{{repo.name}}{{/link-to}}</h1>
|
||||||
<div class="repo-gh">
|
<div class="repo-gh">
|
||||||
<a href="{{controller.urlGithub}}" title="{{repo.name}} on Github">{{repo.name}} on Github</a>
|
<a href="{{urlGithub}}" title="{{repo.name}} on Github">{{repo.name}} on Github</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="repo-badge">
|
<div class="repo-badge">
|
||||||
<a href="#" id="status-image-popup" title="build status image" name="status-images" class="open-popup" {{action "statusImages" target=view}}>
|
<a href="#" id="status-image-popup" title="build status image" name="status-images" class="open-popup" {{action "statusImages"}}>
|
||||||
<img src={{view.statusImageUrl}} alt="Build Status Images"/>
|
<img src={{statusImageUrl}} alt="Build Status Images"/>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
@ -39,3 +40,6 @@
|
||||||
{{loading-indicator}}
|
{{loading-indicator}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
{{/repo-wrapper}}
|
||||||
|
|
||||||
|
{{status-images repo=repo branches=repo.branches}}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<div class="search search--sidebar">
|
<div class="search search--sidebar">
|
||||||
<div class="search-inner">
|
<div class="search-inner">
|
||||||
{{input value=controller.search placeholder="Search all repositories"}}
|
{{input value=search placeholder="Search all repositories"}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{view 'repos-list-tabs'}}
|
{{repos-list-tabs tab=tab showMyRepositories=(action "showMyRepositories") showRunningJobs=(action "showRunningJobs")}}
|
||||||
|
|
||||||
{{#if showRunningJobs}}
|
{{#if showRunningJobs}}
|
||||||
<div class="tabbody sidebar-list">
|
<div class="tabbody sidebar-list">
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{{#travis-layout layoutName="layouts/simple"}}
|
||||||
{{#if redirected}}
|
{{#if redirected}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
@ -14,3 +15,4 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
{{/travis-layout}}
|
|
@ -1,16 +0,0 @@
|
||||||
<form class="ssh-key" {{action "save" on="submit"}}>
|
|
||||||
<div class="field">
|
|
||||||
{{label for="description" content="Description:"}}
|
|
||||||
{{input value=description}}
|
|
||||||
</div>
|
|
||||||
{{#travis-field "value"}}
|
|
||||||
{{label for="value" class="value" content="Private key:"}}
|
|
||||||
{{textarea value=value}} {{travis-errors "value"}}
|
|
||||||
{{/travis-field}}
|
|
||||||
|
|
||||||
<div class="actions">
|
|
||||||
<input type="submit" value="Add" class="submit-ssh-key {{if isSaving 'saving'}}" {{if isSaving 'dsabled="disabled"'}} />
|
|
||||||
<span class="or">or</span>
|
|
||||||
<a href="#" class="cancel-ssh-key" {{action "cancel"}}>Cancel</a>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
|
@ -1,14 +0,0 @@
|
||||||
<a href="#" class="close" {{action "close" target=view}}></a>
|
|
||||||
<p>
|
|
||||||
<label>Branch:</label>
|
|
||||||
{{#if view.branches.isLoaded}}
|
|
||||||
{{view Ember.Select content=view.branches selection=view.statusImageBranch optionLabelPath="content.commit.branch" optionValuePath="content.commit.branch"}}
|
|
||||||
{{else}}
|
|
||||||
{{loading-indicator}}
|
|
||||||
{{/if}}
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<label>{{view Ember.Select content=view.formats selection=view.statusImageFormat}}</label>
|
|
||||||
{{view 'status-image-input' value=view.statusString class="url" rows=3}}
|
|
||||||
</p>
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{{#travis-layout layoutName="layouts/landing-page" class="landing-pro"}}
|
||||||
<div id="landing" class="landing wrapper">
|
<div id="landing" class="landing wrapper">
|
||||||
<section class="section--white">
|
<section class="section--white">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
|
@ -14,3 +15,4 @@
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
{{/travis-layout}}
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<li class="{{view.classProfile}}">
|
<li class="{{classProfile}}">
|
||||||
{{#if auth.signedOut}}
|
{{#if auth.signedOut}}
|
||||||
<button class="signed-out button--signin" {{action "signIn" target="auth"}}>Sign in with GitHub</button>
|
<button class="signed-out button--signin" {{action "signIn" target="auth"}}>Sign in with GitHub</button>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
@ -1,30 +1,12 @@
|
||||||
import Ember from 'ember';
|
import Ember from 'ember';
|
||||||
|
|
||||||
var limit = function(dependentKey, limitKey) {
|
var limit = function(dependentKey, limitKey) {
|
||||||
var options = {
|
return Ember.computed(dependentKey, dependentKey + ".[]", function() {
|
||||||
addedItem: function(array, item, changeMeta) {
|
var limit = Ember.get(this, limitKey),
|
||||||
var limit = Ember.get(this, limitKey);
|
array = this.get(dependentKey);
|
||||||
if (changeMeta.index < limit) {
|
|
||||||
array.insertAt(changeMeta.index, item);
|
return array.toArray().slice(0, limit);
|
||||||
if (Ember.get(array, "length") > limit) {
|
});
|
||||||
array.popObject();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return array;
|
|
||||||
},
|
|
||||||
removedItem: function(array, item, changeMeta) {
|
|
||||||
var limit = Ember.get(this, limitKey);
|
|
||||||
if (changeMeta.index < limit && changeMeta.index < Ember.get(array, 'length')) {
|
|
||||||
array.removeAt(changeMeta.index, 1);
|
|
||||||
var toPush = changeMeta.arrayChanged.objectAt(limit);
|
|
||||||
if (toPush) {
|
|
||||||
array.pushObject(toPush);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return array;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
return Ember.arrayComputed(dependentKey, limitKey, options);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default limit;
|
export default limit;
|
||||||
|
|
|
@ -57,4 +57,5 @@ format = function(version, slug, branch) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export { format };
|
||||||
export default format;
|
export default format;
|
||||||
|
|
|
@ -13,7 +13,7 @@ export default Ember.Object.extend({
|
||||||
|
|
||||||
signInForTests(user) {
|
signInForTests(user) {
|
||||||
this.set('state', 'signed-in');
|
this.set('state', 'signed-in');
|
||||||
if ((user.constructor.typeKey != null) !== 'user') {
|
if ((user.constructor.modelName != null) !== 'user') {
|
||||||
this.store.push({
|
this.store.push({
|
||||||
data: {
|
data: {
|
||||||
type: 'user',
|
type: 'user',
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
import BasicView from 'travis/views/basic';
|
|
||||||
|
|
||||||
export default BasicView.extend({
|
|
||||||
templateName: 'profile/tabs/user',
|
|
||||||
userBinding: 'controller.user',
|
|
||||||
|
|
||||||
gravatarUrl: function() {
|
|
||||||
return location.protocol + "//www.gravatar.com/avatar/" + (this.get('user.gravatarId')) + "?s=200&d=mm";
|
|
||||||
}.property('user.gravatarId')
|
|
||||||
});
|
|
|
@ -1,3 +0,0 @@
|
||||||
import BasicView from 'travis/views/basic';
|
|
||||||
|
|
||||||
export default BasicView.extend();
|
|
|
@ -1,5 +0,0 @@
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.View.extend({
|
|
||||||
layoutName: 'layouts/simple'
|
|
||||||
});
|
|
|
@ -1,3 +0,0 @@
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.View.extend();
|
|
|
@ -1,6 +0,0 @@
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.View.extend({
|
|
||||||
layoutName: 'layouts/dashboard',
|
|
||||||
classNames: ['dashboard']
|
|
||||||
});
|
|
|
@ -1,3 +0,0 @@
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.View.extend();
|
|
|
@ -1,10 +0,0 @@
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.View.extend({
|
|
||||||
layoutName: function() {
|
|
||||||
var name;
|
|
||||||
if (name = this.get('controller.layoutName')) {
|
|
||||||
return 'layouts/' + name;
|
|
||||||
}
|
|
||||||
}.property('controller.layoutName')
|
|
||||||
});
|
|
|
@ -1,6 +0,0 @@
|
||||||
import BasicView from 'travis/views/basic';
|
|
||||||
|
|
||||||
export default BasicView.extend({
|
|
||||||
layoutName: 'layouts/error',
|
|
||||||
classNames: ['error error404']
|
|
||||||
});
|
|
|
@ -1,5 +0,0 @@
|
||||||
import BasicView from 'travis/views/basic';
|
|
||||||
|
|
||||||
export default BasicView.extend({
|
|
||||||
layoutName: 'layouts/simple'
|
|
||||||
});
|
|
|
@ -1,6 +0,0 @@
|
||||||
import BasicView from 'travis/views/basic';
|
|
||||||
|
|
||||||
export default BasicView.extend({
|
|
||||||
classNames: ['landing-pro'],
|
|
||||||
layoutName: 'layouts/landing-page'
|
|
||||||
});
|
|
|
@ -1,5 +0,0 @@
|
||||||
import BasicView from 'travis/views/basic';
|
|
||||||
|
|
||||||
export default BasicView.extend({
|
|
||||||
layoutName: 'layouts/landing-page'
|
|
||||||
});
|
|
|
@ -1,11 +0,0 @@
|
||||||
import BasicView from 'travis/views/basic';
|
|
||||||
import { githubAdmin as githubAdminUrl } from 'travis/utils/urls';
|
|
||||||
|
|
||||||
export default BasicView.extend({
|
|
||||||
templateName: 'profile/tabs/hooks',
|
|
||||||
userBinding: 'controller.user',
|
|
||||||
|
|
||||||
urlGithubAdmin: function() {
|
|
||||||
return githubAdminUrl(this.get('hook.slug'));
|
|
||||||
}.property('hook.slug')
|
|
||||||
});
|
|
|
@ -1,5 +0,0 @@
|
||||||
import BasicView from 'travis/views/basic';
|
|
||||||
|
|
||||||
export default BasicView.extend({
|
|
||||||
layoutName: 'layouts/simple'
|
|
||||||
});
|
|
|
@ -1,10 +0,0 @@
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.View.extend({
|
|
||||||
layoutName: (function() {
|
|
||||||
var name;
|
|
||||||
if (name = this.get('controller.layoutName')) {
|
|
||||||
return 'layouts/' + name;
|
|
||||||
}
|
|
||||||
}).property('controller.layoutName')
|
|
||||||
});
|
|
|
@ -1,6 +0,0 @@
|
||||||
import BasicView from 'travis/views/basic';
|
|
||||||
|
|
||||||
export default BasicView.extend({
|
|
||||||
classNames: ['landing-pro'],
|
|
||||||
layoutName: 'layouts/landing-page'
|
|
||||||
});
|
|
|
@ -1,6 +0,0 @@
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.View.extend({
|
|
||||||
layoutName: 'layouts/home',
|
|
||||||
classNames: ['main']
|
|
||||||
});
|
|
|
@ -1,5 +0,0 @@
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.View.extend({
|
|
||||||
layoutName: 'layouts/simple'
|
|
||||||
});
|
|
|
@ -1,6 +0,0 @@
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.View.extend({
|
|
||||||
layoutName: 'layouts/profile',
|
|
||||||
classNames: ['owner']
|
|
||||||
});
|
|
|
@ -1,6 +0,0 @@
|
||||||
import BasicView from 'travis/views/basic';
|
|
||||||
|
|
||||||
export default BasicView.extend({
|
|
||||||
classNames: ['landing-pro'],
|
|
||||||
layoutName: 'layouts/landing-page'
|
|
||||||
});
|
|
|
@ -1,8 +0,0 @@
|
||||||
import BasicView from 'travis/views/basic';
|
|
||||||
|
|
||||||
export default BasicView.extend({
|
|
||||||
tabBinding: 'controller.tab',
|
|
||||||
classNames: ['profile-orglist', 'columns', 'medium-4'],
|
|
||||||
tagName: 'aside',
|
|
||||||
templateName: 'profile/accounts'
|
|
||||||
});
|
|
|
@ -1,21 +0,0 @@
|
||||||
import BasicView from 'travis/views/basic';
|
|
||||||
|
|
||||||
export default BasicView.extend({
|
|
||||||
templateName: 'profile/tabs',
|
|
||||||
tabBinding: 'controller.tab',
|
|
||||||
activate() {
|
|
||||||
return this.get('controller').activate(event.target.name);
|
|
||||||
},
|
|
||||||
|
|
||||||
classHooks: function() {
|
|
||||||
return this.get('tab') === 'hooks' ? 'active' : null;
|
|
||||||
}.property('tab'),
|
|
||||||
|
|
||||||
classUser: function() {
|
|
||||||
return this.get('tab') === 'user' ? 'active' : null;
|
|
||||||
}.property('tab'),
|
|
||||||
|
|
||||||
displayUser: function() {
|
|
||||||
return this.get('controller.account.login') === this.get('controller.user.login');
|
|
||||||
}.property('controller.account.login', 'controller.user.login')
|
|
||||||
});
|
|
|
@ -1,12 +0,0 @@
|
||||||
import BasicView from 'travis/views/basic';
|
|
||||||
|
|
||||||
export default BasicView.extend({
|
|
||||||
templateName: 'profile/show',
|
|
||||||
layoutName: 'layouts/profile',
|
|
||||||
classNames: ['profile-view'],
|
|
||||||
accountBinding: 'controller.account',
|
|
||||||
|
|
||||||
name: function() {
|
|
||||||
return this.get('account.name') || this.get('account.login');
|
|
||||||
}.property('account.name', 'account.login')
|
|
||||||
});
|
|
|
@ -1,56 +0,0 @@
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default Ember.View.extend({
|
|
||||||
templateName: 'repos/show/tabs',
|
|
||||||
tabBinding: 'controller.tab',
|
|
||||||
contextBinding: 'controller',
|
|
||||||
|
|
||||||
classCurrent: function() {
|
|
||||||
return this.get('tab') === 'current' ? 'active' : null;
|
|
||||||
}.property('tab'),
|
|
||||||
|
|
||||||
classBuilds: function() {
|
|
||||||
return this.get('tab') === 'builds' ? 'active' : null;
|
|
||||||
}.property('tab'),
|
|
||||||
|
|
||||||
classPullRequests: function() {
|
|
||||||
return this.get('tab') === 'pull_requests' ? 'active' : null;
|
|
||||||
}.property('tab'),
|
|
||||||
|
|
||||||
classBranches: function() {
|
|
||||||
return this.get('tab') === 'branches' ? 'active' : null;
|
|
||||||
}.property('tab'),
|
|
||||||
|
|
||||||
classBuild: function() {
|
|
||||||
var classes, tab;
|
|
||||||
tab = this.get('tab');
|
|
||||||
classes = [];
|
|
||||||
if (tab === 'build') {
|
|
||||||
classes.push('active');
|
|
||||||
}
|
|
||||||
if (tab === 'build' || tab === 'job') {
|
|
||||||
classes.push('display-inline');
|
|
||||||
}
|
|
||||||
return classes.join(' ');
|
|
||||||
}.property('tab'),
|
|
||||||
|
|
||||||
classJob: function() {
|
|
||||||
return this.get('tab') === 'job' ? 'active' : null;
|
|
||||||
}.property('tab'),
|
|
||||||
|
|
||||||
classRequests: function() {
|
|
||||||
return this.get('tab') === 'requests' ? 'active' : null;
|
|
||||||
}.property('tab'),
|
|
||||||
|
|
||||||
classCaches: function() {
|
|
||||||
return this.get('tab') === 'caches' ? 'active' : null;
|
|
||||||
}.property('tab'),
|
|
||||||
|
|
||||||
classSettings: function() {
|
|
||||||
return this.get('tab') === 'settings' ? 'active' : null;
|
|
||||||
}.property('tab'),
|
|
||||||
|
|
||||||
classRequest: function() {
|
|
||||||
return this.get('tab') === 'request' ? 'active' : null;
|
|
||||||
}.property('tab')
|
|
||||||
});
|
|
|
@ -1,39 +0,0 @@
|
||||||
import { statusImage } from 'travis/utils/urls';
|
|
||||||
import StatusImagesView from 'travis/views/status-images';
|
|
||||||
import BasicView from 'travis/views/basic';
|
|
||||||
import config from 'travis/config/environment';
|
|
||||||
import Polling from 'travis/mixins/polling';
|
|
||||||
import Ember from 'ember';
|
|
||||||
|
|
||||||
export default BasicView.extend(Polling, {
|
|
||||||
popup: Ember.inject.service(),
|
|
||||||
reposBinding: 'reposController',
|
|
||||||
repoBinding: 'controller.repo',
|
|
||||||
buildBinding: 'controller.build',
|
|
||||||
jobBinding: 'controller.job',
|
|
||||||
tabBinding: 'controller.tab',
|
|
||||||
pollModels: 'controller.repo',
|
|
||||||
classNameBindings: ['controller.isLoading:loading'],
|
|
||||||
|
|
||||||
isEmpty: function() {
|
|
||||||
return this.get('repos.isLoaded') && this.get('repos.length') === 0;
|
|
||||||
}.property('repos.isLoaded', 'repos.length'),
|
|
||||||
|
|
||||||
statusImageUrl: function() {
|
|
||||||
return statusImage(this.get('controller.repo.slug'));
|
|
||||||
}.property('controller.repo.slug'),
|
|
||||||
|
|
||||||
actions: {
|
|
||||||
statusImages() {
|
|
||||||
var view;
|
|
||||||
this.get('popup').close();
|
|
||||||
view = StatusImagesView.create({
|
|
||||||
toolsView: this,
|
|
||||||
container: this.container
|
|
||||||
});
|
|
||||||
BasicView.currentPopupView = view;
|
|
||||||
view.appendTo($('body'));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,39 +0,0 @@
|
||||||
import Ember from 'ember';
|
|
||||||
import { colorForState } from 'travis/utils/helpers';
|
|
||||||
import Polling from 'travis/mixins/polling';
|
|
||||||
|
|
||||||
export default Ember.CollectionView.extend({
|
|
||||||
elementId: '',
|
|
||||||
tagName: 'ul',
|
|
||||||
emptyView: Ember.View.extend({
|
|
||||||
templateName: 'repos-list/empty'
|
|
||||||
}),
|
|
||||||
|
|
||||||
itemViewClass: Ember.View.extend(Polling, {
|
|
||||||
pollModels: 'repo',
|
|
||||||
repoBinding: 'content',
|
|
||||||
classNames: ['repo'],
|
|
||||||
classNameBindings: ['color', 'selected'],
|
|
||||||
|
|
||||||
selected: function() {
|
|
||||||
return this.get('content') === this.get('controller.selectedRepo');
|
|
||||||
}.property('controller.selectedRepo'),
|
|
||||||
|
|
||||||
color: function() {
|
|
||||||
return colorForState(this.get('repo.lastBuildState'));
|
|
||||||
}.property('repo.lastBuildState'),
|
|
||||||
|
|
||||||
scrollTop() {
|
|
||||||
if (window.scrollY > 0) {
|
|
||||||
return $('html, body').animate({
|
|
||||||
scrollTop: 0
|
|
||||||
}, 200);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
click() {
|
|
||||||
this.scrollTop();
|
|
||||||
return this.get('controller').transitionToRoute('/' + this.get('repo.slug'));
|
|
||||||
}
|
|
||||||
})
|
|
||||||
});
|
|
|
@ -1,5 +0,0 @@
|
||||||
import BasicView from 'travis/views/basic';
|
|
||||||
|
|
||||||
export default BasicView.extend({
|
|
||||||
templateName: 'auth/signin'
|
|
||||||
});
|
|
|
@ -1,43 +0,0 @@
|
||||||
import Ember from 'ember';
|
|
||||||
import format from 'travis/utils/status-image-formats';
|
|
||||||
|
|
||||||
export default Ember.View.extend({
|
|
||||||
templateName: 'status_images',
|
|
||||||
classNames: ['popup', 'status-images'],
|
|
||||||
classNameBindings: ['display'],
|
|
||||||
repoBinding: 'toolsView.repo',
|
|
||||||
buildBinding: 'toolsView.build',
|
|
||||||
jobBinding: 'toolsView.job',
|
|
||||||
branchesBinding: 'repo.branches',
|
|
||||||
formats: ['Image URL', 'Markdown', 'Textile', 'Rdoc', 'AsciiDoc', 'RST', 'Pod', 'CCTray'],
|
|
||||||
|
|
||||||
didInsertElement() {
|
|
||||||
this._super(...arguments);
|
|
||||||
this.setStatusImageBranch();
|
|
||||||
this.setStatusImageFormat();
|
|
||||||
this.show();
|
|
||||||
},
|
|
||||||
|
|
||||||
show() {
|
|
||||||
return this.set('display', true);
|
|
||||||
},
|
|
||||||
|
|
||||||
actions: {
|
|
||||||
close() {
|
|
||||||
return this.destroy();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
setStatusImageFormat: (function() {
|
|
||||||
this.set('statusImageFormat', this.formats[0]);
|
|
||||||
}),
|
|
||||||
|
|
||||||
setStatusImageBranch: function() {
|
|
||||||
var branch = this.get('repo.branches').findProperty('commit.branch', this.get('build.commit.branch'));
|
|
||||||
this.set('statusImageBranch', branch);
|
|
||||||
}.observes('repo.branches', 'repo.branches.isLoaded', 'build.commit.branch'),
|
|
||||||
|
|
||||||
statusString: function() {
|
|
||||||
return format(this.get('statusImageFormat'), this.get('repo.slug'), this.get('statusImageBranch.commit.branch'));
|
|
||||||
}.property('statusImageFormat', 'repo.slug', 'statusImageBranch.commit.branch')
|
|
||||||
});
|
|
|
@ -1,6 +0,0 @@
|
||||||
import BasicView from 'travis/views/basic';
|
|
||||||
|
|
||||||
export default BasicView.extend({
|
|
||||||
classNames: ['landing-pro'],
|
|
||||||
layoutName: 'layouts/landing-page'
|
|
||||||
});
|
|
|
@ -1,36 +0,0 @@
|
||||||
import BasicView from 'travis/views/basic';
|
|
||||||
var View;
|
|
||||||
|
|
||||||
View = BasicView.extend({
|
|
||||||
tabBinding: 'controller.tab',
|
|
||||||
|
|
||||||
classHome: function() {
|
|
||||||
return this.get('tab') === 'home' ? 'active' : null;
|
|
||||||
}.property('tab'),
|
|
||||||
|
|
||||||
classStats: function() {
|
|
||||||
return this.get('tab') === 'stats' ? 'active' : null;
|
|
||||||
}.property('tab'),
|
|
||||||
|
|
||||||
classProfile: function() {
|
|
||||||
var classes = ['profile menu'];
|
|
||||||
|
|
||||||
if (this.get('tab') === 'profile') {
|
|
||||||
classes.push('active');
|
|
||||||
}
|
|
||||||
|
|
||||||
classes.push(this.get('controller.auth.state') || 'signed-out');
|
|
||||||
|
|
||||||
return classes.join(' ');
|
|
||||||
}.property('tab', 'controller.auth.state'),
|
|
||||||
|
|
||||||
showProfile() {
|
|
||||||
$('#top .profile ul').show();
|
|
||||||
},
|
|
||||||
|
|
||||||
hideProfile() {
|
|
||||||
$('#top .profile ul').hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
export default View;
|
|
|
@ -1,22 +1,26 @@
|
||||||
window.deprecationWorkflow = window.deprecationWorkflow || {};
|
window.deprecationWorkflow = window.deprecationWorkflow || {};
|
||||||
window.deprecationWorkflow.config = {
|
window.deprecationWorkflow.config = {
|
||||||
workflow: [
|
workflow: [
|
||||||
{ handler: "silence", matchMessage: "Ember.LinkView is deprecated. Please use Ember.LinkComponent." },
|
// DONE
|
||||||
{ handler: "silence", matchMessage: "Calling store.find() with a query object is deprecated. Use store.query() instead." },
|
{ handler: "log", matchMessage: "Ember.LinkView is deprecated. Please use Ember.LinkComponent." },
|
||||||
{ handler: "silence", matchMessage: "Ember.View is deprecated. Consult the Deprecations Guide for a migration strategy." },
|
{ handler: "log", matchMessage: "Calling store.find() with a query object is deprecated. Use store.query() instead." },
|
||||||
{ handler: "silence", matchMessage: "Ember.arrayComputed is deprecated. Replace it with plain array methods" },
|
{ handler: "log", matchMessage: new RegExp("A property of .*? was modified inside the didInsertElement hook. You should never change properties on components, services or models during didInsertElement because it causes significant performance degradation.") },
|
||||||
{ handler: "silence", matchMessage: "The filter API will be moved into a plugin soon. To enable store.filter using an environment flag, or to use an alternative, you can visit the ember-data-filter addon page" },
|
{ handler: "log", matchMessage: "Ember.arrayComputed is deprecated. Replace it with plain array methods" },
|
||||||
{ handler: "silence", matchMessage: "Usage of `state` is deprecated, use `_state` instead." },
|
// this will still emit deprecations, because we use state property in
|
||||||
{ handler: "silence", matchMessage: "Function#observesBefore is deprecated and will be removed in the near future." },
|
// request-icon compoenent, that makes Ember.js think that we're using
|
||||||
{ handler: "silence", matchMessage: "Ember.addBeforeObserver is deprecated and will be removed in the near future." },
|
// internal component's state
|
||||||
{ handler: "silence", matchMessage: "`Ember.ArrayController` is deprecated." },
|
{ handler: "log", matchMessage: "Usage of `state` is deprecated, use `_state` instead." },
|
||||||
{ handler: "silence", matchMessage: "Ember.removeBeforeObserver is deprecated and will be removed in the near future." },
|
{ handler: "log", matchMessage: "RestAdapter#find has been deprecated and renamed to `findRecord`." },
|
||||||
{ handler: "silence", matchMessage: "The default behavior of `shouldBackgroundReloadRecord` will change in Ember Data 2.0 to always return true. If you would like to preserve the current behavior please override `shouldBackgroundReloadRecord` in your adapter:application and return false." },
|
{ handler: "log", matchMessage: "Usage of `typeKey` has been deprecated and will be removed in Ember Data 2.0. It has been replaced by `modelName` on the model class." },
|
||||||
{ handler: "silence", matchMessage: "RestAdapter#find has been deprecated and renamed to `findRecord`." },
|
{ handler: "log", matchMessage: "Using store.dematerializeRecord() has been deprecated since it was intended for private use only. You should use store.unloadRecord() instead." },
|
||||||
{ handler: "silence", matchMessage: "Using the same function as getter and setter is deprecated." },
|
{ handler: "log", matchMessage: "Using the same function as getter and setter is deprecated." },
|
||||||
{ handler: "silence", matchMessage: "Using store.dematerializeRecord() has been deprecated since it was intended for private use only. You should use store.unloadRecord() instead." },
|
{ handler: "log", matchMessage: "`Ember.ArrayController` is deprecated." },
|
||||||
{ handler: "silence", matchMessage: "A property of <travis@view:-outlet::ember607> was modified inside the didInsertElement hook. You should never change properties on components, services or models during didInsertElement because it causes significant performance degradation." },
|
{ handler: "log", matchMessage: "The default behavior of `shouldBackgroundReloadRecord` will change in Ember Data 2.0 to always return true. If you would like to preserve the current behavior please override `shouldBackgroundReloadRecord` in your adapter:application and return false." },
|
||||||
{ handler: "silence", matchMessage: "Using DS.Snapshot.get() is deprecated. Use .attr(), .belongsTo() or .hasMany() instead." },
|
{ handler: "log", matchMessage: "Function#observesBefore is deprecated and will be removed in the near future." },
|
||||||
{ handler: "silence", matchMessage: "Usage of `typeKey` has been deprecated and will be removed in Ember Data 2.0. It has been replaced by `modelName` on the model class." }
|
{ handler: "log", matchMessage: "Ember.addBeforeObserver is deprecated and will be removed in the near future." },
|
||||||
|
{ handler: "log", matchMessage: "Ember.removeBeforeObserver is deprecated and will be removed in the near future." },
|
||||||
|
{ handler: "log", matchMessage: "Using DS.Snapshot.get() is deprecated. Use .attr(), .belongsTo() or .hasMany() instead." },
|
||||||
|
{ handler: "log", matchMessage: "The filter API will be moved into a plugin soon. To enable store.filter using an environment flag, or to use an alternative, you can visit the ember-data-filter addon page" },
|
||||||
|
{ handler: "log", matchMessage: "Ember.View is deprecated. Consult the Deprecations Guide for a migration strategy." },
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
|
@ -39,8 +39,10 @@
|
||||||
"ember-cli-sauce": "^1.1.0",
|
"ember-cli-sauce": "^1.1.0",
|
||||||
"ember-cli-uglify": "1.2.0",
|
"ember-cli-uglify": "1.2.0",
|
||||||
"ember-data": "1.13.15",
|
"ember-data": "1.13.15",
|
||||||
|
"ember-data-filter": "1.13.0",
|
||||||
"ember-disable-proxy-controllers": "^1.0.1",
|
"ember-disable-proxy-controllers": "^1.0.1",
|
||||||
"ember-export-application-global": "^1.0.4",
|
"ember-export-application-global": "^1.0.4",
|
||||||
"ember-try": "0.0.7"
|
"ember-try": "0.0.7",
|
||||||
|
"emberx-select": "2.0.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
"exists",
|
"exists",
|
||||||
"fillIn",
|
"fillIn",
|
||||||
"click",
|
"click",
|
||||||
|
"select",
|
||||||
"keyEvent",
|
"keyEvent",
|
||||||
"triggerEvent",
|
"triggerEvent",
|
||||||
"find",
|
"find",
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
import resolver from './helpers/resolver';
|
import resolver from './helpers/resolver';
|
||||||
|
import registerSelectHelper from './helpers/register-select-helper';
|
||||||
|
registerSelectHelper();
|
||||||
import {
|
import {
|
||||||
setResolver
|
setResolver
|
||||||
} from 'ember-qunit';
|
} from 'ember-qunit';
|
||||||
|
|
Loading…
Reference in New Issue
Block a user