Commit Graph

127 Commits

Author SHA1 Message Date
Piotr Sarnacki
d1633e796a Slightly better implementation of showAll for jobs in queues 2012-11-28 00:26:37 +01:00
Piotr Sarnacki
afa1d07fbe Show only first 15 elements from each queue for now
With shitloads of jobs in queues app becomes unusable, this is a quick
solution to make it better.
2012-11-28 00:04:23 +01:00
Sven Fuchs
d94b001e81 restore isLoaded for repos controller 2012-11-10 04:21:49 +01:00
Piotr Sarnacki
49f1c74a12 Extend message on loaded models and fix undefined ke problem 2012-11-06 11:47:12 +01:00
Piotr Sarnacki
eef8e55cfe Check if key is defined in incomplete checks 2012-10-31 14:56:17 +01:00
Piotr Sarnacki
6bf5bd3356 Needed to move part of incomplete impl. to store
When using get with path (eg. get('foo.bar.baz')), get method is called
only on the current object and computed property will be called. Because
there is no easy way to overwrite the computed property, I moved
incomplete record loading to ember-data. It's not DRY and it should be
rewritten, but I don't want to do it at this point as we will need to
completely rewrite it when upgrading ember-data.
2012-10-31 00:46:13 +01:00
Piotr Sarnacki
d1ab28abcc Remove console.log entry 2012-10-30 02:23:41 +01:00
Piotr Sarnacki
5ae7e1d046 Check also associations for incomplete records 2012-10-28 23:43:17 +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
939212302a Fix loading page with #L<line-number>
Ember changed a way HistoryLocation works and it no longer calls
getURL(). I'm monkey patching it, but I will submit a pull request to
fix it.
2012-10-22 21:45:43 +02: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
Sven Fuchs
90fb2c3b78 add broadcasts 2012-10-18 03:53:19 +02:00
Piotr Sarnacki
9d07ef79ac Fix bug with undefined loadedAttributes 2012-10-16 17:47:03 +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
Sven Fuchs
ed94cb7329 Merge branch 'master' of github.com:travis-ci/travis-web
Conflicts:
	assets/scripts/lib/travis/model.coffee
	public/scripts/app.js
	public/scripts/min/app.js
	public/version
2012-10-13 21:22:42 +02:00
Sven Fuchs
e7a26524d4 move select() functionality to Travis.Model and reuse it for accounts 2012-10-13 21:20:11 +02:00
Piotr Sarnacki
c707135ccd First spike of 'isComplete' functionality
When we get payload from pusher, we usually don't send the entire
record. Initially such records where fetched from server right away to
get missing data. This was done becuase Ember can't tell if given data
is complete or not and just assumes that the record is loaded.

To not fire unneeded request, this code sets incomplete flag on records
loaded from pusher and loads the rest of the data only if needed.
2012-10-13 20:47:21 +02:00
Piotr Sarnacki
2575218ddb Fix logs to always point to build or job view 2012-10-12 18:32:25 +02:00
Piotr Sarnacki
7fc77e66ea Limit repos list to 30 items 2012-10-09 18:23:11 +02:00
Sven Fuchs
847c120bd7 fuck yeah, flash messages 2012-10-09 15:16:54 +02:00
Piotr Sarnacki
9237770180 Forgot to add Travis.Location file 2012-10-09 12:59:27 +02:00
Sven Fuchs
7e6907feba Merge branch 'master' of github.com:travis-ci/travis-web
Conflicts:
	Gemfile.lock
	public/scripts/app.js
	public/scripts/min/app.js
	public/version
2012-10-09 12:33:11 +02:00
Sven Fuchs
6cbe6f140e refactor ajax, get rid of the module 2012-10-09 12:31:15 +02:00
Piotr Sarnacki
186ba1dd45 Fix links to log line numbers
This is working implementation of links on log line numbers. Although it
does the job, it's really hacky and involves overriding some of the
ember's methods (resolvePath, routeMatcher) beacuse currently
HistoryLocation can't handle hash additions in an easy way.

This code should be fixed as soon as ember's router gets more powerful
and gives much more granular control over matching routes.
2012-10-09 03:54:11 +02:00
Sven Fuchs
25dffc0a7a load user permissions 2012-10-06 23:40:05 +02:00
Sven Fuchs
152dde6e05 make things even more generic 2012-10-03 19:29:44 +02:00
Sven Fuchs
7b47863014 extract paths in Assetfile; rename javascripts to scripts, stylesheets to styles 2012-10-03 17:13:02 +02:00