Commit Graph

190 Commits

Author SHA1 Message Date
Piotr Sarnacki
94a752592d Revert "Revert "API uses match to filter by slug""
This reverts commit 0a9fdb718c.
2014-08-12 16:05:28 +02:00
Piotr Sarnacki
eecd5187a3 Revert "Revert "Page for displaying caches""
This reverts commit 3d6931c523.
2014-08-12 16:05:21 +02:00
Sven Fuchs
3d6931c523 Revert "Page for displaying caches"
This reverts commit a58688b451.
2014-08-12 15:53:19 +02:00
Sven Fuchs
0a9fdb718c Revert "API uses match to filter by slug"
This reverts commit e286428722.
2014-08-12 15:53:06 +02:00
Piotr Sarnacki
2958717eba Fix settings tab highlighting 2014-08-06 16:38:37 +02:00
Piotr Sarnacki
e286428722 API uses match to filter by slug 2014-08-05 18:14:34 +02:00
Piotr Sarnacki
a58688b451 Page for displaying caches 2014-08-05 18:09:24 +02:00
Piotr Sarnacki
74d20d0149 Ssh key form styling and polishing 2014-08-01 04:10:26 +02:00
Piotr Sarnacki
c9f58718cf Final touches on env vars 2014-08-01 02:50:20 +02:00
Piotr Sarnacki
568c0e14b8 Display settings in repo pane 2014-07-31 12:26:33 +02:00
Piotr Sarnacki
17ed1d94cc First stab at ssh key form 2014-07-31 12:26:19 +02:00
Piotr Sarnacki
745a39eae5 First stab at env vars 2014-07-28 14:19:44 +02:00
Piotr Sarnacki
05489d4a0a Change tabs to work with routes and outlets instead of helpers
When I started working on settings I had a bit different vision on tabs
and I've added that code prematurely. It seems that the best way to go
is to create separate routes and controllers for each tab - that way we
can just rely on Ember.js for customizing, not some custom code in tabs
helpers etc.
2014-07-28 12:42:21 +02:00
Piotr Sarnacki
aa06f3947e Display current repo's URL for lint link 2014-07-22 18:47:45 +02:00
Piotr Sarnacki
00ccb07a49 Fix sync button 2014-06-17 16:39:21 +02:00
Piotr Sarnacki
52dea338ee Refactor handling accounts
This commit changes a way we load accounts for profile view:

* instead of using several views with profile controllers, always use
  one view to render hooks. This is achieved by redirecting to
  individual account page from main profile page (for example when going
  into /profile as a user drogus, the effective address will be
  /profile/drogus)
* instead of using observers to wait for accounts to load I just use
  promise in ProfileRoute#model which effectively ensures that accounts
  are loaded at the time we want to select an individual account
* profile controller is split into profile and account controller
2014-05-28 10:23:39 +02:00
Piotr Sarnacki
3b1cd4f5c4 Bring back afterSignIn and afterSignIn as actions sent to controller
It seems that there is more use cases to cover with this behaviour, for
example when someone enters /auth directly and logs in from there.
2014-05-28 10:22:48 +02:00
Piotr Sarnacki
3544d523d7 Refactor auth code
* don't use __container__
* register it as a factory on container and inject into routes and
  controller
* avoid afterSignIn errors by checking on hooksTarget, ApplicationRoute
  should register itself as a hooksTarget
* keep user info on auth
2014-05-28 10:22:47 +02:00
Piotr Sarnacki
57edf811b7 Add requests page 2014-05-12 11:03:10 +02:00
Mathias Meyer
e093b5b90a Hide "Show More" when there are no more builds.
Fixes travis-ci/travis-ci#1057
2014-05-10 09:39:24 +02:00
Piotr Sarnacki
66e93ed3ab Limit flash messages to 2
(closes travis-ci/travis-ci#1859)
2014-05-06 11:39:36 +02:00
Mathias Meyer
2fa2ea533b Fix repository hint on accounts pages.
Accounts and the profile are currently separate controllers, so
whenever you switched the account, the message would be hidden.
2014-05-06 10:10:36 +02:00
Mathias Meyer
34c07325d3 Add a message for travis-ci.com as well.
Switched the logic around to make a bit more sense with the
configuration conditionals.
2014-03-18 10:44:34 +01:00
Mathias Meyer
aaf777ce9d Show a message pointint to travis-ci.com.
Reduces friction a whee bit in finding your private repositories.
2014-03-18 10:40:30 +01:00
Piotr Sarnacki
7ef7da5535 Redirect to getting started only from index route
Also rename renderNoOwnedRepos to redirectToGettingStarted
2014-02-20 15:28:38 +01:00
Mathias Meyer
b2bfb6c3e9 Rename properties/bindings for unadministerable hooks. 2014-02-18 11:56:19 +01:00
Piotr Sarnacki
f123162627 Use Em.computed.sort and Em.computed.limit instead of nesting proxies
With new array computed helpers we can simplify code and get rid of
nested array proxies.
2014-02-18 10:13:41 +01:00
Hiro Asari
e00b938f4d Merge pull request #190 from travis-ci/hh-annotations
Annotation support (#1220)
2014-01-27 08:41:52 -08:00
Hiro Asari
9e2a8cb218 Merge branch 'master' into hh-annotations
Conflicts:
	assets/scripts/app/controllers/job.coffee
	assets/scripts/app/models/job.coffee
2014-01-24 10:18:58 -05:00
Justine Arreche
f6491297c1 removed instances of locales in current_user and user 2014-01-14 14:01:40 -05:00
Damien Mathieu
ff1aad3f03 extract the log lines selector into a separate component 2014-01-09 15:53:33 +01:00
Damien Mathieu
c9e0f07a5a highlight multiple lines
We can now highlight multiple lines, adding #L1-L2 to the hash.
We can select the ending line with shift + click.

Closes travis-ci/travis-ci#1829
2014-01-07 21:46:19 +01:00
Hiro Asari
4d83e1a4cb Remove urlAuthor and urlCommitter fields
No longer in views, so no need to keep these.
2013-12-31 23:21:10 -05:00
Piotr Sarnacki
edb4e19309 Run lastBuildDidChange only once for a runloop run
When a lot of pusher events come with build updates, lastBuildDidChange
can run quite frequently. We can avoid that by using scheduleOnce, which
will ensure that only the last invocation of lastBuildDidChange will be
run for a given runloop run.
2013-12-11 12:43:08 +01:00
Piotr Sarnacki
07e0620b23 Fix duplicated broadcasts 2013-12-04 16:20:16 +01:00
Piotr Sarnacki
018eafe84b Fix problem with getting started template rendering on first sync
When first sync template is displayed, user usually doesn't have any
repos, which also triggers rendering of getting started template. The
fix for this is to handle the action to render getting started page on
first sync and do nothing in such case.

I also added a test to ensure that it works correctly.
2013-10-29 20:48:27 +01:00
Piotr Sarnacki
b5297d7800 Update code for newest ember-model 2013-10-18 13:41:10 +02:00
Piotr Sarnacki
1ea19a7cbd Properly detect if user is logged in for broadcasts 2013-09-24 14:17:19 +02:00
Gosha Arinich
62322318da get rid of 'controllerFor' deprecation warnings 2013-09-21 21:31:12 +03:00
Piotr Sarnacki
19a6b29b35 Reload hooks if they're not available 2013-09-16 18:53:13 +02:00
Piotr Sarnacki
0327d39e2c Move observing last build to controller
We observe last build on the repo in order to show the freshest build on
repo page. I moved it to router in order to keep such observers in the
same place, but this was not a wise move. To make it work properly
observer needs to be removed when moving to some other part (like
build's page). The problem is that deactivate function is not called
when we move to the other route in the same nesting. We have our own
'activate' function on repoController, which is better suited for
handling this task.
2013-09-12 23:23:21 +02:00
Mathias Meyer
451894bcec Pull some bindings into build and job controllers. 2013-09-08 10:11:20 +02:00
Piotr Sarnacki
92616251bb Revert "Update code for newest ember-model"
This reverts commit 1594130ff3.
2013-09-06 22:14:06 +02:00
Piotr Sarnacki
1594130ff3 Update code for newest ember-model 2013-09-06 19:37:06 +02:00
Piotr Sarnacki
4b7f9bb14a Delegate CurrentUserController#updateLocale to user instance 2013-09-01 14:22:48 +02:00
Piotr Sarnacki
072a5de579 Show first_sync page after routerTransitions
This code ensures that we send an event after router is fully
initialized, otherwise it could cause an error.
2013-08-29 16:33:09 +02:00
Piotr Sarnacki
18ba86eca0 Remove stuff not used in travis-web anymore 2013-08-28 14:17:26 +02:00
Piotr Sarnacki
b56fa7b9df Fix getting hooks on profile page
Hooks were sometimes not loaded, because user property on
ProfileController was not available. This commit tries one additional
way to get a login - Travis.lookup with controller:currentUser.
2013-08-27 16:11:56 +02:00
Piotr Sarnacki
8c3e92faea Merge branch 'master' into ui-improvements
Conflicts:
	assets/scripts/app/controllers/repo.coffee
	assets/scripts/app/templates/builds/show.hbs
	assets/scripts/app/templates/jobs/show.hbs
2013-08-06 13:16:56 +02:00
Piotr Sarnacki
33bce774a3 Add first_sync template
First sync will be displayed when user is logged in and first sync is
still taking place
2013-08-05 03:29:19 +02:00
Piotr Sarnacki
b40d0acf9c Return empty array from userRepos when there is no user 2013-08-05 03:28:43 +02:00
Piotr Sarnacki
d248fd11a6 Fix messages on empty repos list 2013-08-05 02:35:47 +02:00
Piotr Sarnacki
218a078164 Fix messages on empty repos list 2013-08-05 02:35:28 +02:00
Piotr Sarnacki
d9d833d1b4 No need to prefetch repos in recentRepos
Repo#withLastBuilds already does a fetch, so this is redundant
2013-08-03 15:11:23 +02:00
Piotr Sarnacki
53951c3691 Don't reload user repositories each time my repos tab is clicked 2013-07-31 16:18:37 +02:00
Piotr Sarnacki
42470fd416 Wrap updateTimes in Ember.run 2013-07-31 13:59:03 +02:00
Piotr Sarnacki
92da0c8034 Simplify build/job and tools templates 2013-07-31 13:43:06 +02:00
Piotr Sarnacki
9093b2a311 Remove tick from sidebar controller 2013-07-31 13:39:18 +02:00
Piotr Sarnacki
4d74491401 Remove unused code 2013-07-31 13:29:55 +02:00
Floyd Pink
fd98847863 show loading indicator on show-more button click 2013-07-27 16:11:12 -04:00
Piotr Sarnacki
76af32013b Fix updating times on repo page 2013-07-23 17:13:29 +02:00
Henrik Hodne
5ce8093253 Show annotations on the job page 2013-07-10 18:52:07 -07:00
Piotr Sarnacki
c7516b458e Show all accounts and hooks in profile
Previously we showed only accounts and repositories, to which you have
admin access. To improve usability, it's better to show all accounts and
all repositories, but explain why part of the repositories are not
manageable.
2013-06-18 17:54:13 +02:00
Piotr Sarnacki
3a4d52f52b Change URL when clicking on repos tabs 2013-06-12 19:55:34 +02:00
Piotr Sarnacki
75784da25e Render information about no repos into main template 2013-06-12 15:27:15 +02:00
Piotr Sarnacki
704bd9434e Redirect to getting started page if user has no repositories 2013-06-11 17:22:52 +02:00
Piotr Sarnacki
50cdc4cf98 Move checking for errors to router rather than template
Previously we were checking if we should display an error message by
adding if statements in a template. This is not the best way to do
it, because it clutters a template and makes code harder to follow.

In this commit I move rendering error templates to the router. Code for
rendering error when there is no builds is not the best way to do it
either, but it can be improved when new router changes are merged to
Ember's master and a way Ember Data is handling promises is revised and
improved.
2013-06-05 11:37:29 +02:00
Piotr Sarnacki
6bc7b69088 Refactor a way we setup things on repo controller
Till now, when switching between different views, we were switching
different bindings on repo controller. This was quite innefficient,
because then we needed to add bindings also from other controllers and
it's hard to manage such structure when we would like to add specialized
controllers (like LogController).

The new setup is more declarative, meaning that we do such things on the
router and set things on proper controllers. The only drawback is that
now we need to setup a few observers instead of bindings for "current"
views (ie. when viewing the newest repo or when viewing the last build
in current repo).

At this point it may not look like huge improvement, but it will open a
way to more refactorings.
2013-06-05 11:37:28 +02:00
Mathias Meyer
a0ab577b6c Add RGSoC logo to the top of the sidebar.
Remove the current sponsors from the sidebar.
2013-05-31 21:17:06 +02:00
Piotr Sarnacki
8004766cfe Don't set sortProperties to null
Sorting could be triggered on controller and then when tab would be
switched, nullified sortProperties can result in an error.
2013-05-29 13:51:21 +03:00
Piotr Sarnacki
05859a5a3c Use visibility.js to run timer updates
Visibility.js provides a thin wrapper over page visibility API, which
allows to detect if page is currently visible by user. This allows us to
stop live updates when it's not needed. This is especially easy in case
of timers, because Visibility.js provides setInterval replacement, which
runs given code only when page is visible.

A lot of ❤️ for @tchack, who showed me visibility.js!
2013-05-29 13:42:51 +03:00
Piotr Sarnacki
4288e79044 Change Ember.run.later to setTimeout in periodic actions
It seems that running Ember.run.later periodically can cause CPU usage
to increase over time. Such increase adds up to already increasing CPU
usage because of data amount growing.

This commit tries to mitigate the issue by using setTimeout instead
2013-05-29 11:17:58 +03:00
Piotr Sarnacki
eb065a0eee Sort owned repositories 2013-05-16 02:10:10 +02:00
Piotr Sarnacki
df9db80c42 A few improvements for tabs on repos list
* if user is logged out, the default tab should be 'recent'
* when user logs in, the tab is switched to 'my repositories'
* when user logs out, my repositories is hidden again and tab is
  switched to 'recent'
2013-04-30 02:45:16 +02:00
Fiona Tay
5cf2c65d2f make 'My Repos' come before 'Recent' in sidebar 2013-04-17 20:12:33 -07:00
Piotr Sarnacki
957d8a01ab Merge branch 'sidebar-tabs'
Conflicts:
	assets/scripts/spec/support/conditions.coffee
2013-04-05 19:26:24 +02:00
Piotr Sarnacki
ea3ea61146 Fix ordering on workers lists
Emebr does not allow to use mixin on create, it needs to be passed to
extend().

(closes #151)
2013-03-25 00:41:05 +01:00
Piotr Sarnacki
5d049fd7de Destroy groups in running jobs after they're emptied 2013-03-21 23:46:27 +01:00
Piotr Sarnacki
aedddd8afe Display only jobs and workers in tabs 2013-03-15 19:22:24 +01:00
Piotr Sarnacki
d590b06d17 Leave currentUser connected to controller, but check for id 2013-03-15 10:28:35 +01:00
Piotr Sarnacki
1b01581fb4 Use regular params instead of event in My Repositories list (closes #157) 2013-03-15 10:22:58 +01:00
Piotr Sarnacki
46643e8315 Run Travis.Repo.find() before using recent repos
Becuase we use filter() now to get just the repos with the last build
into the sidebar, it will not fetch the request automatically.
2013-03-14 18:01:13 +01:00
Piotr Sarnacki
b847dbd664 Reset line numebr on each request 2013-03-14 17:56:50 +01:00
Piotr Sarnacki
181ecd227a Don't access repo object when it's not needed to not send ajax requests 2013-03-14 15:55:18 +01:00
Piotr Sarnacki
bdb552100a Always use currentItem to get log context 2013-03-14 15:10:56 +01:00
Piotr Sarnacki
79f1dc448f Revert "move log subscrition to a log controller"
This was causing the log to not refresh sometimes when switching from
one repo to another, I'm reverting for now, we will have to have another
look.

This reverts commit 2e8b74160c.

Conflicts:
	assets/scripts/app/controllers/build.coffee
	assets/scripts/app/models/build.coffee
	assets/scripts/app/templates/builds/show.hbs
	assets/scripts/app/views/log.coffee
	assets/scripts/vendor/log.js
2013-03-14 10:07:35 +01:00
Piotr Sarnacki
b1edd8e510 Bring back log engine from master 2013-03-12 22:52:39 +01:00
Piotr Sarnacki
63559f4c4c Show appropriate message when the repository has no builds 2013-03-11 20:11:43 +01:00
Piotr Sarnacki
8fab8448c2 Show appropriate message if repository was not found 2013-03-11 19:47:59 +01:00
Sven Fuchs
2e8b74160c move log subscrition to a log controller 2013-03-06 19:59:59 +01:00
Piotr Sarnacki
1e6672eb9f Fix toggle button on hooks list in profile 2013-03-06 15:18:57 +01:00
Piotr Sarnacki
9ee359664c Fix sync button 2013-03-05 03:37:47 +01:00
Piotr Sarnacki
4337949dd4 Fix the rest of the specs 2013-03-04 13:29:00 +01:00
Piotr Sarnacki
712389efdb Fix more specs 2013-03-04 03:46:04 +01:00
Piotr Sarnacki
c6d1f4fa59 Fix a few more integration tests 2013-02-28 15:56:55 +01:00
Piotr Sarnacki
0f89da6dea Fix selected class on repos list 2013-02-28 15:54:47 +01:00
Piotr Sarnacki
12da46a623 Fix showAll button 2013-02-26 11:21:34 +01:00
Piotr Sarnacki
a47147ed82 Fix build lists to not interfere with each other 2013-02-26 11:17:42 +01:00
Piotr Sarnacki
395c818a64 Fix permission check for cog menu 2013-02-21 23:22:54 +01:00
Piotr Sarnacki
cfbec29978 Fix some of the places still using Travis.app 2013-02-21 23:22:54 +01:00