mirror of
https://github.com/fabioformosa/quartz-manager.git
synced 2026-01-05 00:53:18 +09:00
introduced layout of manager page
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
30
quartz-manager-backend/src/main/resources/application.yml
Normal file
30
quartz-manager-backend/src/main/resources/application.yml
Normal 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
|
||||
@@ -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,
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
export * from './logs-panel.component';
|
||||
@@ -0,0 +1 @@
|
||||
LOGS PANEL HERE!!!
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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() {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export * from './progress-panel.component';
|
||||
@@ -0,0 +1 @@
|
||||
PROGRESS PANEL HERE!!!
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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() {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export * from './scheduler-config.component';
|
||||
@@ -0,0 +1 @@
|
||||
SCHEDULER CONFIG HERE!!!
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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() {
|
||||
}
|
||||
|
||||
}
|
||||
1
quartz-manager-frontend/src/app/manager/index.ts
Normal file
1
quartz-manager-frontend/src/app/manager/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from './manager.component';
|
||||
@@ -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>
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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();
|
||||
});
|
||||
});
|
||||
27
quartz-manager-frontend/src/app/manager/manager.component.ts
Normal file
27
quartz-manager-frontend/src/app/manager/manager.component.ts
Normal 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() {
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user