forked from cloudfoundry/stratos
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suse Customizations #3
Merged
Merged
Changes from 27 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
9e7ce09
Merge remote-tracking branch 'upstream/eula' into suse
nwmac 8eabaef
SUSE Theme
nwmac 7535278
Login component
nwmac 8b731ed
WIP SUSE login page
nwmac e7da465
Add missing file
nwmac 4f07c49
SUSE Theme and customizations
nwmac 4c12644
Merge branch 'upstream/customizations' into suse
nwmac 2be3b13
Merge remote-tracking branch 'upstream/eula' into suse
nwmac 3974404
Merge branch 'v2-master' into suse
nwmac 4ebcfd4
Merge remote-tracking branch 'upstream/v2-master' into suse
nwmac 19e83da
Merge remote-tracking branch 'upstream/v2-master' into suse
nwmac 9498e94
Fix issues with merge of Angular 6
nwmac 1ebc2ab
Merge remote-tracking branch 'origin/v2-master' into suse
nwmac f09ff5a
Remove console.log
richard-cox 81e6735
Fix loading indicator & hide 'Sign in' when busy
richard-cox File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { SuseModule } from './custom/suse.module'; | ||
|
||
@NgModule({ | ||
imports: [ | ||
SuseModule, | ||
] | ||
}) | ||
export class CustomModule { } |
39 changes: 39 additions & 0 deletions
39
custom-src/frontend/app/custom/suse-login/suse-login.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<div class="suse-login"> | ||
<div class="suse-login__header"> | ||
<div class="suse-login__title">SUSE Stratos</div> | ||
</div> | ||
<div class="suse-login__content"> | ||
<div class="suse-login__intro"> | ||
<h1 class="suse-login__headline">SUSE Stratos<br>Cloud Foundry<br>Console</h1> | ||
<p class="suse-login__tagline">Use SUSE Stratos to develop, compose, and manage Cloud Foundry workloads.</p> | ||
</div> | ||
<div class="suse-login__box suse-login__busy" [ngClass]="{'suse-login__busy': busy$ | async }"> | ||
<div class="suse-login__form-title">Sign in</div> | ||
<div class="suse-login__form-outer"> | ||
<form class="suse-login__form" name="loginForm" (ngSubmit)="login()" #loginForm="ngForm"> | ||
<mat-form-field> | ||
<input matInput required [(ngModel)]="username" name="username" placeholder="Username"> | ||
</mat-form-field> | ||
<mat-form-field> | ||
<input matInput required type="password" [(ngModel)]="password" name="password" placeholder="Password"> | ||
</mat-form-field> | ||
<button class="suse-login__submit" color="primary" *ngIf="!loggedIn" type="submit" mat-button mat-raised-button [disabled]="!loginForm.valid">Login</button> | ||
</form> | ||
</div> | ||
<div class="suse-login__loading"> | ||
<mat-progress-bar mode="query"></mat-progress-bar> | ||
</div> | ||
<div class="suse-login__message" [ngClass]="{'suse-login__message--show': !!message, 'suse-login__message-error': this.error}"> | ||
{{ message }} | ||
</div> | ||
</div> | ||
</div> | ||
<div class="suse-login__footer"> | ||
<div class="suse-login__copyright"> | ||
<span *ngIf="config.copyright" [innerHTML]="config.copyright"></span> | ||
</div> | ||
<div class="suse-login__logo"> | ||
<a href="https://www.suse.com" target="_blank"><img src="/assets/custom/suse_logo.png"></a> | ||
</div> | ||
</div> | ||
</div> |
144 changes: 144 additions & 0 deletions
144
custom-src/frontend/app/custom/suse-login/suse-login.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
@import '../../../sass/custom/suse-colors'; | ||
|
||
.suse-login { | ||
align-items: center; | ||
background-color: $suse-blue; | ||
border-bottom: 10px solid $suse-primary; | ||
display: flex; | ||
flex-direction: column; | ||
width: 100%; | ||
height: 100%; | ||
|
||
&__header, &__content, &__footer { | ||
align-items: center; | ||
display: flex; | ||
flex-direction: row; | ||
} | ||
&__header { | ||
background-color: $suse-secondary; | ||
color: $suse-text; | ||
flex: 0 0 60px; | ||
font-size: 24px; | ||
font-weight: 500; | ||
justify-content: center; | ||
width: 100%; | ||
} | ||
&__content { | ||
align-items: flex-start; | ||
color: $suse-text; | ||
flex: 1; | ||
margin-top: 100px; | ||
overflow-y: auto; | ||
width: 90%; | ||
} | ||
&__footer { | ||
flex: 0 0 auto; | ||
width: 90%; | ||
padding: 20px 0; | ||
} | ||
&__title { | ||
width: 90%; | ||
} | ||
&__copyright { | ||
color: $suse-text-gray; | ||
flex: 1; | ||
} | ||
&__logo { | ||
img { | ||
width: 79px; | ||
} | ||
} | ||
&__intro { | ||
flex: 1; | ||
margin-right: 24px; | ||
} | ||
&__box { | ||
display: flex; | ||
flex: 1; | ||
flex-direction: column; | ||
justify-content: center; | ||
margin-left: 24px; | ||
height: 260px; | ||
} | ||
&__form { | ||
display: flex; | ||
flex-direction: column; | ||
.mat-form-field:not(.mat-form-field-invalid) { | ||
.mat-input-placeholder { | ||
color: $suse-text-gray; | ||
} | ||
.mat-form-field-underline { | ||
background-color: $suse-text-gray; | ||
} | ||
} | ||
} | ||
&__submit.mat-raised-button { | ||
&.mat-primary[disabled] { | ||
color: $suse-button-gray; | ||
} | ||
margin-top: 24px; | ||
} | ||
&__headline { | ||
color: $suse-primary; | ||
font-size: 52px; | ||
font-weight: 300; | ||
margin: 0; | ||
} | ||
&__tagline { | ||
color: $suse-text-gray; | ||
font-size: 18px; | ||
font-weight: 300; | ||
line-height: 1.5; | ||
margin: 24px 0; | ||
} | ||
&__form-outer { | ||
$cubic: cubic-bezier(.215, .61, .355, 1); | ||
$time: 250ms; | ||
height: 200px; | ||
max-width: 400px; | ||
opacity: 1; | ||
transition: height $time $cubic 100ms, opacity $time * 2 $cubic $time + 50ms; | ||
} | ||
&__form-title { | ||
color: $suse-text; | ||
font-size: 30px; | ||
font-weight: 300; | ||
margin-bottom: 24px; | ||
} | ||
&__loading { | ||
display: none; | ||
} | ||
&__busy { | ||
.suse-login__form { | ||
display: none; | ||
} | ||
.suse-login__form-outer { | ||
height: 0; | ||
opacity: 0; | ||
} | ||
.suse-login__loading { | ||
display: block; | ||
} | ||
} | ||
&__message { | ||
font-size: 18px; | ||
font-weight: 300; | ||
height: 20px; | ||
padding-top: 20px; | ||
} | ||
} | ||
|
||
@media(max-width: 768px) { | ||
.suse-login { | ||
&__intro { | ||
display: none; | ||
} | ||
&__box { | ||
margin: 0; | ||
} | ||
&__content { | ||
max-width: 400px; | ||
width: 80%; | ||
} | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
custom-src/frontend/app/custom/suse-login/suse-login.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { SuseLoginComponent } from './suse-login.component'; | ||
|
||
describe('SuseLoginComponent', () => { | ||
let component: SuseLoginComponent; | ||
let fixture: ComponentFixture<SuseLoginComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ SuseLoginComponent ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(SuseLoginComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
23 changes: 23 additions & 0 deletions
23
custom-src/frontend/app/custom/suse-login/suse-login.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { Component, Inject, ViewEncapsulation } from '@angular/core'; | ||
import { Router } from '@angular/router'; | ||
import { Store } from '@ngrx/store'; | ||
import { Customizations, CustomizationsMetadata } from '../../core/customizations.types'; | ||
import { LoginPageComponent } from '../../features/login/login-page/login-page.component'; | ||
import { AppState } from '../../store/app-state'; | ||
|
||
@Component({ | ||
selector: 'app-suse-login', | ||
templateUrl: './suse-login.component.html', | ||
styleUrls: ['./suse-login.component.scss'], | ||
encapsulation: ViewEncapsulation.None | ||
}) | ||
export class SuseLoginComponent extends LoginPageComponent { | ||
|
||
constructor( | ||
store: Store<AppState>, | ||
router: Router, | ||
@Inject(Customizations) public config: CustomizationsMetadata | ||
) { | ||
super(store, router); | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This bar looked super long when the window was full screen