Commit Graph

178 Commits

Author SHA1 Message Date
Piotr Sarnacki
8715087237 Extract ApplicationRoute to a separate file 2015-01-14 14:07:05 +01:00
Piotr Sarnacki
5c280001d3 Rename IndexRoute to MainRoute 2015-01-14 13:22:58 +01:00
Piotr Sarnacki
43e06fc180 Viewing user's repositories needs auth 2015-01-12 11:39:34 +01:00
Piotr Sarnacki
36b174102a Change /my_repositories to /repositories 2015-01-06 14:01:41 +01:00
Piotr Sarnacki
0074acb8fe Fix profile info tab 2015-01-06 12:45:08 +01:00
Piotr Sarnacki
5cfc3d44a6 Fix ssh key form when returning after form was open
When user opens ssh key form, navigates to a different rote and returns, ssh key
form shows that a custom key is added, but it's just a leftover from the
previous open of the form. It seems that Ember Model caches the new model in
the store and returns it from fetch. The fix is to return null in such case.
2014-12-31 15:35:02 +01:00
Piotr Sarnacki
eb9eac2b09 Merge branch 'refactoring' into ps-travis-pro-merge 2014-12-30 11:30:08 +01:00
Piotr Sarnacki
47e1de1d26 Extract Github URLs to controller 2014-12-30 11:28:49 +01:00
Piotr Sarnacki
15283b0294 Use model property instead of content on controllers 2014-12-30 11:19:38 +01:00
Piotr Sarnacki
86c2e8334e [pro-merge] Sidebar can be rendered, no need to use outlet 2014-12-29 18:20:22 +01:00
Piotr Sarnacki
e9cbd98713 [pro-merge] Update routes with changes from travis-pro 2014-12-29 18:17:58 +01:00
Piotr Sarnacki
f355bc58f3 Fix search to work with new way of handling repos tabs 2014-12-29 18:17:55 +01:00
Piotr Sarnacki
b771f79587 No need to specify path when path is the same as name 2014-12-29 18:17:55 +01:00
Piotr Sarnacki
9d4146f155 Refactor index.recent and index.my_repositories routes 2014-12-29 18:17:55 +01:00
Piotr Sarnacki
5f2f4c3852 First stab at fixing weird view errors
This commit starts refactoring of one of the remaining areas where we do weird
tricks to get the desired behaviour. Namely, we were treating "my_repositories"
and "recent" not as individual routes with separate URLs, but only different
states on the repos controller. Such approach leads to various problem with
connecting outlets on rerenders (ie. we don't explicitly connect outlets when
changing from one view to another programatically).

A new cleaner way is to change both tabs into routes.
2014-12-29 18:17:55 +01:00
Piotr Sarnacki
0a69a5424d Fix log errors on 1.8.1
This part needs further refactoring, but for now I just fixed log view to
teardown and setup things properly in all cases something changes (when element
is inserted or removed, but also when log object is changed).
2014-12-29 18:16:15 +01:00
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