Commit Graph

41 Commits

Author SHA1 Message Date
Piotr Sarnacki
e60d16209d Fix loading record by slug
In a repo route we need to find record by slug there is no easy way to
do it with a public finders API, so we need to use adapter and
serializers directly. The problem is that the old way of doing this
didn't use the normalizePayload function and also it didn't add included
records properly. New code properly normalizes response and adds all of
the embedded records that were extracted from the response.
2015-11-18 17:01:59 +01:00
Piotr Sarnacki
bd3b62c264 Fix handling branches
This commit fixes handling of branches when using both V3 and V2. The
changes include:

  * proper definition of relationships that reflect V3 structure, so for
    example build belongs to a branch
  * setting up inverse records for some of the relationships. without
    doing that Ember Data can handle relationships in a surprising way,
    for example if the same record is referenced in 2 places in a
    belongsTo relationship, Ember Data will remove one of the references
    without proper inverse definitions
  * we need to add id when extracting branch as a relationship. Ember
    Data expects all of the relationships to have an id
  * lastly, we need to mimic the structure of the V3 API in V2 payloads,
    so for a build payload I'm now creating a branch record
2015-11-18 17:00:34 +01:00
Piotr Sarnacki
d1b9bddfe0 Fix sidebar repos list
We need this list to update with pusher, so filtering is better than
using store.query.
2015-11-11 17:38:59 +01:00
Piotr Sarnacki
8956dedeaf Attribute mappings in serializers should use underscore notation 2015-11-11 16:24:23 +01:00
Piotr Sarnacki
5c5c433363 Include repositoryId as an attribute on build
For some reason (probably some problem with one of the serializers) we
sometimes lack an id attribute for a promise that we get for a repo
relationship on build. Because of that doing `build.get('repo.id')` may
sometimes return undefined. A temporary workaround is to make sure that
we always can access the `repository_id` property.
2015-11-10 17:52:32 +01:00
Piotr Sarnacki
3d7833d64b Use storage service instead of Travis.storage 2015-11-09 14:06:42 +01:00
Piotr Sarnacki
310627cc55 Sort repos in repos-list component, not in controller 2015-11-09 13:46:55 +01:00
Piotr Sarnacki
2a2b3f018b Use lastBuild from defaultBranch on repository
One thing that is not standard here is a serializer for branch, which
uses @href as id. At this point branches don't have ids and ember-data
needs one, so using @href is the easiest way.
2015-11-09 13:46:54 +01:00
Piotr Sarnacki
6992a79a93 Create adapters and serializers working with v3 and v2 APIs
This commit adds adapters and serializers for v3, but also a fallback
serializer for v2, which allows to handle v2 and v3 payloads at the same
time. This is needed, because when we use v3 endpoint for one of the
models (in this case repo), we can also get embedded records of other
types (like branch or build).
2015-11-09 13:46:54 +01:00
Piotr Sarnacki
22d4f59ce9 Move ajax and auth into services 2015-11-09 13:46:54 +01:00
Piotr Sarnacki
b9de261388 Remove some more deprecations 2015-11-09 13:43:56 +01:00
Piotr Sarnacki
13ce7f88bd Fix getting push access data on settings reload 2015-09-07 13:21:57 +02:00
Piotr Sarnacki
ee52beaa10 Fix log
After update to glimmer log started to be rendered incorrectly, with log
lines being inserted in the wrong places. I'm not sure what's the
underlying problem, but rewriting to components seems to fix the issue.
Since views are deprecated anyway I'm not going to investigate the
problem deeper.
2015-08-18 10:41:10 +02:00
Lisa Passing
b32ce35a05 fix ssh-key displays 2015-07-20 17:11:59 +02:00
Lisa Passing
e42a4088e7 detect build.linux in jobs.queue and display notice 2015-06-30 11:35:49 +02:00
Piotr Sarnacki
92eb8436a1 Revert "Revert "add eventType as an attribute, include api builds to the history""
This reverts commit 4d519f145a.
2015-06-11 11:32:25 +02:00
Konstantin Haase
4d519f145a Revert "add eventType as an attribute, include api builds to the history"
This reverts commit 5e1dd9a83b.
2015-05-12 12:35:41 +02:00
Sven Fuchs
5e1dd9a83b add eventType as an attribute, include api builds to the history 2015-05-06 15:30:57 +02:00
Piotr Sarnacki
c6ee26c2e5 Fix broadcasts 2015-04-15 15:16:17 +02:00
Piotr Sarnacki
cbbd555fdd Bring better sortOrder for my repos back 2015-04-08 14:09:40 +02:00
Piotr Sarnacki
918b6e043e If there's no repos on landing page for 10s, fetch some 2015-04-07 14:43:00 +02:00
Piotr Sarnacki
a731028dfa Add avatars on accounts list 2015-03-25 16:36:07 +01:00
Piotr Sarnacki
d9cb754879 Refactor repo actions support
This commit refactors repo-actions support to use components and make
the implementation much simpler. It also fixes a bug with buttons being
displayed when they shouldn't be.
2015-03-13 10:30:19 +01:00
Piotr Sarnacki
cf946d5da5 Merge pull request #335 from travis-ci/anchor-btn-to-log
Move log related buttons to the log area
2015-02-26 09:56:32 +01:00
Piotr Sarnacki
405cdd3dae Received state should also indicate not started build 2015-02-25 16:50:49 +01:00
Piotr Sarnacki
e189bc607b Allow to cancel build if any of the jobs can be cancelled 2015-02-25 11:52:55 +01:00
Piotr Sarnacki
758f26282a Allow to cancel build if any of the jobs can be cancelled 2015-02-23 17:08:46 +01:00
Piotr Sarnacki
92fbc73760 Show 'Top' button only if log has any content 2015-02-23 10:07:08 +01:00
Piotr Sarnacki
0309ac29c0 Don't try to fetch lastBuild if there's no id 2015-02-11 12:59:07 +01:00
Piotr Sarnacki
4afd7db020 Return array and not a promise from Repo.search 2015-02-11 12:58:45 +01:00
Piotr Sarnacki
f8e787fcdd Add missing fields to models 2015-02-11 11:18:24 +01:00
Piotr Sarnacki
39b780e615 Fix syncing 2015-02-10 09:42:58 +01:00
Piotr Sarnacki
86983f1e6d Fix requests page 2015-02-10 09:41:57 +01:00
Piotr Sarnacki
485976d003 Don't try to reload record if it's already loading 2015-02-09 19:28:32 +01:00
Piotr Sarnacki
6877c3afc1 Properly add new builds to builds lists 2015-02-09 19:28:32 +01:00
Piotr Sarnacki
141457c4f9 Change config keys to camel case 2015-02-05 11:35:47 +01:00
Piotr Sarnacki
8f7c58ce4c Add missing imports for config 2015-02-04 18:27:14 +01:00
Piotr Sarnacki
b0bd24a129 Add ember-cli version of the Ember.js app 2015-02-03 09:48:22 +01:00
Piotr Sarnacki
3a09a0da9a Move assets/scripts/app to root dir 2015-02-03 09:44:34 +01:00
Sven Fuchs
767476a8c9 remove rails 2012-06-22 00:37:43 +02:00
Sven Fuchs
a3f629bd0d initial commit 2012-06-17 00:05:06 +02:00