cleaning
This commit is contained in:
parent
bd96625fd2
commit
d3ffa58d11
|
@ -1,22 +0,0 @@
|
|||
import { Injectable } from '@angular/core';
|
||||
import { EmailTemplate } from '../common/is.model';
|
||||
import { FormGroup } from '@angular/forms';
|
||||
import { ISClient } from '../common/is.client';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class EmailsClient extends ISClient {
|
||||
|
||||
loadEmailTemplates(onSuccess: Function): void {
|
||||
this.httpGet<EmailTemplate[]>('/proxy/byType/templates/email/', onSuccess);
|
||||
}
|
||||
|
||||
saveEmailTemplate(email: EmailTemplate, onSuccess: Function, relatedForm?: FormGroup): void {
|
||||
this.httpPost('/proxy/byType/templates/email/', email, onSuccess, relatedForm);
|
||||
}
|
||||
|
||||
deleteEmailTemplate(id: string, onSuccess: Function): void {
|
||||
this.httpDelete('/proxy/byType/templates/email/' + encodeURIComponent(id), onSuccess);
|
||||
}
|
||||
}
|
|
@ -4,8 +4,9 @@ import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dial
|
|||
import { MatSort } from '@angular/material/sort';
|
||||
import { MatTableDataSource } from '@angular/material/table';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { EmailTemplate } from '../common/is.model';
|
||||
import { EmailsClient } from './emails.client';
|
||||
import { ISClient } from '../common/is.client';
|
||||
|
||||
@Component({
|
||||
selector: 'app-emails',
|
||||
|
@ -96,3 +97,21 @@ export class EmailDialog {
|
|||
this.dialogRef.close();
|
||||
}
|
||||
}
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class EmailsClient extends ISClient {
|
||||
|
||||
loadEmailTemplates(onSuccess: Function): void {
|
||||
this.httpGet<EmailTemplate[]>('/proxy/byType/templates/email/', onSuccess);
|
||||
}
|
||||
|
||||
saveEmailTemplate(email: EmailTemplate, onSuccess: Function, relatedForm?: FormGroup): void {
|
||||
this.httpPost('/proxy/byType/templates/email/', email, onSuccess, relatedForm);
|
||||
}
|
||||
|
||||
deleteEmailTemplate(id: string, onSuccess: Function): void {
|
||||
this.httpDelete('/proxy/byType/templates/email/' + encodeURIComponent(id), onSuccess);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
import { Injectable } from '@angular/core';
|
||||
import { HttpHeaders, HttpParams } from '@angular/common/http';
|
||||
import { MDStore, MDStoreVersion, MDStoreRecord } from '../common/is.model';
|
||||
import { FormGroup } from '@angular/forms';
|
||||
import { ISClient } from '../common/is.client';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class IndexClient extends ISClient {
|
||||
|
||||
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
import { Component, Inject, OnInit } from '@angular/core';
|
||||
import { Component, Injectable, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { MatDialog, MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||
import { MDStore, MDStoreRecord, MDStoreVersion } from '../common/is.model';
|
||||
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
||||
import { IndexClient } from './index.client';
|
||||
import { ISClient } from '../common/is.client';
|
||||
|
||||
@Component({
|
||||
selector: 'app-index-confs',
|
||||
|
@ -35,3 +35,11 @@ export class IndexComponent implements OnInit {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class IndexClient extends ISClient {
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
import { Injectable } from '@angular/core';
|
||||
import { ISClient } from '../common/is.client';
|
||||
import { Service } from '../common/is.model';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class InfoClient extends ISClient {
|
||||
|
||||
availableServices(onSuccess: Function): void {
|
||||
this.httpGet<Service[]>("/ajax-is/services", onSuccess);
|
||||
}
|
||||
|
||||
infoService(service: string, onSuccess: Function): void {
|
||||
this.httpGet<any>("/ajax-is/info/" + encodeURIComponent(service), onSuccess);
|
||||
}
|
||||
|
||||
pingService(service: string, onSuccess: Function): void {
|
||||
this.httpGet<number>("/ajax-is/ping/" + encodeURIComponent(service), onSuccess);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,10 +1,10 @@
|
|||
import { Component, Inject, AfterViewInit, OnInit, ViewChild } from '@angular/core';
|
||||
import { Component, Inject, AfterViewInit, OnInit, ViewChild, Injectable } from '@angular/core';
|
||||
import { MatTable, MatTableDataSource } from '@angular/material/table';
|
||||
import { MatSort } from '@angular/material/sort';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { MatDialog, MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||
import { Module, Service } from '../common/is.model';
|
||||
import { InfoClient } from './info.client';
|
||||
import { ISClient } from '../common/is.client';
|
||||
|
||||
export interface KeyValueDatasource {
|
||||
name: string;
|
||||
|
@ -116,3 +116,22 @@ export class ServiceInfoDialog {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class InfoClient extends ISClient {
|
||||
|
||||
availableServices(onSuccess: Function): void {
|
||||
this.httpGet<Service[]>("/ajax-is/services", onSuccess);
|
||||
}
|
||||
|
||||
infoService(service: string, onSuccess: Function): void {
|
||||
this.httpGet<any>("/ajax-is/info/" + encodeURIComponent(service), onSuccess);
|
||||
}
|
||||
|
||||
pingService(service: string, onSuccess: Function): void {
|
||||
this.httpGet<number>("/ajax-is/ping/" + encodeURIComponent(service), onSuccess);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
import { Injectable } from '@angular/core';
|
||||
import { ResourceType, WfSection } from '../common/is.model';
|
||||
import { ISClient } from '../common/is.client';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class MainMenuPanelsClient extends ISClient {
|
||||
|
||||
loadResourceTypes(onSuccess: Function) {
|
||||
this.httpGet<ResourceType[]>("/proxy/byType/resource_manager/api/resourceTypes", onSuccess)
|
||||
}
|
||||
|
||||
loadWfSections(onSuccess: Function) {
|
||||
this.httpGet<WfSection[]>("/proxy/byType/wf_manager/api/sections", onSuccess)
|
||||
}
|
||||
|
||||
availableServiceTypes(onSuccess: Function) {
|
||||
this.httpGet<string[]>("/ajax-is/service-types", onSuccess)
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
import { Component, ViewChild } from '@angular/core';
|
||||
import { Component, Injectable, ViewChild } from '@angular/core';
|
||||
import { KeyValue, ResourceType, WfSection } from '../common/is.model';
|
||||
import { MatAccordion } from '@angular/material/expansion';
|
||||
import { MainMenuPanelsClient } from './main-menu-panels.client';
|
||||
import { ISClient } from '../common/is.client';
|
||||
|
||||
@Component({
|
||||
selector: 'app-main-menu-panels',
|
||||
|
@ -35,3 +35,21 @@ export class MainMenuPanelsComponent {
|
|||
return this.runningServiceTypes.has(serviceType);
|
||||
}
|
||||
}
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class MainMenuPanelsClient extends ISClient {
|
||||
|
||||
loadResourceTypes(onSuccess: Function) {
|
||||
this.httpGet<ResourceType[]>("/proxy/byType/resource_manager/api/resourceTypes", onSuccess)
|
||||
}
|
||||
|
||||
loadWfSections(onSuccess: Function) {
|
||||
this.httpGet<WfSection[]>("/proxy/byType/wf_manager/api/sections", onSuccess)
|
||||
}
|
||||
|
||||
availableServiceTypes(onSuccess: Function) {
|
||||
this.httpGet<string[]>("/ajax-is/service-types", onSuccess)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
import { Injectable } from '@angular/core';
|
||||
import { HttpHeaders, HttpParams } from '@angular/common/http';
|
||||
import { MDStore, MDStoreVersion, MDStoreRecord } from '../common/is.model';
|
||||
import { FormGroup } from '@angular/forms';
|
||||
import { ISClient } from '../common/is.client';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class OaiClient extends ISClient {
|
||||
|
||||
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
import { Component, Inject, OnInit } from '@angular/core';
|
||||
import { Component, Inject, Injectable, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { MatDialog, MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||
import { MDStore, MDStoreRecord, MDStoreVersion } from '../common/is.model';
|
||||
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
||||
import { OaiClient } from './oai.client';
|
||||
import { ISClient } from '../common/is.client';
|
||||
|
||||
@Component({
|
||||
selector: 'app-oai',
|
||||
|
@ -20,8 +20,12 @@ export class OaiComponent implements OnInit {
|
|||
reload() {
|
||||
// TODO
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class OaiClient extends ISClient {
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
</p>
|
||||
|
||||
<p>
|
||||
<a mat-stroked-button color="primary" [routerLink]="['/adv_resources/vocabulary']">
|
||||
<a mat-stroked-button color="primary" [routerLink]="['/vocabularies']">
|
||||
<mat-icon fontIcon="home"></mat-icon>
|
||||
return to vocabulary list
|
||||
</a>
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
import { Injectable } from '@angular/core';
|
||||
import { HttpParams } from '@angular/common/http';
|
||||
import { WfHistoryEntry } from '../common/is.model';
|
||||
import { ISClient } from '../common/is.client';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class WfHistoryClient extends ISClient {
|
||||
|
||||
loadWfHistory(total: number, from: number, to: number, onSuccess: Function): void {
|
||||
let params = new HttpParams();
|
||||
if (total && total > 0) { params = params.append('total', total); }
|
||||
if (from && from > 0) { params = params.append('from', from); }
|
||||
if (to && to > 0) { params = params.append('to', to); }
|
||||
|
||||
this.httpGetWithOptions<WfHistoryEntry[]>('/proxy/byType/wf-manager/history/', { params: params }, onSuccess);
|
||||
}
|
||||
}
|
|
@ -1,11 +1,12 @@
|
|||
import { Component, Inject, AfterViewInit, OnInit, ViewChild } from '@angular/core';
|
||||
import { Component, Inject, AfterViewInit, OnInit, ViewChild, Injectable } from '@angular/core';
|
||||
import { MatTableDataSource } from '@angular/material/table';
|
||||
import { MatSort } from '@angular/material/sort';
|
||||
import { WfHistoryEntry, KeyValue } from '../common/is.model';
|
||||
import { ActivatedRoute, Params } from '@angular/router';
|
||||
import { combineLatest } from 'rxjs';
|
||||
import { MatDialog, MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||
import { WfHistoryClient } from './wf-history.client';
|
||||
import { ISClient } from '../common/is.client';
|
||||
import { HttpParams } from '@angular/common/http';
|
||||
|
||||
@Component({
|
||||
selector: 'app-wf-history',
|
||||
|
@ -147,8 +148,19 @@ export class WfHistoryDialog {
|
|||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class WfHistoryClient extends ISClient {
|
||||
|
||||
loadWfHistory(total: number, from: number, to: number, onSuccess: Function): void {
|
||||
let params = new HttpParams();
|
||||
if (total && total > 0) { params = params.append('total', total); }
|
||||
if (from && from > 0) { params = params.append('from', from); }
|
||||
if (to && to > 0) { params = params.append('to', to); }
|
||||
|
||||
this.httpGetWithOptions<WfHistoryEntry[]>('/proxy/byType/wf-manager/history/', { params: params }, onSuccess);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue