introduced layout of manager page

This commit is contained in:
fabio.formosa
2018-02-16 01:12:35 +01:00
parent 0b4dc4a1de
commit f88bd50768
25 changed files with 450 additions and 22 deletions

View File

@@ -141,6 +141,11 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
</dependency>
</dependencies>

View File

@@ -43,7 +43,7 @@ public class SchedulerConfig {
factoryBean.setRepeatInterval(pollFrequencyMs);
factoryBean.setRepeatCount(repeatCount);
factoryBean
.setMisfireInstruction(SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_EXISTING_COUNT);// in case of misfire, ignore all missed triggers and continue
.setMisfireInstruction(SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_EXISTING_COUNT);// in case of misfire, ignore all missed triggers and continue
return factoryBean;
}

View File

@@ -1,20 +0,0 @@
server.context-path=/quartz-manager
server.port=8080
server.session.timeout=28800
spring.thymeleaf.cache=false
spring.thymeleaf.mode=LEGACYHTML5
quartz.enabled=true
job.frequency=4000
job.repeatCount=19
logging.level.org.springframework.web=WARN
logging.level.it.fabioformosa=INFO
app.name: quartz-manager
jwt.header: Authorization
jwt.expires_in: 600
jwt.secret: queenvictoria
jwt.cookie: AUTH-TOKEN

View File

@@ -0,0 +1,30 @@
server:
context-path: /quartz-manager
port: 8080
session.timeout : 28800
spring:
thymeleaf:
cache: false
mode: LEGACYHTML5
quartz:
enabled: true
job:
frequency: 4000
repeatCount: 19
logging:
level:
org.springframework.web: WARN
it.fabioformosa: INFO
app:
name: quartz-manager
jwt:
header: Authorization
expires_in: 600 # 10 minutes
secret: queenvictoria
cookie: AUTH-TOKEN

View File

@@ -10,6 +10,8 @@ import { NotFoundComponent } from './not-found';
import { ChangePasswordComponent } from './change-password';
import { ForbiddenComponent } from './forbidden';
import { SignupComponent } from './signup';
import { ManagerComponent } from './manager';
export const routes: Routes = [
{
@@ -17,6 +19,12 @@ export const routes: Routes = [
component: HomeComponent,
pathMatch: 'full'
},
{
path: 'manager',
component: ManagerComponent,
canActivate: [AdminGuard],
pathMatch: 'full'
},
{
path:'signup',
component: SignupComponent,

View File

@@ -3,6 +3,7 @@ import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { RouterTestingModule } from '@angular/router/testing';
import { AppComponent } from './app.component';
import { HomeComponent } from './home';
import { ManagerComponent } from './manager';
import { LoginComponent } from './login';
import { MockApiService } from './service/mocks/api.service.mock';

View File

@@ -20,15 +20,20 @@ import { FlexLayoutModule } from '@angular/flex-layout';
import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routing.module';
import { HomeComponent } from './home';
import { ManagerComponent } from './manager';
import { LoginComponent } from './login';
import { LoginGuard, GuestGuard, AdminGuard } from './guard';
import { NotFoundComponent } from './not-found';
import { AccountMenuComponent } from './component/header/account-menu/account-menu.component';
import {
HeaderComponent,
ApiCardComponent,
FooterComponent,
GithubComponent
GithubComponent,
SchedulerConfigComponent,
LogsPanelComponent,
ProgressPanelComponent
} from './component';
import {
@@ -54,10 +59,14 @@ export function initUserFactory(userService: UserService) {
FooterComponent,
ApiCardComponent,
HomeComponent,
ManagerComponent,
GithubComponent,
LoginComponent,
NotFoundComponent,
AccountMenuComponent,
SchedulerConfigComponent,
LogsPanelComponent,
ProgressPanelComponent,
ChangePasswordComponent,
ForbiddenComponent,
AdminComponent,

View File

@@ -2,3 +2,6 @@ export * from './header';
export * from './github';
export * from './footer';
export * from './api-card';
export * from './logs-panel';
export * from './scheduler-config';
export * from './progress-panel';

View File

@@ -0,0 +1 @@
export * from './logs-panel.component';

View File

@@ -0,0 +1 @@
LOGS PANEL HERE!!!

View File

@@ -0,0 +1,63 @@
:host {
text-align: center;
max-width: 350px;
}
mat-card {
text-align: left;
.response-success {
background-color: #dff0d8;
border-color: #d6e9c6;
color: #3c763d;
}
.response-error {
background-color: #f2dede;
border-color: #ebccd1;
color: #a94442;
}
.response {
max-height: 0;
transition: max-height 1s;
margin-left: -16px;
margin-right: -16px;
border-radius: 4px;
overflow: hidden;
margin-bottom: -16px;
padding-bottom: 0;
}
.expand {
padding: 15px;
border: 1px solid transparent;
max-height: 999px;
margin-top: 8px;
}
mat-card-actions {
margin-bottom: 0;
padding-bottom: 0;
}
pre {
display: block;
padding: 9.5px;
margin: 0 0 10px;
font-size: 13px;
line-height: 1.42857143;
color: #333;
word-break: break-all;
word-wrap: break-word;
white-space: pre-wrap;
background-color: #f5f5f5;
border: 1px solid #ccc;
border-radius: 4px;
}
}
@media screen and (max-width: 599px) {
:host {
max-width: 999px;
}
}

View File

@@ -0,0 +1,16 @@
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
@Component({
selector: 'logs-panel',
templateUrl: './logs-panel.component.html',
styleUrls: ['./logs-panel.component.scss']
})
export class LogsPanelComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}

View File

@@ -0,0 +1 @@
export * from './progress-panel.component';

View File

@@ -0,0 +1 @@
PROGRESS PANEL HERE!!!

View File

@@ -0,0 +1,63 @@
:host {
text-align: center;
max-width: 350px;
}
mat-card {
text-align: left;
.response-success {
background-color: #dff0d8;
border-color: #d6e9c6;
color: #3c763d;
}
.response-error {
background-color: #f2dede;
border-color: #ebccd1;
color: #a94442;
}
.response {
max-height: 0;
transition: max-height 1s;
margin-left: -16px;
margin-right: -16px;
border-radius: 4px;
overflow: hidden;
margin-bottom: -16px;
padding-bottom: 0;
}
.expand {
padding: 15px;
border: 1px solid transparent;
max-height: 999px;
margin-top: 8px;
}
mat-card-actions {
margin-bottom: 0;
padding-bottom: 0;
}
pre {
display: block;
padding: 9.5px;
margin: 0 0 10px;
font-size: 13px;
line-height: 1.42857143;
color: #333;
word-break: break-all;
word-wrap: break-word;
white-space: pre-wrap;
background-color: #f5f5f5;
border: 1px solid #ccc;
border-radius: 4px;
}
}
@media screen and (max-width: 599px) {
:host {
max-width: 999px;
}
}

View File

@@ -0,0 +1,15 @@
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
@Component({
selector: 'progress-panel',
templateUrl: './progress-panel.component.html',
styleUrls: ['./progress-panel.component.scss']
})
export class ProgressPanelComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}

View File

@@ -0,0 +1 @@
export * from './scheduler-config.component';

View File

@@ -0,0 +1 @@
SCHEDULER CONFIG HERE!!!

View File

@@ -0,0 +1,63 @@
:host {
text-align: center;
max-width: 350px;
}
mat-card {
text-align: left;
.response-success {
background-color: #dff0d8;
border-color: #d6e9c6;
color: #3c763d;
}
.response-error {
background-color: #f2dede;
border-color: #ebccd1;
color: #a94442;
}
.response {
max-height: 0;
transition: max-height 1s;
margin-left: -16px;
margin-right: -16px;
border-radius: 4px;
overflow: hidden;
margin-bottom: -16px;
padding-bottom: 0;
}
.expand {
padding: 15px;
border: 1px solid transparent;
max-height: 999px;
margin-top: 8px;
}
mat-card-actions {
margin-bottom: 0;
padding-bottom: 0;
}
pre {
display: block;
padding: 9.5px;
margin: 0 0 10px;
font-size: 13px;
line-height: 1.42857143;
color: #333;
word-break: break-all;
word-wrap: break-word;
white-space: pre-wrap;
background-color: #f5f5f5;
border: 1px solid #ccc;
border-radius: 4px;
}
}
@media screen and (max-width: 599px) {
:host {
max-width: 999px;
}
}

View File

@@ -0,0 +1,16 @@
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
@Component({
selector: 'scheduler-config',
templateUrl: './scheduler-config.component.html',
styleUrls: ['./scheduler-config.component.scss']
})
export class SchedulerConfigComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}

View File

@@ -0,0 +1 @@
export * from './manager.component';

View File

@@ -0,0 +1,22 @@
<div class="content" fxLayout="row" fxLayoutAlign="center none">
<div fxFlex="1 1 auto" style="border: 1px solid blue">
<scheduler-config>
</scheduler-config>
</div>
<div fxFlex="1 1 auto" style="border: 1px solid blue">
<div fxLayout="column">
<div fxFlex="1 1 auto" style="border: 1px solid green">
<progress-panel>
</progress-panel>
</div>
<div fxFlex="1 1 auto" style="border: 1px solid green">
<logs-panel>
</logs-panel>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,42 @@
app-api-card {
margin: 0 50px 0 0;
&.last {
margin: 0 0 0 0;
}
}
app-github {
margin: 50px -70px -50px;
}
@media screen and (min-width: 600px) and (max-width: 1279px) {
app-api-card {
margin: 0 4px 0 0;
&.last {
margin: 0 0 0 0;
}
}
app-github {
margin: 20px -30px -20px;
}
}
@media screen and (max-width: 599px) {
.content {
/* https://github.com/angular/flex-layout/issues/295 */
display: block !important;
}
app-api-card {
/* https://github.com/angular/flex-layout/issues/295 */
display: block !important;
margin: 0 0 12px 0;
}
app-github {
margin: 8px -12px -8px;
}
}

View File

@@ -0,0 +1,58 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { HomeComponent } from './home.component';
import { ApiCardComponent, GithubComponent } from '../component';
import { MockApiService } from '../service/mocks/api.service.mock';
import {
MatButtonModule,
MatCardModule
} from '@angular/material';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import {
ApiService,
AuthService,
UserService,
FooService,
ConfigService
} from '../service';
describe('HomeComponent', () => {
let component: HomeComponent;
let fixture: ComponentFixture<HomeComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [
HomeComponent,
ApiCardComponent,
GithubComponent
],
imports: [
MatButtonModule,
MatCardModule
],
providers: [
{
provide: ApiService,
useClass: MockApiService
},
AuthService,
UserService,
FooService,
ConfigService
]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(HomeComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@@ -0,0 +1,27 @@
import { Component, OnInit } from '@angular/core';
import {
FooService,
ConfigService,
UserService
} from '../service';
@Component({
selector: 'manager',
templateUrl: './manager.component.html',
styleUrls: ['./manager.component.scss']
})
export class ManagerComponent implements OnInit {
fooResponse = {};
whoamIResponse = {};
allUserResponse = {};
constructor(
private config: ConfigService,
private fooService: FooService,
private userService: UserService
) { }
ngOnInit() {
}
}