Commit Graph

35 Commits

Author SHA1 Message Date
Piotr Sarnacki
c6ec02429d Log user out only if necessary on failed user data request 2016-03-08 13:50:49 +01:00
Piotr Sarnacki
fa7c275eaa Clear timers in update-times service
It's mostly relevant in tests, because service is destroyed when test
end and then we don't want to run any timers.
2016-03-08 13:50:49 +01:00
Piotr Sarnacki
e919906f99 Update time also for finished builds, but only every minute 2016-01-25 17:55:48 +01:00
Piotr Sarnacki
5c0697ed85 Always authenticate ajax calls
Our mechanism for blacklisting IPs, which was developed as a protection
against a DDoS attach, sometimes classifies IPs as offenders
incorrectly. In order to temporary improve the situation of 403
responses from API we're now going to authenticate all of the ajax
calls, because authenticated calls are not blacklisted that easily.
2016-01-21 14:00:41 +01:00
Lisa P
1fc82577b1 dont send data body if it is empty 2016-01-21 13:04:05 +01:00
Piotr Sarnacki
2d0aee4e68 Fix status images popup
After recent refactorings status images popup started to fetch branches
info whenever a repo page was opened, resulting in additional HTTP
requests. Furthermore, because of a way we load branches, it could
result in builds view displaying very old builds, because in API V2 we
essentially download last build for each branch for branches request.

This commit fixes the situation in 2 ways:

1. We wait with downloading branhes till the popup is open
2. We use a V3 requests to download branches and we don't put that data
into the store
2016-01-18 13:14:28 +01:00
Piotr Sarnacki
c96a4602cd Merge pull request #432 from travis-ci/ps-remove-deprecations
Remove deprecations in preparation for 2.x update
2016-01-14 11:37:41 +01:00
Piotr Sarnacki
21f25cd2bf [deprecations] Remove all of the views from the app 2016-01-12 16:55:22 +01:00
Piotr Sarnacki
bbf0b7459f Allow to set an alternative endpoint for auth 2016-01-11 14:26:26 +01:00
Piotr Sarnacki
bde3b7375a Fix displaying flashes coming from the server 2016-01-07 10:22:18 +01:00
Piotr Sarnacki
0b8c032c21 Make JSHint happy 2016-01-06 12:14:02 +01:00
Piotr Sarnacki
b57adacf02 Fix displaying synced at time on the profile page 2016-01-06 11:32:17 +01:00
Piotr Sarnacki
00d448c231 Fix displaying synced at time on the profile page 2016-01-05 12:31:12 +01:00
Piotr Sarnacki
737685a7c0 Fix ajax callbacks after javascript conversion 2016-01-04 13:15:15 +01:00
Piotr Sarnacki
e60b0a0224 Fix jshint errors after conversion to JS 2016-01-04 13:15:15 +01:00
Piotr Sarnacki
fafaf65043 Convert project to JavaScript 2016-01-04 13:15:14 +01:00
Piotr Sarnacki
2e2d2ae81b Feature flag API V3 2015-12-17 12:39:17 +01:00
Piotr Sarnacki
36d099667e Download last_build for a branch when we get the branch from pusher
`lastBuild` is a synchronous relationship on a branch model, so we need to
have a build record present when we put a default branch from a repository
model into the store. We don't send lastBuild's payload in pusher, so
we need to get it using an ajax call, if it's not already in the store.
In the future we may decide to make the relationship async, but I don't
want to change the code at the moment
2015-12-08 10:18:08 +01:00
Piotr Sarnacki
e1a334678d Fix handling default_branch from pusher
Pusher payloads don't have all of the information that is available in
API V3, so we need to do some normalizing.
2015-12-08 10:18:07 +01:00
Piotr Sarnacki
9b4d5c5b4e Remove obsolete pusher handling code from store
Removed code was checking if we should handle a pusher event, ie. if the
event is associated with the user, or if we already have a record
associated with the event. We don't need the check now, because we no
longer use the common channel.
2015-12-08 10:18:07 +01:00
Piotr Sarnacki
e161717f73 Simplify pusher handling in store 2015-12-08 10:18:05 +01:00
Piotr Sarnacki
d7400c0567 Remove console.log 2015-12-08 10:18:05 +01:00
Piotr Sarnacki
81898e422f Fix pusher to work with new ember-data
This commit just fixes things to the point where pusher updates are
applied to the store properly. This still lacks a business logic fixes,
so for example we won't update lastBuild's field, because there's no
such information from pusher.
2015-12-08 10:18:05 +01:00
Piotr Sarnacki
47439657a1 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-12-08 10:18:02 +01:00
Piotr Sarnacki
5cf1cbba6b Move ajax and auth into services 2015-12-08 10:18:02 +01:00
Lisa P
558f6e64c0 remove some things 2015-10-21 10:27:28 +02:00
Lisa P
fa0d533059 try some things 2015-10-21 10:27:28 +02:00
Piotr Sarnacki
ca54a64211 Fix flash messages 2015-09-09 10:36:12 +02:00
Piotr Sarnacki
2e5c3c8a2d Remove some more deprecations 2015-09-01 10:24:03 +02:00
Piotr Sarnacki
da10f0a839 Fix popup open 2015-08-19 11:23:30 +02:00
Piotr Sarnacki
daeb5fa056 Refactor repo tools to use components 2015-08-06 11:09:41 +02:00
Piotr Sarnacki
93373e89ee Enable polling for tests 2015-05-12 10:02:47 +02:00
Piotr Sarnacki
234572f8a6 Disable ajax polling for now 2015-05-12 09:38:29 +02:00
Piotr Sarnacki
a85f0ebc9f Add tests for polling service and mixin 2015-05-07 13:49:22 +02:00
Piotr Sarnacki
a4a75912b0 Implement ajax polling for things that are visible on the screen
We sometimes miss pusher updates, which started to be more common
lately. Until we investigate what's going on, this should be a good
workaround for keeping UI in sync with the DB.
2015-05-07 13:49:21 +02:00