travis-web/assets/scripts/app/models
Piotr Sarnacki fc40190c29 Optimize log viewer
Till now, log viewer was rendered in handlebars, which was the simplest
solution, but it had a major drawback - every append to log caused it to
rerender which was not efficient and memory consuming.

The new approach is to make Travis.Log interpret the log and send lines
with instructions to the view, so for example if view should add a line,
it gets something like:

    { number: 1, content: '$ bundle install' }

Such approach is required to handle cases where data coming from pusher
is not actually a new line. For example output containing dots from
tests needs to be appended:

    $ rake
    ....

Such output could be sent to client in 2 chunks: "$ rake\n.." and "..".
In such situation we would need to send 3 instructions:

  { number: 1, content: '$ rake' }
  { number: 2, content: '..'     }
  { number: 2, content: '..', append: true }

The third instruction can come much later, because tests can take a
while to run, so we can't assume that each line will come in one piece.

The other scenario is \r, for example when showing progress:

    \rDownloading: 10%
    \rDownloading: 50%
    \rDownloading: 100%

Such input should be changed into such instructions:

  { number: 1, content: 'Downloading: 10%' }
  { number: 1, content: 'Downloading: 50%',  replace: true }
  { number: 1, content: 'Downloading: 100%', replace: true }

Travis.Log also supports folds, for example on bundle install, the code
was rewritten to make folds management simpler.
2012-12-04 22:57:57 +01:00
..
account.coffee move select() functionality to Travis.Model and reuse it for accounts 2012-10-13 21:20:11 +02:00
artifact.coffee Optimize log viewer 2012-12-04 22:57:57 +01:00
branch.coffee add an events tab 2012-10-16 02:00:24 +02:00
broadcast.coffee refactor broadcasts 2012-10-19 04:27:07 +02:00
build.coffee split requeueBuild vs requeueJob 2012-12-01 03:13:17 +01:00
commit.coffee extract paths in Assetfile; rename javascripts to scripts, stylesheets to styles 2012-10-03 17:13:02 +02:00
event.coffee stashing some work on the events log 2012-10-16 22:46:10 +02:00
extensions.coffee extract paths in Assetfile; rename javascripts to scripts, stylesheets to styles 2012-10-03 17:13:02 +02:00
hook.coffee Don't allow to change hook's state while it's saving 2012-11-28 20:11:01 +01:00
job.coffee clear log on job:requeued hax 2012-12-01 16:36:55 +01:00
repo.coffee Don't require loading repos when dislaying queues and workers 2012-11-27 22:36:15 +01:00
sponsor.coffee extract paths in Assetfile; rename javascripts to scripts, stylesheets to styles 2012-10-03 17:13:02 +02:00
user.coffee Start polling only after sync request was done 2012-11-28 20:23:56 +01:00
worker.coffee Don't require loading repos when dislaying queues and workers 2012-11-27 22:36:15 +01:00