Commit Graph

162 Commits

Author SHA1 Message Date
Piotr Sarnacki
e6800c80c6 Refactor our layout handling
Layout handling in travis-web was implemented in a dynamic way, so we
could change a main layout from any of the routes. This needed a
`rerender` call which was making things harder and needed some hacks. It
also broke a few transitions when upgrading to 1.8.1.

After examining our usage of layouts I've noticed that we don't need to
change the entire layout dynamically and instead we can set layout on
root routes (like "index", "profile" and other root routes).
2014-12-29 18:16:14 +01:00
Piotr Sarnacki
5dec305cda Caches and requests need authentication
(closes #299)
2014-09-03 13:56:56 +02:00
Piotr Sarnacki
5c41529d07 Reset ssh key controller properly 2014-08-25 15:22:17 +02:00
Piotr Sarnacki
a77f3827ee Settings need a signed in user 2014-08-21 16:56:04 +02:00
Piotr Sarnacki
9741ede075 Merge branch 'ps-env-vars'
Conflicts:
	assets/scripts/app/controllers.coffee
	assets/scripts/app/helpers/handlebars.coffee
	assets/scripts/app/templates/repo/settings.hbs
	assets/scripts/app/views/repo/show.coffee
	assets/styles/tabs.sass
	config.ru
2014-08-21 16:02:07 +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
Piotr Sarnacki
2958717eba Fix settings tab highlighting 2014-08-06 16:38:37 +02:00
Piotr Sarnacki
a58688b451 Page for displaying caches 2014-08-05 18:09:24 +02:00
Piotr Sarnacki
534ac6431b Allow to disable ssh_key 2014-08-01 04:33:04 +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
a5dae4acf3 Set job and build on repo controller to null when leaving
We set job and build directly on repo controller for routes like job,
build and repo.index. We also need to clean that up when we exit to not
show for example download log button when we switch to different route.
2014-07-30 13:36:27 +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
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
459089f0cd Make profiles code a bit simpler
We don't need to nest "profile" tab in account view
2014-05-28 10:23:39 +02:00
Piotr Sarnacki
a39d031925 Don't specify index routes
They're generated by default
2014-05-28 10:23:39 +02:00
Piotr Sarnacki
cc8219ba7a No need to add renderFirstSync method 2014-05-28 10:23:39 +02:00
Piotr Sarnacki
42becfc019 Don't specify outlet name for 'pane' outlets
Specyfing "pane" as an outlet name here was a legacy thing. In current
form it doesn't give us anything and results in more code, as we need to
specify outlet everytime we want to render something there.
2014-05-28 10:23:38 +02:00
Piotr Sarnacki
de14a03de1 Simplify logic for displaying 'no builds for repository' error
We use promise when fetching a repository which means that any nested
routes already have all the repository data loaded. Thanks to that there
is no need to setup observers, we can check what to render right away in
RepoIndexRoute
2014-05-28 10:23:38 +02:00
Piotr Sarnacki
51b9f02da9 Don't render "flash" as an outlet.
Just as with "top", we always render "flash" into flash outlet, so we
can render it straight away.
2014-05-28 10:23:38 +02:00
Piotr Sarnacki
338be594bd No need to keep "top" as an outlet.
We render the same thing for "top" part of the site for every layout,
there is no need to keep it as an outlet, we can just render it
directly.
2014-05-28 10:23:37 +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
9dd198ed75 Remove auth logic from redirect in Travis.Route
Auth check in redirect duplicates beforeModel logic
2014-05-28 10:22:48 +02:00
Piotr Sarnacki
8d393c2cf7 Remove afterSignIn hook from actions in AuthRoute
This is a leftover from previous version of auth code. The purpose of
this code was to redirect to index if we're on auth route and user is
already signed in. This may happen only when we use autoSignIn which is
synchronuous, so it should be fine to just check if user is signed in
and redirect to index there.
2014-05-28 10:22:47 +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
3ce79ed3cc Remove unused code 2014-05-23 16:17:08 +02:00
Piotr Sarnacki
1a0344eeed Remove RepoLoadingRoute for now
This somehow breaks tests, I need to figure out why that happens
2014-05-14 14:38:26 +02:00
Piotr Sarnacki
57edf811b7 Add requests page 2014-05-12 11:03:10 +02:00
Piotr Sarnacki
39b8af12f9 Merge branch 'insufficient-oauth-permissions'
Conflicts:
	assets/scripts/app/routes.coffee
2014-02-24 23:33:14 +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
Piotr Sarnacki
8c513fd7d2 Use action bubbling instead of checking for contructor in AuthRoute 2014-02-19 16:17:31 +01:00
Piotr Sarnacki
8e040912ec Still redirect to getting started, but render it in 'main' outlet
Rendering views outside of routes cycle seems problematic at the moment,
so redirection is our best bet. However, the way I initially did it in
cc90200 causes problems for people who don't have any own repositories
set up for Travis CI, but still want to log in and browse around -
rendering getting started page as a full page hides left sidebar with a
list of repositories.

This commit changes getting started page to render in the main outlet,
just as before redirection changes.
2014-02-17 11:26:28 +01:00
Piotr Sarnacki
cc90200d66 Instead of rendering getting started page, just redirect to it
It would be nice to allow to just render getting started page, but
because of the way we manage layouts, it's hard to get it running
without weird bugs popping up now and then. This should be easier to
achieve once the templates are cleaned up to use better laout
management.
2014-02-13 15:51:38 +01:00
Piotr Sarnacki
a1c42482b6 Render getting started page into application level 2014-02-13 15:26:52 +01:00
Henrik Hodne
2450f9fe9d Revert previous revert
I found the commit that caused the bug that caused me to do the last
revert. I'm therefore reverting the previous revert and I will be
committing a revert that reverts the commit that introduced the bug. See
next commit.

This reverts commit db2d38a7af.
2014-02-12 09:54:24 -06:00
Henrik Hodne
db2d38a7af
Revert setting panel deploy
This seems to have caused issues with enabling the hooks for
repositories.
2014-02-12 09:14:47 -06:00
Piotr Sarnacki
8d19410264 Merge remote-tracking branch 'origin/settings-pane'
Conflicts:
	assets/scripts/app/controllers.coffee
	assets/scripts/app/routes.coffee
	assets/scripts/app/views/repo/show.coffee
2014-02-12 11:52:01 +01:00
Piotr Sarnacki
ce74220f28 Don't reopen Ember.Route
A better way is to provide Travis.Route, which will be used by default
when generating route objects.

There is also no need to define actions for all the routes as they are
needed only in ApplicationRoute (ie. when they're not handled by other
routes).
2014-02-12 08:55:55 +01:00
Piotr Sarnacki
e5749b0629 Fix handling not existing repos
Also ensure that we don't break it again with an integration test.
2014-02-12 08:02:47 +01:00
Piotr Sarnacki
a8784a58fa Use index/loading template instead of IndexLoadingRoute
By default Ember.js will use either IndexLoadingRoute or index/loading
template. Before this commit we were specyfing IndexLoadingRoute, which
was renderring index_loading template. This is not needed as long as we
use index/loading template - the effect is the same, but we use a
default.
2014-02-12 07:48:44 +01:00
Piotr Sarnacki
03e8745dc3 Bubble the error to top if we don't handle it in Ember.Route
A proper thing to do when an error is not handled is to bubble it up
rather than using throw (which we were using before this commit).
2014-02-12 07:46:56 +01:00
Piotr Sarnacki
71e5959f4e Properly handle notFound URL
We handled notFound URL using an old hack, which no longer works. The
proper way now is to handle a "catch all" route.
2014-02-12 07:45:32 +01:00
Hiro Asari
8b6be08ef4 Merge branch 'master' into settings-pane
Conflicts:
	assets/scripts/app/routes.coffee
	assets/scripts/app/templates/profile/tabs/hooks.hbs
2014-01-17 07:09:04 -05:00
Hiro Asari
6ec13ceee1 Merge pull request #240 from dmathieu/multiple_lines
Highlight multiple lines
2014-01-09 10:41:28 -08: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
Piotr Sarnacki
c80a4e4160 No need to abort transition: rejecting will abort automatically 2014-01-07 21:17:20 +01:00