Merge pull request #449 from travis-ci/enterprise-ui-fixes

Enterprise ui fixes
This commit is contained in:
Lisa P 2016-02-04 12:29:57 +01:00
commit 4347c1efe4
7 changed files with 104 additions and 87 deletions

View File

@ -1,4 +1,5 @@
import TravisRoute from 'travis/routes/basic';
import config from 'travis/config/environment';
export default TravisRoute.extend({
needsAuth: false

View File

@ -1,26 +1,19 @@
{{#if allHooks.isLoaded}}
<header>
{{#if config.billingEndpoint}}
<div class="cta-btn">
{{#if subscribeButtonInfo.subscribed}}
<a class="btn btn-activated" href={{billingUrl}}>
Subscription active!
</a>
{{else}}
{{#if subscribeButtonInfo.education}}
<a class="btn btn-activated" href={{billingUrl}}>
Educational account!
</a>
{{else}}
<a class="btn btn-activate" href={{billingUrl}}>
Sign up this account!
</a>
{{/if}}
{{#if config.billingEndpoint}}
<div class="cta-btn">
{{#if subscribeButtonInfo.subscribed}}
<a class="btn btn-activated" href={{billingUrl}}>Subscription active!</a>
{{else}}
{{#if subscribeButtonInfo.education}}
<a class="btn btn-activated" href={{billingUrl}}>Educational account!</a>
{{else}}
<a class="btn btn-activate" href={{billingUrl}}> Sign up this account!</a>
{{/if}}
{{/if}}
</div>
{{/if}}
</div>
{{/if}}
<div class="profile-header">
<h1>{{accountName}}</h1>
@ -29,15 +22,17 @@
{{sync-button user=auth.currentUser}}
{{#if user.isSyncing}}
{{#if config.pro}}
<p>We're only showing your private repositories. You can find your public projects on <a href="https://travis-ci.org" title="travis-ci.org">travis-ci.org</a>.</p>
{{#unless config.enterprise}}
{{#if config.pro}}
<p>We're only showing your private repositories. You can find your public projects on <a href="https://travis-ci.org" title="travis-ci.org">travis-ci.org</a>.</p>
{{else}}
<p>We're only showing your public repositories. You can find your private projects on <a href="https://travis-ci.com" title="travis-ci.com">travis-ci.com</a>.</p>
{{/if}}
<p>We're only showing your public repositories. You can find your private projects on <a href="https://travis-ci.com" title="travis-ci.com">travis-ci.com</a>.</p>
{{/if}}
{{/unless}}
{{/if}}
</header>
<section class="profile-getstarted">
{{!-- <a href="#" class="dismiss"><span class="icon icon--dismiss-grey"></span></a> --}}
<ol class="row">

View File

@ -2,27 +2,29 @@
<section id="log-container" class="log">
{{#if auth.signedIn}}
{{#if job.isLegacyInfrastructure}}
{{#if job.isFinished}}
<p class="notice"><span class="icon-flag"></span>
<span class="label-align">This job ran on our legacy infrastructure. Please read <a href="http://docs.travis-ci.com/user/migrating-from-legacy/?utm_source=legacy-notice&utm_medium=banner&utm_campaign=legacy-upgrade" title="Migrating from legacy">our docs on how to upgrade</a>.</span></p>
{{else}}
<p class="notice"><span class="icon-flag"></span>
<span class="label-align">This job is running on our legacy infrastructure. Please read <a href="http://docs.travis-ci.com/user/migrating-from-legacy/?utm_source=legacy-notice&utm_medium=banner&utm_campaign=legacy-upgrade" title="Migrating from legacy">our docs on how to upgrade</a>.</span></p>
{{#unless config.enterprise}}
{{#if auth.signedIn}}
{{#if job.isLegacyInfrastructure}}
{{#if job.isFinished}}
<p class="notice"><span class="icon-flag"></span>
<span class="label-align">This job ran on our legacy infrastructure. Please read <a href="http://docs.travis-ci.com/user/migrating-from-legacy/?utm_source=legacy-notice&utm_medium=banner&utm_campaign=legacy-upgrade" title="Migrating from legacy">our docs on how to upgrade</a>.</span></p>
{{else}}
<p class="notice"><span class="icon-flag"></span>
<span class="label-align">This job is running on our legacy infrastructure. Please read <a href="http://docs.travis-ci.com/user/migrating-from-legacy/?utm_source=legacy-notice&utm_medium=banner&utm_campaign=legacy-upgrade" title="Migrating from legacy">our docs on how to upgrade</a>.</span></p>
{{/if}}
{{/if}}
{{/if}}
{{#if job.displayGceNotice}}
{{#if job.isFinished}}
<p class="notice--blue"><span class="icon-flag"></span>
<span class="label-align">This job ran on our new platform for Precise builds. Please read <a href="https://blog.travis-ci.com/2015-11-27-moving-to-a-more-elastic-future" title="Blog post on infrastructure migration">our blog post for more information</a>.</span></p>
{{else}}
<p class="notice--blue"><span class="icon-flag"></span>
<span class="label-align">This job is running on our new platform for Legacy Precise builds. Please read <a href="https://blog.travis-ci.com/2015-11-27-moving-to-a-more-elastic-future" title="Blog post on infrastructure migration">our blog post for more information</a>.</span></p>
{{#if job.displayGceNotice}}
{{#if job.isFinished}}
<p class="notice--blue"><span class="icon-flag"></span>
<span class="label-align">This job ran on our new platform for Precise builds. Please read <a href="https://blog.travis-ci.com/2015-11-27-moving-to-a-more-elastic-future" title="Blog post on infrastructure migration">our blog post for more information</a>.</span></p>
{{else}}
<p class="notice--blue"><span class="icon-flag"></span>
<span class="label-align">This job is running on our new platform for Legacy Precise builds. Please read <a href="https://blog.travis-ci.com/2015-11-27-moving-to-a-more-elastic-future" title="Blog post on infrastructure migration">our blog post for more information</a>.</span></p>
{{/if}}
{{/if}}
{{/if}}
{{/if}}
{{/unless}}
{{#if job.notStarted}}
<div class="log-notice">Hang tight, the log cannot be shown until the build has started.</div>

View File

@ -3,32 +3,40 @@
<div class="footer-elem">
<img src="/images/ui/footer-logo.svg">
</div>
<div class="footer-elem">
<h3>&copy;Travis CI, GmbH</h3>
<p>Rigaer Straße 8<br>10247 Berlin, Germany <br>
<a href="https://docs.travis-ci.com/imprint.html">Imprint</a></p>
</div>
{{#unless config.enterprise}}
<div class="footer-elem">
<h3>&copy;Travis CI, GmbH</h3>
<p>Rigaer Straße 8<br>10247 Berlin, Germany <br>
<a href="https://docs.travis-ci.com/imprint.html">Imprint</a></p>
</div>
{{/unless}}
<div class="footer-elem">
<h3>Help</h3>
<ul>
<li><a href="https://docs.travis-ci.com">Documentation</a></li>
<li><a href="https://blog.travis-ci.com/">Blog</a></li>
<li><a href="mailto:support@travis-ci.com">Email</a></li>
<li><a href="https://twitter.com/travisci">Twitter</a></li>
{{#unless config.enterprise}}
<li><a href="https://blog.travis-ci.com/">Blog</a></li>
<li><a href="mailto:support@travis-ci.com">Email</a></li>
<li><a href="https://twitter.com/travisci">Twitter</a></li>
{{/unless}}
</ul>
</div>
{{#if config.pro}}
{{#unless config.enterprise}}
{{#if config.pro}}
<div class="footer-elem">
<h3>Legal</h3>
<ul>
<li><a href="https://docs.travis-ci.com/imprint.html">Imprint</a></li>
<li><a href="https://billing.travis-ci.com/pages/terms">Terms of Service</a></li>
<li><a href="https://billing.travis-ci.com/pages/security">Security Statement</a></li>
</ul>
</div>
{{/if}}
<div class="footer-elem">
<h3>Legal</h3>
<ul>
<li><a href="https://docs.travis-ci.com/imprint.html">Imprint</a></li>
<li><a href="https://billing.travis-ci.com/pages/terms">Terms of Service</a></li>
<li><a href="https://billing.travis-ci.com/pages/security">Security Statement</a></li>
</ul>
{{travis-status}}
</div>
{{/if}}
<div class="footer-elem">
{{travis-status}}
</div>
{{/unless}}
</div>
</footer>

View File

@ -5,32 +5,36 @@
<button type="button" id="tofuburger" class="tofuburger" {{action 'toggleBurgerMenu'}}>Toggle Menu</button>
</div>
{{#if auth.signedIn}}
{{#unless config.enterprise}}
{{#if auth.signedIn}}
{{broadcast-tower toggleBroadcasts="toggleBroadcasts" status=broadcasts.lastBroadcastStatus}}
{{broadcast-tower toggleBroadcasts="toggleBroadcasts" status=broadcasts.lastBroadcastStatus}}
<ul class="broadcasts {{if showBroadcasts 'is-open'}}">
{{#each broadcasts.content as |broadcast|}}
<li><p><span class="broadcast-status {{broadcast.category}}" title="Transmitted on {{broadcast.updated_at}}"></span> {{{broadcast.message}}} <a {{action 'markBroadcastAsSeen' broadcast}} class="icon-close"></a></p></li>
{{else}}
<li><p>There are no broadcasts transmitted</p></li>
{{/each}}
</ul>
{{/if}}
<ul class="broadcasts {{if showBroadcasts 'is-open'}}">
{{#each broadcasts.content as |broadcast|}}
<li><p><span class="broadcast-status {{broadcast.category}}" title="Transmitted on {{broadcast.updated_at}}"></span> {{{broadcast.message}}} <a {{action 'markBroadcastAsSeen' broadcast}} class="icon-close"></a></p></li>
{{else}}
<li><p>There are no broadcasts transmitted</p></li>
{{/each}}
</ul>
{{/if}}
{{/unless}}
<nav id="navigation" class="navigation {{if is-open 'is-open'}}">
<ul>
{{#unless config.pro}}
<li><a href="https://blog.travis-ci.com" title="Travis CI Blog" class="navigation-anchor">Blog</a></li>
<li><a href="https://www.traviscistatus.com/" title="Travis CI Status" class="navigation-anchor">Status</a></li>
<li>
<span class="navigation-anchor">Help</span>
<ul class="navigation-nested">
<li><a href="https://docs.travis-ci.com">Docs</a></li>
<li><a href="https://docs.travis-ci.com/imprint.html" alt="Imprint">Imprint</a></li>
</ul>
</li>
{{/unless}}
{{#unless config.enterprise}}
{{#unless config.pro}}
<li><a href="https://blog.travis-ci.com" title="Travis CI Blog" class="navigation-anchor">Blog</a></li>
<li><a href="https://www.traviscistatus.com/" title="Travis CI Status" class="navigation-anchor">Status</a></li>
<li>
<span class="navigation-anchor">Help</span>
<ul class="navigation-nested">
<li><a href="https://docs.travis-ci.com">Docs</a></li>
<li><a href="https://docs.travis-ci.com/imprint.html" alt="Imprint">Imprint</a></li>
</ul>
</li>
{{/unless}}
{{#if config.pro}}
{{#unless auth.signedIn}}
@ -50,6 +54,11 @@
</li>
{{/unless}}
{{/if}}
{{else}}
{{#if auth.signedIn}}
<li><a class="navigation-anchor" title="Documentation" href="https://docs.travis-ci.com">Docs</a></li>
{{/if}}
{{/unless}}
<li class="{{classProfile}}">
{{#if auth.signedOut}}
@ -70,9 +79,11 @@
{{#link-to "profile" class="signed-in"}}Accounts{{/link-to}}
</li>
{{#if config.billingEndpoint}}
<li>
<a href={{config.billingEndpoint}}>Billing</a>
</li>
{{#unless config.enterprise}}
<li>
<a href={{config.billingEndpoint}}>Billing</a>
</li>
{{/unless}}
{{/if}}
<li>
<a href="/" {{action "signOut" target="auth"}}>Sign Out</a>

View File

@ -19,7 +19,7 @@ export default Ember.HistoryLocation.extend({
getURL: function() {
var url;
url = this._super.apply(this, arguments);
if (location.pathname === '/') {
if (location.pathname === '/' && !config.enterprise) {
if (this.get('auth.signedIn')) {
return '/repositories';
} else {
@ -34,7 +34,7 @@ export default Ember.HistoryLocation.extend({
},
formatURL: function(logicalPath) {
if (logicalPath === '/repositories' || logicalPath === '/home' || logicalPath === '/home-pro') {
if (!config.enterprise && (logicalPath === '/repositories' || logicalPath === '/home' || logicalPath === '/home-pro')) {
return '/';
} else {
return this._super(...arguments);

View File

@ -37,7 +37,7 @@ module.exports = function(environment) {
};
if (typeof process !== 'undefined') {
if (process.env.TRAVIS_PRO) {
if (process.env.TRAVIS_PRO && !process.env.TRAVIS_ENTERPRISE) {
// set defaults for pro if it's used
// TODO: we have the same defaults also in ruby process,
// it would be nice to move it to one place. In theory