SUPPORT-8529: Добавлены компоненты взаимодействия с ConfigDataExecutor
This commit is contained in:
parent
d318a8bdae
commit
c246132121
7 changed files with 197 additions and 61 deletions
27
backend/src/main/java/rpc/ConfigExecutorRpcService.java
Normal file
27
backend/src/main/java/rpc/ConfigExecutorRpcService.java
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
package rpc;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import ru.cg.webbpm.modules.webkit.annotations.RpcCall;
|
||||
import ru.cg.webbpm.modules.webkit.annotations.RpcService;
|
||||
import ru.cg.webbpm.modules.webkit.beans.Behavior;
|
||||
import service.ConfigExecutorService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Evgenii Malkov
|
||||
*/
|
||||
@RpcService
|
||||
public class ConfigExecutorRpcService extends Behavior {
|
||||
|
||||
private final ConfigExecutorService configExecutorService;
|
||||
|
||||
public ConfigExecutorRpcService(@Autowired ConfigExecutorService configExecutorService) {
|
||||
this.configExecutorService = configExecutorService;
|
||||
}
|
||||
|
||||
@RpcCall
|
||||
public void callConfigExecutor(String path, List<String> ids) {
|
||||
configExecutorService.callConfigExecutor(path, ids);
|
||||
}
|
||||
}
|
||||
31
backend/src/main/java/service/ConfigExecutorService.java
Normal file
31
backend/src/main/java/service/ConfigExecutorService.java
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
package service;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Evgenii Malkov
|
||||
*/
|
||||
@Service
|
||||
public class ConfigExecutorService {
|
||||
|
||||
@Value("${config-data-executor.host}")
|
||||
String host;
|
||||
@Value("${config-data-executor.port}")
|
||||
String port;
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
|
||||
|
||||
|
||||
public void callConfigExecutor(String path, List<String> ids) {
|
||||
LOGGER.info("host: " + host);
|
||||
LOGGER.info("port " + port);
|
||||
LOGGER.info("path: " + path);
|
||||
ids.forEach(LOGGER::info);
|
||||
}
|
||||
}
|
||||
|
|
@ -54,6 +54,8 @@
|
|||
<property name="security.password.regex" value="^((?=(.*\d){1,})(?=.*[a-zа-яё])(?=.*[A-ZА-ЯЁ]).{8,})$"/>
|
||||
<property name="fias.enable" value="false"/>
|
||||
<property name="com.arjuna.ats.arjuna.allowMultipleLastResources" value="true"/>
|
||||
<property name="config-data-executor.host" value="127.0.0.1"/>
|
||||
<property name="config-data-executor.port" value="8080"/>
|
||||
</system-properties>
|
||||
<management>
|
||||
<audit-log>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
<div>
|
||||
<button type="button"
|
||||
[disabled]="!isEnabled()"
|
||||
class="btn btn-secondary"
|
||||
[ngbTooltip]="tooltip | emptyIfNull"
|
||||
(click)="onClick()"
|
||||
(focus)="onFocus()"
|
||||
(blur)="onBlur()">{{caption}}</button>
|
||||
</div>
|
||||
42
frontend/src/ts/ervu/ConfigExecuteBtn.ts
Normal file
42
frontend/src/ts/ervu/ConfigExecuteBtn.ts
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
import {ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef} from "@angular/core";
|
||||
import {AbstractButton, NotNull, ObjectRef, TextArea} from "@webbpm/base-package";
|
||||
import {ConfigExecutorRpcService} from "../generated/rpc/ConfigExecutorRpcService";
|
||||
|
||||
/**
|
||||
* @author: a.petrov
|
||||
*/
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'button-component',
|
||||
templateUrl: './../../../src/resources/template/app/component/ConfigExecuteBtn.html',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
})
|
||||
export class ConfigExecuteBtn extends AbstractButton {
|
||||
|
||||
@ObjectRef()
|
||||
@NotNull()
|
||||
public ervuIdField: TextArea;
|
||||
@NotNull()
|
||||
public methodPath: string;
|
||||
private script: ConfigExecutorRpcService;
|
||||
|
||||
constructor(el: ElementRef, cd: ChangeDetectorRef) {
|
||||
super(el, cd);
|
||||
}
|
||||
|
||||
public initialize() {
|
||||
super.initialize();
|
||||
this.script = this.getScript(ConfigExecutorRpcService)
|
||||
}
|
||||
|
||||
doClickActions(): Promise<any> {
|
||||
const methodPath = this.methodPath;
|
||||
const idsValue = this.ervuIdField.getValue();
|
||||
this.script.callConfigExecutor(methodPath, idsValue, true);
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
protected getFocusElement(): HTMLInputElement {
|
||||
return this.el.nativeElement.querySelector('button');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<xmlComponent>
|
||||
<id>8a93fb89-9703-41de-95ec-ec1f700b12f5</id>
|
||||
<name>ConfigExecuteBtn</name>
|
||||
<internal>false</internal>
|
||||
<versions>
|
||||
<studioVersion>3.175.1-SUPPORT-8427v3-SNAPSHOT</studioVersion>
|
||||
<packageVersions>
|
||||
<entry>
|
||||
<key>ru.cg.webbpm.packages.base.resources</key>
|
||||
<value>3.175.1-8427v4-SNAPSHOT</value>
|
||||
</entry>
|
||||
</packageVersions>
|
||||
</versions>
|
||||
<rootObject id="491f2de3-6427-4144-afbd-d586e3789b05">
|
||||
<prototypeId>c8dfe691-a84a-48da-b79e-6298d90db71d</prototypeId>
|
||||
<componentRootId>491f2de3-6427-4144-afbd-d586e3789b05</componentRootId>
|
||||
<name>ConfigExecuteBtn</name>
|
||||
<container>false</container>
|
||||
<childrenReordered>false</childrenReordered>
|
||||
<scripts id="bf098f19-480e-44e4-9084-aa42955c4d0f">
|
||||
<properties>
|
||||
<entry>
|
||||
<key>caption</key>
|
||||
<value>
|
||||
<simple>"Удалить данные по гражданам"</simple>
|
||||
</value>
|
||||
</entry>
|
||||
<entry>
|
||||
<key>navigateTo</key>
|
||||
<value>
|
||||
<simple>"delete"</simple>
|
||||
</value>
|
||||
</entry>
|
||||
</properties>
|
||||
</scripts>
|
||||
</rootObject>
|
||||
</xmlComponent>
|
||||
|
|
@ -400,20 +400,6 @@
|
|||
<container>false</container>
|
||||
<removed>true</removed>
|
||||
</children>
|
||||
<children id="2f80169f-cb77-4b05-8f00-24717bb10507">
|
||||
<prototypeId>57c7cd21-1556-4dbd-b9da-33520486a1db</prototypeId>
|
||||
<componentRootId>2f80169f-cb77-4b05-8f00-24717bb10507</componentRootId>
|
||||
<name>SQL удаление граждан из списка на вызов ЕРВУ</name>
|
||||
<container>false</container>
|
||||
<removed>true</removed>
|
||||
</children>
|
||||
<children id="6da552a8-56a0-4593-b6ea-ec93eb17f9f8">
|
||||
<prototypeId>57c7cd21-1556-4dbd-b9da-33520486a1db</prototypeId>
|
||||
<componentRootId>6da552a8-56a0-4593-b6ea-ec93eb17f9f8</componentRootId>
|
||||
<name>SQL перевод граждан в статус «состоит на учете»</name>
|
||||
<container>false</container>
|
||||
<removed>true</removed>
|
||||
</children>
|
||||
<children id="f7553607-7133-4e0c-88dc-1c2d2ef3f174">
|
||||
<prototypeId>c8dfe691-a84a-48da-b79e-6298d90db71d</prototypeId>
|
||||
<componentRootId>f7553607-7133-4e0c-88dc-1c2d2ef3f174</componentRootId>
|
||||
|
|
@ -849,13 +835,38 @@
|
|||
<scripts id="fe04d7fb-6c5b-46c4-b723-667732d81f4f"/>
|
||||
<scripts id="5c566210-2a60-4048-a2d1-84c7dd023248"/>
|
||||
<scripts id="3171b2e1-b4af-4335-95fa-1b2592604b84"/>
|
||||
<children id="05c32fb0-b9ce-49c5-a58e-117ffa813578">
|
||||
<prototypeId>c8dfe691-a84a-48da-b79e-6298d90db71d</prototypeId>
|
||||
<componentRootId>05c32fb0-b9ce-49c5-a58e-117ffa813578</componentRootId>
|
||||
<name>Navigation Удалить данные по гражданам</name>
|
||||
<children id="b1eb1925-d767-4e3f-ba59-b8f1c152de9a">
|
||||
<prototypeId>491f2de3-6427-4144-afbd-d586e3789b05</prototypeId>
|
||||
<componentRootId>b1eb1925-d767-4e3f-ba59-b8f1c152de9a</componentRootId>
|
||||
<name>ConfigExecuteBtn Удалить данные по гражданам</name>
|
||||
<container>false</container>
|
||||
<childrenReordered>false</childrenReordered>
|
||||
<scripts id="bf098f19-480e-44e4-9084-aa42955c4d0f">
|
||||
<enabled>false</enabled>
|
||||
<properties>
|
||||
<entry>
|
||||
<key>visible</key>
|
||||
<value>
|
||||
<simple>false</simple>
|
||||
</value>
|
||||
</entry>
|
||||
</properties>
|
||||
</scripts>
|
||||
<scripts id="6783ae7c-aeee-4b77-9a83-31eee4bf9cbb">
|
||||
<classRef type="JAVA">
|
||||
<className>ConfigExecutorRpcService</className>
|
||||
<packageName>rpc</packageName>
|
||||
</classRef>
|
||||
<enabled>true</enabled>
|
||||
<expanded>true</expanded>
|
||||
</scripts>
|
||||
<scripts id="6ad54463-00fd-4b17-a4d5-962321d82f7c">
|
||||
<classRef type="TS">
|
||||
<className>ConfigExecuteBtn</className>
|
||||
<packageName>ervu</packageName>
|
||||
</classRef>
|
||||
<enabled>true</enabled>
|
||||
<expanded>true</expanded>
|
||||
<properties>
|
||||
<entry>
|
||||
<key>caption</key>
|
||||
|
|
@ -864,9 +875,27 @@
|
|||
</value>
|
||||
</entry>
|
||||
<entry>
|
||||
<key>navigateTo</key>
|
||||
<key>confirmationText</key>
|
||||
<value>
|
||||
<simple>null</simple>
|
||||
</value>
|
||||
</entry>
|
||||
<entry>
|
||||
<key>ervuIdField</key>
|
||||
<value>
|
||||
<simple>{"objectId":"663b3639-2a6b-4f3d-b0a0-2ba829de6ea4","packageName":"component.field","className":"TextArea","type":"TS"}</simple>
|
||||
</value>
|
||||
</entry>
|
||||
<entry>
|
||||
<key>methodPath</key>
|
||||
<value>
|
||||
<simple>"delete"</simple>
|
||||
</value>
|
||||
</entry>
|
||||
<entry>
|
||||
<key>visible</key>
|
||||
<value>
|
||||
<simple>true</simple>
|
||||
</value>
|
||||
</entry>
|
||||
</properties>
|
||||
|
|
@ -1256,48 +1285,6 @@
|
|||
<container>false</container>
|
||||
<removed>true</removed>
|
||||
</children>
|
||||
<children id="6274524c-0f28-4028-a08d-9523ef7e4dcc">
|
||||
<prototypeId>98594cec-0a9b-4cef-af09-e1b71cb2ad9e</prototypeId>
|
||||
<componentRootId>6274524c-0f28-4028-a08d-9523ef7e4dcc</componentRootId>
|
||||
<name>AC_lock</name>
|
||||
<container>false</container>
|
||||
<removed>true</removed>
|
||||
</children>
|
||||
<children id="87b02ec5-54b8-432a-b9e8-67530c4c22d4">
|
||||
<prototypeId>57c7cd21-1556-4dbd-b9da-33520486a1db</prototypeId>
|
||||
<componentRootId>87b02ec5-54b8-432a-b9e8-67530c4c22d4</componentRootId>
|
||||
<name>SQL блокировка рекрута в 13</name>
|
||||
<container>false</container>
|
||||
<removed>true</removed>
|
||||
</children>
|
||||
<children id="64c555f4-4ace-4925-a7d9-601625723ab2">
|
||||
<prototypeId>57c7cd21-1556-4dbd-b9da-33520486a1db</prototypeId>
|
||||
<componentRootId>64c555f4-4ace-4925-a7d9-601625723ab2</componentRootId>
|
||||
<name>SQL удаление повесток и мер без удаления рекрута</name>
|
||||
<container>false</container>
|
||||
<removed>true</removed>
|
||||
</children>
|
||||
<children id="4a50e271-338a-4e02-a339-92817b4f89f7">
|
||||
<prototypeId>57c7cd21-1556-4dbd-b9da-33520486a1db</prototypeId>
|
||||
<componentRootId>4a50e271-338a-4e02-a339-92817b4f89f7</componentRootId>
|
||||
<name>SQL удаление инцидентов по рекруту</name>
|
||||
<container>false</container>
|
||||
<removed>true</removed>
|
||||
</children>
|
||||
<children id="eabba59b-a69a-49b7-bb89-abf7b57a8ed2">
|
||||
<prototypeId>57c7cd21-1556-4dbd-b9da-33520486a1db</prototypeId>
|
||||
<componentRootId>eabba59b-a69a-49b7-bb89-abf7b57a8ed2</componentRootId>
|
||||
<name>SQL уведомления гражданина через ЕПГУ</name>
|
||||
<container>false</container>
|
||||
<removed>true</removed>
|
||||
</children>
|
||||
<children id="4e0d797b-8b42-43c3-b3a8-08cff21f2c7d">
|
||||
<prototypeId>57c7cd21-1556-4dbd-b9da-33520486a1db</prototypeId>
|
||||
<componentRootId>4e0d797b-8b42-43c3-b3a8-08cff21f2c7d</componentRootId>
|
||||
<name>SQL версионные журналы</name>
|
||||
<container>false</container>
|
||||
<removed>true</removed>
|
||||
</children>
|
||||
<children id="c72d5f68-82f1-4f82-a7d5-0b3fe0a7fe91">
|
||||
<prototypeId>c8dfe691-a84a-48da-b79e-6298d90db71d</prototypeId>
|
||||
<componentRootId>c72d5f68-82f1-4f82-a7d5-0b3fe0a7fe91</componentRootId>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue