Compare commits

...

634 Commits

Author SHA1 Message Date
Curtis Ekstrom
1f5eb7f525 Revert to old container lookup behavior
This fixes a bug that affected only pro
2016-04-15 05:58:52 +02:00
lislis
812bf1a4f5 update org landing page, fix gigantic number 2016-04-14 17:00:55 +02:00
Justine
b9688352f4 Merge pull request #497 from jtangelder/ansi-contrast
Improve contrast of the highlight ansi colors
2016-04-14 10:24:40 -04:00
Lisa
2701581c12 Merge pull request #499 from travis-ci/lp-updates
Multiple smaller updates
2016-04-14 16:24:05 +02:00
Lisa
1ff47c63c4 Merge pull request #494 from travis-ci/modify_broadcast_copy
Shorten broadcast copy
2016-04-14 16:15:25 +02:00
lislis
dbedf34be1 add title attrs to team flags 2016-04-14 16:04:27 +02:00
lislis
5733d14ae4 fix layout issue with last synced message 2016-04-14 15:44:59 +02:00
lislis
4cb225d578 hide 'signup account' message if on enterprise 2016-04-14 15:29:30 +02:00
lislis
249deb0eff remove case sensitive notice from getting started 2016-04-14 15:24:12 +02:00
Piotr Sarnacki
446a9bc9b1 Merge pull request #498 from travis-ci/remove_moment_deprecation
Remove moment deprecation on builds page
2016-04-14 14:21:42 +02:00
Curtis Ekstrom
ee4b26a7d7
Remove moment deprecation on builds page
See https://github.com/moment/moment/issues/1407 for more details. All that was needed was to manually instantiate a new Date() object
2016-04-14 13:22:15 +02:00
Piotr Sarnacki
7601173aaa Merge pull request #495 from travis-ci/remove_2.2_deprecations
Upgrade Ember to 2.4.5 and remove all application deprecations
2016-04-14 13:09:53 +02:00
Curtis Ekstrom
e74b29c313
Remove getOwner polyfill 2016-04-14 12:25:24 +02:00
Jorik Tangelder
eb7a746549 Improve contrast of the highlight ansi colors
The contrast of the green, red and yellow highlight colors was too low.
2016-04-14 11:54:36 +02:00
Curtis Ekstrom
d85469c98e
Bump Ember to 2.4.5 2016-04-14 09:44:50 +02:00
Curtis Ekstrom
fe8a5a13e1
Remove Ember 2.3 deprecation warnings 2016-04-14 09:38:59 +02:00
Curtis Ekstrom
f8d05dea78
Remove all remaining app deprecations 2016-04-13 18:06:28 +02:00
Curtis Ekstrom
dc34ab38e7
Install polyfill addon until upgraded to Ember 2.3 2016-04-13 18:06:28 +02:00
Curtis Ekstrom
5c3d905424
Remove unnecessary deprecation handlers
These deprecations are no longer being triggered by the application (as
far as I can tell).
2016-04-13 18:05:52 +02:00
Curtis Ekstrom
f00a899e74
Shorten broadcast copy
This shortens the broadcast copy and makes more sense grammatically
2016-04-13 16:03:19 +02:00
Piotr Sarnacki
1c49615a2d Merge pull request #488 from fauxton/ce_upgrade_ember_cli
Upgrade Ember-CLI to 2.4.3
2016-04-13 11:05:00 +02:00
Piotr Sarnacki
d6c4f1beea Merge pull request #489 from travis-ci/remove-sponsors
Remove unused images
2016-04-13 11:03:44 +02:00
Piotr Sarnacki
f459fed279 Merge pull request #492 from travis-ci/adding-igor-carmen-maren-buck
Remove Buck for now
2016-04-13 11:01:17 +02:00
Curtis Ekstrom
8de13d1949
Simplify testem logic and remove console logging 2016-04-12 23:04:08 +02:00
Buck Doyle
35f9d00a7d Remove Buck for now 2016-04-12 18:25:40 +02:00
Buck Doyle
17f200081a Merge pull request #491 from travis-ci/adding-igor-carmen-maren-buck
Adding Igor, Carmen, Maren, and Buck
2016-04-12 17:58:52 +02:00
Buck Doyle
a17556baf6 Remove mistakenly-added line 2016-04-12 17:41:11 +02:00
Buck Doyle
575d78e38d Auto-merged master into adding-igor-carmen-maren-buck on deployment. 2016-04-12 17:02:56 +02:00
Justine Arreche
d6d1b7c738 update bucks gif 2016-04-12 10:54:50 -04:00
Curtis Ekstrom
3fa2fcea93 Auto-merged master into remove-sponsors on deployment. 2016-04-12 16:30:06 +02:00
Buck Doyle
67104fc1f1 Merge pull request #490 from travis-ci/speed_up_production_builds
Exclude emoji images from fingerprinting to speed up production builds
2016-04-12 16:23:06 +02:00
Justine Arreche
ebb451d70c adding in Maren and Buck 2016-04-12 09:54:22 -04:00
Buck Doyle and Curtis Ekstrom
e14003eb53
Exclude emoji images from fingerprinting to speed up production builds 2016-04-12 15:32:15 +02:00
Buck Doyle and Curtis Ekstrom
bc8efb758f Remove unused images 2016-04-12 15:12:46 +02:00
Curtis Ekstrom
8cd14b8952
Upgrade Ember-CLI to 2.4.3
This upgrades several Ember-CLI related packages, but does not change
our Ember/Ember-Data versions (those will require code changes that are
best handled in separate commits).

In addition, Testem can now be dynamically configured, meaning we no longer need
custom scripts to run as part of CI to set dynamic launcher configuration values
based on PR status.
2016-04-12 10:25:44 +02:00
Justine Arreche
f62143217e created dual nationality flag for Igor 2016-04-11 13:38:41 -04:00
Justine Arreche
2c56238de0 Added Igor and Carmen to the team page 2016-04-11 12:59:55 -04:00
lislis
286b59c8ed update user numbers 2016-04-11 12:51:51 -04:00
Sven Fuchs
c5f3cc4873 Merge branch 'te-dev' 2016-04-08 14:42:11 +02:00
Sven Fuchs
36e1f9b30e camelize channelPrefix option 2016-04-08 14:41:22 +02:00
Lisa
7035b3f763 Merge pull request #486 from travis-ci/lp-remove-org-landing-bg
Update org landing page
2016-04-06 15:54:24 +02:00
lislis
862b14bad3 only remove gce notice 2016-04-06 15:15:20 +02:00
lislis
38e45810e9 update org landing 2016-04-06 14:11:16 +02:00
Lisa
bf636b05f2 Merge pull request #483 from mithun/master
fix image format for POD
2016-04-06 12:44:41 +02:00
Lisa
fa000b80c9 Merge pull request #484 from travis-ci/te-dev
pass through Env.pusher.channelPrefix for enterprise
2016-04-06 12:42:31 +02:00
lislis
ae57f3903e make permissions dependend on array.length 2016-04-06 12:38:20 +02:00
Sven Fuchs
6505a058d6 pass through Env.pusher.channelPrefix for enterprise 2016-04-05 18:09:41 +02:00
Lisa
e3efe7d7fc Merge pull request #482 from travis-ci/lp-remove-builds-from-org-landing
Remove builds from org landing
2016-04-05 14:25:47 +02:00
Mithun Ayachit
703cdbd598 fix image format for POD
Some POD parsers recognize only lowercase format names.

For e.g., pod2markdown fails to generate a markdown file with the status image if the format is 'HTML'
2016-04-05 06:31:17 -05:00
lislis
217618ea71 remove build polling logic from home route 2016-04-05 12:29:32 +02:00
lislis
919857dfad update styles for pro pages 2016-04-05 12:23:58 +02:00
lislis
c74fa87016 remove recent builds 2016-04-05 12:03:58 +02:00
lislis
1cfb9d37be fix broadcast display 2016-04-05 11:57:25 +02:00
Piotr Sarnacki
cbd0c46e37 Ensure that permission functions work without a user 2016-03-22 12:43:41 +01:00
lislis
e66efc1cbc check for currentUser in permissions 2016-03-22 12:42:20 +01:00
Lisa P
71c55779a1 import util, coment out dashboard acceptance 2016-03-22 12:41:52 +01:00
Lisa P
fa62539a40 add more tests 2016-03-22 12:41:34 +01:00
Lisa P
26ca2875ae make it a util 2016-03-22 12:41:28 +01:00
Lisa P
65cf81169b add permissions mixin to dashboard row 2016-03-22 12:41:14 +01:00
Lisa P
2220334265 put permissions into a mixin 2016-03-22 12:37:05 +01:00
Konstantin Haase
3618488151 Update team.js 2016-03-22 11:03:31 +01:00
Piotr Sarnacki
ae8092ddc0 Make JSHint happy 2016-03-21 14:02:18 +01:00
lislis
d9c7ada46d fix typo in component 2016-03-21 12:34:37 +01:00
Lisa
e1500d76a1 Merge pull request #479 from travis-ci/MdA_typo_fix
fix typo "annually"
2016-03-16 11:40:42 +01:00
María de Antón
a940e176e7 fix typo "annually"
Thanks to Lachlan who reported the typo
2016-03-16 09:58:56 +01:00
Lisa
381bdc98b5 Merge pull request #477 from travis-ci/ja-fixing-logos
Fixed the full color logo downloads and links
2016-03-14 18:15:04 +01:00
Lisa
2c1c1a000e Merge pull request #476 from travis-ci/lp-decrease
decrease border
2016-03-14 17:47:19 +01:00
Justine Arreche
935092c8d7 Fixed the full color logo downloads and links 2016-03-14 12:44:18 -04:00
Lisa P
fdd07e83b4 try border 2016-03-14 17:24:19 +01:00
Lisa
f482c8be36 Merge pull request #475 from travis-ci/ja-adding-ana-team
Adding Ana to the team page as well as Mexico's flag
2016-03-14 17:04:16 +01:00
Justine Arreche
b859386fda Adding Ana to the team page as well as Mexico's flag 2016-03-14 10:35:07 -04:00
Lisa
07d241bdc2 Merge pull request #474 from travis-ci/lp-fix-env-var
some UI fixes after the update
2016-03-14 13:22:53 +01:00
Lisa P
e35e01747a fix user avatar/ status icon spacing 2016-03-14 13:09:32 +01:00
Lisa P
8c374cde93 fix env var display 2016-03-14 12:38:31 +01:00
Piotr Sarnacki
8fb479c3e0 Turn off API V3 2016-03-09 17:02:38 +01:00
Lisa
c65a88a23a Merge pull request #471 from travis-ci/lp-db-rows
Dashboard styles and cleanup
2016-03-09 11:53:59 +01:00
Lisa P
521fb30b42 fix caches 2016-03-09 11:30:45 +01:00
Lisa P
38398588bb adjust flag icon and notice 2016-03-09 11:19:55 +01:00
Lisa P
79b456e511 dashboard row styles
start row layouting

work on dropup

rearrange markup, make tofu toggle

bäm

use placeholder instead of variable, doh

add border

replace all the icons

adjust icons sizes

use icon classes instead of svg

more icons adjustments

more icon tweaks on caches

update coloring mixins

fix stateMap, update db coloring mixin

cleanup owner page

even more icon fun

popup tweaks

tweak api icon

change to new broadcast icon

change icon path

responsive tweaks

dashboard filter

hack around Safari's not quite standard flexbox behaviour

update row labels and icon spacing

rearrange links in sidebar

make last builds a component, tweak svg stroke-width

more icon tweaks

fiddle around with svg view props

rearrange links in branch-row

tweak request icon

add integration test

more tweaks
2016-03-09 11:05:51 +01:00
Piotr Sarnacki
c6ec02429d Log user out only if necessary on failed user data request 2016-03-08 13:50:49 +01:00
Piotr Sarnacki
fa7c275eaa Clear timers in update-times service
It's mostly relevant in tests, because service is destroyed when test
end and then we don't want to run any timers.
2016-03-08 13:50:49 +01:00
Piotr Sarnacki
bfb1b69374 Merge pull request #473 from travis-ci/acceptance-tests
Acceptance tests
2016-03-07 14:35:19 +01:00
Piotr Sarnacki
5dc64c4937 Fix findRecord to work without passing a snapshot
We use adapter.findRecord to fetch repo by slug. Using it this way was
broken with one of the ember-data releases. This commit brings back the
old behaviour.
2016-03-07 13:32:49 +01:00
Piotr Sarnacki
ab0a2af471 Fix various small issues with test suite 2016-03-07 13:28:51 +01:00
Piotr Sarnacki
7292d6f53e Update ember-cli-mirage to newest beta 2016-03-07 13:28:46 +01:00
Lisa P
de26ed2091 fix error handling for log 2016-03-07 13:27:48 +01:00
Lisa P
0dc7e0e045 Add job page acceptance test 2016-03-07 13:27:47 +01:00
Piotr Sarnacki
725d3b00da Add ember-cli-mirage addon 2016-03-07 13:27:44 +01:00
Lisa
09637d5e07 Merge pull request #470 from travis-ci/lp-ui-fixes
UI fixes
2016-03-03 18:47:01 +01:00
Lisa
7ad66ac83e Merge pull request #468 from mkobit/fix/spelling-fix
Fix spelling errors for 'repository'
2016-03-03 18:16:55 +01:00
Lisa P
c31d87871b fix sync button label 2016-03-03 17:02:28 +01:00
Lisa P
adb8753b60 fix uppercase error for avatars 2016-03-03 16:41:14 +01:00
Piotr Sarnacki
a3ce77831d Make jshint happy 2016-03-03 11:58:17 +01:00
Piotr Sarnacki
57dec8f2fc Don't fetch /jobs when not in pro
We pass runningJobsCount to repos-list-tabs component, which essentially
is a binding and a binding will call the property that we're passing,
which in turn will fetch running and queued jobs. In order to avoid
this, I added guards in computed properties.
2016-03-03 11:25:01 +01:00
Mike Kobit
df325866f1 Fix spelling errors for 'repository' 2016-03-02 09:26:58 -06:00
Piotr Sarnacki
20b72e5f10 Merge pull request #467 from travis-ci/ps-pendo.io
Add pendo.io integration
2016-03-02 15:15:51 +01:00
Piotr Sarnacki
51f91c3748 Add pendo.io integration 2016-03-01 12:22:17 +01:00
Piotr Sarnacki
0f99defb25 Merge pull request #466 from fauxton/typo_fix
Fix mixin typo
2016-02-25 17:39:46 +01:00
Curtis Ekstrom
8211dd716a Fix mixin typo 2016-02-25 14:51:31 +01:00
Piotr Sarnacki
55005b1b13 Scroll page in beforeModel hook in scroll-mixin
The `activate` hook is not always called when the route is used,
specifically it will not be called when the model changes, but the
change happened within the same route (for example when switching from
/travis-ci/travis-web to /travis-ci/travis-core). `beforeModel` is
guaranteed to be called every time the model is changed, both when the
route is entered for the first time and on any subsequent calls.
2016-02-23 13:05:36 +01:00
Lisa P
4fc13503d5 Merge pull request #463 from travis-ci/lp-le-dash
Updating some UI elements
2016-02-22 11:35:49 +00:00
Lisa P
dad5950142 start fresh markup for prgs filter 2016-02-19 18:40:18 +01:00
Lisa P
101a0ec71f sync button on dashbaord 2016-02-19 18:40:16 +01:00
Lisa P
192ebce0c3 refactor all things dashbaord 2016-02-17 17:04:15 +01:00
Lisa P
77dcbacd5e Merge pull request #462 from jimhester/R-matrix
Add R language key for matrix column
2016-02-17 15:57:59 +00:00
Lisa P
3a211b8a73 Merge pull request #461 from fauxton/ember-cli-2.3
Upgrade to Ember-CLI 2.3.0
2016-02-17 15:53:39 +00:00
Lisa P
b0d1ac8463 Merge pull request #460 from fauxton/remove_binding_deprecations
Remove legacy binding deprecation warnings
2016-02-17 15:45:32 +00:00
Lisa P
a09ec1c264 Merge pull request #459 from travis-ci/lp-update-footer
update footer
2016-02-17 15:36:04 +00:00
Jim Hester
546a678712 Add R language key for matrix column 2016-02-17 10:22:53 -05:00
Lisa P
645daffd10 update footer
introduce grey as body color

special case footer on landing-pro
2016-02-17 15:20:00 +01:00
Curtis Ekstrom
e436dbaeac Upgrade package to remove deprecation warning 2016-02-17 06:18:54 +01:00
Curtis Ekstrom
0a5b7465d8 Remove legacy binding deprecation warnings
This removes the warnings and should clean up the test output (especially in CI) quite a bit.
2016-02-16 23:40:17 +01:00
Curtis Ekstrom
90dc71694e Upgrade to Ember-CLI 2.3.0
Note: There is a [known issue](https://github.com/mixonic/ember-cli-deprecation-workflow/issues/30) with a deprecation warning coming from
...wait for it... ember-cli-deprecation-workflow.

Otherwise, this simply bumps the necessary dependencies (suggested by
the new generators) and makes the project conform to the minimal changes
in import syntax.
2016-02-16 23:02:01 +01:00
Lisa P
9f636b986c Merge pull request #458 from fauxton/fix_sidebar_links
Remove click handler overriding default link behavior
2016-02-16 14:36:36 +00:00
Curtis Ekstrom
2ae61562ea Ensure scroll position reset
This adds a new mixin that allows us to opt in to scroll reset
behavior.
2016-02-16 14:10:12 +01:00
Curtis Ekstrom
c118153f2f Remove click handler overriding default link behavior
An [issue](https://github.com/travis-ci/travis-ci/issues/5181) was reported in
which the repository sidebar links were not functioning properly. I've
tracked it down to the fact that a click handler was registered and
automatically performing a redirect to the repo route.

This breaks CMD+Click behavior (as the click handler was still
called and navigating when the user did not expect it, as well as
navigated to a link that the user did not intend to visit.

This commit simply removes that click handler. I checked the previous
coffee version of the file to gain more context on why it was initially
added, but unfortunately, it was simply added when the original
component was created, so I'm not sure what its use was.
2016-02-15 23:40:09 +01:00
Lisa P
08bc13aedd fix layout issue on repos for not signed in users 2016-02-15 16:45:40 +01:00
Lisa P
f8ce0b494f Merge pull request #456 from travis-ci/ja-rexported-logos
Added in rexported logo assets and corrected /logos for file downloads
2016-02-12 15:54:51 +01:00
Justine
af4b85ab24 Merge pull request #457 from travis-ci/ha-doc-env-var-escaping
Add note for escaping bash special characters
2016-02-11 18:08:16 -05:00
Hiro Asari
d55147ee04 Add note for escaping bash special characters 2016-02-11 12:33:26 -10:00
Justine Arreche
be6bfda455 Added in rexported logo assets and corrected /logos for file downloads 2016-02-11 12:15:07 -05:00
Lisa P
ae1719b5f4 Merge pull request #452 from travis-ci/lp-cleanup
mulitiple smaller things
2016-02-11 16:19:50 +01:00
Lisa P
a343815476 revamp settings button to more options 2016-02-11 15:12:04 +01:00
Lisa P
7a6bb1cdd9 update status image popup 2016-02-11 14:44:36 +01:00
Lisa P
eda72b785c remove unused styles 2016-02-11 14:43:00 +01:00
Lisa P
92eec06b6e broadcast fix for safari 2016-02-11 14:38:59 +01:00
Piotr Sarnacki
707c77aeee Strengthen the dependencies on canCancel in build
For some reason it sometimes is not refreshed correctly without these
additional dependencies.
2016-02-11 13:54:07 +01:00
Piotr Sarnacki
20e8a47576 Fix logs displaying when a restart happens
When a user restarts a job, we should not try fetching the log again. In
order to do this I added a guard in job-log component, which checks if
attributes changed in didReceiveAttrs callback. If the old job value is
the same as the new value, we don't need to do anything.
2016-02-11 13:43:59 +01:00
Piotr Sarnacki
238969bc51 Merge pull request #455 from alicetragedy/lg-update-team
add twitter handle for laura in team page
2016-02-09 14:43:59 +01:00
alicetragedy
a27131015f add twitter handle for laura in team page 2016-02-09 10:53:21 +01:00
carlad
c65841e7ce Merge pull request #454 from travis-ci/ja-adding-laura
Added in Laura's picture, gif, information and countries..
2016-02-08 22:03:56 +01:00
Justine Arreche
24aa541616 Added in Laura's picture, gif, information and countries.. oh and I guess I also wanted to sneaky change my picture too 2016-02-08 15:25:53 -05:00
Piotr Sarnacki
1091385aab Merge pull request #447 from fauxton/remove_autoprefixer_deprecations
Remove autoprexifer deprecations
2016-02-08 11:43:37 +01:00
Piotr Sarnacki
a6e850ecea Merge pull request #448 from fauxton/remove_router_deprecations
Remove resource router deprecations
2016-02-08 11:43:31 +01:00
Piotr Sarnacki
9c9f161c26 Merge pull request #450 from fauxton/remove_append_deprecations
Remove append() test deprecations
2016-02-08 11:43:17 +01:00
Lisa P
c07709139c fix people pics on front page 2016-02-04 13:00:47 +01:00
Lisa P
4347c1efe4 Merge pull request #449 from travis-ci/enterprise-ui-fixes
Enterprise ui fixes
2016-02-04 12:29:57 +01:00
Curtis Ekstrom
9d429966d0 Remove append() test deprecations
Replacing with `render` to appease the test suite gods.
2016-02-04 00:06:47 +01:00
Lisa P
243bd4aed5 update according to comments 2016-02-02 15:22:03 +01:00
Lisa P
38be0fc90c enterprisify infrastructure notices 2016-02-02 12:32:04 +01:00
Lisa P
534714e7e9 hide syncing info on enterprise 2016-02-02 12:23:50 +01:00
Lisa P
21cbc96e77 bring back profile graphic 2016-02-02 12:23:49 +01:00
Lisa P
90408dfb47 hide some UI elements for enterprise 2016-02-02 12:23:49 +01:00
Piotr Sarnacki
1d0fb6468e Fix job times updating on build view 2016-02-02 11:45:59 +01:00
Piotr Sarnacki
8e610a6191 Show branches content even if there's no defaultBranch 2016-02-02 11:08:48 +01:00
Curtis Ekstrom
768963efc6 Remove resource router deprecations
The use of `resource` within the router is deprecated as of 2.0.0.
See notice [here](https://github.com/emberjs/ember.js/pull/11517).

This uses ember-watson to do the manual conversion, with small
aesthetic tweaks.
2016-02-01 16:29:12 +01:00
Curtis Ekstrom
1b00bc72a1 Remove autoprexifer deprecations
Upgading ember-cli-autoprefixer to 0.5.0 removes the deprecation
messages from the build output (these were targeted for removal
in 0.4.0).

There are no noticable side effects, but this version does package
the most recent version of postcss/autoprefixer. The release notes
for that version can be found
[here](https://github.com/postcss/autoprefixer/releases/tag/6.0.0).
2016-02-01 16:11:42 +01:00
Piotr Sarnacki
4443dc9ddd Merge pull request #435 from jasonkarns/patch-1
Leverage <time> element
2016-02-01 16:00:36 +01:00
Jason Karns
788bcfa0d4 more time markup 2016-02-01 09:44:04 -05:00
Jason Karns
b481946000 Leverage <time> element
Sample of using the `time` element instead of `abbr` for displaying timestamps.

The `time` element can also represent durations. So the sample used here is suboptimal. Rather than the duration time lising the `lastBuildStartedAt` time in the `datetime` attribute, it ought to be a [valid `duration` value](https://www.w3.org/html/wg/drafts/html/master/infrastructure.html#valid-duration-string). However, I didn't see any existing helpers for formatting according to a machine-readable duration value.
2016-02-01 09:38:17 -05:00
Piotr Sarnacki
3fef8fdd0e Merge pull request #446 from travis-ci/lp-remove-codeclimate
remove code climate
2016-02-01 13:20:13 +01:00
Lisa P
1c4f748b2e fix tests, refactor repo-actions component 2016-02-01 13:09:16 +01:00
Lisa P
cd7ab9b719 remove code climate
remove code climate popup function
2016-02-01 13:09:15 +01:00
Piotr Sarnacki
ac4f5ed193 Merge pull request #445 from travis-ci/update-finished-at-for-finished-builds
Update time also for finished builds, but only every minute
2016-02-01 11:58:44 +01:00
Piotr Sarnacki
84e207641e Merge pull request #443 from fauxton/remove_component_test_deprecations
Remove component test deprecations by specifying test type
2016-02-01 10:38:01 +01:00
Piotr Sarnacki
620632500b Merge pull request #444 from fauxton/remove_initializer_deprecations
Remove initializer deprecation warnings
2016-02-01 10:37:30 +01:00
Curtis Ekstrom
92896aa8e1 Remove initializer deprecation warnings
The previous initializer API was deprecated in Ember 2.1 (See
http://emberjs.com/deprecations/v2.x/), so this updates the initializer
signatures to accomodate that change.
Also, remove the registered deprecation from the workflow.
2016-01-31 12:30:27 +01:00
Curtis Ekstrom
58955469c6 Remove component test deprecations by specifying test type 2016-01-31 12:04:44 +01:00
Piotr Sarnacki
4b9d9fda1e Remove unneeded class 2016-01-29 16:47:40 +01:00
Piotr Sarnacki
6deae83a1b Only hide #log element, so it's always in the DOM
When a job is not started, we will show a message that the log can't be
shown. If a pusher message with a state change comes after the first log
pusher message, travis-web-log will error out, because in such a
situation a DOM element wouldn't be available. To make it always work,
this commit changes the behaviour to just hide #log element with CSS
instead of using {{#if}}.
2016-01-29 16:32:51 +01:00
Piotr Sarnacki
7764479c14 Schedule inserting elements afterRender
It will ensure that log element is already loaded.
2016-01-29 14:31:16 +01:00
Piotr Sarnacki
24465e634f Use el.innerHTML = ''; instead of $(el).empty()
innerHTML is faster than empty(), especially on some versions of
firefox. This change was already commited before, but it was somehow
lost while converting project to JS.
2016-01-29 14:31:16 +01:00
Justine
b1aead7577 Merge pull request #442 from travis-ci/lp-fadeout
fade out long commit messages
2016-01-28 09:27:27 -05:00
Lisa P
41884ff9d2 fade out long commit messages 2016-01-27 16:41:20 +01:00
Piotr Sarnacki
6639a29411 Merge pull request #437 from travis-ci/lp-avatar
make a user-avatar component
2016-01-27 13:13:19 +01:00
Lisa P
22c938489e make gravatar depend on email 2016-01-27 13:01:18 +01:00
Piotr Sarnacki
c0df9d03e1 Revert "Update travis-web-log"
I need to work more on the problem that this commit tried to resolve

This reverts commit 84660db9d2.
2016-01-27 12:42:50 +01:00
Piotr Sarnacki
84660db9d2 Update travis-web-log 2016-01-27 12:38:30 +01:00
Piotr Sarnacki
9a9d3805d8 Bring back noop function which was accidentally destroyed 2016-01-27 12:32:53 +01:00
carlad
f6d6e9150a Merge pull request #441 from travis-ci/cd-update-precise-text
remove "Legacy" from "Precise builds" in log-content message
2016-01-27 10:09:03 +01:00
Lisa P
5d74d57ac6 add avatarUrl propertuy to user model 2016-01-26 18:40:07 +01:00
carlad
4f394ad72e remove Legacy from Precise builds text 2016-01-26 18:29:31 +01:00
Lisa P
d82ff49359 change component implementation 2016-01-26 14:50:58 +01:00
Lisa P
9cff29ce80 fix href on caches 2016-01-26 12:25:43 +01:00
Lisa P
0570a86035 add empty href to caches-item otherwise iOS does not fire tab event 2016-01-25 18:29:32 +01:00
Piotr Sarnacki
e919906f99 Update time also for finished builds, but only every minute 2016-01-25 17:55:48 +01:00
Lisa P
2882c8ca96 add empty href otherwise iOS does not fire a tap event correctly 2016-01-25 15:25:33 +01:00
Piotr Sarnacki
069f7ddbeb Fix displaying no-builds and not-active errors
This commit unifies the behaviour of displaying no-builds and not-active
errors for repo and fixes the error when user can't access repo settings
when the project is not active.
2016-01-21 16:35:36 +01:00
Lisa P
add716945f Merge pull request #436 from jasonkarns/patch-2
Fix grammatical error for finished job duration
2016-01-21 14:05:50 +01:00
Piotr Sarnacki
5c0697ed85 Always authenticate ajax calls
Our mechanism for blacklisting IPs, which was developed as a protection
against a DDoS attach, sometimes classifies IPs as offenders
incorrectly. In order to temporary improve the situation of 403
responses from API we're now going to authenticate all of the ajax
calls, because authenticated calls are not blacklisted that easily.
2016-01-21 14:00:41 +01:00
Piotr Sarnacki
7cfa83deb8 Merge pull request #439 from travis-ci/lp-ie-restart
don't send data body if it is empty
2016-01-21 13:56:30 +01:00
Lisa P
35961e3c63 Merge pull request #438 from travis-ci/lp-fix-title-on-owner
fix title tag when owner had no name set
2016-01-21 13:47:43 +01:00
Lisa P
3e7a8b694e fix title tag when owner had no name set 2016-01-21 13:39:02 +01:00
Lisa P
1fc82577b1 dont send data body if it is empty 2016-01-21 13:04:05 +01:00
Lisa P
05b85eb37f make a user-avatar component
delete some, add some, fix some tests
2016-01-21 12:08:28 +01:00
Piotr Sarnacki
6efb2ac449 No need to load builds into repo.builds
Builds on repo model already incorporate all of the builds that belong
to a given repo and are loaded into a store, so no need to load them to
expandable array.
2016-01-18 13:18:19 +01:00
Piotr Sarnacki
2d0aee4e68 Fix status images popup
After recent refactorings status images popup started to fetch branches
info whenever a repo page was opened, resulting in additional HTTP
requests. Furthermore, because of a way we load branches, it could
result in builds view displaying very old builds, because in API V2 we
essentially download last build for each branch for branches request.

This commit fixes the situation in 2 ways:

1. We wait with downloading branhes till the popup is open
2. We use a V3 requests to download branches and we don't put that data
into the store
2016-01-18 13:14:28 +01:00
Piotr Sarnacki
b0df09fb22 Fix displaying no-builds message with an index view 2016-01-15 15:43:29 +01:00
Piotr Sarnacki
4bbf114e82 Check also for value in attrs for job-log 2016-01-15 15:15:59 +01:00
Piotr Sarnacki
e1a2f42030 Properly set pusher path in config 2016-01-15 12:36:45 +01:00
Piotr Sarnacki
5ddbde82f1 Upgrade Ember.js to 2.2.1 2016-01-14 23:17:21 +01:00
Jason Karns
a7e2099829 Fix grammatical error for finished job duration
While a job is running, on the job status view, the duration is labeled: "Running for x sec". When the job finishes, 'Running' is swapped for 'Total time'. But "Total time for x sec" doesn't make any sense. the " for" should be part of the conditional with "Running"
2016-01-14 14:03:41 -05:00
Piotr Sarnacki
c70ed06848 Fix sorting on builds list 2016-01-14 15:40:06 +01:00
Piotr Sarnacki
557797ab19 Fix show more button for builds
While doing search and replace I accidentally replaced too much
occurences of 'builds'
2016-01-14 14:10:20 +01:00
Piotr Sarnacki
0a872e25a7 Fix showing running jobs
When I changed tabs-list-view to be a component I missed the fact that
config is not registered for components, which resulted in not showing
the running jobs tab at all. This commit fixes the situation.
2016-01-14 14:04:29 +01:00
Piotr Sarnacki
8eaee33d6d Merge pull request #433 from travis-ci/update-ember
Update Ember.js to 2.2.0 and Ember Data to 2.3.0
2016-01-14 13:22:32 +01:00
Piotr Sarnacki
660752ec78 Fix build header for job with PR data 2016-01-14 13:21:57 +01:00
Piotr Sarnacki
93deb7f4e2 Fix tests 2016-01-14 13:14:45 +01:00
Piotr Sarnacki
f9dde74f59 Add deprecations from Ember.js 2.x to deprecation workflow 2016-01-14 12:16:32 +01:00
Piotr Sarnacki
0c15a09d54 Update Ember Data to 2.3.0 2016-01-14 11:54:47 +01:00
Piotr Sarnacki
ed71aa133e Update Ember.js to 2.2.0 2016-01-14 11:54:26 +01:00
Piotr Sarnacki
efaae492c4 Run GA instructions only if gaCode is set 2016-01-14 11:38:46 +01:00
Piotr Sarnacki
c96a4602cd Merge pull request #432 from travis-ci/ps-remove-deprecations
Remove deprecations in preparation for 2.x update
2016-01-14 11:37:41 +01:00
Piotr Sarnacki
99b7ce4a9d Add missing semicolon 2016-01-14 11:28:25 +01:00
Lisa P
c694ab24f6 remove broadcast animation because 💥 CPU 2016-01-13 18:19:56 +01:00
Lisa P
76749e2250 fix signin loop 2016-01-13 15:29:44 +01:00
Piotr Sarnacki
9a7508e25d Merge pull request #434 from travis-ci/lp-signin-route
add explicit signin route
2016-01-13 15:10:14 +01:00
Lisa P
5163e5129b pin jquery version 2016-01-13 14:49:04 +01:00
Lisa P
a63188ae13 add explicit signin route 2016-01-13 14:28:22 +01:00
Piotr Sarnacki
34ca0cc386 Use transitionToRoute instead of transitionTo in controllers 2016-01-13 12:00:35 +01:00
Piotr Sarnacki
fb1b820837 [deprecations] Remove all of the views from the app 2016-01-13 11:26:30 +01:00
Piotr Sarnacki
ee5f842d51 Fix adding ssh key 2016-01-13 11:25:45 +01:00
Piotr Sarnacki
271b8f89ea Fix show more button and simplify builds controller 2016-01-13 11:25:41 +01:00
Piotr Sarnacki
13d2eba016 [deprecations] Remove the need to use beforeObserver in job-log component 2016-01-12 18:27:24 +01:00
Piotr Sarnacki
21f25cd2bf [deprecations] Remove all of the views from the app 2016-01-12 16:55:22 +01:00
Piotr Sarnacki
c3ef9ac5d9 [deprecations] Remove all of the views we use just for layouts 2016-01-12 16:55:22 +01:00
Piotr Sarnacki
becde631d5 [deprecations] Use ember-data-filter plugin
At some point we may try to refactor places where we use store.filter(),
but at the moment it would result with an overly complicated code, so
I'd prefer to use a plugin.
2016-01-12 16:55:22 +01:00
Piotr Sarnacki
1c33475ff6 [deprecations] Don't use snapshot.get() 2016-01-12 16:55:22 +01:00
Piotr Sarnacki
dcac5d4150 Merge pull request #429 from travis-ci/lp-deprecations
remove deprecations
2016-01-12 16:54:52 +01:00
Lisa P
ea79bb1625 Merge pull request #430 from travis-ci/lp-branch-tiles
show build number on hover in branch tiles #yolo
2016-01-12 15:20:34 +01:00
Lisa P
bd7e4a001d fix wobbling building icon 2016-01-12 13:25:57 +01:00
Lisa P
e3b77b4b5a fix yellows across the place 2016-01-12 13:10:15 +01:00
Lisa P
6eed891a1a show build number on hover in branch tiles 2016-01-12 13:10:15 +01:00
Piotr Sarnacki
bbf0b7459f Allow to set an alternative endpoint for auth 2016-01-11 14:26:26 +01:00
Piotr Sarnacki
cebaa0e8d1 Merge pull request #431 from jacques/jacques/fix-readme-team-file
Fix file location for app/routes/team.{coffee,js} in README.md
2016-01-11 12:21:57 +01:00
Jacques Marneweck
982d13e897 Fix file location for app/routes/team.{coffee,js} in README.md 2016-01-11 09:37:54 +02:00
Lisa P
b8f8071f98 add image descriptions 2016-01-07 14:33:34 +01:00
Lisa P
253a56f47d not use view in accounts 2016-01-07 14:22:39 +01:00
Piotr Sarnacki
f9df4b1896 [deprecations] Don't use before observer 2016-01-07 13:15:59 +01:00
Piotr Sarnacki
85b2837c52 [deprecations] Disable fetching records in the background by Ember Data 2016-01-07 11:28:52 +01:00
Piotr Sarnacki
39cf0b3044 [deprecations] Don't use ArrayController 2016-01-07 11:22:40 +01:00
Piotr Sarnacki
4b71704b1c [deprecations] Don't use second argument in a property
This makes Ember.js think that we're trying to use the property as
setter and it's deprecated
2016-01-07 11:18:05 +01:00
Piotr Sarnacki
e7ca2c8bfe [deprecations] Use Store#unloadRecord instaed of Store#dematerializeRecord 2016-01-07 11:18:05 +01:00
Piotr Sarnacki
a920ae9cd7 [deprecations] Use modelName instead of typeKey 2016-01-07 11:18:05 +01:00
Piotr Sarnacki
4e3a755908 [deprecations] Use Adapter#findRecord instead of Adapter#find 2016-01-07 11:18:05 +01:00
Piotr Sarnacki
a6087d4fcd [deprecations] Use Component#_state instead of Component#state 2016-01-07 11:18:00 +01:00
Piotr Sarnacki
131a09c9c5 [deprecations] Use store.query instead of store.find where appropriate 2016-01-07 10:41:08 +01:00
Piotr Sarnacki
f5823669b2 [deprecations] Use regular computed property instead of arrayComputed 2016-01-07 10:40:17 +01:00
Piotr Sarnacki
03332a8654 [deprecations] Don't run Ember.set directly in didInsertElement 2016-01-07 10:40:14 +01:00
Piotr Sarnacki
16da227dd9 [deprecations] Use LinkComponent instead of LinkView 2016-01-07 10:35:55 +01:00
Piotr Sarnacki
bde3b7375a Fix displaying flashes coming from the server 2016-01-07 10:22:18 +01:00
Piotr Sarnacki
7649c180dd Fix cancel and restart buttons
Callback functions for restart and cancel where improperly updated while
switching from coffeescript to javascript.
2016-01-07 10:19:29 +01:00
Lisa P
561e671e0d be more explicit about github icon size 2016-01-06 16:26:49 +01:00
Justine
0606aff5b8 Merge pull request #428 from travis-ci/rkh-switzerland
moved to switzerland
2016-01-06 10:11:48 -05:00
Konstantin Haase
e6520ff7cc rkh moved to switzerland 2016-01-06 14:30:29 +01:00
Piotr Sarnacki
959da82d91 Add config/deprecation-workflow.js
This config file is used by ember-cli-deprecation-workflow addon, which
allows to tackle deprecations one at a time by setting the strategy for
each deprecation.
2016-01-06 12:28:56 +01:00
Piotr Sarnacki
0b8c032c21 Make JSHint happy 2016-01-06 12:14:02 +01:00
Piotr Sarnacki
ac7c92d0c4 Bring back DurationCalculations mixin to Build 2016-01-06 12:09:03 +01:00
Piotr Sarnacki
f349321024 Move SSL instructions to README 2016-01-06 12:02:09 +01:00
Piotr Sarnacki
040932d676 Remove ember-cli-coffeescript 2016-01-06 11:34:16 +01:00
Piotr Sarnacki
b57adacf02 Fix displaying synced at time on the profile page 2016-01-06 11:32:17 +01:00
Piotr Sarnacki
6ee82c0cf8 Merge pull request #426 from travis-ci/lp-whitelist-info
add link to docs on requests if branch is gh-pages
2016-01-06 11:26:09 +01:00
Lisa P
5bf4e4ffe4 make isGHPages a proper property 2016-01-05 15:01:38 +01:00
Piotr Sarnacki
f4aa705b51 Merge pull request #427 from travis-ci/fix-displaying-last-synced-at
Fix displaying synced at time on the profile page
2016-01-05 14:57:37 +01:00
Piotr Sarnacki
341296aaaa Merge pull request #418 from travis-ci/lp-mobile-log
Mobile log
2016-01-05 14:55:52 +01:00
Piotr Sarnacki
01bcfb8a8c Merge pull request #424 from travis-ci/lp-accessible-jobslist
add aria-labels to jobs-item
2016-01-05 14:51:21 +01:00
Piotr Sarnacki
493bf72605 Merge pull request #425 from travis-ci/lp-bring-back-branch
bring back branch name
2016-01-05 14:50:28 +01:00
Lisa P
1233eba3e8 fix log 2016-01-05 14:44:27 +01:00
Lisa P
8d2ca774d0 fix template logic if job has not yet started 2016-01-05 14:20:23 +01:00
Lisa P
f445690fb5 refactor a lot of buttons so toggle log looks more consistent 2016-01-05 14:20:23 +01:00
Lisa P
10b0c62fc2 make log toggle on mobile 2016-01-05 14:15:25 +01:00
Lisa P
8e2b3a86c6 feature flag Build 2016-01-05 13:57:14 +01:00
Lisa P
5a0618b22e bring back branch name 2016-01-05 13:35:29 +01:00
Lisa P
4edd1feaad remove coffee file 2016-01-05 13:25:48 +01:00
Lisa P
f5211f1fdc add aria-labels to jobs-item 2016-01-05 12:56:26 +01:00
Lisa P
dbd124852d remove coffee file 2016-01-05 12:44:08 +01:00
Lisa P
7aa77b4f6f add link to docs on requests if branch is gh-pages 2016-01-05 12:43:09 +01:00
Piotr Sarnacki
00d448c231 Fix displaying synced at time on the profile page 2016-01-05 12:31:12 +01:00
Piotr Sarnacki
0813d8cd45 Merge pull request #422 from travis-ci/ps-convert-to-js
Convert project to JavaScript
2016-01-05 09:36:36 +01:00
Piotr Sarnacki
d8160614bf Fix tests 2016-01-04 13:19:48 +01:00
Piotr Sarnacki
737685a7c0 Fix ajax callbacks after javascript conversion 2016-01-04 13:15:15 +01:00
Piotr Sarnacki
ece4141cc5 Remove annotations relationship on job 2016-01-04 13:15:15 +01:00
Piotr Sarnacki
e60b0a0224 Fix jshint errors after conversion to JS 2016-01-04 13:15:15 +01:00
Piotr Sarnacki
fafaf65043 Convert project to JavaScript 2016-01-04 13:15:14 +01:00
Piotr Sarnacki
09e4f52dac Merge branch 'thriqon-bug-author-committer' 2016-01-04 12:19:32 +01:00
Jonas Weber
e27a19101d Drop unneeded imports for gravatarImage 2016-01-04 12:19:14 +01:00
Jonas Weber
ab54733723 Show author name and author avatar on builds list 2016-01-04 12:18:33 +01:00
Jonas Weber
9e94643dc4 Calculate actual avatar URL in model
repeated logic for Gravatar fallback
2016-01-04 12:18:01 +01:00
Piotr Sarnacki
4e720519fe Revert "Merge branch 'thriqon-bug-author-committer'"
This reverts commit ac576077ab, reversing
changes made to f9263fc8f3.
2016-01-04 12:14:44 +01:00
Piotr Sarnacki
e5763ee2d6 Revert "Fix tests"
This reverts commit ca3a24e686.
2016-01-04 12:14:40 +01:00
Piotr Sarnacki
ca3a24e686 Fix tests 2016-01-04 12:04:17 +01:00
Piotr Sarnacki
ac576077ab Merge branch 'thriqon-bug-author-committer' 2016-01-04 11:54:47 +01:00
Jonas Weber
b68ae942a6 Drop unneeded imports for gravatarImage 2016-01-04 11:54:18 +01:00
Jonas Weber
83bb882475 Show author name and author avatar on builds list 2016-01-04 11:53:20 +01:00
Jonas Weber
8abc24f04b Calculate actual avatar URL in model
repeated logic for Gravatar fallback
2016-01-04 11:50:10 +01:00
Piotr Sarnacki
573ebfd406 Fix status image popup
While fixing deprecations a `propertyBinding="foo"` calls were changed
into `property="foo"` calls, which should be `property=foo`. Otherwise
`foo` is treated as a string.
2016-01-04 11:41:50 +01:00
Piotr Sarnacki
ae704df6bf Use el.innerHTML = ''; instead of $(el).empty()
It turns out that jQuery's empty method can be really slow in Firefox,
which can freeze the browser when cleaning the log.
2016-01-04 11:41:50 +01:00
Piotr Sarnacki
f6b95a9a9a Convert log-content component to js 2016-01-04 11:41:50 +01:00
Piotr Sarnacki
7f74787b91 Properly normalize array repsonse for V2 jobs 2016-01-04 11:41:50 +01:00
Piotr Sarnacki
f01b95f886 Convert job serializer to js 2016-01-04 11:41:50 +01:00
Lisa P
8cf9be6adc refactor some of the icon styles an usages 2016-01-04 11:41:50 +01:00
Lisa P
a751145fef use base64 backgroung svg 2016-01-04 11:41:50 +01:00
Piotr Sarnacki
f9263fc8f3 Fix status image popup
While fixing deprecations a `propertyBinding="foo"` calls were changed
into `property="foo"` calls, which should be `property=foo`. Otherwise
`foo` is treated as a string.
2015-12-30 23:26:25 +01:00
Piotr Sarnacki
21285bbe8b Use el.innerHTML = ''; instead of $(el).empty()
It turns out that jQuery's empty method can be really slow in Firefox,
which can freeze the browser when cleaning the log.
2015-12-30 10:36:18 +01:00
Piotr Sarnacki
6e73923fbb Convert log-content component to js 2015-12-30 10:36:08 +01:00
Piotr Sarnacki
c9bfb0c05e Properly normalize array repsonse for V2 jobs 2015-12-23 17:57:32 +01:00
Piotr Sarnacki
0885052537 Convert job serializer to js 2015-12-23 17:56:40 +01:00
Piotr Sarnacki
cbe5d7ac34 Merge pull request #419 from travis-ci/lp-base64
Convert svg background images to base64
2015-12-22 11:32:25 +01:00
Piotr Sarnacki
92935b626b Merge pull request #421 from travis-ci/lp-remove-deprecations
Remove deprecations
2015-12-22 11:32:09 +01:00
Lisa P
7fa107a3f0 update default avatar 2015-12-22 11:13:14 +01:00
Lisa P
d95e34484f remove old repos templates 2015-12-22 11:13:10 +01:00
Lisa P
b4a8dc5707 remove jobs template 2015-12-22 11:13:03 +01:00
Lisa P
a941bc867a remove label helper 2015-12-22 11:12:57 +01:00
Lisa P
79c8e97f51 remove events file 2015-12-22 11:12:52 +01:00
Lisa P
fc0aefb42c remove old env-vars files 2015-12-22 11:12:44 +01:00
Lisa P
90675b1380 remove annotations 2015-12-22 11:12:38 +01:00
Lisa P
7eef434c67 delete unused accounts files 2015-12-22 11:12:32 +01:00
Lisa P
b99dc5ee59 refactor accounts, pt2 2015-12-22 11:12:25 +01:00
Lisa P
875ff4fb44 rearrange templates, start unifying avatar 2015-12-22 11:12:19 +01:00
Lisa P
201a37aa70 refactor accounts, pt1 2015-12-22 11:12:12 +01:00
Lisa P
8c9f92062d refactor cta subscription button to component, remove deprecation 2015-12-22 11:07:44 +01:00
Lisa P
bae81542b9 update more deprecated syntax
update input action handling
2015-12-22 11:07:35 +01:00
Lisa P
d18715858f switch to new each helper syntax 2015-12-22 11:07:07 +01:00
Lisa P
af76a3f30b change to .peekRecords and .isEvery 2015-12-22 10:50:59 +01:00
Piotr Sarnacki
96f22bff8c Get also api builds when clicking on 'show more' 2015-12-17 13:21:38 +01:00
Piotr Sarnacki
e170753ba8 Properly serialize env var 2015-12-17 13:12:56 +01:00
Piotr Sarnacki
fdd7b5b91b Properly normalize ssh key 2015-12-17 13:10:07 +01:00
Piotr Sarnacki
462b3d637f Merge pull request #420 from travis-ci/feature-flag-api-v3
Feature flag API V3
2015-12-17 12:47:36 +01:00
Piotr Sarnacki
2e2d2ae81b Feature flag API V3 2015-12-17 12:39:17 +01:00
Piotr Sarnacki
c6a5db87a4 Add babel-polyfill
Babel will not work on older browser with polyfilling some of the
features, that's why we need to include it.
2015-12-15 18:46:32 +01:00
Lisa P
5a747a4da0 Merge pull request #417 from travis-ci/hh-new-title-picture
Update the picture and title for Henrik
2015-12-10 07:20:21 -08:00
Piotr Sarnacki
598f6a02fb Don't show default branch in inactive branches 2015-12-10 12:12:42 +01:00
Piotr Sarnacki
830211444b Make only one query to jobs 2015-12-10 11:43:54 +01:00
Piotr Sarnacki
048e7737ea Limit initial repos request to 20 repos 2015-12-10 11:43:46 +01:00
Piotr Sarnacki
b950b60c64 Fix committer and author in build header 2015-12-10 09:39:05 +01:00
Piotr Sarnacki
b94cc70a4e Removed wrong function in 4d73d67 2015-12-09 18:40:29 +01:00
Piotr Sarnacki
4d73d67f51 Remove duplicated function in job's serializer 2015-12-09 18:08:21 +01:00
Henrik Hodne
80a0255f39 Update the picture and title for Henrik 2015-12-09 17:43:03 +01:00
Lisa P
e09da9386d refactor some of the icon styles an usages 2015-12-09 15:53:29 +01:00
Lisa P
f07dd50e43 use base64 backgroung svg 2015-12-09 15:53:28 +01:00
Piotr Sarnacki
679d5227b3 Don't reload a page after clicking on Travis CI's logo 2015-12-09 14:52:37 +01:00
Piotr Sarnacki
6ad07924d3 Merge pull request #414 from travis-ci/web-on-v3
Moving travis-web to V3 API
2015-12-09 14:39:11 +01:00
Piotr Sarnacki
e25d1e80a6 Disable content security policy for now
We don't use it on a server at the moment, so it's just making
development harder.
2015-12-09 11:58:31 +01:00
Piotr Sarnacki
b2b892238b Fix adding ssh key 2015-12-09 11:58:10 +01:00
Piotr Sarnacki
9a55449789 Fix pusher auth for pro 2015-12-09 11:57:57 +01:00
Piotr Sarnacki
cc38f08df4 Fix codeclimate logo 2015-12-09 10:23:09 +01:00
Piotr Sarnacki
09f27d47be Fix search 2015-12-09 10:23:09 +01:00
Piotr Sarnacki
2793d6a6e6 Revert "Fix pusher authentication"
This reverts commit 9d5775f6a2.

This was not a proper fix, it seems that the signature is wrong too
2015-12-08 12:48:17 +01:00
Piotr Sarnacki
d94801ed18 Update SSL instructions 2015-12-08 12:34:35 +01:00
Piotr Sarnacki
9d5775f6a2 Fix pusher authentication
For some reason API sends us pusher auth keys without a proper pusher
key, ie. instead of "{actual_pusher_key}:{signature}" it sends
"key:{signature}". For now I'm just fixing it on the client, but this
needs further investigation in the API.
2015-12-08 12:31:38 +01:00
Piotr Sarnacki
787febe4f6 Update ssl keys for localhost 2015-12-08 11:17:18 +01:00
Piotr Sarnacki
00653e9420 Fix repo search 2015-12-08 10:18:09 +01:00
Piotr Sarnacki
ada9e9ba02 Fix adding ssh keys and env vars 2015-12-08 10:18:09 +01:00
Piotr Sarnacki
6db80a4073 Remove unneeded require 2015-12-08 10:18:09 +01:00
Piotr Sarnacki
9201f86921 Try Sauce Labs on pushes
It seems that phantomjs 2.0.0 has problems with running tessts built
with new ember-cli and sauce labs tests seem to work again. I'm
switching back to sauce labs on pushes for the time being.
2015-12-08 10:18:09 +01:00
Piotr Sarnacki
87fdd95a6f Fix tests 2015-12-08 10:18:09 +01:00
Piotr Sarnacki
ee23903cc2 Remove ember-cli-sri for now
ember-cli-sri doesn't work properly on Chrome 45 and there's no
workarounds at the moment, more info here:
https://github.com/jonathanKingston/ember-cli-sri/issues/5
2015-12-08 10:18:09 +01:00
Piotr Sarnacki
d4955c1ed0 Fix hooks toggling
New ember-data serializers send data without a model key in the payload
by default, so instead of what API expects:

    {
      "hook": {
        "id": 1,
        "active": true
      }
    }

it would send:

    { "id": 1, "active": true }

Because of that we need to change how hooks are serialized.

Furthermore, API V2 returns just "result: true" after a successful
request to change a hook, so we need to return something meaningful from
the adapter's updateRecord in order to make ember-data happy.
2015-12-08 10:18:08 +01:00
Piotr Sarnacki
0d9755489f Sort repos in repos controller, not in the component
We rely on the order of repositories when we set current repo on the
main page. That's why we need to do sorting in the controller.
2015-12-08 10:18:08 +01:00
Piotr Sarnacki
35c5d619bd Convert repos controller to javascript 2015-12-08 10:18:08 +01:00
Piotr Sarnacki
36d099667e Download last_build for a branch when we get the branch from pusher
`lastBuild` is a synchronous relationship on a branch model, so we need to
have a build record present when we put a default branch from a repository
model into the store. We don't send lastBuild's payload in pusher, so
we need to get it using an ajax call, if it's not already in the store.
In the future we may decide to make the relationship async, but I don't
want to change the code at the moment
2015-12-08 10:18:08 +01:00
Piotr Sarnacki
bdcb906fe0 [deprecations] Use peekRecord instead of getById 2015-12-08 10:18:08 +01:00
Piotr Sarnacki
842c050100 Load repos list only once 2015-12-08 10:18:08 +01:00
Piotr Sarnacki
2be45cdc18 Fix requests payload 2015-12-08 10:18:08 +01:00
Piotr Sarnacki
e8f2e5ae97 Properly notify build to update times 2015-12-08 10:18:07 +01:00
Piotr Sarnacki
a56e4a39c3 Fix sorting on the left sidebar 2015-12-08 10:18:07 +01:00
Piotr Sarnacki
e1a334678d Fix handling default_branch from pusher
Pusher payloads don't have all of the information that is available in
API V3, so we need to do some normalizing.
2015-12-08 10:18:07 +01:00
Piotr Sarnacki
9b4d5c5b4e Remove obsolete pusher handling code from store
Removed code was checking if we should handle a pusher event, ie. if the
event is associated with the user, or if we already have a record
associated with the event. We don't need the check now, because we no
longer use the common channel.
2015-12-08 10:18:07 +01:00
Piotr Sarnacki
b31831d535 Set repo as default serializer only on repo serializer, not v3 2015-12-08 10:18:07 +01:00
Piotr Sarnacki
b8b1459cf5 Don't error out if there's no hash in extractRelationship for V3 2015-12-08 10:18:07 +01:00
Piotr Sarnacki
69dd90b76b Model#typeKey -> Model#modelName 2015-12-08 10:18:06 +01:00
Piotr Sarnacki
a732a18e59 Fix key for repo relationship for V3 API 2015-12-08 10:18:06 +01:00
Piotr Sarnacki
c3fd0d8e98 Fix loading record by slug
In a repo route we need to find record by slug there is no easy way to
do it with a public finders API, so we need to use adapter and
serializers directly. The problem is that the old way of doing this
didn't use the normalizePayload function and also it didn't add included
records properly. New code properly normalizes response and adds all of
the embedded records that were extracted from the response.
2015-12-08 10:18:06 +01:00
Piotr Sarnacki
7ae4d6aa7d Fix handling branches
This commit fixes handling of branches when using both V3 and V2. The
changes include:

  * proper definition of relationships that reflect V3 structure, so for
    example build belongs to a branch
  * setting up inverse records for some of the relationships. without
    doing that Ember Data can handle relationships in a surprising way,
    for example if the same record is referenced in 2 places in a
    belongsTo relationship, Ember Data will remove one of the references
    without proper inverse definitions
  * we need to add id when extracting branch as a relationship. Ember
    Data expects all of the relationships to have an id
  * lastly, we need to mimic the structure of the V3 API in V2 payloads,
    so for a build payload I'm now creating a branch record
2015-12-08 10:18:06 +01:00
Piotr Sarnacki
147ab06fcf Fix references in V3 payloads
V3 API doesn't return any of the records more than 2 times. If a record
is already included in the response any other occurences will be
represented as a reference, ie. a hash with just an @href. Ember Data
doesn't play nice with such references as it needs an id to identify a
record.

The code in this commit traverses payloads from V3 API and adds an id to
each of the references that are present.

For example a following payload:

    {
      "@href": "/build/1",
      "@type": "build"
      "id": 1,
      "state": "passed",
      "branch": {
        "@href": "/repo/1/branch/master",
        "name": "master",
        "lastBuild": {
          "@href": "/build/1"
        }
      }
    }

Will be changed to:

    {
      "@href": "/build/1",
      "@type": "build"
      "id": 1,
      "state": "passed",
      "branch": {
        "@href": "/repo/1/branch/master",
        "name": "master",
        "lastBuild": {
          "@href": "/build/1",
          "id": 1
        }
      }
    }

In this case an "id" field was added to "branch.lastBuild" field.
2015-12-08 10:18:06 +01:00
Piotr Sarnacki
e2a602a8af Update ember-cli-coffeescript to newest version 2015-12-08 10:18:06 +01:00
Piotr Sarnacki
e7c4d18e9b Update ember-cli to 1.13.12 (ember.js 1.13.10, ember-data 1.13.15) 2015-12-08 10:18:06 +01:00
Piotr Sarnacki
e84cf89cf7 app/serializers/repo.coffee -> app/serializers/repo.js 2015-12-08 10:18:05 +01:00
Piotr Sarnacki
e161717f73 Simplify pusher handling in store 2015-12-08 10:18:05 +01:00
Piotr Sarnacki
d7400c0567 Remove console.log 2015-12-08 10:18:05 +01:00
Piotr Sarnacki
81898e422f Fix pusher to work with new ember-data
This commit just fixes things to the point where pusher updates are
applied to the store properly. This still lacks a business logic fixes,
so for example we won't update lastBuild's field, because there's no
such information from pusher.
2015-12-08 10:18:05 +01:00
Piotr Sarnacki
60348781d6 Don't run Sauce tests for now 2015-12-08 10:18:05 +01:00
Piotr Sarnacki
7187d2ef45 Disable dashboard test for now 2015-12-08 10:18:05 +01:00
Piotr Sarnacki
d636369daa Fix sidebar repos list
We need this list to update with pusher, so filtering is better than
using store.query.
2015-12-08 10:18:05 +01:00
Piotr Sarnacki
35f95739c7 Attribute mappings in serializers should use underscore notation 2015-12-08 10:18:04 +01:00
Piotr Sarnacki
dbd83c8643 Use job_ids as a key for jobs relationship for build 2015-12-08 10:18:04 +01:00
Piotr Sarnacki
ca633bdf7b Don't add commit data to included array in build serializer
We already do it in an abstracted way (ie. for all relationships) in v2
fallback serializer.
2015-12-08 10:18:04 +01:00
Piotr Sarnacki
ad4d06cb25 No need to add repo to the list of attributes now 2015-12-08 10:18:04 +01:00
Piotr Sarnacki
39a579c9db Fix handling relationships for V2 API
* we should look for both embedded relationship and relationship key,
  so in cases like for commit, when there's a full commit data on
  "commit" property, and only id at "commit_id", we will use commit data
* we can't add @type to V2 fallback, because in other places we chack
  for @type to distinguish V2 and V3 payloads
* there's no need to include a record in "included" if there's only a
  type and an id there
2015-12-08 10:18:04 +01:00
Piotr Sarnacki
34e53c1034 Fix job route's use of job.build relationship
build is an async relationship now, so job.get('build') returns a
promise.
2015-12-08 10:18:04 +01:00
Piotr Sarnacki
e4623d981b Fix including to-many relationships for V3 payloads 2015-12-08 10:18:04 +01:00
Piotr Sarnacki
c50c01f8ea Properly include relationships for V2 payloads 2015-12-08 10:18:04 +01:00
Piotr Sarnacki
a2bd6d827d Convert build serializer to javascript 2015-12-08 10:18:03 +01:00
Piotr Sarnacki
74a9a1603e Update serializers to work with jobs endpoint response 2015-12-08 10:18:03 +01:00
Piotr Sarnacki
d59e402314 Include repositoryId as an attribute on build
For some reason (probably some problem with one of the serializers) we
sometimes lack an id attribute for a promise that we get for a repo
relationship on build. Because of that doing `build.get('repo.id')` may
sometimes return undefined. A temporary workaround is to make sure that
we always can access the `repository_id` property.
2015-12-08 10:18:03 +01:00
Piotr Sarnacki
3946077c96 Use V2FallbackSerializer for jobs 2015-12-08 10:18:03 +01:00
Piotr Sarnacki
c40e413f35 Don't throw error if broadcastArray is undefined 2015-12-08 10:18:03 +01:00
Piotr Sarnacki
ab0b0cbebc Use storage service instead of Travis.storage 2015-12-08 10:18:03 +01:00
Piotr Sarnacki
1843d8cb54 Remove unused settings/index controller 2015-12-08 10:18:03 +01:00
Piotr Sarnacki
6ee956367c Observe repos.firstObject on reposController
Since we change repos property on reposController, we can't set observer
on repos, because as soon as it's changed, we loose the observer.
Instead, we should observe only on reposController, which is not going
to change.
2015-12-08 10:18:02 +01:00
Piotr Sarnacki
8de314e943 Sort repos in repos-list component, not in controller 2015-12-08 10:18:02 +01:00
Piotr Sarnacki
47439657a1 Use lastBuild from defaultBranch on repository
One thing that is not standard here is a serializer for branch, which
uses @href as id. At this point branches don't have ids and ember-data
needs one, so using @href is the easiest way.
2015-12-08 10:18:02 +01:00
Piotr Sarnacki
d9cff6e8b4 Create adapters and serializers working with v3 and v2 APIs
This commit adds adapters and serializers for v3, but also a fallback
serializer for v2, which allows to handle v2 and v3 payloads at the same
time. This is needed, because when we use v3 endpoint for one of the
models (in this case repo), we can also get embedded records of other
types (like branch or build).
2015-12-08 10:18:02 +01:00
Piotr Sarnacki
6ff69bf94a Remove unneeded test 2015-12-08 10:18:02 +01:00
Piotr Sarnacki
5cf1cbba6b Move ajax and auth into services 2015-12-08 10:18:02 +01:00
Piotr Sarnacki
d677307006 Remove some more deprecations 2015-12-08 10:17:32 +01:00
Piotr Sarnacki
63ddf332a8 Properly call error callback in ajax utility 2015-12-07 13:35:25 +01:00
Piotr Sarnacki
69ac8e1a00 Revert "Change signature in $.ajax's error callback"
This reverts commit 60a77742c0.

We don't use $.ajax...
2015-12-07 10:05:19 +01:00
Piotr Sarnacki
60a77742c0 Change signature in $.ajax's error callback
Error callback in $.ajax has different signature than success callback
2015-12-07 09:39:39 +01:00
Lisa P
60116154c7 fix flash messages width 2015-12-04 16:02:03 +01:00
Lisa P
14d372251c Merge pull request #416 from travis-ci/lp-fixes
Fix and cleanup some things after switch to new UI
2015-12-04 15:40:35 +01:00
Lisa P
efe80caa37 clean up icons and other assets 2015-12-04 11:44:24 +01:00
Lisa P
2e45aae5f9 update flexbox in footer 2015-12-04 11:44:24 +01:00
Lisa P
174e7b2bc1 update docs and blog links to use https 2015-12-04 11:44:24 +01:00
Lisa P
86a6cf5c05 refactor some icons 2015-12-04 11:44:24 +01:00
Lisa P
5a8024fd42 change settings icon on profile page 2015-12-04 11:44:23 +01:00
Lisa P
e0629a1571 change to new icons for key and fingerprint 2015-12-04 11:44:23 +01:00
Lisa P
129674aa25 fix branch-row-unit test 2015-12-04 11:44:23 +01:00
Piotr Sarnacki
3827b6b4d8 Add debug info on ajax errors 2015-12-04 11:23:53 +01:00
Lisa P
61e445381c Merge branch 'master' of github.com:travis-ci/travis-web 2015-12-03 12:32:59 +01:00
Lisa P
d78ec1a438 fix commit link in build header 2015-12-03 12:32:48 +01:00
Piotr Sarnacki
b2ec5ab110 Merge pull request #415 from travis-ci/sol-infrastructure-conductor
Tweaking solarce's title
2015-12-03 12:03:12 +01:00
Lisa P
e86de3d068 fix tab arrow in FF 2015-12-03 11:50:07 +01:00
Lisa P
657839a2a4 Merge pull request #411 from travis-ci/lp-buildheader-revamp
buildheader revamp
2015-12-03 11:29:35 +01:00
Lisa P
88b7af156d add scale icon 2015-12-03 11:22:29 +01:00
Brandon Burton
ac426b3914 trying newer node 2015-12-02 14:17:59 -08:00
Brandon Burton
5ece740957 Tweaking solarce's title
**Infrastructure Conductor** =D
2015-12-02 10:16:38 -08:00
Lisa P
e4658e8023 fix tests and stuff 2015-12-02 17:34:46 +01:00
Lisa P
728f428c1f fix notices 2015-12-02 16:42:54 +01:00
Lisa P
9cb7c6c836 tweak elapsed time 2015-12-02 16:28:14 +01:00
Lisa P
576409ba1e add elapsed time 2015-12-02 16:13:28 +01:00
Lisa P
9baadcfd9e try two-line /builds
fix white ghosting on api icon

check requests for existing branch

tweak cc icon

tweak settings fields

try hover over settigns menu
2015-12-02 16:13:26 +01:00
Lisa P
0b1bd7d090 style caches
some cache tweaks

add title attributes to settings interaction elements
2015-12-02 16:13:21 +01:00
Lisa P
495c3b50f8 style requests
some spacing tweaks

implement Justine's feedback
2015-12-02 16:13:18 +01:00
Lisa P
3fa79819dd change template for build history
new icon vor show more btn
2015-12-02 16:13:15 +01:00
Lisa P
85f61c5155 style pullrequests 2015-12-02 16:13:14 +01:00
Lisa P
336479a2be jobs list styles
align animating icons

bring back color in sidebar tiles

change settings hover color

new help icon for allowed failures and settings help

fix svgs for firefox

also for remove log

also for help icon

fix coloring issues, use flexbox footer
2015-12-02 16:13:10 +01:00
Lisa P
fe36e018ce start flexboxify job list
implement Justine\'s feedback

remove regenerate key popup styles

add new icons, refactor request-icon component

use correct property name
2015-12-02 16:11:25 +01:00
Lisa P
fd885304f6 remove old build header styles
delete old job styles

cleanup templates and prepare for jobs list
2015-12-02 16:11:21 +01:00
Lisa P
a6e6cb0418 make adjustment to logs to take up less space on mobile 2015-12-02 16:11:20 +01:00
Lisa P
c7212174fb style settings button
hover states for repo tool buttons

style log buttons

dont forget the small arrow iconå
2015-12-02 16:11:17 +01:00
Lisa P
1ba9548ad0 first iteration build header styles
build header styles 2nd iteration

make job header use component too

cleanup templates and markup for repo page

styles for the repo header

rewrite styles for repo header, cleanup tabs
2015-12-02 16:11:14 +01:00
Lisa P
0176f9fb0c remove unused color variables
remove old icons
2015-12-02 16:11:10 +01:00
Lisa P
613e1dac80 make component for build header 2015-12-02 16:11:09 +01:00
Lisa P
f117c939dd rewrite markup for buildheader
fill in status icons
2015-12-02 16:11:05 +01:00
Piotr Sarnacki
bdfd78c9f1 Merge pull request #413 from travis-ci/hh-fix-xcode-landing-page
Fix Xcode typo on landing page
2015-12-02 14:37:01 +01:00
Henrik Hodne
465ddc81f6 Fix Xcode typo on landing page 2015-12-02 07:36:21 +01:00
Lisa P
f9d5e94d41 change _config to config 2015-12-01 12:09:07 +01:00
Lisa P
b482922dd7 also check for dist in GCE notice 2015-12-01 11:38:50 +01:00
Lisa P
d40e2eddb3 Merge pull request #412 from travis-ci/lp-gce-notice
add notice for gce builds
2015-11-30 15:51:33 +01:00
Lisa P
00304798a6 add notice for gce builds 2015-11-27 16:55:01 +01:00
Lisa P
6771e53da6 fix width in plans 2015-11-24 12:06:02 +01:00
carlad
4db677b407 Merge pull request #410 from travis-ci/cd-landing-typo
fix typo ulimited to unlimited
2015-11-24 11:39:38 +01:00
carlad
36a28290ec fix typo ulimited to unlimited 2015-11-24 11:38:20 +01:00
Lisa P
fbe9eb2fc4 fix safari flexbox issues for plans and logo 2015-11-23 13:01:18 +01:00
Lisa P
787b2fa4d1 fix button alignment bug 2015-11-23 12:47:57 +01:00
Lisa P
466588d1d6 remove flexbox on small screens because it causes too much troubl eon safari 2015-11-23 11:36:44 +01:00
Lisa P
362ff8d73a add a bit more spacing on feature list 2015-11-23 10:42:09 +01:00
Lisa P
41f69029a4 set favicon to default after logout 2015-11-23 10:38:32 +01:00
Lisa P
a604463c9d change nav change logic 2015-11-23 10:26:39 +01:00
Lisa P
af6e1ec69a remove another declaration of topbar color 2015-11-23 09:49:36 +01:00
Lisa P
6784f6f708 Merge pull request #407 from travis-ci/lp-pro-landingpage
pro landing page
2015-11-23 09:24:54 +01:00
Lisa P
d299f330ff align plan number 2015-11-23 09:11:58 +01:00
Lisa P
9b3440be1f change image path 2015-11-23 09:08:24 +01:00
Lisa P
4bbb90ce02 add logos and paths 2015-11-23 08:59:02 +01:00
Justine Arreche
a091cdf97f updating server svg to contain background color 2015-11-20 16:37:45 -05:00
Lisa P
6afdd3b0e3 update gif aly 2015-11-20 18:23:14 +01:00
Lisa P
3f2fb06791 update josh and flex-flow of team 2015-11-20 17:21:02 +01:00
Lisa P
afecf3dfbb add aly gif 2015-11-20 17:14:01 +01:00
Lisa P
193eccb179 fix typo on plans page 2015-11-20 16:35:12 +01:00
Lisa P
9acb4a2476 hot pink fixes (with flexbox) pt3 2015-11-20 14:00:19 +01:00
Lisa P
335b7a1302 hot pink fixes pt2 2015-11-20 13:39:51 +01:00
Lisa P
4d69e32534 hot pink fixes pt1 2015-11-20 13:21:58 +01:00
Lisa P
339b1269e4 add gif for Emma 2015-11-19 18:03:51 +01:00
Lisa P
2eaf1e9c4d change nav for pro signed in 2015-11-19 18:01:39 +01:00
Lisa P
983ccd5e0a change team page route 2015-11-19 17:38:27 +01:00
Lisa P
9a1474aac4 update readme 2015-11-17 12:33:09 +01:00
Lisa P
b4ccfa5110 update team flags 2015-11-16 17:26:21 +01:00
Lisa P
834ab67ac2 add ga tracking to pro landing and pricing buttons 2015-11-16 14:58:34 +01:00
Lisa P
cfcd65c0b1 fill in missing links on pro pages 2015-11-16 13:00:47 +01:00
Lisa P
5b930a661a Merge pull request #408 from travis-ci/lp-add-xcode-to-keys-map
add osx_image to keys-map
2015-11-13 14:18:16 +01:00
Lisa P
ff6455bab7 add osx_image to keys-map 2015-11-13 13:13:40 +01:00
Lisa P
6e8e48ab96 redirect to landing page after signout 2015-11-13 12:41:39 +01:00
Lisa P
46a3af254a change plans route on .org 2015-11-12 13:10:33 +01:00
Lisa P
b5ef87fd32 also remove obsolete files 2015-11-11 18:59:01 +01:00
Lisa P
7b04ae16ce rearrange some css files 2015-11-11 18:57:02 +01:00
Lisa P
701acecc56 change pro navigation and landing page redirects 2015-11-11 18:18:58 +01:00
Lisa P
88fd47002f add team pics 2015-11-11 17:17:07 +01:00
Lisa P
dfb303a0a3 add finaly styles to logo page 2015-11-11 16:58:20 +01:00
Lisa P
b23aaa8b02 add more logo page content 2015-11-11 13:13:36 +01:00
Lisa P
11b66b26a0 add logo page 2015-11-09 20:07:57 +01:00
Lisa P
d5ac31b557 redirect plans page to landing age if on .org 2015-11-09 19:51:32 +01:00
Lisa P
2299494da8 tweak cta display on pro pages 2015-11-09 17:00:55 +01:00
Lisa P
2fac9ba462 teak team member styles 2015-11-09 16:50:58 +01:00
Lisa P
f898636a25 make team members a component 2015-11-09 16:36:15 +01:00
Lisa P
7d1dce76ee fix z-index of jobs:hover 2015-11-04 11:34:27 +01:00
Lisa P
e2122050df more tweaks 2015-11-04 11:29:13 +01:00
Lisa P
f7599e98c3 tweak landing page colors 2015-11-04 11:17:04 +01:00
Lisa P
813998be35 add files for team page 2015-10-29 18:26:41 +01:00
Lisa P
d16b655d1c change pricing pathname to plans 2015-10-29 18:18:10 +01:00
Lisa P
0f6230fddc fix link-to in branches template 2015-10-29 17:56:29 +01:00
Lisa P
e247ab35b4 responsive tweaks 2015-10-29 17:43:51 +01:00
Lisa P
6a8911b36e second iteration pricing styles 2015-10-29 16:58:04 +01:00
Lisa P
8f7ec796af first iteration pricing styles 2015-10-28 18:30:04 +01:00
Lisa P
701c683bff write markup for pricing page 2015-10-28 17:01:08 +01:00
Lisa P
72879709f0 fix broadcasts overlay by removing z-index on the wrong state 2015-10-28 13:35:08 +01:00
Lisa P
fbd7305252 fix branches sorting order 2015-10-28 13:21:23 +01:00
Lisa P
46836812f4 refactor new link styles to mixin 2015-10-28 12:56:19 +01:00
Lisa P
cd82f30f8c change some markup bits 2015-10-28 12:39:21 +01:00
Lisa P
b35e24868a tweak responsive behaviour 2015-10-27 18:08:33 +01:00
Lisa P
8719b1a772 some spacing things 2015-10-27 17:17:37 +01:00
Lisa P
e80f399e83 add icon for pinned tabs in Safari 2015-10-27 14:46:21 +01:00
Lisa P
fda6e7f6f9 more styling for .com landing page 2015-10-27 14:42:14 +01:00
Lisa P
e47ec2f581 add some flexbox action 2015-10-26 18:13:38 +01:00
Lisa P
1620db18c9 add and use a lot of icons 2015-10-26 18:00:53 +01:00
Lisa P
811ab63f1e start styling pro landing page 2015-10-26 15:23:36 +01:00
Lisa P
b350414ae6 prepare markup for pro landing page 2015-10-26 15:23:36 +01:00
Lisa P
625e23228a put eye svg into component 2015-10-26 15:22:13 +01:00
Lisa P
4a54b2df9b Merge pull request #406 from travis-ci/lp-toggle-token
toggle token on profile page
2015-10-26 14:49:24 +01:00
Lisa P
512450b7ce tweak icon iris and toolip 2015-10-26 13:48:34 +01:00
Lisa P
8c911fcc2c add eye icon and tooltip to profile token toggle 2015-10-26 12:34:57 +01:00
Lisa P
5f00526700 add toggle functionality to profile token 2015-10-23 17:52:15 +02:00
Lisa P
def57c603b provide fallback for owner page is payload is empty 2015-10-23 17:15:22 +02:00
Lisa P
64a580f299 rewrite icon template logic 2015-10-23 12:17:26 +02:00
Lisa P
68cee22a76 refactor logic change 2015-10-23 11:53:57 +02:00
Lisa P
e1f5086877 also apply new logic to update method 2015-10-22 21:41:29 +02:00
Hiro Asari
52cbf7a130 Merge pull request #404 from HPI-BP2015H/smalltalk
Smalltalk support
2015-10-22 11:30:18 -04:00
Lisa P
d1f3ee2c6f Merge pull request #401 from travis-ci/lp-broadcasts
Broadcasts
2015-10-22 17:29:29 +02:00
Lisa P
aad5530d2e change tower icon color logic 2015-10-22 17:06:12 +02:00
Lisa P
380204bb44 fix svg overflow in firefox 2015-10-22 15:55:53 +02:00
Lisa P
68537ca3a5 fix button alignment, tweak broadcast 2015-10-22 15:50:42 +02:00
Steffen Kötte
1d6cf2fbea Smalltalk support 2015-10-22 12:09:06 +02:00
Lisa P
1545dbd9d1 animate transmission waves 2015-10-21 18:39:54 +02:00
Lisa P
02f986fe72 change fade animation and properly clean timeout 2015-10-21 17:47:44 +02:00
Hiro Asari
00fbf2c6d9 Merge pull request #403 from jhass/crystal_matrix
Add crystal language key
2015-10-21 11:05:26 -04:00
Lisa P
5c99abfafc add hover colors and rewrite tower as component 2015-10-21 16:55:44 +02:00
Lisa P
36147b36a0 fix topbar navigation (again) 2015-10-21 10:27:29 +02:00
Lisa P
99e3864acd make broadcasts icon change color 2015-10-21 10:27:29 +02:00
Lisa P
8bf917984c make broadcasts list update itself after element is removed 2015-10-21 10:27:29 +02:00
Lisa P
14faf23d0b bring back status icons 2015-10-21 10:27:29 +02:00
Lisa P
9fa7e408cd make seen broadcasts work with localstorage 2015-10-21 10:27:29 +02:00
Lisa P
558f6e64c0 remove some things 2015-10-21 10:27:28 +02:00
Lisa P
fa0d533059 try some things 2015-10-21 10:27:28 +02:00
Lisa P
10a747d2ac filter out expired broadcasts 2015-10-21 10:27:28 +02:00
Lisa P
1bbceeaf13 rewrite topbar to fix in broadcasts, plus some cleanup 2015-10-21 10:27:28 +02:00
Lisa P
bb544f8a7d only show tower when logged in 2015-10-21 10:26:30 +02:00
Lisa P
9c403da804 style broadcasts and toggle them 2015-10-21 10:26:30 +02:00
Lisa P
f33161f95e start working on broadcasts 2015-10-21 10:26:30 +02:00
Jonne Haß
16a8d356fc Add crystal language key 2015-10-21 00:44:13 +02:00
Lisa P
bc67c4cccd Merge pull request #402 from travis-ci/cd-update-help-menu
remove link to stack overflow in help menu
2015-10-20 12:08:09 +02:00
carlad
02e2f84209 remove link to stack overflow in help menu 2015-10-19 18:11:35 +02:00
Lisa P
a713a5969f Merge pull request #400 from travis-ci/rkh-fix-owner-page-for-users
owner page: fix API query to eager load repositories for all owners, …
2015-10-15 10:09:09 +02:00
Konstantin Haase
718bf96a87 owner page: fix API query to eager load repositories for all owners, not just organizations 2015-10-15 09:09:34 +02:00
Lisa P
a048e1fca1 Merge pull request #399 from travis-ci/lp-query-more-branches
Fix owner/branches/dashbaord after api cleanup
2015-10-14 15:37:36 +02:00
Lisa P
9052ec133c fix test 2015-10-14 15:27:45 +02:00
Lisa P
a5c3cf69f2 fix branches after api cleanup 2015-10-14 14:57:39 +02:00
Lisa P
2e39139da3 fix dashbaord after api cleanup, change some interaction elements 2015-10-14 14:57:39 +02:00
Lisa P
860e89dd86 fix owner page after api cleanup 2015-10-14 14:57:39 +02:00
Lisa P
7d6dd75bdf remove logic again because api takes care of it now 2015-10-14 14:57:39 +02:00
Lisa P
e80c022874 remove wrong sorting param 2015-10-14 14:57:39 +02:00
Lisa P
ebc7c5a1ed use different query more logic 2015-10-14 14:57:38 +02:00
Lisa P
8f61f49826 query for more branches if first call is not last page 2015-10-14 14:57:38 +02:00
Lisa P
3306e5a7e6 Merge pull request #398 from travis-ci/fix-404
Fix 404
2015-10-13 13:02:30 +02:00
Lisa P
3c2fbc067e make give 404 a matchable route and redirect from owner if necessary 2015-10-13 12:38:22 +02:00
Lisa P
7f57466484 set limit in branch query to 100 2015-10-09 14:52:09 +02:00
Lisa P
f9ac2e6a76 remove spacing on build list 2015-10-08 15:34:36 +02:00
Lisa P
1ba4cf25d0 filter for push and api builds on branches 2015-10-08 15:28:17 +02:00
Lisa P
e646edbc0e Merge branch 'master' into fix-404 2015-10-07 19:07:06 +02:00
Lisa P
1d71f943ca really fix build tile links 2015-10-07 18:01:31 +02:00
Lisa P
24032d4040 fix status coloring on owner page 2015-10-07 17:37:53 +02:00
Lisa P
b7215bbeaf fix sync button trigger icon on profile page 2015-10-07 17:34:09 +02:00
Lisa P
4da602c632 fix build tile links 2015-10-07 17:29:17 +02:00
Lisa P
e603c2ac9a Merge pull request #397 from travis-ci/running-build-sidebar
Running build sidebar
2015-10-07 16:03:34 +02:00
Lisa P
a9c39ceab6 update icons for running builds in sidebar 2015-10-07 15:28:06 +02:00
Lisa P
c0917d2128 rearrange job filtering in sidebar 2015-10-06 21:40:44 +02:00
Lisa P
0d94c1b786 try to get redirect to 404 working 2015-10-06 21:07:24 +02:00
Lisa P
2b84d5228b smarter filtering for default branch 2015-10-06 17:21:56 +02:00
Lisa P
fedc6acec1 take out dropup on build tiles and use title attribtue instead 2015-10-06 00:54:08 +02:00
Lisa P
fbb30d120c fix owner page query 2015-10-05 23:31:59 +02:00
Lisa P
4ed60c5fbb change owner query and comment out transition 2015-10-05 22:50:09 +02:00
Lisa P
12ac35a123 fix double link in build tiles, better error message for owner 2015-10-05 22:44:29 +02:00
Lisa P
f41a6d0e34 Merge pull request #395 from Ladsgroup/master
Change Rst ro RST
2015-10-05 19:59:29 +02:00
Lisa P
942a48996a position dropups on buildTiles differently 2015-10-05 18:10:28 +02:00
Lisa P
0ff2f25de4 Merge pull request #396 from travis-ci/branches-redux
Branches redux
2015-10-05 17:37:51 +02:00
Lisa P
e4e29ff418 add component for landing page builds + styles 2015-10-05 17:26:45 +02:00
Lisa P
a6ca21f03d remove some deprecation errors 2015-10-02 14:49:10 +02:00
Lisa P
42b75fab6a add a unit test for branch-row 2015-10-02 14:36:28 +02:00
Lisa P
27cb6035a3 fixed weird spacing and responsive behaviour with flexbox 2015-10-02 13:35:59 +02:00
Lisa P
d07afa8b6f also remove trigger build from branches without builds 2015-09-30 18:27:39 +02:00
Lisa P
eb502c9094 fix some tests 2015-09-30 18:18:51 +02:00
Lisa P
4687957514 fix mobile for owner page 2015-09-29 18:20:23 +02:00
Lisa P
3a366a234a refactor new styles 2015-09-29 18:15:29 +02:00
Lisa P
6e7a27da87 take out interactive elements for now 2015-09-29 16:21:00 +02:00
Lisa P
1a1fedfb74 fix last_branch fields on dashbaord 2015-09-29 15:23:44 +02:00
Lisa P
0f2f2253cf make font-weight a variable and make it 400 2015-09-28 17:46:43 +02:00
Lisa P
76c9b368cf fix long repo and branch name issue 2015-09-28 17:25:20 +02:00
Lisa P
8562ac894c redo sync button on dashboard 2015-09-28 16:44:32 +02:00
Lisa P
e350f7bb04 fix dashboard avatars and filter padding 2015-09-28 14:41:25 +02:00
Lisa P
c38a64bc2f fix links in dashboard templates 2015-09-28 14:12:04 +02:00
amir
eb60eb0caf Change Rst ro RST
RST is abbreviation of reStructuredText.
Using Rst is plain wrong, it would be good to use RST or reStructuredText.
2015-09-25 18:55:58 +03:30
Lisa P
ffb635b846 switch back to default branch 2015-09-22 17:57:57 +02:00
Lisa P
a964272df2 change some styles on dashboard 2015-09-22 17:49:11 +02:00
Lisa P
3ef64f0910 start redoing dashboard 2015-09-21 18:56:00 +02:00
Lisa P
ace639adc0 update icons on owner page 2015-09-18 15:25:25 +02:00
Lisa P
33917bf73c try to refactor coloring mixins 2015-09-18 15:02:07 +02:00
Lisa P
abf40de3c2 fix list padding bug 2015-09-18 13:59:16 +02:00
Lisa P
b665468bf7 add moire breakpoint for row spacing 2015-09-18 12:41:20 +02:00
Lisa P
d44f020dec fix tab highlighting 2015-09-18 12:13:18 +02:00
Lisa P
f9b1c37d04 make transition to build history work 2015-09-17 17:07:54 +02:00
Lisa P
732f572c6e make sidebar icons smaller 2015-09-17 16:42:08 +02:00
Lisa P
b79b711e40 check for permissions before displaying trigger button 2015-09-17 16:39:00 +02:00
Lisa P
cb01f58f4d new icons for the sidebar 2015-09-17 16:16:37 +02:00
Lisa P
5a35f0c1b7 refactor coloring styles and work on trigger build workflow 2015-09-17 15:51:58 +02:00
Lisa P
ac8765f0f1 moar alignment fun 2015-09-17 14:49:35 +02:00
Lisa P
b74aa037d5 refactor status-icon component and start rolling out new icons in the sidebar 2015-09-17 14:22:00 +02:00
Lisa P
8b7a316ebf finally centered those dropups 2015-09-17 12:29:11 +02:00
Lisa P
6d86b587e9 failing to center dropups 2015-09-16 18:11:46 +02:00
Lisa P
0e210d791a :hotpink: fixes no 2 2015-09-16 13:21:46 +02:00
Lisa P
b7350f3ee0 :hotpink: fixes no 1 2015-09-16 13:14:24 +02:00
Lisa P
8ea023cdbd fix trigger build request and ui feedback 2015-09-15 18:41:03 +02:00
Lisa P
e8fb719591 tweak some styles and responsive behaviour 2015-09-15 17:59:15 +02:00
Lisa P
4dc5c03077 sort branches by date 2015-09-15 15:39:36 +02:00
Lisa P
b5648b864b style trigger build button for branches without builds 2015-09-15 12:17:37 +02:00
Lisa P
df59484afb filter for default branch 2015-09-15 11:21:00 +02:00
Lisa P
ceba450eb2 make trigger build on branches work 2015-09-14 17:48:06 +02:00
Lisa P
26fe355e40 get icon coloring right 2015-09-14 14:56:02 +02:00
Lisa P
5326821990 make last 5 builds work 2015-09-14 14:16:17 +02:00
Lisa P
6d0067bdb0 Merge branch 'master' into branches-redux 2015-09-14 10:35:23 +02:00
Piotr Sarnacki
06c579c453 Merge pull request #394 from travis-ci/owner-route-error-handling
Add error handling for the owner route
2015-09-09 10:37:05 +02:00
Piotr Sarnacki
ad40e7b53a Try to disable sauce addon for now 2015-09-09 10:36:52 +02:00
Piotr Sarnacki
ca54a64211 Fix flash messages 2015-09-09 10:36:12 +02:00
Hiro Asari
a8d585cb74 Remove invalid data 2015-09-08 15:24:14 -04:00
Lisa P
a00704943a prepare for 5 builds per branch request 2015-09-08 18:21:44 +02:00
Lisa P
fe67ce0882 work on branches templates 2015-09-08 17:48:47 +02:00
Lisa P
05f9b0df7e work on booting state icons 2015-09-08 13:28:31 +02:00
Lisa P
b3c966b245 toy around with branch requests 2015-09-07 18:09:39 +02:00
Lisa P
dda2051d57 commit current status 2015-09-07 15:53:14 +02:00
Lisa P
8d5e7d5b87 Merge branch 'master' into branches-redux 2015-09-07 11:51:30 +02:00
Piotr Sarnacki
36058f79b9 Add error handling for the owner route 2015-09-07 11:45:58 +02:00
Lisa P
e8af1e0109 pixel fun with dropup position indicator 2015-08-28 17:06:06 -04:00
Lisa P
9370b4b7be fix some display bugs 2015-08-28 17:00:51 -04:00
Lisa P
c5fa70776b add the branches things 2015-08-28 16:28:47 -04:00
Lisa P
cecd09fa99 work on branch coloring and things 2015-08-27 20:35:26 -04:00
Lisa P
05b22c40e0 start implementing new branches 2015-08-27 17:42:45 -04:00
1189 changed files with 33892 additions and 23645 deletions

View File

@ -1,9 +1,19 @@
{
"predef": [
"server",
"document",
"window",
"-Promise",
"jQuery"
"jQuery",
"Visibility",
"$",
"Travis",
"_cio",
"_gaq",
"Log",
"moment",
"Pusher",
"md5"
],
"browser": true,
"boss": true,

View File

@ -1,6 +1,6 @@
---
language: node_js
node_js: "0.10.36"
node_js: stable
env:
- EMBER_VERSION=default
@ -39,9 +39,6 @@ install:
- npm install
- bower install
before_script:
- ruby ci/prepare_testem.rb
script:
- ember try $EMBER_VERSION

3
.watchmanconfig Normal file
View File

@ -0,0 +1,3 @@
{
"ignore_dirs": ["tmp", "dist"]
}

View File

@ -65,3 +65,6 @@ DEPENDENCIES
sinatra
sinatra-contrib
travis-web!
BUNDLED WITH
1.10.1

View File

@ -16,6 +16,39 @@ Now you can run the server:
And open http://localhost:4200 in the browser.
Alternatively you can run `ember build --watch` and start the server with `waiter/script/server`
### Running the app in private repos mode
At the moment Travis CI is available as two separate sites - https://travis-ci.org for Open Source
projects and https://travis-ci.com for private projects. travis-web will connect
to the Open Source version by default. In order to connect it to the API for private projects
you need to run:
```
TRAVIS_PRO=true ember serve --ssl --ssl-key=ssl/server.key --ssl-cert=ssl/server.crt
```
One caveat here is that the command will start server with SSL, so the page will
be accessible at https://localhost:4200 (note `https` part).
### Running on SSL in general
Sometimes there is a need to test the app with an SSL connection. This is required
to make Pusher work when running Travis CI Pro, but it may also be needed in other
situations.
There's already an SSL certificate in the `ssl` directory, which is set for `localhost`
host. If you want to use it, you can start the server with:
```
ember serve --ssl --ssl-key=ssl/server.key --ssl-cert=ssl/server.crt
```
In case you want your own certificate, you can follow the instructions posted
here: https://gist.github.com/trcarden/3295935 and then point the server to your
certificate with `--ssl-key` and `--ssl-cert`.
### Running tests
To run a test suite execute:
@ -25,3 +58,21 @@ To run a test suite execute:
You can also start an interactive test runner for easier development:
ember test --serve
### Updating the team page
The team information can be found in `app/routes/team.js`.
To add another member just add the info in the same style as the previous ones. Like so
{
name: 'Mr T'
title: 'Mascot'
handle: 'travisci'
nationality: 'internet'
country: 'internet'
image: 'mrt'
}
The order of value pairs does not matter, the quotationmarks do. Name and title will be displayed as they are. The handle will be used to generate a link to Twitter and displayed with a '@' in front of it. Nationality and country determine the flags. Please use the name of the country and not the adjective (like 'germany' and NOT 'german'). Image is the identifier to find the right image and animated gif. 'mrt' in the example will result in `team-mrt.png` and `mrt-animated.gif`.
Add the images themselves to `public/images/team/` and additional flags to `public/images/pro-landing/`. Mind the naming conventions already in place.

View File

@ -1,14 +0,0 @@
Sometimes there is a need to test the app with an SSL connection, for example for
testing pusher on Travis CI Pro.
In order to run the app with SSL enabled you need to:
* generate self signed certificate as described here: https://gist.github.com/trcarden/3295935
* one difference is that you need to use localhost.ssl, because travis-api
doesn't whitelist localhost.ssl at the moment
* run ruby server with `SSL=true TRAVIS_PRO=true waiter/script/server`
* run Ember app in build mode only `TRAVIS_PRO=true ember build --watch`
Now open the app on whatever port ruby server is running (3001 by default). The
ruby app will serve files generated by `ember build` and it will allow SSL
connections

View File

@ -1,23 +0,0 @@
`import DS from 'ember-data'`
`import config from 'travis/config/environment'`
Adapter = DS.ActiveModelAdapter.extend
host: config.apiEndpoint
coalesceFindRequests: true
ajaxOptions: (url, type, options) ->
hash = @_super(url, type, options)
hash.headers ||= {}
hash.headers['accept'] = 'application/json; version=2'
if token = Travis.sessionStorage.getItem('travis.token')
hash.headers['Authorization'] ||= "token #{token}"
hash
findMany: (store, type, ids) ->
@ajax(@buildURL(type.typeKey), 'GET', data: { ids: ids })
`export default Adapter`

View File

@ -0,0 +1,57 @@
import config from 'travis/config/environment';
import Ember from 'ember';
import ActiveModelAdapter from 'active-model-adapter';
export default ActiveModelAdapter.extend({
auth: Ember.inject.service(),
host: config.apiEndpoint,
coalesceFindRequests: true,
// Before Ember Data 2.0 the default behaviour of running `findAll` was to get
// new records only when there're no records in the store. This will change
// to a different strategy in 2.0: when you run `findAll` it will not get any
// new data initially, but it will try loading new data in the background.
//
// I'm disabling the new behaviour for now.
shouldBackgroundReloadRecord() {
return false;
},
ajaxOptions(url, type, options) {
var base, hash, token;
hash = this._super(...arguments);
hash.headers = hash.headers || {};
hash.headers['accept'] = 'application/json; version=2';
if (token = this.get('auth').token()) {
if(!hash.headers['Authorization']) {
hash.headers['Authorization'] = "token " + token;
}
}
return hash;
},
findMany(store, type, ids) {
return this.ajax(this.buildURL(type.modelName), 'GET', {
data: {
ids: ids
}
});
},
handleResponse(status, headers, payload) {
if (status > 299) {
console.log("[ERROR] API responded with an error (" + status + "): " + (JSON.stringify(payload)));
}
return this._super(...arguments);
},
// this can be removed once this PR is merged and live:
// https://github.com/emberjs/data/pull/4204
findRecord(store, type, id, snapshot) {
return this.ajax(this.buildURL(type.modelName, id, snapshot, 'findRecord'), 'GET');
}
});

View File

@ -1,26 +0,0 @@
`import Ember from 'ember'`
`import ApplicationAdapter from 'travis/adapters/application'`
Adapter = ApplicationAdapter.extend
namespace: 'settings'
buildURL: (type, id, record) ->
url = @_super.apply this, arguments
if record && (repoId = Ember.get(record, 'repo.id'))
delimiter = if url.indexOf('?') != -1 then '&' else '?'
url = "#{url}#{delimiter}repository_id=#{repoId}"
url
updateRecord: (store, type, record) ->
data = {};
serializer = store.serializerFor(type.typeKey);
serializer.serializeIntoHash(data, type, record);
id = Ember.get(record, 'id');
this.ajax(this.buildURL(type.typeKey, id, record), "PATCH", { data: data })
`export default Adapter`

27
app/adapters/env-var.js Normal file
View File

@ -0,0 +1,27 @@
import Ember from 'ember';
import ApplicationAdapter from 'travis/adapters/application';
export default ApplicationAdapter.extend({
namespace: 'settings',
buildURL(type, id, record) {
var delimiter, repoId, url;
url = this._super.apply(this, arguments);
if (record && record.belongsTo('repo') && (repoId = record.belongsTo('repo').id)) {
delimiter = url.indexOf('?') !== -1 ? '&' : '?';
url = "" + url + delimiter + "repository_id=" + repoId;
}
return url;
},
updateRecord(store, type, record) {
var data, serializer;
data = {};
serializer = store.serializerFor(type.modelName);
serializer.serializeIntoHash(data, type, record);
var id = record.id;
return this.ajax(this.buildURL(type.modelName, id, record), "PATCH", {
data: data
});
}
});

9
app/adapters/hook.js Normal file
View File

@ -0,0 +1,9 @@
import ApplicationAdapter from 'travis/adapters/application';
export default ApplicationAdapter.extend({
updateRecord(store, type, snapshot) {
return this._super(...arguments).then( (data) => {
return { hook: { id: snapshot.id } };
});
}
});

26
app/adapters/repo.js Normal file
View File

@ -0,0 +1,26 @@
import V3Adapter from 'travis/adapters/v3';
import ApplicationAdapter from 'travis/adapters/application';
import Config from 'travis/config/environment';
let Adapter = Config.useV3API ? V3Adapter : ApplicationAdapter;
export default Adapter.extend({
defaultSerializer: '-repo',
ajaxOptions(url, type, options) {
var hash = options || {};
if(!hash.data) {
hash.data = {};
}
if(Config.useV3API) {
if(hash.data.include) {
hash.data.include += ',repository.default_branch,branch.last_build,build.commit';
} else {
hash.data.include = 'repository.default_branch,branch.last_build,build.commit';
}
}
return this._super(url, type, hash);
}
});

View File

@ -1,24 +0,0 @@
`import Ember from 'ember'`
`import ApplicationAdapter from 'travis/adapters/application'`
Adapter = ApplicationAdapter.extend
namespace: 'settings'
find: (store, type, id, record) ->
@ajax(this.urlPrefix() + '/ssh_key/' + id, 'GET')
deleteRecord: (store, type, record) ->
id = Ember.get(record, 'id')
@ajax(this.urlPrefix() + '/ssh_key/' + id, "DELETE");
createRecord: (store, type, record) ->
data = {};
serializer = store.serializerFor(type.typeKey);
serializer.serializeIntoHash(data, type, record, { includeId: true });
id = Ember.get(record, 'id')
this.ajax(this.urlPrefix() + '/ssh_key/' + id, "PATCH", { data: data })
`export default Adapter`

29
app/adapters/ssh-key.js Normal file
View File

@ -0,0 +1,29 @@
import Ember from 'ember';
import ApplicationAdapter from 'travis/adapters/application';
export default ApplicationAdapter.extend({
namespace: 'settings',
findRecord(store, type, id, record) {
return this.ajax(this.urlPrefix() + '/ssh_key/' + id, 'GET');
},
deleteRecord(store, type, record) {
var id = record.id;
return this.ajax(this.urlPrefix() + '/ssh_key/' + id, "DELETE");
},
createRecord(store, type, record) {
var data, serializer;
data = {};
serializer = store.serializerFor(type.modelName);
serializer.serializeIntoHash(data, type, record, {
includeId: true
});
var id = record.id;
return this.ajax(this.urlPrefix() + '/ssh_key/' + id, "PATCH", {
data: data
});
}
});

64
app/adapters/v3.js Normal file
View File

@ -0,0 +1,64 @@
import Ember from 'ember';
import config from 'travis/config/environment';
import RESTAdapter from 'ember-data/adapters/rest';
export default RESTAdapter.extend({
auth: Ember.inject.service(),
host: config.apiEndpoint,
sortQueryParams: false,
coalesceFindRequests: false,
headers: {
'Travis-API-Version': '3',
'Accept': 'application/json',
'Content-Type': 'application/json'
},
ajaxOptions: function(url, type, options) {
var hash = this._super(...arguments);
hash.headers = hash.headers || {};
var token;
if(token = this.get('auth').token()) {
hash.headers['Authorization'] = "token " + token;
}
return hash;
},
// TODO: I shouldn't override this method as it's private, a better way would
// be to create my own URL generator
_buildURL: function(modelName, id) {
var url = [];
var host = Ember.get(this, 'host');
var prefix = this.urlPrefix();
var path;
if (modelName) {
path = this.pathForType(modelName, id);
if (path) { url.push(path); }
}
if (id) { url.push(encodeURIComponent(id)); }
if (prefix) { url.unshift(prefix); }
url = url.join('/');
if (!host && url && url.charAt(0) !== '/') {
url = '/' + url;
}
return url;
},
pathForType: function(modelName, id) {
var underscored = Ember.String.underscore(modelName);
return id ? underscored : Ember.String.pluralize(underscored);
},
// this can be removed once this PR is merged and live:
// https://github.com/emberjs/data/pull/4204
findRecord(store, type, id, snapshot) {
return this.ajax(this.buildURL(type.modelName, id, snapshot, 'findRecord'), 'GET');
}
});

View File

@ -1,107 +0,0 @@
`import Ember from 'ember'`
`import Resolver from 'ember/resolver'`
`import loadInitializers from 'ember/load-initializers'`
`import config from './config/environment'`
Ember.MODEL_FACTORY_INJECTIONS = true
App = Ember.Application.extend(Ember.Evented,
LOG_TRANSITIONS: true
LOG_TRANSITIONS_INTERNAL: true
LOG_ACTIVE_GENERATION: true
LOG_MODULE_RESOLVER: true
LOG_VIEW_LOOKUPS: true
#LOG_RESOLVER: true
modulePrefix: config.modulePrefix
podModulePrefix: config.podModulePrefix
Resolver: Resolver
lookup: ->
@__container__.lookup.apply @__container__, arguments
flash: (options) ->
Travis.lookup('controller:flash').loadFlashes([options])
toggleSidebar: ->
$('body').toggleClass('maximized')
# TODO gotta force redraws here :/
element = $('<span></span>')
$('#top .profile').append(element)
Em.run.later (-> element.remove()), 10
element = $('<span></span>')
$('#repo').append(element)
Em.run.later (-> element.remove()), 10
ready: ->
location.href = location.href.replace('#!/', '') if location.hash.slice(0, 2) == '#!'
@on 'user:signed_in', (user) ->
Travis.onUserUpdate(user)
@on 'user:refreshed', (user) ->
Travis.onUserUpdate(user)
@on 'user:synced', (user) ->
Travis.onUserUpdate(user)
@on 'user:signed_out', () ->
if config.userlike
Travis.removeUserlike()
currentDate: ->
new Date()
onUserUpdate: (user) ->
if config.pro
@identifyCustomer(user)
if config.userlike
@setupUserlike(user)
@subscribePusher(user)
subscribePusher: (user) ->
return unless user.channels
channels = user.channels
if config.pro
channels = channels.map (channel) ->
if channel.match /^private-/
channel
else
"private-#{channel}"
Travis.pusher.subscribeAll(channels)
setupUserlike: (user) ->
btn = document.getElementById('userlikeCustomTab')
btn.classList.add("logged-in")
userlikeData = window.userlikeData = {}
userlikeData.user = {}
userlikeData.user.name= user.login;
userlikeData.user.email = user.email;
unless document.getElementById('userlike-script')
s = document.createElement('script')
s.id = 'userlike-script'
s.src = '//userlike-cdn-widgets.s3-eu-west-1.amazonaws.com/0327dbb23382ccbbb91b445b76e8a91d4b37d90ef9f2faf84e11177847ff7bb9.js'
document.body.appendChild(s)
removeUserlike: () ->
btn = document.getElementById('userlikeCustomTab')
btn.classList.remove("logged-in")
identifyCustomer: (user) ->
if _cio && _cio.identify
_cio.identify
id: user.id
email: user.email
name: user.name
created_at: (Date.parse(user.created_at) / 1000) || null
login: user.login
)
loadInitializers(App, config.modulePrefix)
`export default App`

130
app/app.js Normal file
View File

@ -0,0 +1,130 @@
import Ember from 'ember';
import Resolver from './resolver';
import loadInitializers from 'ember-load-initializers';
import config from './config/environment';
Ember.MODEL_FACTORY_INJECTIONS = true;
Ember.LinkComponent.reopen({
attributeBindings: ['alt']
});
var App = Ember.Application.extend(Ember.Evented, {
LOG_TRANSITIONS: true,
LOG_TRANSITIONS_INTERNAL: true,
LOG_ACTIVE_GENERATION: true,
LOG_MODULE_RESOLVER: true,
LOG_VIEW_LOOKUPS: true,
modulePrefix: config.modulePrefix,
podModulePrefix: config.podModulePrefix,
Resolver: Resolver,
flash(options) {
return Ember.getOwner(Travis).lookup('controller:flash').loadFlashes([options]);
},
toggleSidebar() {
var element;
$('body').toggleClass('maximized');
element = $('<span></span>');
$('#top .profile').append(element);
Ember.run.later((function() {
return element.remove();
}), 10);
element = $('<span></span>');
$('#repo').append(element);
return Ember.run.later((function() {
return element.remove();
}), 10);
},
ready() {
if (location.hash.slice(0, 2) === '#!') {
location.href = location.href.replace('#!/', '');
}
this.on('user:signed_in', function(user) {
return Travis.onUserUpdate(user);
});
this.on('user:refreshed', function(user) {
return Travis.onUserUpdate(user);
});
this.on('user:synced', function(user) {
return Travis.onUserUpdate(user);
});
return this.on('user:signed_out', function() {
if (config.userlike) {
return Travis.removeUserlike();
}
});
},
currentDate() {
return new Date();
},
onUserUpdate(user) {
if (config.pro) {
this.identifyCustomer(user);
}
if (config.userlike) {
this.setupUserlike(user);
}
return this.subscribePusher(user);
},
subscribePusher(user) {
var channels;
if (!user.channels) {
return;
}
channels = user.channels;
if (config.pro) {
channels = channels.map(function(channel) {
if (channel.match(/^private-/)) {
return channel;
} else {
return "private-" + channel;
}
});
}
return Travis.pusher.subscribeAll(channels);
},
setupUserlike(user) {
var btn, s, userlikeData;
btn = document.getElementById('userlikeCustomTab');
btn.classList.add("logged-in");
userlikeData = window.userlikeData = {};
userlikeData.user = {};
userlikeData.user.name = user.login;
userlikeData.user.email = user.email;
if (!document.getElementById('userlike-script')) {
s = document.createElement('script');
s.id = 'userlike-script';
s.src = '//userlike-cdn-widgets.s3-eu-west-1.amazonaws.com/0327dbb23382ccbbb91b445b76e8a91d4b37d90ef9f2faf84e11177847ff7bb9.js';
return document.body.appendChild(s);
}
},
removeUserlike() {
var btn;
btn = document.getElementById('userlikeCustomTab');
return btn.classList.remove("logged-in");
},
identifyCustomer(user) {
if (_cio && _cio.identify) {
return _cio.identify({
id: user.id,
email: user.email,
name: user.name,
created_at: (Date.parse(user.created_at) / 1000) || null,
login: user.login
});
}
}
});
loadInitializers(App, config.modulePrefix);
export default App;

View File

@ -1,46 +0,0 @@
`import Ember from 'ember'`
AddEnvVarComponent = Ember.Component.extend
classNames: ['form--envvar']
classNameBindings: ['nameIsBlank:form-error']
store: Ember.inject.service()
isValid: () ->
if Ember.isBlank(@get('name'))
this.set('nameIsBlank', true)
false
else
true
reset: ->
@setProperties(name: null, value: null, public: null)
actions:
save: ->
return if @get('isSaving')
@set('isSaving', true)
if @isValid()
env_var = @get('store').createRecord('env_var',
name: @get('name')
value: @get('value')
public: @get('public')
repo: @get('repo')
)
self = this
env_var.save().then =>
@set('isSaving', false)
@reset()
, =>
@set('isSaving', false)
else
@set('isSaving', false)
nameChanged: ->
this.set('nameIsBlank', false)
`export default AddEnvVarComponent`

View File

@ -0,0 +1,55 @@
import Ember from 'ember';
export default Ember.Component.extend({
classNames: ['form--envvar'],
classNameBindings: ['nameIsBlank:form-error'],
store: Ember.inject.service(),
isValid() {
if (Ember.isBlank(this.get('name'))) {
this.set('nameIsBlank', true);
return false;
} else {
return true;
}
},
reset() {
return this.setProperties({
name: null,
value: null,
"public": null
});
},
actions: {
save() {
var env_var, self;
if (this.get('isSaving')) {
return;
}
this.set('isSaving', true);
if (this.isValid()) {
env_var = this.get('store').createRecord('env_var', {
name: this.get('name'),
value: this.get('value'),
"public": this.get('public'),
repo: this.get('repo')
});
self = this;
return env_var.save().then(() => {
this.set('isSaving', false);
return this.reset();
}, () => {
return this.set('isSaving', false);
});
} else {
return this.set('isSaving', false);
}
},
nameChanged() {
return this.set('nameIsBlank', false);
}
}
});

View File

@ -1,73 +0,0 @@
# `import Ember from 'ember'`
AddSshKeyComponent = Ember.Component.extend
classNames: ['form--sshkey']
classNameBindings: ['valueError:form-error']
store: Ember.inject.service()
isSaving: false
didInsertElement: () ->
id = @get('repo.id')
model = @get('store').recordForId('ssh_key', id)
# TODO: this can be removed in favor of simply unloading record
# once https://github.com/emberjs/data/pull/2867
# and https://github.com/emberjs/data/pull/2870 are merged
if model
@get('store').dematerializeRecord(model._internalModel)
typeMap = @get('store').typeMapFor(model.constructor)
idToRecord = typeMap.idToRecord
delete idToRecord[id]
model = @get('store').createRecord('ssh_key', id: id)
@set('model', model)
isValid: () ->
if Ember.isBlank(@get('value'))
this.set('valueError', 'Value can\'t be blank.')
false
else
true
reset: ->
@setProperties(description: null, value: null)
valueChanged: (->
this.set('valueError', false)
).observes('value')
addErrorsFromResponse: (errArr) ->
error = errArr[0].detail
if error.code == 'not_a_private_key'
this.set('valueError', 'This key is not a private key.')
else if error.code == 'key_with_a_passphrase'
this.set('valueError', 'The key can\'t have a passphrase.')
actions:
save: ->
this.set('valueError', false)
return if @get('isSaving')
@set('isSaving', true)
if @isValid()
ssh_key = @get('model').setProperties(
description: @get('description')
value: @get('value')
)
ssh_key.save().then =>
@set('isSaving', false)
@reset()
@sendAction('sshKeyAdded', ssh_key)
, (error) =>
@set('isSaving', false)
if error.errors
@addErrorsFromResponse(error.errors)
else
@set('isSaving', false)
`export default AddSshKeyComponent`

View File

@ -0,0 +1,85 @@
import Ember from 'ember';
export default Ember.Component.extend({
classNames: ['form--sshkey'],
classNameBindings: ['valueError:form-error'],
store: Ember.inject.service(),
isSaving: false,
didInsertElement() {
var id = this.get('repo.id');
var model = this.get('store').recordForId('ssh_key', id);
if (model) {
this.get('store').unloadRecord(model);
var typeMap = this.get('store').typeMapFor(model.constructor);
var idToRecord = typeMap.idToRecord;
delete idToRecord[id];
}
model = this.get('store').createRecord('ssh_key', { id: id });
return this.set('model', model);
},
isValid() {
if (Ember.isBlank(this.get('value'))) {
this.set('valueError', 'Value can\'t be blank.');
return false;
} else {
return true;
}
},
reset() {
return this.setProperties({
description: null,
value: null
});
},
valueChanged: function() {
return this.set('valueError', false);
}.observes('value'),
addErrorsFromResponse(errArr) {
var error = errArr[0].detail;
if (error.code === 'not_a_private_key') {
return this.set('valueError', 'This key is not a private key.');
} else if (error.code === 'key_with_a_passphrase') {
return this.set('valueError', 'The key can\'t have a passphrase.');
}
},
actions: {
save() {
var ssh_key;
this.set('valueError', false);
if (this.get('isSaving')) {
return;
}
this.set('isSaving', true);
if (this.isValid()) {
ssh_key = this.get('model');
ssh_key.setProperties({
description: this.get('description'),
value: this.get('value')
});
return ssh_key.save().then(() => {
this.set('isSaving', false);
this.reset();
return this.sendAction('sshKeyAdded', ssh_key);
}, (error) => {
this.set('isSaving', false);
if (error.errors) {
return this.addErrorsFromResponse(error.errors);
}
});
} else {
return this.set('isSaving', false);
}
}
}
});

View File

@ -0,0 +1,103 @@
import Ember from 'ember';
import { githubCommit as githubCommitUrl } from 'travis/utils/urls';
import TravisRoute from 'travis/routes/basic';
import config from 'travis/config/environment';
export default Ember.Component.extend({
routing: Ember.inject.service('-routing'),
tagName: 'li',
classNameBindings: ['build.last_build.state'],
classNames: ['branch-row', 'row-li'],
isLoading: false,
isTriggering: false,
hasTriggered: false,
urlGithubCommit: function() {
return githubCommitUrl(this.get('build.repository.slug'), this.get('build.last_build.commit.sha'));
}.property('build.last_build'),
getLast5Builds: function() {
var apiEndpoint, branchName, lastBuilds, options, repoId;
lastBuilds = Ember.ArrayProxy.create({
content: [{}, {}, {}, {}, {}],
isLoading: true,
count: 0
});
if (!this.get('build.last_build')) {
lastBuilds.set('isLoading', false);
} else {
apiEndpoint = config.apiEndpoint;
repoId = this.get('build.repository.id');
branchName = this.get('build.name');
options = {};
if (this.get('auth.signedIn')) {
options.headers = {
Authorization: "token " + (this.auth.token())
};
}
$.ajax(apiEndpoint + "/v3/repo/" + repoId + "/builds?branch.name=" + branchName + "&limit=5&build.event_type=push,api", options).then(function(response) {
var array, i, j, ref;
array = response.builds.map(function(build) {
return Ember.Object.create(build);
});
if (array.length < 5) {
for (i = j = 1, ref = 5 - array.length; j <= ref; i = j += 1) {
array.push({});
}
}
lastBuilds.set('count', response['@pagination'].count);
lastBuilds.set('content', array);
return lastBuilds.set('isLoading', false);
});
}
return lastBuilds;
}.property(),
canTrigger: function() {
var permissions;
if (!this.get('auth.signedIn')) {
return false;
} else {
permissions = this.get('auth.currentUser.permissions');
if (permissions.contains(parseInt(this.get('build.repository.id')))) {
return true;
} else {
return false;
}
}
}.property(),
triggerBuild: function() {
var apiEndpoint, options, repoId;
apiEndpoint = config.apiEndpoint;
repoId = this.get('build.repository.id');
options = {
type: 'POST',
body: {
request: {
branch: this.get('build.name')
}
}
};
if (this.get('auth.signedIn')) {
options.headers = {
Authorization: "token " + (this.auth.token())
};
}
return $.ajax(apiEndpoint + "/v3/repo/" + repoId + "/requests", options).then(() => {
this.set('isTriggering', false);
return this.set('hasTriggered', true);
});
},
actions: {
tiggerBuild(branch) {
this.set('isTriggering', true);
return this.triggerBuild();
},
viewAllBuilds(branch) {
return this.get('routing').transitionTo('builds');
}
}
});

View File

@ -0,0 +1,21 @@
import Ember from 'ember';
export default Ember.Component.extend({
classNames: ['broadcast'],
isOpen: false,
timeoutId: '',
actions: {
toggleBroadcasts() {
this.toggleProperty('isOpen');
this.sendAction('toggleBroadcasts');
if (this.get('isOpen') === true) {
return this.set('timeoutId', setTimeout(() => {
this.toggleProperty('isOpen');
return this.sendAction('toggleBroadcasts');
}, 10000));
} else {
return clearTimeout(this.get('timeoutId'));
}
}
}
});

View File

@ -0,0 +1,27 @@
import Ember from 'ember';
import { gravatarImage } from 'travis/utils/urls';
import GithubUrlProperties from 'travis/mixins/github-url-properties';
import { durationFrom, safe } from 'travis/utils/helpers';
import { githubCommit } from 'travis/utils/urls';
export default Ember.Component.extend({
tagName: 'section',
classNames: ['build-header'],
classNameBindings: ['item.state'],
isJob: function() {
if (this.get('item.build')) {
return true;
} else {
return false;
}
}.property('item'),
urlGithubCommit: function() {
return githubCommit(this.get('repo.slug'), this.get('commit.sha'));
}.property('item'),
elapsedTime: function() {
return durationFrom(this.get('item.startedAt'), this.get('item.finishedAt'));
}.property('item.startedAt', 'item.finishedAt', 'item.duration')
});

View File

@ -1,9 +0,0 @@
`import Ember from 'ember'`
`import RepoActionsItemComponentMixin from 'travis/utils/repo-actions-item-component-mixin'`
BuildRepoActionsComponent = Ember.Component.extend(RepoActionsItemComponentMixin,
item: Ember.computed.alias('build')
type: 'build'
)
`export default BuildRepoActionsComponent`

View File

@ -0,0 +1,7 @@
import Ember from 'ember';
import RepoActionsItemComponentMixin from 'travis/utils/repo-actions-item-component-mixin';
export default Ember.Component.extend(RepoActionsItemComponentMixin, {
item: Ember.computed.alias('build'),
type: 'build'
});

View File

@ -0,0 +1,14 @@
import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'li',
classNameBindings: ['build.state'],
attributeBindings: ['title'],
title: function() {
var num, state;
num = this.get('build.number');
state = this.get('build.state');
return "Build #" + num + " " + state;
}.property('build')
});

View File

@ -0,0 +1,12 @@
import Ember from 'ember';
import { colorForState } from 'travis/utils/helpers';
import Polling from 'travis/mixins/polling';
export default Ember.Component.extend({
classNameBindings: ['color'],
pollModels: 'build',
color: function() {
return colorForState(this.get('build.state'));
}.property('build.state')
});

View File

@ -1,17 +0,0 @@
`import Ember from 'ember'`
`import { gravatarImage } from 'travis/utils/urls'`
`import { githubCommit as githubCommitUrl } from 'travis/utils/urls'`
BuildsItemComponent = Ember.Component.extend
classNameBindings: ['build.state']
classNames: ['tile', 'tile--small', 'tile--build', 'row']
urlAuthorGravatarImage: (->
gravatarImage(@get('build.commit.authorEmail'), 40)
).property('build.commit.authorEmail')
urlGithubCommit: (->
githubCommitUrl(@get('build.repo.slug'), @get('build.commit.sha'))
).property('build.commit.sha')
`export default BuildsItemComponent`

View File

@ -0,0 +1,12 @@
import Ember from 'ember';
import { githubCommit as githubCommitUrl } from 'travis/utils/urls';
export default Ember.Component.extend({
tagName: 'li',
classNameBindings: ['build.state'],
classNames: ['row-li', 'pr-row'],
urlGithubCommit: function() {
return githubCommitUrl(this.get('build.repo.slug'), this.get('build.commit.sha'));
}.property('build.commit.sha')
});

View File

@ -0,0 +1,30 @@
import Ember from 'ember';
import Polling from 'travis/mixins/polling';
export default Ember.Component.extend({
store: Ember.inject.service('store'),
pollHook: function(store) {
var contentType, repositoryId;
contentType = this.get('contentType');
repositoryId = this.get('repo.id');
store = this.get('store');
if (contentType === 'builds') {
return store.query('build', {
event_type: 'push',
repository_id: repositoryId
});
} else if (contentType === 'pull_requests') {
return store.filter('build', {
event_type: 'pull_request',
repository_id: repositoryId
});
} else {
return store.query('build', {
repository_id: repositoryId,
branches: true
});
}
}
});

View File

@ -1,27 +0,0 @@
`import Ember from 'ember'`
`import Ajax from 'travis/utils/ajax'`
CachesItemComponent = Ember.Component.extend
tagName: 'li'
classNames: ['tile', 'tile--xs', 'row']
classNameBindings: ['cache.type']
isDeleting: false
actions:
delete: ->
return if @get('isDeleting')
if confirm('Are you sure?')
@set('isDeleting', true)
data = { branch: @get('cache.branch') }
deletingDone = => @set('isDeleting', false)
repo = @get('repo')
Ajax.ajax("/repos/#{repo.get('id')}/caches", "DELETE", data: data).then(deletingDone, deletingDone).then =>
@get('caches').removeObject(@get('cache'))
`export default CachesItemComponent`

View File

@ -0,0 +1,33 @@
import Ember from 'ember';
export default Ember.Component.extend({
ajax: Ember.inject.service(),
tagName: 'li',
classNames: ['cache-item'],
classNameBindings: ['cache.type'],
isDeleting: false,
actions: {
"delete": function() {
var data, deletingDone, repo;
if (this.get('isDeleting')) {
return;
}
if (confirm('Are you sure?')) {
this.set('isDeleting', true);
data = {
branch: this.get('cache.branch')
};
deletingDone = () => {
return this.set('isDeleting', false);
};
repo = this.get('repo');
return this.get('ajax').ajax("/repos/" + (repo.get('id')) + "/caches", "DELETE", {
data: data
}).then(deletingDone, deletingDone).then(() => {
return this.get('caches').removeObject(this.get('cache'));
});
}
}
}
});

View File

@ -1,10 +0,0 @@
`import Ember from 'ember'`
Component = Ember.Component.extend(
actions:
close: ->
$('.popup').removeClass('display')
return false
)
`export default Component`

View File

@ -0,0 +1,36 @@
import Ember from 'ember';
import { githubCommit as githubCommitUrl } from 'travis/utils/urls';
import config from 'travis/config/environment';
import { hasAdminPermission, hasPushPermission } from 'travis/utils/permission';
export default Ember.Component.extend({
tagName: 'li',
classNameBindings: ['repo.default_branch.last_build.state'],
classNames: ['rows', 'rows--dashboard'],
isLoading: false,
isTriggering: false,
hasTriggered: false,
dropupIsOpen: false,
urlGithubCommit: function() {
return githubCommitUrl(this.get('repo.slug'), this.get('repo.default_branch.last_build.commit.sha'));
}.property('repo'),
displayMenuTofu: function() {
return hasPushPermission(this.get('currentUser'), this.get('repo.id'));
},
displayActivateLink: function() {
return hasAdminPermission(this.get('currentUser'), this.get('repo.id'));
},
actions: {
tiggerBuild(branch) {
this.set('isTriggering', true);
return this.triggerBuild();
},
openDropup() {
this.toggleProperty('dropupIsOpen');
}
}
});

View File

@ -1,29 +0,0 @@
`import Ember from 'ember'`
EnvVarComponent = Ember.Component.extend
classNames: ['settings-envvar']
classNameBindings: ['envVar.public:is-public']
isDeleting: false
validates:
name: ['presence']
actionType: 'Save'
showValueField: Ember.computed.alias('public')
value: ( (key, value) ->
if @get('envVar.public')
@get('envVar.value')
else
'••••••••••••••••'
).property('envVar.value', 'envVar.public')
actions:
delete: ->
return if @get('isDeleting')
@set('isDeleting', true)
@get('envVar').destroyRecord()
`export default EnvVarComponent`

28
app/components/env-var.js Normal file
View File

@ -0,0 +1,28 @@
import Ember from 'ember';
export default Ember.Component.extend({
classNames: ['settings-envvar'],
classNameBindings: ['envVar.public:is-public'],
isDeleting: false,
validates: { name: ['presence'] },
actionType: 'Save',
showValueField: Ember.computed.alias('public'),
value: function(key) {
if (this.get('envVar.public')) {
return this.get('envVar.value');
} else {
return '••••••••••••••••';
}
}.property('envVar.value', 'envVar.public'),
actions: {
"delete": function() {
if (this.get('isDeleting')) {
return;
}
this.set('isDeleting', true);
return this.get('envVar').destroyRecord();
}
}
});

View File

@ -0,0 +1,6 @@
import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'span',
classNames: ['icon-eye']
});

View File

@ -1,58 +0,0 @@
`import Ember from 'ember'`
`import LimitedArray from 'travis/utils/limited-array'`
FlashDisplayComponent = Ember.Component.extend
auth: Ember.inject.service()
store: Ember.inject.service()
currentUserBinding: 'auth.currentUser'
classNames: ['flash']
tagName: 'ul'
init: ->
@_super.apply this, arguments
@set('flashes', LimitedArray.create(limit: 1, content: []))
messages: (->
broadcasts = @get('unseenBroadcasts')
flashes = @get('flashes')
model = []
model.pushObjects(broadcasts) if broadcasts
model.pushObjects(flashes.toArray().reverse()) if flashes
model.uniq()
).property('unseenBroadcasts.[]', 'flashes.[]', 'unseenBroadcasts.length', 'flashes.length')
unseenBroadcasts: (->
@get('broadcasts').filter (broadcast) ->
!broadcast.get('isSeen')
).property('broadcasts.[]', 'broadcasts.length')
broadcasts: (->
broadcasts = Ember.ArrayProxy.create(content: [])
if @get('currentUser.id')
@get('store').find('broadcast').then (result) ->
broadcasts.pushObjects(result.toArray())
broadcasts
).property('currentUser.id')
loadFlashes: (msgs) ->
for msg in msgs
type = Object.keys(msg)[0]
msg = { type: type, message: msg[type] }
@get('flashes').unshiftObject(msg)
Ember.run.later(this, (-> @get('flashes.content').removeObject(msg)), 15000)
close: (msg) ->
if msg.constructor.modelName == "broadcast"
msg.setSeen()
@notifyPropertyChange('unseenBroadcasts')
else
@get('flashes').removeObject(msg)
actions:
closeMessage: (msg) ->
@close(msg)
`export default FlashDisplayComponent`

View File

@ -0,0 +1,14 @@
import Ember from 'ember';
export default Ember.Component.extend({
flashes: Ember.inject.service(),
classNames: ['flash'],
tagName: 'ul',
messagesBinding: 'flashes.messages',
actions: {
closeMessage(msg) {
return this.get('flashes').close(msg);
}
}
});

View File

@ -1,15 +0,0 @@
`import Ember from 'ember'`
FlashItemComponent = Ember.Component.extend
tagName: 'li'
classNameBindings: ['type']
type: (->
@get('flash.type') || 'broadcast'
).property('flash.type')
actions:
close: ->
this.attrs.close(@get('flash'))
`export default FlashItemComponent`

View File

@ -0,0 +1,16 @@
import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'li',
classNameBindings: ['type'],
type: function() {
return this.get('flash.type') || 'broadcast';
}.property('flash.type'),
actions: {
close() {
return this.attrs.close(this.get('flash'));
}
}
});

View File

@ -1,18 +0,0 @@
`import Ember from 'ember'`
HookSwitchComponent = Ember.Component.extend
tagName: 'a'
classNames: ['switch--icon']
classNameBindings: ['active']
activeBinding: "hook.active"
click: ->
@sendAction('onToggle')
hook = @get('hook')
hook.toggle().then( (->), =>
@toggleProperty('hook.active')
@sendAction('onToggleError', hook)
)
`export default HookSwitchComponent`

View File

@ -0,0 +1,17 @@
import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'a',
classNames: ['switch--icon'],
classNameBindings: ['active'],
activeBinding: "hook.active",
click() {
var hook;
this.sendAction('onToggle');
hook = this.get('hook');
return hook.toggle().then((function() {}), () => {
this.toggleProperty('hook.active');
return this.sendAction('onToggleError', hook);
});
}
});

View File

@ -1,21 +0,0 @@
`import Ember from 'ember'`
`import config from 'travis/config/environment'`
HooksListItemComponent = Ember.Component.extend
tagName: 'li'
classNames: ['row']
classNameBindings: ['hook.active:active']
githubOrgsOauthAccessSettingsUrl: config.githubOrgsOauthAccessSettingsUrl
actions:
handleToggleError: ->
@set("showError", true)
close: ->
@send('resetErrors')
resetErrors: ->
@set("showError", false)
`export default HooksListItemComponent`

View File

@ -0,0 +1,23 @@
import Ember from 'ember';
import config from 'travis/config/environment';
export default Ember.Component.extend({
tagName: 'li',
classNames: ['row'],
classNameBindings: ['hook.active:active'],
githubOrgsOauthAccessSettingsUrl: config.githubOrgsOauthAccessSettingsUrl,
actions: {
handleToggleError() {
return this.set("showError", true);
},
close() {
return this.send('resetErrors');
},
resetErrors() {
return this.set("showError", false);
}
}
});

View File

@ -1,30 +0,0 @@
`import Ember from 'ember'`
JobLogComponent = Ember.Component.extend
logBinding: 'job.log'
didInsertElement: ->
@setupLog()
logDidChange: (->
@setupLog()
).observes('log')
logWillChange: (->
@teardownLog()
).observesBefore('log')
willDestroyElement: ->
@teardownLog()
teardownLog: ->
job = @get('job')
job.unsubscribe() if job
setupLog: ->
job = @get('job')
if job
job.get('log').fetch()
job.subscribe()
`export default JobLogComponent`

35
app/components/job-log.js Normal file
View File

@ -0,0 +1,35 @@
import Ember from 'ember';
export default Ember.Component.extend({
logBinding: 'job.log',
classNames: ['job-log'],
didReceiveAttrs: function(options) {
this._super(...arguments);
let oldJob = options.oldAttrs && options.oldAttrs.job && options.oldAttrs.job.value,
newJob = options.newAttrs && options.newAttrs.job && options.newAttrs.job.value;
if(newJob !== oldJob) {
if(newJob) {
this.setupLog(newJob);
}
if(oldJob) {
this.teardownLog(oldJob);
}
}
},
teardownLog(job) {
job.unsubscribe();
},
setupLog(job) {
this.set('error', false);
job.get('log').fetch().then(function() { }, () => {
this.set('error', true);
});
job.subscribe();
}
});

View File

@ -1,9 +0,0 @@
`import Ember from 'ember'`
`import RepoActionsItemComponentMixin from 'travis/utils/repo-actions-item-component-mixin'`
JobRepoActionsComponent = Ember.Component.extend(RepoActionsItemComponentMixin,
item: Ember.computed.alias('job')
type: 'job'
)
`export default JobRepoActionsComponent`

View File

@ -0,0 +1,7 @@
import Ember from 'ember';
import RepoActionsItemComponentMixin from 'travis/utils/repo-actions-item-component-mixin';
export default Ember.Component.extend(RepoActionsItemComponentMixin, {
item: Ember.computed.alias('job'),
type: 'job'
});

View File

@ -0,0 +1,18 @@
import Ember from 'ember';
import { colorForState } from 'travis/utils/helpers';
import { githubCommit } from 'travis/utils/urls';
import Polling from 'travis/mixins/polling';
export default Ember.Component.extend({
pollModels: 'job.build',
commitBinding: 'job.commit',
currentItemBinding: 'job',
color: function() {
return colorForState(this.get('job.state'));
}.property('job.state'),
urlGithubCommit: function() {
return githubCommit(this.get('repo.slug'), this.get('commit.sha'));
}.property('repo.slug', 'commit.sha')
});

View File

@ -1,41 +0,0 @@
`import Ember from 'ember'`
`import { colorForState } from 'travis/utils/helpers'`
`import { languageConfigKeys } from 'travis/utils/keys-map';`
JobsItemComponent = Ember.Component.extend
tagName: 'li'
classNameBindings: ['job.state']
classNames: ['tile', 'tile--jobs', 'row']
isAnimating: (->
state = @get('job.state')
animationStates = ['received', 'queued', 'started', 'booting']
unless animationStates.indexOf(state) == -1
true
).property('job.state')
languages: (->
output = []
if config = @get('job.config')
for key, languageName of languageConfigKeys
if version = config[key]
output.push(languageName + ': ' + version)
gemfile = @get('job.config.gemfile')
if gemfile && @get('job.config.env')
output.push "Gemfile: #{gemfile}"
output.join(' ')
).property('job.config')
environment: (->
if env = @get('job.config.env')
env
else if gemfile = @get('job.config.gemfile')
"Gemfile: #{gemfile}"
).property('job.config.env', 'job.config.gemfile')
`export default JobsItemComponent`

View File

@ -0,0 +1,36 @@
import Ember from 'ember';
import { colorForState } from 'travis/utils/helpers';
import { languageConfigKeys } from 'travis/utils/keys-map';
export default Ember.Component.extend({
tagName: 'li',
classNameBindings: ['job.state'],
classNames: ['jobs-item'],
languages: function() {
var config, gemfile, key, languageName, output, version;
output = [];
if (config = this.get('job.config')) {
for (key in languageConfigKeys) {
languageName = languageConfigKeys[key];
if (version = config[key]) {
output.push(languageName + ': ' + version);
}
}
gemfile = this.get('job.config.gemfile');
if (gemfile && this.get('job.config.env')) {
output.push("Gemfile: " + gemfile);
}
}
return output.join(' ');
}.property('job.config'),
environment: function() {
var env, gemfile;
if (env = this.get('job.config.env')) {
return env;
} else if (gemfile = this.get('job.config.gemfile')) {
return "Gemfile: " + gemfile;
}
}.property('job.config.env', 'job.config.gemfile')
});

View File

@ -1,11 +0,0 @@
`import Ember from 'ember'`
JobsListComponent = Ember.Component.extend
jobTableId: Ember.computed(->
if @get('required')
'jobs'
else
'allowed_failure_jobs'
)
`export default JobsListComponent`

View File

@ -0,0 +1,13 @@
import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'section',
classNames: ['jobs'],
jobTableId: Ember.computed(function() {
if (this.get('required')) {
return 'jobs';
} else {
return 'allowed_failure_jobs';
}
})
});

View File

@ -0,0 +1,8 @@
import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'li',
classNameBindings: ['build.state']
});

View File

@ -1,40 +0,0 @@
`import Ember from 'ember'`
LimitConcurrentBuildsComponent = Ember.Component.extend
classNames: ['limit-concurrent-builds']
description: (->
description = "Limit concurrent jobs"
if @get('enabled')
description += " "
description
).property('enabled')
limitChanged: ->
repo = @get('repo')
limit = parseInt(@get('value'))
if limit
@set('isSaving', true)
savingFinished = =>
@set('isSaving', false)
repo.saveSettings(maximum_number_of_builds: limit).
then(savingFinished, savingFinished)
actions:
toggle: ->
unless @get('enabled')
return if @get('value') == 0
return if @get('isSaving')
@set('isSaving', true)
savingFinished = =>
@set('isSaving', false)
@get('repo').saveSettings(maximum_number_of_builds: 0).then(savingFinished, savingFinished)
@set('value', 0)
limitChanged: ->
Ember.run.debounce(this, 'limitChanged', 1000)
`export default LimitConcurrentBuildsComponent`

View File

@ -0,0 +1,55 @@
import Ember from 'ember';
export default Ember.Component.extend({
classNames: ['limit-concurrent-builds'],
description: function() {
var description;
description = "Limit concurrent jobs";
if (this.get('enabled')) {
description += " ";
}
return description;
}.property('enabled'),
limitChanged() {
var limit, repo, savingFinished;
repo = this.get('repo');
limit = parseInt(this.get('value'));
if (limit) {
this.set('isSaving', true);
savingFinished = () => {
return this.set('isSaving', false);
};
return repo.saveSettings({
maximum_number_of_builds: limit
}).then(savingFinished, savingFinished);
}
},
actions: {
toggle() {
var savingFinished;
if (!this.get('enabled')) {
if (this.get('value') === 0) {
return;
}
if (this.get('isSaving')) {
return;
}
this.set('isSaving', true);
savingFinished = () => {
return this.set('isSaving', false);
};
this.get('repo').saveSettings({
maximum_number_of_builds: 0
}).then(savingFinished, savingFinished);
return this.set('value', 0);
}
},
limitChanged() {
return Ember.run.debounce(this, 'limitChanged', 1000);
}
}
});

View File

@ -1,8 +0,0 @@
`import Ember from 'ember'`
LoadingIndicatorComponent = Ember.Component.extend
tagName: 'div'
classNameBindings: ['center:loading-container', 'inline:inline-block']
center: false
`export default LoadingIndicatorComponent`

View File

@ -0,0 +1,7 @@
import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'div',
classNameBindings: ['center:loading-container', 'inline:inline-block', 'height:icon-height'],
center: false
});

View File

@ -1,157 +0,0 @@
`import Ember from 'ember'`
`import LinesSelector from 'travis/utils/lines-selector'`
`import LogFolder from 'travis/utils/log-folder'`
`import config from 'travis/config/environment'`
`import { plainTextLog as plainTextLogUrl } from 'travis/utils/urls'`
Log.DEBUG = false
Log.LIMIT = 10000
Log.Scroll = (options) ->
options ||= {}
@beforeScroll = options.beforeScroll
this
Log.Scroll.prototype = $.extend new Log.Listener,
insert: (log, data, pos) ->
@tryScroll() if @numbers
true
tryScroll: ->
if element = $("#log p:visible.highlight:first")
if @beforeScroll
@beforeScroll()
$('#main').scrollTop(0)
$('html, body').scrollTop(element.offset()?.top - (window.innerHeight / 3)) # weird, html works in chrome, body in firefox
Log.Limit = (max_lines, limitedLogCallback) ->
@max_lines = max_lines || 1000
@limitedLogCallback = limitedLogCallback || (->)
this
Log.Limit.prototype = Log.extend new Log.Listener,
count: 0,
insert: (log, node, pos) ->
if node.type == 'paragraph' && !node.hidden
@count += 1
if @limited
@limitedLogCallback()
return @count
Object.defineProperty Log.Limit.prototype, 'limited',
get: ->
@count >= @max_lines
LogContentComponent = Ember.Component.extend
popup: Ember.inject.service()
currentUserBinding: 'auth.currentUser'
didInsertElement: ->
console.log 'log view: did insert' if Log.DEBUG
@_super.apply this, arguments
@createEngine()
willDestroyElement: ->
console.log 'log view: will destroy' if Log.DEBUG
@teardownLog()
teardownLog: (log) ->
if log || log = @get('log')
parts = log.get('parts')
parts.removeArrayObserver(@, didChange: 'partsDidChange', willChange: 'noop')
parts.destroy()
log.notifyPropertyChange('parts')
@lineSelector?.willDestroy()
if logElement = this.$('#log')
logElement.empty()
createEngine: (log) ->
if log || log = @get('log')
if logElement = this.$('#log')
logElement.empty()
log.onClear =>
@teardownLog()
@createEngine()
@scroll = new Log.Scroll beforeScroll: =>
@unfoldHighlight()
@limit = new Log.Limit Log.LIMIT, =>
@set('limited', true)
@engine = Log.create(listeners: [@scroll, @limit])
@engine.limit = @limit
@logFolder = new LogFolder(@$('#log'))
@lineSelector = new LinesSelector(@$('#log'), @scroll, @logFolder)
@observeParts(log)
didUpdateAttrs: (changes) ->
@_super.apply(this, arguments)
return unless changes.oldAttrs
if changes.newAttrs.job.value && changes.oldAttrs.job.value &&
changes.newAttrs.job.value != changes.oldAttrs.job.value
@teardownLog(changes.oldAttrs.job.value.get('log'))
@createEngine(changes.newAttrs.job.value.get('log'))
unfoldHighlight: ->
@lineSelector.unfoldLines()
observeParts: (log) ->
if log || log = @get('log')
parts = log.get('parts')
parts.addArrayObserver(@, didChange: 'partsDidChange', willChange: 'noop')
parts = parts.slice(0)
@partsDidChange(parts, 0, null, parts.length)
partsDidChange: (parts, start, _, added) ->
console.log 'log view: parts did change' if Log.DEBUG
return unless @get('state') == 'inDOM'
for part, i in parts.slice(start, start + added)
# console.log "limit in log view: #{@get('limited')}"
break if @engine?.limit?.limited
@engine.set(part.number, part.content)
plainTextLogUrl: (->
if id = @get('log.job.id')
url = plainTextLogUrl(id)
if config.pro
url += "&access_token=#{@get('job.log.token')}"
url
).property('job.log.id', 'job.log.token')
hasPermission: (->
if permissions = @get('currentUser.permissions')
permissions.contains parseInt(@get('job.repo.id'))
).property('currentUser.permissions.length', 'job.repo.id')
canRemoveLog: (->
if job = @get('job')
job.get('canRemoveLog') && @get('hasPermission')
).property('job.canRemoveLog', 'hasPermission')
showToTop: (->
@get('log.hasContent') && @get('job.canRemoveLog')
).property('log.hasContent', 'job.canRemoveLog')
showTailing: Ember.computed.alias('showToTop')
actions:
toTop: () ->
Travis.tailing.stop()
$(window).scrollTop(0)
toggleTailing: ->
Travis.tailing.toggle()
@engine.autoCloseFold = !Travis.tailing.isActive()
event.preventDefault()
removeLogPopup: ->
if @get('canRemoveLog')
@get('popup').open('remove-log-popup')
return false
noop: -> # TODO required?
`export default LogContentComponent`

View File

@ -0,0 +1,238 @@
import Ember from 'ember';
import LinesSelector from 'travis/utils/lines-selector';
import LogFolder from 'travis/utils/log-folder';
import config from 'travis/config/environment';
import { plainTextLog as plainTextLogUrl } from 'travis/utils/urls';
Log.DEBUG = false;
Log.LIMIT = 10000;
Log.Scroll = function(options) {
options = options || {};
this.beforeScroll = options.beforeScroll;
return this;
};
Log.Scroll.prototype = $.extend(new Log.Listener(), {
insert: function(log, data, pos) {
if (this.numbers) {
this.tryScroll();
}
return true;
},
tryScroll: function() {
var element, ref;
if (element = $("#log p:visible.highlight:first")) {
if (this.beforeScroll) {
this.beforeScroll();
}
$('#main').scrollTop(0);
return $('html, body').scrollTop(((ref = element.offset()) != null ? ref.top : void 0) - (window.innerHeight / 3));
}
}
});
Log.Limit = function(max_lines, limitedLogCallback) {
this.max_lines = max_lines || 1000;
this.limitedLogCallback = limitedLogCallback || (function() {});
return this;
};
Log.Limit.prototype = Log.extend(new Log.Listener(), {
count: 0,
insert: function(log, node, pos) {
if (node.type === 'paragraph' && !node.hidden) {
this.count += 1;
if (this.limited) {
this.limitedLogCallback();
}
return this.count;
}
}
});
Object.defineProperty(Log.Limit.prototype, 'limited', {
get: function() {
return this.count >= this.max_lines;
}
});
export default Ember.Component.extend({
popup: Ember.inject.service(),
classNameBindings: ['logIsVisible:is-open'],
logIsVisible: false,
currentUserBinding: 'auth.currentUser',
didInsertElement() {
if (Log.DEBUG) {
console.log('log view: did insert');
}
this._super.apply(this, arguments);
Ember.run.scheduleOnce('afterRender', this, 'createEngine');
},
willDestroyElement() {
if (Log.DEBUG) {
console.log('log view: will destroy');
}
Ember.run.scheduleOnce('afterRender', this, 'teardownLog');
},
teardownLog(log) {
var parts, ref;
if (log || (log = this.get('log'))) {
parts = log.get('parts');
parts.removeArrayObserver(this, {
didChange: 'partsDidChange',
willChange: 'noop'
});
parts.destroy();
log.notifyPropertyChange('parts');
if ((ref = this.lineSelector) != null) {
ref.willDestroy();
}
this.clearLogElement();
}
},
clearLogElement() {
var logElement = this.$('#log');
if (logElement && logElement[0]) {
logElement[0].innerHTML = '';
}
},
createEngine(log) {
if (log || (log = this.get('log'))) {
this.clearLogElement();
log.onClear(() => {
this.teardownLog();
return this.createEngine();
});
this.scroll = new Log.Scroll({
beforeScroll: () => {
return this.unfoldHighlight();
}
});
this.limit = new Log.Limit(Log.LIMIT, () => {
return this.set('limited', true);
});
this.engine = Log.create({
listeners: [this.scroll, this.limit]
});
this.engine.limit = this.limit;
this.logFolder = new LogFolder(this.$('#log'));
this.lineSelector = new LinesSelector(this.$('#log'), this.scroll, this.logFolder);
this.observeParts(log);
}
},
didUpdateAttrs(changes) {
this._super.apply(this, arguments);
if (!changes.oldAttrs) {
return;
}
if (changes.newAttrs.job.value && changes.oldAttrs.job.value && changes.newAttrs.job.value !== changes.oldAttrs.job.value) {
this.teardownLog(changes.oldAttrs.job.value.get('log'));
return this.createEngine(changes.newAttrs.job.value.get('log'));
}
},
unfoldHighlight() {
return this.lineSelector.unfoldLines();
},
observeParts(log) {
var parts;
if (log || (log = this.get('log'))) {
parts = log.get('parts');
parts.addArrayObserver(this, {
didChange: 'partsDidChange',
willChange: 'noop'
});
parts = parts.slice(0);
this.partsDidChange(parts, 0, null, parts.length);
}
},
partsDidChange(parts, start, _, added) {
Ember.run.schedule('afterRender', this, function() {
var i, j, len, part, ref, ref1, ref2, results;
if (Log.DEBUG) {
console.log('log view: parts did change');
}
if (this.get('_state') !== 'inDOM') {
return;
}
ref = parts.slice(start, start + added);
results = [];
for (i = j = 0, len = ref.length; j < len; i = ++j) {
part = ref[i];
if ((ref1 = this.engine) != null ? (ref2 = ref1.limit) != null ? ref2.limited : void 0 : void 0) {
break;
}
results.push(this.engine.set(part.number, part.content));
}
return results;
});
},
plainTextLogUrl: function() {
var id, url;
if (id = this.get('log.job.id')) {
url = plainTextLogUrl(id);
if (config.pro) {
url += "&access_token=" + (this.get('job.log.token'));
}
return url;
}
}.property('job.log.id', 'job.log.token'),
hasPermission: function() {
var permissions;
if (permissions = this.get('currentUser.permissions')) {
return permissions.contains(parseInt(this.get('job.repo.id')));
}
}.property('currentUser.permissions.length', 'job.repo.id'),
canRemoveLog: function() {
var job;
if (job = this.get('job')) {
return job.get('canRemoveLog') && this.get('hasPermission');
}
}.property('job.canRemoveLog', 'hasPermission'),
showToTop: function() {
return this.get('log.hasContent') && this.get('job.canRemoveLog');
}.property('log.hasContent', 'job.canRemoveLog'),
showTailing: Ember.computed.alias('showToTop'),
actions: {
toTop() {
Travis.tailing.stop();
return $(window).scrollTop(0);
},
toggleTailing() {
Travis.tailing.toggle();
this.engine.autoCloseFold = !Travis.tailing.isActive();
return false;
},
removeLogPopup() {
if (this.get('canRemoveLog')) {
this.get('popup').open('remove-log-popup');
return false;
}
},
toggleLog() {
this.toggleProperty('logIsVisible');
}
},
// don't remove this, it's needed as an empty willChange callback
noop: function() {}
});

View File

@ -1,21 +0,0 @@
`import Ember from 'ember'`
`import Ajax from 'travis/utils/ajax'`
`import config from 'travis/config/environment'`
NoBuildsComponent = Ember.Component.extend
actions:
triggerBuild: () ->
@set('isLoading', true)
apiEndpoint = config.apiEndpoint
$.ajax(apiEndpoint + "/v3/repo/#{@get('repo.repo.id')}/requests", {
headers: {
Authorization: 'token ' + @get('repo.auth')
},
type: "POST"
}).then( =>
@set('isLoading', false)
# @transitionToRoute('repo')
);
`export default NoBuildsComponent`

View File

@ -0,0 +1,20 @@
import Ember from 'ember';
import config from 'travis/config/environment';
export default Ember.Component.extend({
actions: {
triggerBuild() {
var apiEndpoint;
this.set('isLoading', true);
apiEndpoint = config.apiEndpoint;
return $.ajax(apiEndpoint + ("/v3/repo/" + (this.get('repo.repo.id')) + "/requests"), {
headers: {
Authorization: 'token ' + this.get('repo.auth')
},
type: "POST"
}).then(() => {
return this.set('isLoading', false);
});
}
}
});

View File

@ -1,5 +0,0 @@
`import Ember from 'ember'`
NoReposComponent = Ember.Component.extend()
`export default NoReposComponent`

View File

@ -0,0 +1,3 @@
import Ember from 'ember';
export default Ember.Component.extend();

View File

@ -1,5 +0,0 @@
`import Ember from 'ember'`
NotActiveComponent = Ember.Component.extend()
`export default NotActiveComponent`

View File

@ -0,0 +1,3 @@
import Ember from 'ember';
export default Ember.Component.extend();

View File

@ -0,0 +1,28 @@
import Ember from 'ember';
export default Ember.Component.extend({
classNames: ['media', 'account'],
tagName: 'li',
classNameBindings: ['type', 'selected'],
typeBinding: 'account.type',
selectedBinding: 'account.selected',
tokenIsVisible: false,
name: function() {
return this.get('account.name') || this.get('account.login');
}.property('account'),
avatarUrl: function() {
return this.get('account.avatarUrl') || false;
}.property('account'),
isUser: function() {
return this.get('account.type') === 'user';
}.property('account'),
actions: {
tokenVisibility() {
return this.toggleProperty('tokenIsVisible');
}
}
});

View File

@ -1,10 +0,0 @@
`import Ember from 'ember'`
Component = Ember.Component.extend
actions: {
select: (org) ->
@sendAction('action', org)
}
`export default Component`

View File

@ -0,0 +1,17 @@
import Ember from 'ember';
export default Ember.Component.extend({
classNames: ['organisation-filter'],
actions: {
toggleOrgFilter() {
this.toggleProperty('showFilter');
return false;
},
select(org) {
this.toggleProperty('showFilter');
return this.sendAction('action', org);
}
}
});

View File

@ -1,29 +0,0 @@
`import Ember from 'ember'`
OwnerRepoTileComponent = Ember.Component.extend
tagName: 'li'
classNames: ['owner-tile']
classNameBindings: ['repo.default_branch.last_build.state']
ownerName: (->
@get('repo.slug').split(/\//)[0]
).property('repo.slug')
repoName: (->
@get('repo.slug').split(/\//)[1]
).property('repo.slug')
isAnimating: (->
state = @get('repo.default_branch.last_build.state')
animationStates = ['received', 'queued', 'started', 'booting']
unless animationStates.indexOf(state) == -1
true
).property('repo.default_branch.last_build.state')
`export default OwnerRepoTileComponent`

View File

@ -0,0 +1,24 @@
import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'li',
classNames: ['owner-tile', 'row-li'],
classNameBindings: ['repo.default_branch.last_build.state'],
ownerName: function() {
return this.get('repo.slug').split(/\//)[0];
}.property('repo.slug'),
repoName: function() {
return this.get('repo.slug').split(/\//)[1];
}.property('repo.slug'),
isAnimating: function() {
var animationStates, state;
state = this.get('repo.default_branch.last_build.state');
animationStates = ['received', 'queued', 'started', 'booting'];
if (animationStates.indexOf(state) !== -1) {
return true;
}
}.property('repo.default_branch.last_build.state')
});

View File

@ -1,6 +0,0 @@
`import Ember from 'ember'`
`import SyncButton from 'travis/components/sync-button'`
Component = SyncButton.extend()
`export default Component`

View File

@ -0,0 +1,4 @@
import Ember from 'ember';
import SyncButton from 'travis/components/sync-button';
export default SyncButton.extend();

View File

@ -0,0 +1,17 @@
import Ember from 'ember';
export default Ember.Component.extend({
popup: Ember.inject.service(),
classNames: ['application'],
click(event) {
var targetAndParents = $(event.target).parents().andSelf();
if (!(targetAndParents.hasClass('open-popup') || targetAndParents.hasClass('popup'))) {
this.get('popup').close();
}
if (!targetAndParents.hasClass('menu') && !targetAndParents.is('#tools > a')) {
$('.menu').removeClass('display');
}
}
});

View File

@ -0,0 +1,6 @@
import Ember from 'ember';
export default Ember.Component.extend({
classNames: ['profile-orglist', 'columns', 'medium-4'],
tagName: 'aside',
});

View File

@ -1,16 +0,0 @@
`import Ember from 'ember'`
`import config from 'travis/config/environment'`
QueuedJobsComponent = Ember.Component.extend
store: Ember.inject.service()
init: ->
@_super.apply this, arguments
if !Ember.testing
Visibility.every config.intervals.updateTimes, @updateTimes.bind(this)
updateTimes: ->
if jobs = @get('jobs')
jobs.forEach (job) -> job.updateTimes()
`export default QueuedJobsComponent`

View File

@ -0,0 +1,18 @@
import Ember from 'ember';
import config from 'travis/config/environment';
export default Ember.Component.extend({
store: Ember.inject.service(),
updateTimesService: Ember.inject.service('updateTimes'),
init() {
this._super.apply(this, arguments);
if (!Ember.testing) {
return Visibility.every(config.intervals.updateTimes, this.updateTimes.bind(this));
}
},
updateTimes() {
this.get('updateTimesService').push(this.get('jobs'));
}
});

View File

@ -1,23 +0,0 @@
`import Ember from 'ember'`
Component = Ember.Component.extend(
actions:
close: ->
$('.popup').removeClass('display')
return false
removeLog: ->
$('.popup').removeClass('display')
job = @get('job')
job.removeLog().then ->
Travis.flash(success: 'Log has been successfully removed.')
, (xhr) ->
if xhr.status == 409
Travis.flash(error: 'Log can\'t be removed')
else if xhr.status == 401
Travis.flash(error: 'You don\'t have sufficient access to remove the log')
else
Travis.flash(error: 'An error occured when removing the log')
)
`export default Component`

View File

@ -0,0 +1,27 @@
import Ember from 'ember';
export default Ember.Component.extend({
actions: {
close() {
$('.popup').removeClass('display');
return false;
},
removeLog() {
var job = this.get('job');
$('.popup').removeClass('display');
return job.removeLog().then(function() {
return Travis.flash({ success: 'Log has been successfully removed.' });
}, function(xhr) {
if (xhr.status === 409) {
return Travis.flash({ error: 'Log can\'t be removed' });
} else if (xhr.status === 401) {
return Travis.flash({ error: 'You don\'t have sufficient access to remove the log' });
} else {
return Travis.flash({ error: 'An error occured when removing the log' });
}
});
}
}
});

View File

@ -1,15 +0,0 @@
`import Ember from 'ember'`
RepoActionsComponent = Ember.Component.extend(
displayCodeClimate: (->
@get('repo.githubLanguage') == 'Ruby'
).property('repo.githubLanguage')
actions:
codeClimatePopup: ->
$('.popup').removeClass('display')
$('#code-climate').addClass('display')
return false
)
`export default RepoActionsComponent`

View File

@ -0,0 +1,7 @@
import Ember from 'ember';
export default Ember.Component.extend({
classNames: ['repo-main-tools']
});

View File

@ -1,54 +0,0 @@
`import Ember from 'ember'`
RepoShowTabsComponent = Ember.Component.extend
# hrm. how to parametrize bind-attr?
classCurrent: (->
'active' if @get('tab') == 'current'
).property('tab')
classBuilds: (->
'active' if @get('tab') == 'builds'
).property('tab')
classPullRequests: (->
'active' if @get('tab') == 'pull_requests'
).property('tab')
classBranches: (->
'active' if @get('tab') == 'branches'
).property('tab')
classEvents: (->
'active' if @get('tab') == 'events'
).property('tab')
classBuild: (->
tab = @get('tab')
classes = []
classes.push('active') if tab == 'build'
classes.push('display-inline') if tab == 'build' || tab == 'job'
classes.join(' ')
).property('tab')
# TODO: refactor tabs, most of the things here are not really DRY
classJob: (->
'active' if @get('tab') == 'job'
).property('tab')
classRequests: (->
'active' if @get('tab') == 'requests'
).property('tab')
classCaches: (->
'active' if @get('tab') == 'caches'
).property('tab')
classSettings: (->
'active' if @get('tab') == 'settings'
).property('tab')
classRequest: (->
'active' if @get('tab') == 'request'
).property('tab')
`export default RepoShowTabsComponent`

View File

@ -0,0 +1,74 @@
import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'nav',
classNames: ['tabnav'],
ariaRole: 'tablist',
classCurrent: function() {
if (this.get('tab') === 'current') {
return 'active';
}
}.property('tab'),
classBuilds: function() {
if (this.get('tab') === 'builds') {
return 'active';
}
}.property('tab'),
classPullRequests: function() {
if (this.get('tab') === 'pull_requests') {
return 'active';
}
}.property('tab'),
classBranches: function() {
if (this.get('tab') === 'branches') {
return 'active';
}
}.property('tab'),
classBuild: function() {
var classes, tab;
tab = this.get('tab');
classes = [];
if (tab === 'build') {
classes.push('active');
}
if (tab === 'build' || tab === 'job') {
classes.push('display-inline');
}
return classes.join(' ');
}.property('tab'),
classJob: function() {
if (this.get('tab') === 'job') {
return 'active';
}
}.property('tab'),
classRequests: function() {
if (this.get('tab') === 'requests') {
return 'active';
}
}.property('tab'),
classCaches: function() {
if (this.get('tab') === 'caches') {
return 'active';
}
}.property('tab'),
classSettings: function() {
if (this.get('tab') === 'settings') {
return 'active';
}
}.property('tab'),
classRequest: function() {
if (this.get('tab') === 'request') {
return 'active';
}
}.property('tab')
});

View File

@ -1,47 +0,0 @@
`import Ember from 'ember'`
`import config from 'travis/config/environment'`
RepoShowToolsComponent = Ember.Component.extend
popup: Ember.inject.service()
click: (event) ->
if $(event.target).is('a') && $(event.target).parents('.dropdown-menu').length
@closeMenu()
closeMenu: ->
$('.menu').removeClass('display')
actions:
menu: ->
@get('popup').close()
$('#tools .menu').toggleClass('display')
return false
hasPermission: (->
if permissions = @get('currentUser.permissions')
permissions.contains parseInt(@get('repo.id'))
).property('currentUser.permissions.length', 'repo.id')
hasPushPermission: (->
if permissions = @get('currentUser.pushPermissions')
permissions.contains parseInt(@get('repo.id'))
).property('currentUser.pushPermissions.length', 'repo.id')
hasAdminPermission: (->
if permissions = @get('currentUser.adminPermissions')
permissions.contains parseInt(@get('repo.id'))
).property('currentUser.adminPermissions.length', 'repo.id')
displaySettingsLink: (->
@get('hasPushPermission')
).property('hasPushPermission')
displayCachesLink: (->
@get('hasPushPermission') && config.endpoints.caches
).property('hasPushPermission')
displayStatusImages: (->
@get('hasPermission')
).property('hasPermission')
`export default RepoShowToolsComponent`

View File

@ -0,0 +1,38 @@
import Ember from 'ember';
import config from 'travis/config/environment';
import { hasPermission, hasPushPermission } from 'travis/utils/permission';
export default Ember.Component.extend({
popup: Ember.inject.service(),
classNames: ['option-button'],
classNameBindings: ['isOpen:display'],
isOpen: false,
click(event) {
if ($(event.target).is('a') && $(event.target).parents('.settings-dropdown').length) {
return this.closeMenu();
}
},
closeMenu() {
return this.toggleProperty('isOpen');
},
actions: {
menu() {
return this.toggleProperty('isOpen');
}
},
displaySettingsLink: function() {
return hasPushPermission(this.get('currentUser'), this.get('repo.id'));
}.property('currentUser.pushPermissions.length', 'repo'),
displayCachesLink: function() {
return hasPushPermission(this.get('currentUser'), this.get('repo.id')) && config.endpoints.caches;
}.property('currentUser.pushPermissions.length', 'repo'),
displayStatusImages: function() {
return hasPermission(this.get('currentUser'), this.get('repo.id'));
}.property('currentUser.permissions.length', 'repo.id')
});

View File

@ -0,0 +1,7 @@
import Polling from 'travis/mixins/polling';
import Ember from 'ember';
export default Ember.Component.extend(Polling, {
pollModels: 'repo',
classNameBindings: ['isLoading:loading']
});

View File

@ -1,5 +0,0 @@
`import Ember from 'ember'`
ReposEmptyComponent = Ember.Component.extend()
`export default ReposEmptyComponent`

View File

@ -0,0 +1,3 @@
import Ember from 'ember';
export default Ember.Component.extend();

View File

@ -1,31 +0,0 @@
`import Ember from 'ember'`
`import Polling from 'travis/mixins/polling'`
`import { colorForState } from 'travis/utils/helpers'`
ReposListItemComponent = Ember.Component.extend Polling,
routing: Ember.inject.service('-routing')
tagName: 'li'
pollModels: 'repo'
classNames: ['repo']
classNameBindings: ['color', 'selected']
selected: (->
@get('repo') == @get('selectedRepo')
).property('selectedRepo')
color: (->
colorForState(@get('repo.lastBuildState'))
).property('repo.lastBuildState')
scrollTop: (->
if (window.scrollY > 0)
$('html, body').animate({scrollTop: 0}, 200)
)
click: ->
@scrollTop()
@get('routing').transitionTo('repo', @get('repo.slug').split('/'))
`export default ReposListItemComponent`

View File

@ -0,0 +1,27 @@
import Ember from 'ember';
import Polling from 'travis/mixins/polling';
import { colorForState } from 'travis/utils/helpers';
export default Ember.Component.extend(Polling, {
routing: Ember.inject.service('-routing'),
tagName: 'li',
pollModels: 'repo',
classNames: ['repo'],
classNameBindings: ['selected'],
selected: function() {
return this.get('repo') === this.get('selectedRepo');
}.property('selectedRepo'),
color: function() {
return colorForState(this.get('repo.lastBuildState'));
}.property('repo.lastBuildState'),
scrollTop: function() {
if (window.scrollY > 0) {
return $('html, body').animate({
scrollTop: 0
}, 200);
}
}
});

View File

@ -0,0 +1,48 @@
import Ember from 'ember';
export default Ember.Component.extend({
auth: Ember.inject.service(),
currentUserBinding: 'auth.currentUser',
classRecent: function() {
if (this.get('tab') === 'recent') {
return 'active';
} else if (this.get('tab') === 'search' && this.get('auth.signedIn')) {
return 'hidden';
}
}.property('tab'),
classRunning: function() {
var classes;
classes = [];
if (this.get('tab') === 'running') {
classes.push('active');
}
return classes.join(' ');
}.property('tab'),
classOwned: function() {
var classes;
classes = [];
if (this.get('tab') === 'owned') {
classes.push('active');
}
if (this.get('currentUser')) {
classes.push('display-inline');
}
return classes.join(' ');
}.property('tab', 'currentUser'),
classSearch: function() {
if (this.get('tab') === 'search') {
return 'active';
}
}.property('tab'),
classNew: function() {
if (this.get('currentUser')) {
return 'display-inline';
}
}.property('currentUser')
});

View File

@ -1,6 +0,0 @@
`import Ember from 'ember'`
ReposListComponent = Ember.Component.extend
tagName: 'ul'
`export default ReposListComponent`

View File

@ -0,0 +1,7 @@
import Ember from 'ember';
var ReposListComponent = Ember.Component.extend({
tagName: 'ul'
});
export default ReposListComponent;

View File

@ -0,0 +1,25 @@
import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'span',
classNames: ['request-icon', 'icon'],
classNameBindings: ['event', 'state'],
isPush: function() {
return this.get('event') === 'push';
}.property('event'),
isPR: function() {
return this.get('event') === 'pull_request';
}.property('event'),
isAPI: function() {
return this.get('event') === 'api';
}.property('event'),
isEmpty: function() {
if (this.get('event') === null || this.get('event') === null) {
return true;
}
}.property('event')
});

View File

@ -1,41 +0,0 @@
`import Ember from 'ember'`
`import config from 'travis/config/environment'`
RequestsItemComponent = Ember.Component.extend
classNames: ['tile', 'tile--jobs', 'row']
classNameBindings: ['requestClass']
tagName: 'li'
requestClass: (->
if @get('request.isAccepted')
'accepted'
else
'rejected'
).property('content.isAccepted')
type: (->
if @get('request.isPullRequest')
'pull_request'
else
'push'
).property('request.isPullRequest')
status: (->
if @get('request.isAccepted')
'Accepted'
else
'Rejected'
).property('request.isAccepted')
message: (->
message = @get('request.message')
if config.pro && message == "private repository"
''
else if !message
'Build created successfully '
else
message
).property('request.message')
`export default RequestsItemComponent`

View File

@ -0,0 +1,57 @@
import Ember from 'ember';
import config from 'travis/config/environment';
export default Ember.Component.extend({
classNames: ['request-item'],
classNameBindings: ['requestClass'],
tagName: 'li',
isGHPages: function() {
var message = this.get('request.message');
if (message === 'github pages branch') {
return true;
} else {
return false;
}
}.property('request.message'),
requestClass: function() {
if (this.get('request.isAccepted')) {
return 'accepted';
} else {
return 'rejected';
}
}.property('content.isAccepted'),
type: function() {
if (this.get('request.isPullRequest')) {
return 'pull_request';
} else {
return 'push';
}
}.property('request.isPullRequest'),
status: function() {
if (this.get('request.isAccepted')) {
return 'Accepted';
} else {
return 'Rejected';
}
}.property('request.isAccepted'),
hasBranchName: function() {
return this.get('request.branchName');
}.property('request'),
message: function() {
var message;
message = this.get('request.message');
if (config.pro && message === "private repository") {
return '';
} else if (!message) {
return 'Build created successfully ';
} else {
return message;
}
}.property('request.message')
});

View File

@ -1,8 +0,0 @@
`import Ember from 'ember'`
`import Polling from 'travis/mixins/polling'`
RunningJobsItemComponent = Ember.Component.extend(Polling,
pollModels: 'job'
)
`export default RunningJobsItemComponent`

View File

@ -0,0 +1,6 @@
import Ember from 'ember';
import Polling from 'travis/mixins/polling';
export default Ember.Component.extend(Polling, {
pollModels: 'job'
});

Some files were not shown because too many files have changed in this diff Show More