Commit Graph

162 Commits

Author SHA1 Message Date
Piotr Sarnacki
8aafb8d4e6 Bring back 'outlet pane' and 'outlet pane'
For some reason (I haven't had time to debug it) when we don't use named
outlet rendering "into" does not work in certain circumstances (for
example in index current view, where repos are changed automatically).
2013-12-18 11:02:25 +01:00
Piotr Sarnacki
8482c4c286 Move settings out of the profile page 2013-12-18 11:02:24 +01:00
Piotr Sarnacki
c18222ea51 Settings pane
This commit contains a settings pane implementation. There are a couple
of things here, which are not used yet, like advanced form helpers. I'm
leaving them here, because the plan is to add support for more settings
soon (like: include/exclude branch patterns), which will need these
helpers.

There is also tabs support, although in the current version there is
only one tab (initially it was created for supporting general tab and
notifications tab).
2013-12-18 11:02:23 +01:00
Piotr Sarnacki
7a93a9f915 Move events to _actions hash 2013-12-12 15:06:58 +01:00
Piotr Sarnacki
a2bc840292 Use more fetch instead of find
fetch method returns a promise instead of an actual object. We used find
before, because this was the way we did things before upgrade to Ember
Model. Returning a promise from a model hook pauses router rendering for
the time a resource is loading, which makes it much easier to deal with
asynchronous requests. Thanks to that we can remove parts of the code,
which dealt with it manually.
2013-12-11 12:43:09 +01:00
Piotr Sarnacki
21fecf855a Reference lastBuildId instead of lastBuild when checking for existance
Referencing lastBuildId will not trigger loading a build record, which
will lower ajax queries number.
2013-12-11 12:43:08 +01:00
Damien Mathieu
347cb0f887 actions need in views need to be in their own namespace, not in events anymore 2013-12-04 15:32:52 +01:00
Sven Fuchs
eaf260a516 Revert "Display repos with no builds, but which are active in 'My repositories'"
This reverts commit fbed80f166.

Conflicts:
	assets/scripts/app/templates/repos/list.hbs
2013-11-12 16:06:26 +01:00
Piotr Sarnacki
06d90dbc9b Merge branch 'master' into insufficient-oauth-permissions
Conflicts:
	assets/scripts/app/routes.coffee
2013-10-31 15:52:59 +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
fbed80f166 Display repos with no builds, but which are active in 'My repositories'
When user activates a repository in the profile page, we now will
display this repository on the 'My Repositories' list. When user chooses
this repository, she will see an explenation why there is no builds and
what could be done to fix this.

Conflicts:
	assets/scripts/app/controllers.coffee
	assets/scripts/app/models/repo.coffee
	assets/scripts/app/templates/repos/list.hbs
2013-10-29 18:05:23 +01:00
Piotr Sarnacki
7363a1d7ef Render builds/not_found and repo/not_found in the next runloop run
This is done to make sure that if something else render just after
not_found, not_found will still be rendered.
2013-10-27 00:32:58 +02:00
Piotr Sarnacki
796e830a36 Add page about insufficient oauth permissions 2013-10-25 13:10:22 +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
Piotr Sarnacki
1a0e378732 Fix rendering job when moving from index route
The hack which is needed for wrong outlet behaviour renders a template
when outlet is not rendered automatically, but it was done immediately.
Because of that when changing routes from index to job route, sometimes
the hack was kicking in and rendering build instead of job template.
This commit fixes it to check if rendering is needed in "afterRender"
phase on runloop.
2013-09-07 17:44:43 +02:00
Piotr Sarnacki
7c161069f5 Fix problems with transitioning to job 2013-09-06 22:04:25 +02:00
Piotr Sarnacki
27929faf6f Don't render sidebar 2013-08-29 01:15:57 +02:00
Piotr Sarnacki
08d17fdf2b Check also for superclass of Travis.AuthRoute
Ember.js creates subclasses of given class in container, so we need to
check also superclass
2013-08-27 18:23:17 +02:00
Piotr Sarnacki
7be461758c Fix specs 2013-08-26 17:01:27 +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
acf5d8e9be Redirect to root after signin in on auth page 2013-08-05 03:27:47 +02:00
Piotr Sarnacki
c79725d0e9 Refactor sign in related templates, fix indicator in auth template 2013-08-05 03:24:33 +02:00
Piotr Sarnacki
9170795639 Improve auth code in router by using new async stuff (❤️ @machty) 2013-08-03 20:48:59 +02:00
Piotr Sarnacki
af3f865854 Make routes code more async capable when setting job
After changing Ember Data to Ember Model, the default behavior is to
not return promise by default from `find` call. This is better in
general for our use case, because we don't block rendering the UI while
data loads, but we now have to handle cases where model is not yet
loaded in `setupController`
2013-07-31 13:35:47 +02:00
Piotr Sarnacki
373c7f706f Get rid of hacks from routes 2013-07-31 13:32:23 +02: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
b0d1e11e97 Allow to see getting started page through the URL 2013-06-13 12:40:46 +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
e1b5e5d883 Rename routeTo to routeToPath
Ember already uses routeTo, we don't want to override this
2013-06-07 15:59:47 +02:00
Piotr Sarnacki
9eafd917ab Properly check for lastBuild on repo in routes 2013-06-06 21:28:55 +02:00
Piotr Sarnacki
58d3795644 Properly set model on build controller on build/show 2013-06-05 12:45:35 +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
f87e4108a8 Rethrow error if the error coming from router is not "Route missing" 2013-06-05 11:37:28 +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
Piotr Sarnacki
90ffeaf085 Allow to override sign in and sign out callbacks on routes 2013-05-16 12:46:58 +02:00
Piotr Sarnacki
99c3ad770c Router changes for new ember.js 2013-05-15 17:23:50 +02:00
Piotr Sarnacki
6e632f7033 Don't set content for a controller automatically in some of the routes
Ember by default sets controller's `model` property which may cause
weird race conditions when connected with a way we handle setting up
controller's content - most of the time we bind things.
2013-03-28 23:28:58 +01:00
Piotr Sarnacki
c0d23f5579 Be more specific when catching 'URL not found' error, also add test 2013-03-19 21:39:38 +01:00
Piotr Sarnacki
de21e7bebc Handle not-found routes #159 2013-03-15 10:43:07 +01:00
Piotr Sarnacki
3e3bb97591 Clean lineNumber on transitions 2013-03-14 19:32:56 +01:00
Piotr Sarnacki
b847dbd664 Reset line numebr on each request 2013-03-14 17:56:50 +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
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
02ff533774 Fix integration tests running and 2 first tests 2013-02-28 15:54:48 +01:00
Piotr Sarnacki
a47147ed82 Fix build lists to not interfere with each other 2013-02-26 11:17:42 +01:00
Piotr Sarnacki
211b2723f9 Fix authentication 2013-02-26 07:05:40 +01:00
Piotr Sarnacki
1bccb5d177 Fix line numbers when loading an url 2013-02-25 15:18:59 +01:00
Piotr Sarnacki
3e031981bc Remove console.log 2013-02-23 00:21:52 +01:00
Piotr Sarnacki
f0ea65b114 Keep the hash in the location so we can scroll to line in logs 2013-02-23 00:21:01 +01:00
Piotr Sarnacki
b5bda962f9 Remove old router 2013-02-22 23:15:43 +01:00
Piotr Sarnacki
83fb0ebb2c Fix incomplete implementation 2013-02-21 23:22:54 +01:00
Piotr Sarnacki
bd7d2ede3a Refactor proxy creation in router 2013-02-21 23:22:53 +01:00
Piotr Sarnacki
4f21b097a8 Fix profile views 2013-02-21 23:22:53 +01:00
Piotr Sarnacki
50a69cccad Don't do request to get repos every time home page is reloaded 2013-02-21 23:22:53 +01:00
Piotr Sarnacki
9bf2cb1078 Add stats view and fix connectLayout 2013-02-21 23:22:53 +01:00
Piotr Sarnacki
9ed3598f95 Implement branches 2013-02-21 23:22:52 +01:00
Piotr Sarnacki
86670def14 Fix queues lists 2013-02-21 23:22:52 +01:00
Piotr Sarnacki
4cdd4df515 Tabs and basic views are mostly working 2013-02-21 23:22:51 +01:00
Piotr Sarnacki
075e714fc3 Fix job view 2013-02-21 23:22:51 +01:00
Piotr Sarnacki
8ccd95e0b0 Fix build view and links on left sidebar 2013-02-21 23:22:51 +01:00
Piotr Sarnacki
f0e95ddd3f Main view mostly works on new router 2013-02-21 23:22:51 +01:00
Piotr Sarnacki
829e1a4001 Fix routes code if google analytics is not loaded 2013-02-18 23:46:42 +01:00
Sven Fuchs
fb96164db8 just depend on the ga code 2013-02-08 15:30:49 +01:00
Sven Fuchs
2e8a197933 relax checking for non-production hosts 2013-02-08 15:22:32 +01:00
Sven Fuchs
0322e1a3c8 extract ga code and setup 2013-02-08 14:49:46 +01:00
Piotr Sarnacki
f3b37b9aaf Add redirect on /jobs/:id/log.txt and /builds/:id/log.txt 2013-01-16 13:14:46 +01:00
Piotr Sarnacki
ae9ff005d3 Don't throw error when repo can't be find
When visiting page of repo that doesn't exist, we should not throw an
error. It still does not work as expected, redirecting to
/undefined/undefined, which should be addressed as well, but at least we
don't throw errors now.
2013-01-08 15:01:49 +01:00
Randy Morgan
91812fb21c Connected flash outlet for profile 2012-12-11 13:17:24 +09:00
Sven Fuchs
d005f241ba fix things after rebase 2012-12-09 15:16:27 +01:00
Piotr Sarnacki
834e45ceb5 Don't require loading repos when dislaying queues and workers 2012-11-27 22:36:15 +01:00
Piotr Sarnacki
cdbfac1166 Add google analytics 2012-11-17 12:19:30 +01:00
Piotr Sarnacki
3084dacaef Update Ember.js from drogus/ember.js and fix routes
Default regexp used in ember does not work well for us. With repos
starting with 'stats', ember will match such url for /stats/ page, even
though the rest of the url is different, I added ability to overwrite
default regexp.
2012-11-16 17:36:13 +01:00
Piotr Sarnacki
cbd25b8821 Revert "Slugs are case insensitive now (closes #51)"
This reverts commit 8fb481cdd0.
2012-11-16 15:42:50 +01:00
Piotr Sarnacki
8fb481cdd0 Slugs are case insensitive now (closes #51) 2012-11-16 15:16:57 +01:00
Sven Fuchs
216724af64 changes for pro 2012-11-15 16:31:54 +01:00
Piotr Sarnacki
231f3b8723 Load worker related records from pusher payload 2012-10-24 11:28:01 +02:00
Piotr Sarnacki
a63ac52458 Remove layout views, just change template on application 2012-10-23 01:40:05 +02:00
Piotr Sarnacki
72f14fb594 Do not trigger unnecessary reloads when locale *could* have changed 2012-10-22 21:29:51 +02:00
Piotr Sarnacki
c02f4d860b Fix errors with reload 2012-10-22 19:54:53 +02:00
Piotr Sarnacki
60740a8d3d Remove router hacks
I've implemented things that we need into Ember. We're running from my
fork for now, ideally those changes will be merged into official repo.
2012-10-20 16:36:53 +02:00
Sven Fuchs
853606bcc6 moar routing/auth refactorings 2012-10-19 22:20:45 +02:00
Sven Fuchs
c4b91108a0 refactor routes/auth interaction so that it always calls afterSignIn() 2012-10-19 21:24:18 +02:00
Piotr Sarnacki
82163346b9 We don't have to transitionTo('root') here 2012-10-18 03:38:45 +02:00
Piotr Sarnacki
cb76de3718 Move afterSignIn to auth Route
If we keep it only on states lower than root and afterSignIn is sent
when app is still in root.loading (which is often the case as we need to
wait for repository deserialization), it will try to find afterSignIn on
root.
2012-10-18 03:28:29 +02:00
Sven Fuchs
f91622e7e8 add an events tab 2012-10-16 02:00:24 +02:00
Sven Fuchs
95b7ea03d2 set the reposController to the repoController in connectOutlets 2012-10-13 22:03:10 +02:00
Piotr Sarnacki
7ccbba2959 Don't redirect user if we're already in state that's not auth 2012-10-13 19:00:56 +02:00
Sven Fuchs
d84b5dfd0a add autoSignIn to fix that after signOut it would always re-signin on pages that require auth 2012-10-13 15:52:27 +02:00
Sven Fuchs
44d81af450 make sure we go through the auth check after signout 2012-10-13 15:07:35 +02:00
Sven Fuchs
4689545547 camelize to afterSignIn and add afterSignOut 2012-10-13 15:02:23 +02:00
Sven Fuchs
2485a7bcb9 fix router after_signin behaviour 2012-10-13 14:51:12 +02:00
Sven Fuchs
dee3591147 some tweaks 2012-10-13 04:34:30 +02:00
Piotr Sarnacki
87bccccde8 Fix routing to build/job when object is already loaded 2012-10-12 18:46:27 +02:00
Piotr Sarnacki
2575218ddb Fix logs to always point to build or job view 2012-10-12 18:32:25 +02:00
Sven Fuchs
f16c83d10f somewhat more consistent naming 2012-10-12 02:34:54 +02:00
Piotr Sarnacki
6a487c8fd8 Actually fix profile view when reloading page - no need to redirect 2012-10-11 01:25:18 +02:00
Piotr Sarnacki
3c303e5a86 Reload page when locale for user changes, also cache it in cookie 2012-10-10 22:37:44 +02:00