diff --git a/.gitignore b/.gitignore index fe2972e..875cfc8 100644 --- a/.gitignore +++ b/.gitignore @@ -50,20 +50,24 @@ resources/src/main/generated-resources*/ resources/src/main/resources/database/database_structure.xml frontend/build*/ +frontend/.nx*/ frontend/tmp*/ -frontend/.angular*/ frontend/build_dev*/ +frontend/.angular*/ frontend/dist*/ frontend/node_modules*/ -frontend/src/ts/**/*.js -frontend/src/ts/**/*.js.map -frontend/src/ts/**/*.ngsummary.json -frontend/src/ts/aot*/ +frontend/src/ts/page.routing.ts +frontend/tsconfig.base.json +frontend/modules/generated*/ frontend/src/ts/generated*/ +frontend/modules/shared/src/lib/generated/ npm-debug.log +.eslintignore + #Sublime project files *.sublime-project *.sublime-workspace -CLAUDE.md \ No newline at end of file +config/*.ear +config/output/ diff --git a/.studioignore b/.studioignore index 3fc9113..043dd86 100644 --- a/.studioignore +++ b/.studioignore @@ -1,7 +1,11 @@ -#Files for Webbpm-Studio to ignore +#Files for Webbpm-Studio to ignore frontend/build/ +frontend/.angular/ +frontend/.nx/ frontend/build_dev/ frontend/dist/ +frontend/tmp/ +frontend/modules/generated/ frontend/node_modules/ frontend/src/ts/page.routing.ts frontend/src/ts/generated-sources/ @@ -18,7 +22,6 @@ resources/target/ test/ extensions/ -config/ target/ themes/ @@ -26,4 +29,4 @@ themes/ .git/ .idea/ .studioignore -**.js \ No newline at end of file +**.js diff --git a/README.md b/README.md index acbeeb3..359f093 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ CREATE DATABASE "" OWNER = ""; ``` -ВНИМАНИЕ: в общем случае, отдельную БД для безопасности создавать не нужно. В конфигурации источника данных security-ds в файле standalone.xml в качестве имени базы данных используйте базу данных приложения. +ВНИМАНИЕ: в общем случае, отдельную БД для безопасности создавать не нужно. В конфигурации источника данных security-ds в файле конфигурации в качестве имени базы данных используйте базу данных приложения. Предоставление необходимых прав для роли <your-project-security-role> diff --git a/backend/pom.xml b/backend/pom.xml index df01274..1d15ee5 100644 --- a/backend/pom.xml +++ b/backend/pom.xml @@ -9,8 +9,32 @@ ru.micord.ervu.eks backend - war + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-undertow + + + io.undertow + undertow-core + + + org.springframework.boot + spring-boot-starter-actuator + + + io.micrometer + micrometer-registry-prometheus + runtime + + + org.springframework.data + spring-data-commons + io.jsonwebtoken jjwt-api @@ -34,18 +58,17 @@ reporting-jasper-fonts runtime + + org.ocpsoft.prettytime + prettytime + org.jooq jooq - - javax.servlet - javax.servlet-api - org.slf4j slf4j-api - provided org.springframework @@ -123,10 +146,6 @@ ru.cg.webbpm.modules.database database-impl - - javax.annotation - javax.annotation-api - ru.cg.webbpm.modules.jndi jndi-beans @@ -199,6 +218,14 @@ org.apache.httpcomponents httpclient + + me.snowdrop + narayana-spring-boot-starter + + + io.agroal + agroal-spring-boot-starter + ${project.artifactId} @@ -230,6 +257,21 @@ + + org.springframework.boot + spring-boot-maven-plugin + 2.7.18 + + + + repackage + + + + + ru.micord.ervu.eks.App + + diff --git a/backend/src/main/java/WebAppInitializer.java b/backend/src/main/java/WebAppInitializer.java deleted file mode 100644 index f4fef23..0000000 --- a/backend/src/main/java/WebAppInitializer.java +++ /dev/null @@ -1,31 +0,0 @@ -import javax.servlet.ServletContext; -import javax.servlet.ServletException; - -import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer; -import org.springframework.web.util.IntrospectorCleanupListener; - -/** - * This initializer creates root context and registers dispatcher servlet - * Spring scans for initializers automatically - */ -public class WebAppInitializer extends AbstractAnnotationConfigDispatcherServletInitializer { - - public void onStartup(ServletContext servletContext) throws ServletException { - super.onStartup(servletContext); - servletContext.addListener(new IntrospectorCleanupListener()); - } - - protected String[] getServletMappings() { - return new String[]{"/"}; - } - - @Override - protected Class[] getRootConfigClasses() { - return new Class[]{AppConfig.class}; - } - - @Override - protected Class[] getServletConfigClasses() { - return new Class[0]; - } -} diff --git a/backend/src/main/java/AppConfig.java b/backend/src/main/java/ru/micord/ervu/eks/App.java similarity index 62% rename from backend/src/main/java/AppConfig.java rename to backend/src/main/java/ru/micord/ervu/eks/App.java index 03b77a7..a3709a0 100644 --- a/backend/src/main/java/AppConfig.java +++ b/backend/src/main/java/ru/micord/ervu/eks/App.java @@ -1,92 +1,84 @@ -import net.javacrumbs.shedlock.core.LockProvider; -import net.javacrumbs.shedlock.provider.jdbctemplate.JdbcTemplateLockProvider; -import net.javacrumbs.shedlock.spring.ScheduledLockConfiguration; -import net.javacrumbs.shedlock.spring.ScheduledLockConfigurationBuilder; -import org.apache.http.client.config.RequestConfig; -import org.apache.http.impl.client.CloseableHttpClient; -import org.apache.http.impl.client.HttpClients; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.EnableAspectJAutoProxy; -import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; -import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; -import org.springframework.scheduling.annotation.EnableScheduling; -import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler; -import org.springframework.web.client.RestTemplate; -import org.springframework.web.servlet.config.annotation.EnableWebMvc; - -import javax.sql.DataSource; -import java.time.Duration; - -/** - * Root application context - * This context imports XML configs from all the other jars, and is created by {@link WebAppInitializer} - * NB: modules are excluded from component scan since spring-context.xml sometimes holds important parameters and / or annotations - * @author krylov - */ -@Configuration -@ComponentScan(basePackages = { - "service", - "dao", - "bpmn", - "i18n", - "errorhandling", - "database", - "security", - "component.addresses", - "gen", - "ru.cg", - "ru.micord" -}) -@EnableAspectJAutoProxy(proxyTargetClass = true) -@EnableWebMvc -@EnableScheduling -public class AppConfig { - - @Value("${config.data.executor.socket.timeout:10}") - private int socketTimeout; - @Value("${config.data.executor.connection.timeout:10}") - private int connectionTimeout; - - @Bean - public PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer(){ - return new PropertySourcesPlaceholderConfigurer(); - } - - @Bean - public ScheduledLockConfiguration taskScheduler(LockProvider lockProvider) { - ThreadPoolTaskScheduler scheduler = new ThreadPoolTaskScheduler(); - scheduler.setPoolSize(12); - scheduler.initialize(); - return ScheduledLockConfigurationBuilder - .withLockProvider(lockProvider) - .withTaskScheduler(scheduler) - .withDefaultLockAtMostFor(Duration.ofHours(4)) - .build(); - } - - @Bean - public LockProvider lockProvider(@Qualifier("datasource") DataSource dataSource) { - return new JdbcTemplateLockProvider(dataSource); - } - - @Bean - public RestTemplate restTemplate() { - RequestConfig requestConfig = RequestConfig.custom() - .setSocketTimeout(socketTimeout * 1000) - .setConnectionRequestTimeout(connectionTimeout * 1000) - .setConnectTimeout(connectionTimeout * 1000) - .build(); - - CloseableHttpClient httpClient = HttpClients.custom() - .setDefaultRequestConfig(requestConfig) - .build(); - - HttpComponentsClientHttpRequestFactory factory = new HttpComponentsClientHttpRequestFactory(httpClient); - - return new RestTemplate(factory); - } -} +package ru.micord.ervu.eks; + +import javax.sql.DataSource; +import org.apache.http.client.config.RequestConfig; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClients; +import net.javacrumbs.shedlock.core.LockProvider; +import net.javacrumbs.shedlock.provider.jdbctemplate.JdbcTemplateLockProvider; +import net.javacrumbs.shedlock.spring.annotation.EnableSchedulerLock; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration; +import org.springframework.boot.autoconfigure.transaction.TransactionAutoConfiguration; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.EnableAspectJAutoProxy; +import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; +import org.springframework.scheduling.annotation.EnableScheduling; +import org.springframework.web.client.RestTemplate; +import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; +import ru.cg.webbpm.modules.webkit.DispatcherConfig; + +@Configuration +@ComponentScan(basePackages = { + "service", + "dao", + "bpmn", + "i18n", + "errorhandling", + "database", + "security", + "component.addresses", + "gen", + "ru.cg", + "ru.micord", + "com.example.ervu_eks_5" +}) +@EnableAspectJAutoProxy(proxyTargetClass = true) +@EnableScheduling() +@EnableSchedulerLock(defaultLockAtMostFor = "PT4H") +@SpringBootApplication(exclude = { + HibernateJpaAutoConfiguration.class, + TransactionAutoConfiguration.class, +}) +public class App extends DispatcherConfig { + + @Value("${config.data.executor.socket.timeout:10}") + private int socketTimeout; + @Value("${config.data.executor.connection.timeout:10}") + private int connectionTimeout; + + public static void main(String[] args) { + SpringApplication.run(App.class, args); + } + + @Bean + public PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() { + return new PropertySourcesPlaceholderConfigurer(); + } + + @Bean + public LockProvider lockProvider(DataSource dataSource) { + return new JdbcTemplateLockProvider(dataSource); + } + + @Bean + public RestTemplate restTemplate() { + RequestConfig requestConfig = RequestConfig.custom() + .setSocketTimeout(socketTimeout * 1000) + .setConnectionRequestTimeout(connectionTimeout * 1000) + .setConnectTimeout(connectionTimeout * 1000) + .build(); + + CloseableHttpClient httpClient = HttpClients.custom() + .setDefaultRequestConfig(requestConfig) + .build(); + + HttpComponentsClientHttpRequestFactory factory = new HttpComponentsClientHttpRequestFactory(httpClient); + + return new RestTemplate(factory); + } +} diff --git a/backend/src/main/webapp/WEB-INF/jboss-deployment-structure.xml b/backend/src/main/webapp/WEB-INF/jboss-deployment-structure.xml deleted file mode 100644 index dad8afc..0000000 --- a/backend/src/main/webapp/WEB-INF/jboss-deployment-structure.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/config.md b/config.md index 7455710..08975fa 100644 --- a/config.md +++ b/config.md @@ -1,7 +1,5 @@ # Описание параметров конфигурации сервера приложений -Файл /standalone/configuration/standalone.xml - ## Общие - `webbpm.security.login.case_sensitive`. Default value = true. Параметр отвечающий за чувствительность к регистру при обработке логина пользователя. @@ -12,6 +10,15 @@ - development - в этом режиме используется соединение к БД проекта, заданное в Studio. - production - в этом режиме используется соединение к БД проекта, заданное с помощью jndi имени. +## Модуль BPMN + +```bpmn.enable``` - по умолчанию true, отвечает за создание бинов использующих модуль bpmn (при флаге false можно убрать зависимости модуля, смотри **docs/ru/developer-guide/Отключение_bpmn_модуля.md**) + +Пример: +```xml + +``` + ## jBPM - `com.arjuna.ats.arjuna.allowMultipleLastResources` @@ -94,7 +101,7 @@ Проверить успешность авторизации principal-а можно командой `kinit -t -i http.keytab %principal%`. В случае успешной авторизации команда `klist` в качестве default principal которым проводилась авторизация. -После этого в standalone.xml поправить параметр `app.service-principal` на principal, которым успешно авторизовались. principal имеет формат: `HTTP/%hostname%@%REALM%` +После этого поправить параметр `app.service-principal` на principal, которым успешно авторизовались. principal имеет формат: `HTTP/%hostname%@%REALM%` Пример конфигурации: @@ -191,7 +198,7 @@ ... 69 more ``` - необходимо проверить правильность указанного в standalone.xml principal-а. + необходимо проверить правильность указанного principal-а. ### Комбинации нескольких способов аутентификации @@ -328,13 +335,13 @@ {"host":"host","port":1234,"login":"user","password":"password","from":"email_from","senderName":"sender_name","isSecured":true} ``` Почтовый сервер - зарегистрированный актуальный почтовый адрес. В поле password нужно указывать не пароль для входа в почту, а создать пароль для приложений в учетке почты и указать его. -2. Для включения регистрации добавьте в *standalone.xml* свойство +2. Для включения регистрации добавьте свойство ``` - +registration.enabled=true" ``` -3. Также в *standalone.xml* укажите ресурс для отправки писем для подтверждения регистрации (из п.1) +3. Укажите ресурс для отправки писем для подтверждения регистрации (из п.1) ``` - +mail.jndi.resource.name=java:comp/env/webbpm/testResource ``` 4. При необходимости, отредактируйте шаблон письма для подтверждения регистрации (resources/src/main/resources/mail/confirmation.html) @@ -483,8 +490,6 @@ public class Main { ## Настройка логов -Все настройки делаются в файле `standalone.xml`, если не указано иначе. - ### Общие настройки Платформа Web-bpm использует корневую категорию логирования `ru.cg.webbpm`, рекомендуется выставлять ее в уровень `info`. todo check prod config @@ -686,7 +691,6 @@ JBPM использует 3 корневых категории логирова - `dev_mode` - настройка задающая dev_mode для просмотра логов (true/false). При отсутствие оставляет значение при сборке - `guard.confirm_exit` - выводить или нет диалог подтверждения, если обнаружены несохраненные данные в форме. Значение по умолчанию - false. - `password.pattern` - Регулярное выражение для валидации пароля. -- `password_pattern_error` - Сообщение об ошибке валидации. - `show.client.errors` - отвечает за отображение ошибок javascript-a пользователю (должна использоваться только в тестовых контурах) по умолчанию выключена - 'available_task.single_fetch' - Отвечает за количество запросов available_task при завершении процесса. true - одиночный запрос, false/не указано - 10 запросов(старая реализация). @@ -701,19 +705,30 @@ JBPM использует 3 корневых категории логирова ### Esmart -- `electronic_sign.esmart_extension_url` - url для создания расширенной подписи. Подробная информация по ссылке [http://demo.esmart.ru](http://demo.esmart.ru) -- `electronic_sign.tsp_address` - адрес сервера службы штампов времени +- `electronic_sign.esmart_plugin.tsp_address` - url для создания расширенной подписи. Подробная информация по ссылке [http://demo.esmart.ru](http://demo.esmart.ru) +- `electronic_sign.cades_plugin.tsp_address` - адрес сервера службы штампов времени Пример: ```text -"electronic_sign.esmart_extension_url": "http://dsig.ibsdemo.ru/ibs_dsig/ibs_dSig.asmx" +"electronic_sign.esmart_plugin.tsp_address": " http://dsig.rubydemo.ru/ibs_dsig/ibs_dSig.asmx" ``` ## Способ аутентификации - `auth_method` - способ аутентификации. Может принимать одно значение из списка: form, kerberos, cert_over_db, cert_over_ldap +## Url проекта + +- `backend.url` - задает url для проека. Если параметра нет, то берется дефолтные: +``` +window.location.protocol + '//' + window.location.hostname + ':' + window.location.port + '/backend' +``` +Пример: +``` +http://10.10.31.80:8080/ +``` + ## Таймер очистки закешированных значений фильтров - `filter_cleanup_interval_hours` - время жизни закешированного значения фильтра в часах. По умолчанию - 720 часов, diff --git a/config/application.yaml b/config/application.yaml new file mode 100644 index 0000000..fa5ab8d --- /dev/null +++ b/config/application.yaml @@ -0,0 +1,88 @@ +config: + data: + executor: + socket: + timeout: 10 + connection: + timeout: 10 + url: http://localhost:8080/api +webbpm: + mode: development + security: + token: + secret: + key: de2c9de3-0de5-47c1-a8de-0fad6f93873b-com.example-ervu_eks_5-17_10_2025_13:18 +server: + servlet: + context-path: /ervu-eks +bpmn: + enable: false +gar: + enable: false +fias: + enable: false +spring: + mvc: + servlet: + loadOnStartup: 1 + jackson: + serialization: + write-dates-as-timestamps: false + write-enums-using-to-string: true + deserialization: + read-enums-using-to-string: true + task: + scheduling: + pool: + size: 12 + datasource: + person: + url: jdbc:postgresql://10.10.31.118:5432/person_registry + username: ervu + password: ervu + driverClassName: org.postgresql.Driver + dbBeanPackage: com.example.ervu_eks_5.db_beans.person + sqlDialect: POSTGRES + default: true + manually: true + schemas: + - public + security: + url: jdbc:postgresql://10.10.31.118/ervu_eks + username: ervu_eks_sec + password: ervu_eks_sec + driverClassName: org.postgresql.Driver + dbBeanPackage: com.example.ervu_eks_5.db_beans.security + sqlDialect: POSTGRES + maxSize: 7 + metricsEnabled: true + default: false + manually: true + schemas: + - security +monitoring: + white: + ip: + list: 127.0.0.1, 0:0:0:0:0:0:0:1 +management: + endpoints: + web: + exposure: + include: info,health,metrics,prometheus + metrics: + export: + prometheus: + enabled: true +logging: + level: + root: INFO + org: + jooq: + tools: DEBUG + ru: + cg: + webbpm: + modules: + database: + impl: + analytics: DEBUG diff --git a/distribution/pom.xml b/distribution/pom.xml deleted file mode 100644 index 8f0c61b..0000000 --- a/distribution/pom.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - 4.0.0 - - ru.micord.ervu - eks - 1.0.0-SNAPSHOT - - - ru.micord.ervu.eks - distribution - ear - - - /backend - - - - - ru.micord.ervu.eks - backend - war - - - ru.micord.ervu.eks - frontend - war - - - - - - - org.apache.maven.plugins - maven-ear-plugin - 3.2.0 - - - - ru.micord.ervu.eks - frontend - / - frontend.war - - - ru.micord.ervu.eks - backend - ${backendContext} - backend.war - - - - - - ${project.parent.artifactId} - - - - - enable-version-in-url - - /backend-${project.version} - - - - diff --git a/distribution/src/main/application/META-INF/jboss-deployment-structure.xml b/distribution/src/main/application/META-INF/jboss-deployment-structure.xml deleted file mode 100644 index 85df0d6..0000000 --- a/distribution/src/main/application/META-INF/jboss-deployment-structure.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/frontend/.gitignore b/frontend/.gitignore new file mode 100644 index 0000000..fecfda5 --- /dev/null +++ b/frontend/.gitignore @@ -0,0 +1,12 @@ +# frameworks dirs +.angular +.nx + +# compiled output +dist +tmp +out-tsc + +# generated by webbpm +tsconfig.base.json +src/ts/page.routing.ts diff --git a/frontend/.nxignore b/frontend/.nxignore new file mode 100644 index 0000000..66855db --- /dev/null +++ b/frontend/.nxignore @@ -0,0 +1,3 @@ +!modules/generated/ +!tsconfig.base.json +!src/ts/page.routing.ts diff --git a/frontend/.prettierignore b/frontend/.prettierignore new file mode 100644 index 0000000..113709c --- /dev/null +++ b/frontend/.prettierignore @@ -0,0 +1,6 @@ +# Add files here to ignore them from prettier formatting +/dist +/coverage +/.nx/cache +/.nx/workspace-data +.angular diff --git a/frontend/.prettierrc b/frontend/.prettierrc new file mode 100644 index 0000000..544138b --- /dev/null +++ b/frontend/.prettierrc @@ -0,0 +1,3 @@ +{ + "singleQuote": true +} diff --git a/frontend/angular.json b/frontend/angular.json deleted file mode 100644 index 965697d..0000000 --- a/frontend/angular.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "$schema": "./node_modules/@angular/cli/lib/config/schema.json", - "version": 1, - "newProjectRoot": "projects", - "projects": { - "webbpm-frontend": { - "root": "", - "sourceRoot": "src", - "projectType": "application", - "architect": { - "build": { - "builder": "@angular-devkit/build-angular:browser", - "options": { - "outputPath": "dist", - "index": "src/index.html", - "main": "src/ts/main.ts", - "tsConfig": "src/tsconfig.json", - "polyfills": "src/ts/polyfills.ts", - "assets": [ - "src/resources" - ], - "styles": [ - ], - "scripts": [ - "node_modules/jquery/dist/jquery.min.js", - "node_modules/moment/min/moment-with-locales.js", - "node_modules/moment-timezone/builds/moment-timezone-with-data.min.js", - "node_modules/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js", - "node_modules/selectize/dist/js/standalone/selectize.min.js", - "node_modules/downloadjs/download.min.js" - ] - }, - "configurations": { - "production": { - "optimization": true, - "outputHashing": "all", - "sourceMap": false, - "extractCss": true, - "namedChunks": false, - "aot": true, - "extractLicenses": true, - "vendorChunk": false, - "buildOptimizer": true - } - } - }, - "serve": { - "builder": "@angular-devkit/build-angular:dev-server", - "options": { - "browserTarget": "webbpm-frontend:build" - }, - "configurations": {} - }, - "extract-i18n": { - "builder": "@angular-devkit/build-angular:extract-i18n", - "options": { - "browserTarget": "webbpm-frontend:build" - } - }, - "lint": { - "builder": "@angular-devkit/build-angular:tslint", - "options": { - "tsConfig": [], - "exclude": [] - } - } - } - } - }, - "defaultProject": "webbpm-frontend" -} diff --git a/frontend/eslint.config.mjs b/frontend/eslint.config.mjs new file mode 100644 index 0000000..11c4f9b --- /dev/null +++ b/frontend/eslint.config.mjs @@ -0,0 +1,42 @@ +import nx from '@nx/eslint-plugin'; + +export default [ + ...nx.configs['flat/base'], + ...nx.configs['flat/typescript'], + ...nx.configs['flat/javascript'], + { + ignores: ['**/dist'], + }, + { + files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'], + rules: { + '@nx/enforce-module-boundaries': [ + 'error', + { + enforceBuildableLibDependency: true, + allow: ['^.*/eslint(\\.base)?\\.config\\.[cm]?js$'], + depConstraints: [ + { + sourceTag: '*', + onlyDependOnLibsWithTags: ['*'], + }, + ], + }, + ], + }, + }, + { + files: [ + '**/*.ts', + '**/*.tsx', + '**/*.cts', + '**/*.mts', + '**/*.js', + '**/*.jsx', + '**/*.cjs', + '**/*.mjs', + ], + // Override or add rules here + rules: {}, + }, +]; diff --git a/frontend/index.html b/frontend/index.html index a3f48ff..11438fe 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -1,23 +1,14 @@ - - - - ervu-eks - - - - - - - - - - - - -
- - + + + + ervu-eks + + + + + + +
+
+ + diff --git a/frontend/index.webpack.html b/frontend/index.webpack.html deleted file mode 100644 index c98f47a..0000000 --- a/frontend/index.webpack.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - ervu-eks - - - - -
- - diff --git a/frontend/modules/shared/ng-package.json b/frontend/modules/shared/ng-package.json new file mode 100644 index 0000000..18d8ea2 --- /dev/null +++ b/frontend/modules/shared/ng-package.json @@ -0,0 +1,7 @@ +{ + "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", + "dest": "../../dist/modules/shared", + "lib": { + "entryFile": "src/index.ts" + } +} diff --git a/frontend/modules/shared/package.json b/frontend/modules/shared/package.json new file mode 100644 index 0000000..be592ad --- /dev/null +++ b/frontend/modules/shared/package.json @@ -0,0 +1,12 @@ +{ + "name": "shared", + "version": "0.0.1", + "scripts": { + "generate-barrels": "npx barrelsby -D -d src -n index.ts -i src -e \"\\.spec\\.ts$\" \"\\.d\\.ts$\"" + }, + "peerDependencies": { + "@angular/common": "19.2.7", + "@angular/core": "19.2.7" + }, + "sideEffects": false +} diff --git a/frontend/modules/shared/project.json b/frontend/modules/shared/project.json new file mode 100644 index 0000000..ddc1552 --- /dev/null +++ b/frontend/modules/shared/project.json @@ -0,0 +1,29 @@ +{ + "name": "shared", + "$schema": "../../node_modules/nx/schemas/project-schema.json", + "sourceRoot": "modules/shared/src", + "prefix": "lib", + "projectType": "library", + "tags": [], + "targets": { + "build": { + "executor": "@nx/angular:ng-packagr-lite", + "outputs": ["{workspaceRoot}/dist/{projectRoot}"], + "options": { + "project": "modules/shared/ng-package.json" + }, + "configurations": { + "production": { + "tsConfig": "modules/shared/tsconfig.lib.prod.json" + }, + "development": { + "tsConfig": "modules/shared/tsconfig.lib.json" + } + }, + "defaultConfiguration": "production" + }, + "lint": { + "executor": "@nx/eslint:lint" + } + } +} diff --git a/frontend/modules/shared/src/index.ts b/frontend/modules/shared/src/index.ts new file mode 100644 index 0000000..207aece --- /dev/null +++ b/frontend/modules/shared/src/index.ts @@ -0,0 +1,13 @@ +/** + * @file Automatically generated by barrelsby. + */ + +export * from "./lib/shared.module"; +export * from "./lib/component/app-progress-indication.component"; +export * from "./lib/component/ConfigExecuteBtn"; +export * from "./lib/component/ExportDataBtn"; +export * from "./lib/generated/dto/ConfigExecuteRequest"; +export * from "./lib/generated/dto/ExportDataRequest"; +export * from "./lib/generated/rpc/ConfigExecutorRpcService"; +export * from "./lib/generated/rpc/ExportDataRpcService"; +export * from "./lib/service/app-progress-indication.service"; diff --git a/frontend/src/resources/template/app/component/ConfigExecuteBtn.html b/frontend/modules/shared/src/lib/component/ConfigExecuteBtn.html similarity index 100% rename from frontend/src/resources/template/app/component/ConfigExecuteBtn.html rename to frontend/modules/shared/src/lib/component/ConfigExecuteBtn.html diff --git a/frontend/src/ts/ervu/ConfigExecuteBtn.ts b/frontend/modules/shared/src/lib/component/ConfigExecuteBtn.ts similarity index 93% rename from frontend/src/ts/ervu/ConfigExecuteBtn.ts rename to frontend/modules/shared/src/lib/component/ConfigExecuteBtn.ts index 47573a2..b5b5b20 100644 --- a/frontend/src/ts/ervu/ConfigExecuteBtn.ts +++ b/frontend/modules/shared/src/lib/component/ConfigExecuteBtn.ts @@ -14,10 +14,10 @@ import {ConfigExecuteRequest} from "../generated/dto/ConfigExecuteRequest"; * @author: a.petrov */ @Component({ - moduleId: module.id, selector: 'config-execute-button-component', - templateUrl: './../../../src/resources/template/app/component/ConfigExecuteBtn.html', - changeDetection: ChangeDetectionStrategy.OnPush + templateUrl: './ConfigExecuteBtn.html', + changeDetection: ChangeDetectionStrategy.OnPush, + standalone: false }) export class ConfigExecuteBtn extends AbstractButton { diff --git a/frontend/src/ts/ervu/ExportDataBtn.ts b/frontend/modules/shared/src/lib/component/ExportDataBtn.ts similarity index 91% rename from frontend/src/ts/ervu/ExportDataBtn.ts rename to frontend/modules/shared/src/lib/component/ExportDataBtn.ts index dffc618..1b2b6d8 100644 --- a/frontend/src/ts/ervu/ExportDataBtn.ts +++ b/frontend/modules/shared/src/lib/component/ExportDataBtn.ts @@ -17,10 +17,10 @@ import {ExportDataRequest} from "../generated/dto/ExportDataRequest"; * @author: kochetkov */ @Component({ - moduleId: module.id, selector: 'export-data-button-component', - templateUrl: './../../../src/resources/template/app/component/ConfigExecuteBtn.html', - changeDetection: ChangeDetectionStrategy.OnPush + templateUrl: './ConfigExecuteBtn.html', + changeDetection: ChangeDetectionStrategy.OnPush, + standalone: false }) export class ExportDataBtn extends AbstractButton { diff --git a/frontend/modules/shared/src/lib/component/app-progress-indication.component.ts b/frontend/modules/shared/src/lib/component/app-progress-indication.component.ts new file mode 100644 index 0000000..3dd5758 --- /dev/null +++ b/frontend/modules/shared/src/lib/component/app-progress-indication.component.ts @@ -0,0 +1,11 @@ +import {ChangeDetectionStrategy, Component} from "@angular/core"; + +@Component({ + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'progress-indication-dialog-content', + templateUrl: './progress-indication.html', + standalone: false +}) +export class AppProgressIndicationComponent { + +} diff --git a/frontend/src/resources/template/app/component/progress-indication.html b/frontend/modules/shared/src/lib/component/progress-indication.html similarity index 96% rename from frontend/src/resources/template/app/component/progress-indication.html rename to frontend/modules/shared/src/lib/component/progress-indication.html index 95a901e..7654c98 100644 --- a/frontend/src/resources/template/app/component/progress-indication.html +++ b/frontend/modules/shared/src/lib/component/progress-indication.html @@ -1,3 +1,3 @@ -