@@ -76,7 +76,7 @@
|
|||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;" class="select-row"></tr>
|
<tr mat-row *matRowDef="let row; columns: displayedColumns;" [routerLink]="[row.jobId]" class="select-row"></tr>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|||||||
+57
@@ -0,0 +1,57 @@
|
|||||||
|
<div class="container m-b-20" fxLayout="row" fxLayout.lt-md="column" fxLayoutAlign="end" fxLayoutGap="2%">
|
||||||
|
<button mat-raised-button color="primary" [routerLink]="['edit']">
|
||||||
|
<fa-icon icon="edit"></fa-icon>
|
||||||
|
Edit
|
||||||
|
</button>
|
||||||
|
<button mat-raised-button color="primary" [routerLink]="['viewhistory']">
|
||||||
|
View History
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
|
||||||
|
<mat-card>
|
||||||
|
|
||||||
|
<mat-card-content>
|
||||||
|
|
||||||
|
<div fxLayout="row wrap" class="content">
|
||||||
|
|
||||||
|
<div fxFlex="50%" class="mat-body-strong">
|
||||||
|
Job Name
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div fxFlex="50%">
|
||||||
|
{{ jobData.displayName }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div fxFlex="50%" class="mat-body-strong">
|
||||||
|
Cron Expression
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div fxFlex="50%">
|
||||||
|
{{ jobData.cronExpression }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div fxFlex="50%" class="mat-body-strong">
|
||||||
|
Is Active Job?
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div fxFlex="50%">
|
||||||
|
{{ jobData.active }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div fxFlex="50%" class="mat-body-strong">
|
||||||
|
Follow
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div fxFlex="50%">
|
||||||
|
<a href="http://www.cronmaker.com/"> Click Here To Generate Cron Expression </a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</mat-card-content>
|
||||||
|
|
||||||
|
</mat-card>
|
||||||
|
|
||||||
|
</div>
|
||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
a{
|
||||||
|
color: blue;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
max-width: 37rem;
|
||||||
|
|
||||||
|
.content {
|
||||||
|
div {
|
||||||
|
margin: 1rem 0;
|
||||||
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+25
@@ -0,0 +1,25 @@
|
|||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { ViewSchedulerJobComponent } from './view-scheduler-job.component';
|
||||||
|
|
||||||
|
describe('ViewSchedulerJobComponent', () => {
|
||||||
|
let component: ViewSchedulerJobComponent;
|
||||||
|
let fixture: ComponentFixture<ViewSchedulerJobComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ ViewSchedulerJobComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(ViewSchedulerJobComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
+28
@@ -0,0 +1,28 @@
|
|||||||
|
/** Angular Imports */
|
||||||
|
import { Component} from '@angular/core';
|
||||||
|
import { ActivatedRoute } from '@angular/router';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* View Scheduler Job component.
|
||||||
|
*/
|
||||||
|
@Component({
|
||||||
|
selector: 'mifosx-view-scheduler-job',
|
||||||
|
templateUrl: './view-scheduler-job.component.html',
|
||||||
|
styleUrls: ['./view-scheduler-job.component.scss']
|
||||||
|
})
|
||||||
|
export class ViewSchedulerJobComponent {
|
||||||
|
|
||||||
|
/** Job Data. */
|
||||||
|
jobData: any;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the selected job data from `resolve`.
|
||||||
|
* @param {ActivatedRoute} route Activated Route.
|
||||||
|
*/
|
||||||
|
constructor(private route: ActivatedRoute) {
|
||||||
|
this.route.data.subscribe((data: { selectedJob: any }) => {
|
||||||
|
this.jobData = data.selectedJob;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+31
@@ -0,0 +1,31 @@
|
|||||||
|
/** Angular Imports */
|
||||||
|
import { Injectable } from '@angular/core';
|
||||||
|
import { Resolve, ActivatedRouteSnapshot } from '@angular/router';
|
||||||
|
|
||||||
|
/** rxjs Imports */
|
||||||
|
import { Observable, forkJoin } from 'rxjs';
|
||||||
|
|
||||||
|
/** Custom Services */
|
||||||
|
import { SystemService } from '../../system.service';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Selected Scheduler Jobs data resolver.
|
||||||
|
*/
|
||||||
|
@Injectable()
|
||||||
|
export class ViewSchedulerJobResolver implements Resolve<Object> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {SystemService} systemService System service.
|
||||||
|
*/
|
||||||
|
constructor(private systemService: SystemService) {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the selected scheduler job data.
|
||||||
|
* @returns {Observable<any>}
|
||||||
|
*/
|
||||||
|
resolve(route: ActivatedRouteSnapshot): Observable<any> {
|
||||||
|
const jobId = route.paramMap.get('id');
|
||||||
|
return this.systemService.getSelectedJob(jobId);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -71,6 +71,8 @@ import { AuditTrailResolver } from './audit-trails/view-audit/audit-trail.resolv
|
|||||||
import { ReportsResolver } from './manage-reports/reports.resolver';
|
import { ReportsResolver } from './manage-reports/reports.resolver';
|
||||||
import { ReportResolver } from './manage-reports/report.resolver';
|
import { ReportResolver } from './manage-reports/report.resolver';
|
||||||
import { ReportTemplateResolver } from './manage-reports/report-template.resolver';
|
import { ReportTemplateResolver } from './manage-reports/report-template.resolver';
|
||||||
|
import { ViewSchedulerJobComponent } from './manage-scheduler-jobs/view-scheduler-job/view-scheduler-job.component';
|
||||||
|
import { ViewSchedulerJobResolver } from './manage-scheduler-jobs/view-scheduler-job/view-scheduler-job.resolver';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
Route.withShell([
|
Route.withShell([
|
||||||
@@ -331,11 +333,24 @@ const routes: Routes = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'scheduler-jobs',
|
path: 'scheduler-jobs',
|
||||||
component: ManageSchedulerJobsComponent,
|
|
||||||
resolve: {
|
|
||||||
jobsScheduler: ManageSchedulerJobsResolver
|
|
||||||
},
|
|
||||||
data: { title: extract('Manage Scheduler Jobs'), breadcrumb: 'Manage Scheduler Jobs' },
|
data: { title: extract('Manage Scheduler Jobs'), breadcrumb: 'Manage Scheduler Jobs' },
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
component: ManageSchedulerJobsComponent,
|
||||||
|
resolve: {
|
||||||
|
jobsScheduler: ManageSchedulerJobsResolver
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: ':id',
|
||||||
|
data: { title: extract('View Scheduler Job'), routeParamBreadcrumb: 'id' },
|
||||||
|
component: ViewSchedulerJobComponent,
|
||||||
|
resolve: {
|
||||||
|
selectedJob: ViewSchedulerJobResolver
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'global-configurations',
|
path: 'global-configurations',
|
||||||
@@ -498,7 +513,8 @@ const routes: Routes = [
|
|||||||
ReportResolver,
|
ReportResolver,
|
||||||
ReportTemplateResolver,
|
ReportTemplateResolver,
|
||||||
AuditTrailSearchTemplateResolver,
|
AuditTrailSearchTemplateResolver,
|
||||||
AuditTrailResolver
|
AuditTrailResolver,
|
||||||
|
ViewSchedulerJobResolver
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class SystemRoutingModule { }
|
export class SystemRoutingModule { }
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ import { ColumnDialogComponent } from './manage-data-tables/column-dialog/column
|
|||||||
/** Dialog Component Imports */
|
/** Dialog Component Imports */
|
||||||
import { ReportParameterDialogComponent } from './manage-reports/report-parameter-dialog/report-parameter-dialog.component';
|
import { ReportParameterDialogComponent } from './manage-reports/report-parameter-dialog/report-parameter-dialog.component';
|
||||||
import { AddEventDialogComponent } from './manage-hooks/add-event-dialog/add-event-dialog.component';
|
import { AddEventDialogComponent } from './manage-hooks/add-event-dialog/add-event-dialog.component';
|
||||||
|
import { ViewSchedulerJobComponent } from './manage-scheduler-jobs/view-scheduler-job/view-scheduler-job.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
@@ -96,7 +97,8 @@ import { AddEventDialogComponent } from './manage-hooks/add-event-dialog/add-eve
|
|||||||
AddEventDialogComponent,
|
AddEventDialogComponent,
|
||||||
ColumnDialogComponent,
|
ColumnDialogComponent,
|
||||||
AuditTrailsComponent,
|
AuditTrailsComponent,
|
||||||
ViewAuditComponent
|
ViewAuditComponent,
|
||||||
|
ViewSchedulerJobComponent
|
||||||
],
|
],
|
||||||
entryComponents: [
|
entryComponents: [
|
||||||
ReportParameterDialogComponent,
|
ReportParameterDialogComponent,
|
||||||
|
|||||||
@@ -176,6 +176,14 @@ export class SystemService {
|
|||||||
return this.http.get('/scheduler');
|
return this.http.get('/scheduler');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param jobId Selected Job Id
|
||||||
|
* @returns {Observable<any>}
|
||||||
|
*/
|
||||||
|
getSelectedJob(jobId: string) {
|
||||||
|
return this.http.get(`/jobs/${jobId}`);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {any} code Code to be created.
|
* @param {any} code Code to be created.
|
||||||
* @returns {Observable<any>}
|
* @returns {Observable<any>}
|
||||||
|
|||||||
Reference in New Issue
Block a user