Commit Graph

11 Commits

Author SHA1 Message Date
Piotr Sarnacki
5ae7e1d046 Check also associations for incomplete records 2012-10-28 23:43:17 +01:00
Piotr Sarnacki
d3d7f6b83c Don't add repository on worker events if it already exists
It's best to do that, because worker payload is usually outdated. If
there is no info on repo yet, it's worth to add it, but if it already
exists, we will most likely end up with inconsistent situation.
2012-10-28 23:43:16 +01:00
Piotr Sarnacki
987185be54 Fix build link when updating builds through pusher 2012-10-28 23:43:16 +01:00
Piotr Sarnacki
3f0babcf55 Fix adding builds to a build list on pusher event 2012-10-28 23:43:15 +01:00
Piotr Sarnacki
300ad58516 Fix incomplete implementation
While testing in the wild I spotted a few problems with it:

* it didn't work for camel case names.
* it was sometimes setting loaded data too late - it needed to use find
  and then save data on the record. Instead it should save data in
  special array saved on store, indexed by clientId
* there is already method to get attributes in ember-data, it just
  doesn't work with Travis.Foo.get('attributes'), it needs
  Ember.get(Travis.Foo, 'attributes') - it makes implementation much
  shorter
2012-10-22 02:54:48 +02:00
Piotr Sarnacki
af00392d15 Fix jobs table when jobs have different config keys
If we have 2 jobs within 1 build, with such config values:

    { rvm: 'jruby-head', jdk: 'oraclejdk7' }
    { rvm: '1.9.3', jdk: null }

We should return jdk in configValues for second build, even if it's not
present. Otherwise table rows may be missing.

(closes #28)
2012-10-20 02:14:17 +02:00
Piotr Sarnacki
9d07ef79ac Fix bug with undefined loadedAttributes 2012-10-16 17:47:03 +02:00
Piotr Sarnacki
96acd8e526 Fix specs and add missing spec file 2012-10-16 12:14:45 +02:00
Piotr Sarnacki
c05ce673bf Load incomplete records when trying to get unknown attribute
In order to minimize ajax requests, I implemented isComplete property,
which can be used to check if record is fetched from the API or if it
was just partially loaded (for example by pusher event). This is nice in
terms of requests reduction, but caries risk of showing incomplete data.

This commit fixes this situation by saving which attributes were
provided on "incomplete" load and triggering refresh when any unknown
attribute is tried to be fetched.

The implementation is really simple and will probably need refactoring,
but I would like to test it in the wild before putting much more time
into it.
2012-10-16 03:05:38 +02:00
Piotr Sarnacki
4153c990be Fix specs 2012-10-15 23:20:33 +02:00
Piotr Sarnacki
9976b47c93 WIP 2012-10-15 19:35:10 +02:00