release version 1.10.0

This commit is contained in:
2024-10-07 18:42:55 +03:00
parent 2034182607
commit a5088587f7
1501 changed files with 28818 additions and 59966 deletions

View File

@ -3,7 +3,7 @@
<parent>
<groupId>ru.entaxy.esb.ui</groupId>
<artifactId>entaxy-hawtio</artifactId>
<version>1.9.0</version>
<version>1.10.0</version>
</parent>
<groupId>ru.entaxy.esb.ui.hawtio</groupId>
<artifactId>artemis-plugin-entaxy</artifactId>

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* artemis-plugin-entaxy
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -3,7 +3,7 @@
~~~~~~licensing~~~~~~
artemis-plugin-entaxy
==========
Copyright (C) 2020 - 2023 EmDev LLC
Copyright (C) 2020 - 2024 EmDev LLC
==========
You may not use this file except in accordance with the License Terms of the Copyright
Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
# ~~~~~~licensing~~~~~~
# artemis-plugin-entaxy
# ==========
# Copyright (C) 2020 - 2023 EmDev LLC
# Copyright (C) 2020 - 2024 EmDev LLC
# ==========
# You may not use this file except in accordance with the License Terms of the Copyright
# Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -20,7 +20,7 @@
~~~~~~licensing~~~~~~
artemis-plugin-entaxy
==========
Copyright (C) 2020 - 2023 EmDev LLC
Copyright (C) 2020 - 2024 EmDev LLC
==========
You may not use this file except in accordance with the License Terms of the Copyright
Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
~~~~~~licensing~~~~~~
artemis-plugin-entaxy
==========
Copyright (C) 2020 - 2023 EmDev LLC
Copyright (C) 2020 - 2024 EmDev LLC
==========
You may not use this file except in accordance with the License Terms of the Copyright
Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
~~~~~~licensing~~~~~~
artemis-plugin-entaxy
==========
Copyright (C) 2020 - 2023 EmDev LLC
Copyright (C) 2020 - 2024 EmDev LLC
==========
You may not use this file except in accordance with the License Terms of the Copyright
Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
~~~~~~licensing~~~~~~
artemis-plugin-entaxy
==========
Copyright (C) 2020 - 2023 EmDev LLC
Copyright (C) 2020 - 2024 EmDev LLC
==========
You may not use this file except in accordance with the License Terms of the Copyright
Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* artemis-plugin-entaxy
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* artemis-plugin-entaxy
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* artemis-plugin-entaxy
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* artemis-plugin-entaxy
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* artemis-plugin-entaxy
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* artemis-plugin-entaxy
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* artemis-plugin-entaxy
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* artemis-plugin-entaxy
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* artemis-plugin-entaxy
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* artemis-plugin-entaxy
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* artemis-plugin-entaxy
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* artemis-plugin-entaxy
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* artemis-plugin-entaxy
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* artemis-plugin-entaxy
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* artemis-plugin-entaxy
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* artemis-plugin-entaxy
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* artemis-plugin-entaxy
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* artemis-plugin-entaxy
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* artemis-plugin-entaxy
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* artemis-plugin-entaxy
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* artemis-plugin-entaxy
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* artemis-plugin-entaxy
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* artemis-plugin-entaxy
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* artemis-plugin-entaxy
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* artemis-plugin-entaxy
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -3,7 +3,7 @@
<parent>
<groupId>ru.entaxy.esb.ui</groupId>
<artifactId>entaxy-hawtio</artifactId>
<version>1.9.0</version>
<version>1.10.0</version>
</parent>
<groupId>ru.entaxy.esb.ui.hawtio</groupId>
<artifactId>entaxy-branding-plugin</artifactId>

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-branding-plugin
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -3,7 +3,7 @@
~~~~~~licensing~~~~~~
entaxy-branding-plugin
==========
Copyright (C) 2020 - 2023 EmDev LLC
Copyright (C) 2020 - 2024 EmDev LLC
==========
You may not use this file except in accordance with the License Terms of the Copyright
Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -3,7 +3,7 @@
~~~~~~licensing~~~~~~
entaxy-branding-plugin
==========
Copyright (C) 2020 - 2023 EmDev LLC
Copyright (C) 2020 - 2024 EmDev LLC
==========
You may not use this file except in accordance with the License Terms of the Copyright
Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -3,7 +3,7 @@
~~~~~~licensing~~~~~~
entaxy-branding-plugin
==========
Copyright (C) 2020 - 2023 EmDev LLC
Copyright (C) 2020 - 2024 EmDev LLC
==========
You may not use this file except in accordance with the License Terms of the Copyright
Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -3,7 +3,7 @@
~~~~~~licensing~~~~~~
entaxy-branding-plugin
==========
Copyright (C) 2020 - 2023 EmDev LLC
Copyright (C) 2020 - 2024 EmDev LLC
==========
You may not use this file except in accordance with the License Terms of the Copyright
Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

Binary file not shown.

Before

Width:  |  Height:  |  Size: 757 B

After

Width:  |  Height:  |  Size: 774 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 877 B

After

Width:  |  Height:  |  Size: 888 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 823 B

After

Width:  |  Height:  |  Size: 810 B

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-branding-plugin
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
@ -84,10 +84,15 @@ var Branding = (function (Branding) {
"description": "Entaxy Management Console",
"links": [
{
"url": "/entaxy-docs/index.html",
"url": "/entaxy-docs/entaxy-core/latest/index.html",
"target": "_blank",
"text": "User Manual"
},
{
"url": "/camel-docs/manual/3.4.x/index.html",
"target": "_blank",
"text": "Camel Manual"
},
{
"url": "https://entaxy.ru/",
"text": "Website"

View File

@ -3,7 +3,7 @@
<parent>
<groupId>ru.entaxy.esb.ui</groupId>
<artifactId>entaxy-hawtio</artifactId>
<version>1.9.0</version>
<version>1.10.0</version>
</parent>
<groupId>ru.entaxy.esb.ui.hawtio</groupId>
<artifactId>entaxy-h2-plugin</artifactId>

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -3,7 +3,7 @@
~~~~~~licensing~~~~~~
entaxy-management-plugin
==========
Copyright (C) 2020 - 2023 EmDev LLC
Copyright (C) 2020 - 2024 EmDev LLC
==========
You may not use this file except in accordance with the License Terms of the Copyright
Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -3,7 +3,7 @@
~~~~~~licensing~~~~~~
entaxy-management-plugin
==========
Copyright (C) 2020 - 2023 EmDev LLC
Copyright (C) 2020 - 2024 EmDev LLC
==========
You may not use this file except in accordance with the License Terms of the Copyright
Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
~~~~~~licensing~~~~~~
entaxy-management-plugin
==========
Copyright (C) 2020 - 2023 EmDev LLC
Copyright (C) 2020 - 2024 EmDev LLC
==========
You may not use this file except in accordance with the License Terms of the Copyright
Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
~~~~~~licensing~~~~~~
entaxy-management-plugin
==========
Copyright (C) 2020 - 2023 EmDev LLC
Copyright (C) 2020 - 2024 EmDev LLC
==========
You may not use this file except in accordance with the License Terms of the Copyright
Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
~~~~~~licensing~~~~~~
entaxy-management-plugin
==========
Copyright (C) 2020 - 2023 EmDev LLC
Copyright (C) 2020 - 2024 EmDev LLC
==========
You may not use this file except in accordance with the License Terms of the Copyright
Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-h2-plugin
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -3,12 +3,12 @@
<parent>
<groupId>ru.entaxy.esb.ui</groupId>
<artifactId>entaxy-hawtio</artifactId>
<version>1.9.0</version>
<version>1.10.0</version>
</parent>
<groupId>ru.entaxy.esb.ui.hawtio</groupId>
<artifactId>entaxy-management-plugin</artifactId>
<packaging>war</packaging>
<name>ENTAXY :: UI :: HAWTIO :: ENTAXY MANAGEMENT</name>
<name>ENTAXY :: UI :: HAWTIO :: ENTAXY MANAGEMENT PLUGIN</name>
<description>ENTAXY :: UI :: HAWTIO :: ENTAXY MANAGEMENT</description>
<properties>

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -3,7 +3,7 @@
~~~~~~licensing~~~~~~
entaxy-management-plugin
==========
Copyright (C) 2020 - 2023 EmDev LLC
Copyright (C) 2020 - 2024 EmDev LLC
==========
You may not use this file except in accordance with the License Terms of the Copyright
Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -3,7 +3,7 @@
~~~~~~licensing~~~~~~
entaxy-management-plugin
==========
Copyright (C) 2020 - 2023 EmDev LLC
Copyright (C) 2020 - 2024 EmDev LLC
==========
You may not use this file except in accordance with the License Terms of the Copyright
Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
~~~~~~licensing~~~~~~
entaxy-management-plugin
==========
Copyright (C) 2020 - 2023 EmDev LLC
Copyright (C) 2020 - 2024 EmDev LLC
==========
You may not use this file except in accordance with the License Terms of the Copyright
Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
~~~~~~licensing~~~~~~
entaxy-management-plugin
==========
Copyright (C) 2020 - 2023 EmDev LLC
Copyright (C) 2020 - 2024 EmDev LLC
==========
You may not use this file except in accordance with the License Terms of the Copyright
Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
~~~~~~licensing~~~~~~
entaxy-management-plugin
==========
Copyright (C) 2020 - 2023 EmDev LLC
Copyright (C) 2020 - 2024 EmDev LLC
==========
You may not use this file except in accordance with the License Terms of the Copyright
Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -1,213 +0,0 @@
/*-
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
var Entaxy;
(function (Entaxy) {
Entaxy._module.component('entaxyAddConnectorModal', {
bindings: {
modalInstance: '<',
resolve: '<'
},
template:
`
<div class="entaxy-modal-container">
<div class="modal-header">
<button type="button" class="close" aria-label="Close" ng-click="$ctrl.cancel()">
<span class="pficon pficon-close" aria-hidden="true"></span>
</button>
<h4 class="modal-title">{{$ctrl.modalTitle}}</h4>
</div>
<div ng-if="$ctrl.step1 && $ctrl.profiles">
<div class="modal-body-header">
<h2>Choose profile to attach connector to</h2>
</div>
<div class="modal-body" style="height:433px; max-height:433px">
<entaxy-modal-list items="$ctrl.profiles" selected="$ctrl.selectedProfile"
change-selection="$ctrl.changeProfileSelection" enable-dbl-click="true"></entaxy-modal-list>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" ng-click="$ctrl.next()"
ng-disabled="!$ctrl.selectedProfile">Next</button>
</div>
</div>
<div ng-if="$ctrl.step2">
<div class="modal-body-header">
<h2>Choose connector template</h2>
</div>
<div class="modal-body" style="height:433px; max-height:433px">
<entaxy-modal-list items="$ctrl.templates" selected="$ctrl.selectedTemplate"
change-selection="$ctrl.changeTemplateSelection" enable-dbl-click="true"></entaxy-modal-list>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" ng-click="$ctrl.back()" ng-if="$ctrl.profiles">Back</button>
<button type="button" class="btn btn-default" ng-click="$ctrl.next()"
ng-disabled="!$ctrl.selectedTemplate">Next</button>
</div>
</div>
<form name="connectorForm" class="form-horizontal" ng-if="$ctrl.step3" ng-submit="$ctrl.saveConnector($ctrl.formFields)">
<div class="modal-body" style="height:503px; max-height:503px;">
<div class="modal-body-header">
<h2>Fill in connector template parameters</h2>
</div>
<div class="form-group" ng-class="{'has-error': $ctrl.errors[formField.name]}"
ng-repeat="formField in $ctrl.formFields" style="margin:15px;">
<label class="col-sm-3 control-label" ng-class="{'required-pf': formField.isRequired}" for="{{formField.name}}">{{formField.label}}</label>
<div class="col-sm-8">
<input type="{{formField.type}}" id="{{formField.name}}" ng-class="{'form-control': formField.type !== 'checkbox'}"
ng-model="formField.value" ng-readonly="formField.isReadOnly" ng-if="!formField.typeInfo">
<span class="help-block" ng-show="$ctrl.errors[formField.name]">{{$ctrl.errors[formField.name]}}</span>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" ng-click="$ctrl.back()">Back</button>
<button type="submit" class="btn btn-primary">Add</button>
</div>
</form>
</div>
`,
controller: EntaxyAddConnectorModalController
})
.name;
function EntaxyAddConnectorModalController(workspace, jolokia) {
'ngInject';
var ctrl = this;
ctrl.$onInit = function() {
let templates = Entaxy.getConnectorTemplates();
ctrl.templates = templates.map(template => { return { name: template, displayName: template }});
ctrl.profiles = ctrl.resolve.profiles;
if (ctrl.profiles) {
ctrl.step1 = true;
ctrl.step2 = false;
ctrl.step3 = false;
} else {
ctrl.step1 = false;
ctrl.step2 = true;
ctrl.step3 = false;
}
ctrl.modalTitle = ctrl.resolve.profileName ?
'Add Legacy Connector to ' + ctrl.resolve.profileName : 'Add Legacy Connector';
}
ctrl.changeProfileSelection = function(item, isDblClicked) {
ctrl.selectedProfile = item;
if (isDblClicked) {
ctrl.next();
}
}
ctrl.changeTemplateSelection = function(item, isDblClicked) {
ctrl.selectedTemplate = item;
if (isDblClicked) {
ctrl.next();
}
}
ctrl.next = function() {
if (ctrl.step1 === true) {
ctrl.step1 = false;
ctrl.step2 = true;
} else if (ctrl.step2 === true) {
ctrl.step2 = false;
ctrl.step3 = true;
}
if (ctrl.step3 === true) {
defineFormFields();
}
}
function defineFormFields() {
if (!ctrl.formFields || ctrl.selectedTemplate.name !== ctrl.formFields[0].value) {
ctrl.formFields = Entaxy.getConnectorTemplateParams(ctrl.selectedTemplate.name);
ctrl.formFields.unshift({
label: 'templateName',
displayName: 'Template Name',
type: 'java.lang.String',
helpText: null,
value: ctrl.selectedTemplate.name,
isReadOnly: true
});
ctrl.formFields.forEach(formField => {
formField.name = formField.label;
if (formField.displayName) {
formField.label = formField.displayName;
}
formField.type = Entaxy.convertToHtmlInputType(formField.type);
});
}
}
ctrl.back = function() {
if (ctrl.step2 === true) {
ctrl.step1 = true;
ctrl.step2 = false;
} else if (ctrl.step3 === true) {
ctrl.step2 = true;
ctrl.step3 = false;
}
}
ctrl.cancel = function() {
ctrl.modalInstance.dismiss();
}
ctrl.saveConnector = function(fields) {
ctrl.errors = validateFields(fields);
if (Object.keys(ctrl.errors).length === 0) {
let connectorArgs = {
profile: ctrl.selectedProfile,
connectorTemplateName: ctrl.formFields.shift().value,
connectorFields: ctrl.formFields.map(formField => { return { label: formField.name, value: formField.value }; })
};
ctrl.modalInstance.close(connectorArgs);
}
}
function validateFields(fields) {
let errors = {};
_.forEach(fields, (field) => {
if (field.isRequired && (!field.value || (field.type !== 'checkbox' ? field.value.toString().trim().length === 0 : false))) {
errors[field.name] = 'Please fill out this field';
}
});
return errors;
}
}
EntaxyAddConnectorModalController.$inject = ['workspace', 'jolokia'];
})(Entaxy || (Entaxy = {}));

View File

@ -1,99 +0,0 @@
/*-
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
var Entaxy;
(function (Entaxy) {
Entaxy._module.component('entaxyAddFolderModal', {
bindings: {
modalInstance: '<',
resolve: '<'
},
template:
`
<div class="entaxy-simple-modal-container">
<div class="modal-header">
<button type="button" class="close" aria-label="Close" ng-click="$ctrl.cancel()">
<span class="pficon pficon-close" aria-hidden="true"></span>
</button>
<h4 class="modal-title">Set folder name</h4>
</div>
<div class="modal-body-small">
<div class="form-group" ng-class="{'has-error': $ctrl.error}">
<div class="col-sm-12">
<input type="text" class="form-control" ng-model="$ctrl.name">
<span class="help-block" ng-show="$ctrl.error">{{$ctrl.error}}</span>
</div>
</div>
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-primary" ng-click="$ctrl.save()">Save</button>
</div>
</div>
`,
controller: entaxyAddFolderModalController
})
.name;
function entaxyAddFolderModalController($uibModal) {
'ngInject';
let ctrl = this;
ctrl.$onInit = function() {
ctrl.names = ctrl.resolve.names;
}
ctrl.cancel = function(reason) {
ctrl.modalInstance.dismiss(reason);
}
ctrl.save = function() {
ctrl.error = validate();
if (!ctrl.error) {
ctrl.modalInstance.close(ctrl.name);
}
}
function validate() {
let error;
if (!ctrl.name || ctrl.name.length == 0 || ctrl.name.trim().length == 0) {
return 'Folder name must not be empty';
}
['/', '\\', ':', '*', '?', '<', '>', '|'].forEach((symbol) => {
if (ctrl.name.indexOf(symbol) >= 0) {
error = 'Folder name must not include symbols /\\:*?<>|';
}
});
ctrl.names.forEach((name) => {
if (name === ctrl.name) {
error = 'Folder with this name already exists';
}
});
return error;
}
}
entaxyAddFolderModalController.$inject = ['$uibModal'];
})(Entaxy || (Entaxy = {}));

View File

@ -1,321 +0,0 @@
/*-
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
var Entaxy;
(function (Entaxy) {
Entaxy._module
.component('entaxyAllConnectorsTable', {
template:
`
<h2>
Connectors
</h2>
<pf-toolbar class="entaxy-toolbar" config="$ctrl.toolbarConfig"></pf-toolbar>
<pf-table-view config="$ctrl.tableConfig"
columns="$ctrl.tableColumns"
action-buttons="$ctrl.tableActionButtons"
menu-actions="$ctrl.menuActions"
page-config="$ctrl.pageConfig"
items="$ctrl.viewedItems">
</pf-table-view>
`,
controller: EntaxyAllConnectorsTableController
})
.name;
function EntaxyAllConnectorsTableController($q, workspace, $scope, operationsService, jolokia, jolokiaService, entaxyService, entaxyLegacyConnectorService) {
'ngInject';
let ctrl = this;
ctrl.workspace = workspace;
ctrl.itemName = "Connector";
ctrl.statusName = "BundleState";
let filterValues = Entaxy.getAllBundleStates();
ctrl.tableConfig = {
selectionMatchProp: 'displayName',
showCheckboxes: false
};
ctrl.toolbarConfig = {
filterConfig: {
fields: [
{
id: 'direction',
title: 'Direction',
placeholder: 'Filter by Direction...',
filterType: 'select',
filterValues: ['in', 'out']
},
{
id: 'displayName',
title: 'Name',
placeholder: 'Filter by Name...',
filterType: 'text'
},
{
id: 'profile',
title: 'Profile',
placeholder: 'Filter by Profile...',
filterType: 'select',
filterValues: getProfiles().map(profile => profile.name)
},
{
id: 'status',
title: 'Status',
placeholder: 'Filter by Status...',
filterType: 'select',
filterValues: filterValues
}
],
appliedFilters: [],
onFilterChange: filterChange
},
isTableView: true
};
ctrl.tableColumns = [
{ header: 'Direction', itemField: 'direction' },
{ header: 'Name', itemField: 'displayName' },
{ header: 'Profile', itemField: 'profile' },
{ header: 'Status', itemField: 'status' }
];
ctrl.pageConfig = Entaxy.getStandardPageConfig();
function filterChange(filters) {
ctrl.viewedItems = Entaxy.applyFilters(ctrl.items, filters, matchesFilter);
ctrl.toolbarConfig.filterConfig.resultsCount = ctrl.viewedItems.length;
};
function matchesFilter(item, filter) {
let match = true;
if (filter.id === 'direction') {
match = item.direction === filter.value;
} else if (filter.id === 'displayName') {
match = item.displayName.match(filter.value) !== null;
} else if (filter.id === 'profile') {
match = item.profile === filter.value;
} else if (filter.id === 'status') {
match = item.status === filter.value;
}
return match;
};
ctrl.items = [];
ctrl.viewedItems = [];
ctrl.$onInit = function() {
populateTable();
let primaryActions = [
{
name: 'Add Connector',
actionFn: () => ctrl.showModal(Entaxy.MODAL_MODES.ADD),
isDisabled: getProfiles().length === 0
},
{
name: 'Add Legacy Connector',
actionFn: () => ctrl.showAddLegacyConnectorModal(),
isDisabled: getProfiles().length === 0
}
];
ctrl.toolbarConfig.actionsConfig = {
primaryActions: primaryActions
};
ctrl.tableActionButtons = [
{ name: 'Start', title: 'Start ' + ctrl.itemName, actionFn: startItem },
{ name: 'Stop', title: 'Stop ' + ctrl.itemName, actionFn: stopItem },
{ name: 'Uninstall', title: 'Uninstall ' + ctrl.itemName, actionFn: uninstallItem }
];
ctrl.menuActions = [
{ name: 'View Properties', title: 'View ' + ctrl.itemName + ' Properties', actionFn: showPropertiesModal },
{ name: 'Edit Properties', title: 'Edit ' + ctrl.itemName + ' Properties', actionFn: showPropertiesModal }
];
}
function showPropertiesModal(action, item) {
if (action.name === 'View Properties') {
ctrl.showModal(Entaxy.MODAL_MODES.VIEW, item);
} else if (action.name === 'Edit Properties') {
ctrl.showModal(Entaxy.MODAL_MODES.EDIT, item);
}
}
function populateTable() {
let items = [];
let promises = [];
let profilesFolder = entaxyService.getDomainFolder()
.findDescendant(child => child.objectName && child.objectName.endsWith('category=profiles'));
let mbeans = entaxyService.getAllChildMBeansByRuntimeType(profilesFolder, 'entaxy.runtime.connector');
mbeans.forEach(mbean => {
let profileMBeanName = findConnectorParentProfileMBeanName(mbean);
promises.push(jolokiaService.getAttributes(mbean.objectName, [ctrl.statusName, 'Name', 'DisplayName', 'Direction'])
.then((response) => {
items.push({
name: response['Name'],
displayName: response['DisplayName'] === '' || response['DisplayName'].startsWith('ERROR') ? response['Name'] : response['DisplayName'],
direction: response['Direction'] === '' || response['Direction'].startsWith('ERROR') ? '-' : response['Direction'],
status: response[ctrl.statusName],
mbeanName: mbean.objectName,
profileMBeanName: profileMBeanName,
profile: jolokia.getAttribute(profileMBeanName, 'Name')
});
}));
});
$q.all(promises)
.then(() => {
ctrl.items = items;
ctrl.viewedItems = items;
let filters = ctrl.toolbarConfig.filterConfig.appliedFilters;
if (filters.length > 0) {
filterChange(filters);
} else {
ctrl.toolbarConfig.filterConfig.resultsCount = items.length;
}
});
}
function findConnectorParentProfileMBeanName(connectorMBean) {
let parent = connectorMBean.parent;
if (parent.objectName) {
let attributes = jolokia.getAttribute(parent.objectName);
if (attributes.RuntimeType === 'entaxy.runtime.profile') {
return parent.objectName;
}
} else {
return findConnectorParentProfileMBeanName(parent);
}
}
function getProfiles() {
let profilesFolder = entaxyService.getDomainFolder()
.findDescendant(child => child.objectName && child.objectName.endsWith('category=profiles'));
let profileMbeans = entaxyService.getAllChildMBeansByRuntimeType(profilesFolder, 'entaxy.runtime.profile');
let profiles = profileMbeans.length > 0 ?
profileMbeans.map(mbean => {
let name = jolokia.getAttribute(mbean.objectName, 'Name');
return {
name: name,
displayName: name,
mbeanName: mbean.objectName
};
}) : [];
return profiles;
}
ctrl.showModal = function(mode, item) {
if (mode === Entaxy.MODAL_MODES.ADD) {
let resolve = {
mode: () => mode,
itemType: () => ctrl.itemName,
profiles: () => getProfiles()
};
entaxyService.openAddItemModalAndProcessResults(resolve);
} else {
let mbeanName = item.profileMBeanName;
entaxyService.openEditItemModalAndProcessResults(mbeanName, ctrl.itemName, item.name, mode);
}
}
ctrl.showAddLegacyConnectorModal = function() {
let resolve = {
profiles: () => getProfiles()
};
entaxyLegacyConnectorService.openAddLegacyConnectorModal(resolve).then(connectorArgs => {
addLegacyConnector(connectorArgs);
});
}
function addLegacyConnector(connectorArgs) {
let args = entaxyLegacyConnectorService.getArguments(connectorArgs);
let mbeanName = connectorArgs.profile.mbeanName;
operationsService.executeOperation(mbeanName, { name: 'addConnector' }, args)
.then(result => {
Core.notification('success', result, 3000);
}).catch(error => {
Core.notification('danger', error, 5000);
});
}
$scope.$on(Jmx.TreeEvent.Updated, () => {
populateTable();
});
function startItem(action, item) {
if (item.status !== 'Active') {
processOperation(item.profileMBeanName, 'start', item.name);
} else {
Core.notification('info', ctrl.itemName + ' has been already started');
}
}
function stopItem(action, item) {
if (item.status !== 'Resolved') {
processOperation(item.profileMBeanName, 'stop', item.name);
} else {
Core.notification('info', ctrl.itemName + ' has been already stopped');
}
}
function uninstallItem(action, item) {
let title = 'Confirm Uninstalling';
let message = 'Do you want to uninstall ' + ctrl.itemName.toLowerCase() + ' ' + item.displayName + '?';
entaxyService.openConfirmationWindow(title, message).then(() => {
processOperation(item.profileMBeanName,'remove', item.name);
});
}
function processOperation(mbeanName, operationName, selectedItemName) {
let operation = { name: operationName + ctrl.itemName };
entaxyService.processTableOperation(mbeanName, operation, selectedItemName);
}
ctrl.dismissAlert = () => ctrl.alert = null;
}
EntaxyAllConnectorsTableController.$inject = ['$q', 'workspace', '$scope', 'operationsService', 'jolokia', 'jolokiaService', 'entaxyService', 'entaxyLegacyConnectorService'];
})(Entaxy || (Entaxy = {}));

View File

@ -1,77 +0,0 @@
/*-
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
var Entaxy;
(function (Entaxy) {
Entaxy._module.component('entaxyConfirmationModal', {
bindings: {
modalInstance: '<',
resolve: '<'
},
template:
`
<div class="entaxy-simple-modal-container message-modal-container">
<div class="modal-header">
<button type="button" class="close" aria-label="Close" ng-click="$ctrl.cancel()">
<span class="pficon pficon-close" aria-hidden="true"></span>
</button>
<h4 class="modal-title">{{$ctrl.title}}</h4>
</div>
<div class="modal-body-small">
<span class="simple-modal-message">
{{$ctrl.message}}
</span>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" ng-click="$ctrl.cancel()">Cancel</button>
<button type="submit" class="btn btn-primary" ng-click="$ctrl.confirm()">Confirm</button>
</div>
</div>
`,
controller: entaxyConfirmationModalController
})
.name;
function entaxyConfirmationModalController($uibModal) {
'ngInject';
let ctrl = this;
ctrl.$onInit = function() {
ctrl.title = ctrl.resolve.title;
ctrl.message = ctrl.resolve.message;
}
ctrl.cancel = function(reason) {
ctrl.modalInstance.dismiss(reason);
}
ctrl.confirm = function() {
ctrl.modalInstance.close(true);
}
}
entaxyConfirmationModalController.$inject = ['$uibModal'];
})(Entaxy || (Entaxy = {}));

View File

@ -1,43 +0,0 @@
/*-
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
var Entaxy;
(function (Entaxy) {
Entaxy._module.component('entaxyConnections', {
bindings: {
pageTitle: '@'
},
template:
`
<h2>
{{$ctrl.pageTitle}}
</h2>
<entaxy-table runtime-type="entaxy.runtime.connection"
status-name="Status" object-name="name"></entaxy-table>
`
})
.name;
})(Entaxy || (Entaxy = {}));

View File

@ -1,91 +0,0 @@
/*-
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
var Entaxy;
(function (Entaxy) {
Entaxy._module
.component('entaxyConnectors', {
bindings: {
pageTitle: '@'
},
template:
`
<h2>
{{$ctrl.pageTitle}}
</h2>
<entaxy-table runtime-type="entaxy.runtime.connector"
status-name="BundleState" object-name="systemName"
extra-primary-actions-config="$ctrl.config"
is-parent-dependent="true"></entaxy-table>
`,
controller: EntaxyConnectorsController
})
.name;
function EntaxyConnectorsController(workspace, $scope, $uibModal, operationsService, jolokia, entaxyLegacyConnectorService) {
'ngInject';
var ctrl = this;
ctrl.workspace = workspace;
let primaryActions = [ { name: 'Add Legacy Connector', actionFn: () => ctrl.showAddConnectorModal() } ];
ctrl.config = {
primaryActions: primaryActions,
isTableUpdateNeeded: true
}
ctrl.showAddConnectorModal = function() {
let selectedMBeanName = workspace.getSelectedMBeanName();
let resolve = {
profileName: () => jolokia.getAttribute(selectedMBeanName, 'Name')
};
entaxyLegacyConnectorService.openAddLegacyConnectorModal(resolve).then(connectorArgs => {
addConnector(connectorArgs);
});
}
function addConnector(connectorArgs) {
let args = entaxyLegacyConnectorService.getArguments(connectorArgs);
let mbeanName = ctrl.workspace.getSelectedMBeanName();
operationsService.executeOperation(mbeanName, { name: 'addConnector' }, args)
.then(result => {
Core.notification('success', result, 3000);
}).catch(error => {
Core.notification('danger', error, 5000);
});
}
ctrl.dismissAlert = () => ctrl.alert = null;
}
EntaxyConnectorsController.$inject = ['workspace', '$scope', '$uibModal', 'operationsService', 'jolokia', 'entaxyLegacyConnectorService'];
})(Entaxy || (Entaxy = {}));

View File

@ -1,136 +0,0 @@
/*-
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
var Entaxy;
(function (Entaxy) {
Entaxy._module
.component('entaxyConnectorsWithFlow', {
bindings: {
direction: '@',
connectors: '<',
profileName: '<',
editCustomizationPointFn: '<'
},
template:
`
<div class="connectors-group-container">
<span class="connectors-group-title">{{$ctrl.connectorsGroupTitle}}</span>
<div class="connectors-with-flow-container">
<div class="connectors-container">
<div class="connector-block" ng-repeat="connector in $ctrl.connectors"
ng-click="$ctrl.editConnectorProperties(connector, $event)">
<span>{{connector.name}}</span>
<div id="{{connector.name}}_{{customizationPoint}}" class="customization-point-block"
ng-repeat="customizationPoint in $ctrl.connectorCustomizationPoints"
ng-click="$ctrl.editConnectorCustomizationPoint(connector, customizationPoint, $event)">
{{customizationPoint}}
</div>
</div>
</div>
<div id="{{$ctrl.direction}}-flow-block" class="flow-block">
<span>{{$ctrl.flowName}}</span>
<div id="{{$ctrl.direction}}-flow_{{customizationPoint}}" class="customization-point-block"
ng-repeat="customizationPoint in $ctrl.flowCustomizationPoints"
ng-click="$ctrl.editFlowCustomizationPoint(customizationPoint, $event)">
{{customizationPoint}}
</div>
</div>
</div>
</div>
`,
controller: entaxyConnectorsWithFlowController
})
.name;
function entaxyConnectorsWithFlowController(workspace, operationsService, entaxyService) {
'ngInject';
let ctrl = this;
ctrl.$onInit = function() {
if (ctrl.direction) {
let isDirectionIn = ctrl.direction === 'in';
ctrl.connectorsGroupTitle = '--- ' + ctrl.direction.toUpperCase() + ' ---';
ctrl.flowName = ctrl.direction.toUpperCase() + '-FLOW';
ctrl.connectorCustomizationPoints = isDirectionIn ? ['pre-route', 'response'] : ['pre-output', 'postprocess'];
ctrl.flowCustomizationPoints = isDirectionIn ? ['pre-route', 'response'] : ['pre-route', 'postprocess'];
} else {
Entaxy.log.error('Connectors group direction is not defined');
}
}
ctrl.editConnectorProperties = function (connector, event) {
event.stopPropagation();
let mbeanName = workspace.getSelectedMBeanName();
let itemType = 'Connector';
let mode = Entaxy.MODAL_MODES.EDIT;
entaxyService.openEditItemModalAndProcessResults(mbeanName, itemType, connector.name, mode);
}
ctrl.editConnectorCustomizationPoint = function (connector, customizationPoint, event) {
event.stopPropagation();
let mbeanName = workspace.getSelectedMBeanName();
let propertyName = getPropertyNameForConnectorCustomizationPoint(customizationPoint);
ctrl.editCustomizationPointFn(mbeanName, 'getConnectorConfig', [ connector.name ], propertyName);
}
ctrl.editFlowCustomizationPoint = function (customizationPoint, event) {
event.stopPropagation();
let selectedMbean = workspace.getSelectedMBean();
let mbeanName = selectedMbean.parent.objectName;
let propertyName = getPropertyNameForFlowCustomizationPoint(customizationPoint);
ctrl.editCustomizationPointFn(mbeanName, 'getProfileConfig', [ ctrl.profileName ], propertyName);
}
function getPropertyNameForConnectorCustomizationPoint(customizationPointName) {
switch (customizationPointName) {
case 'pre-route':
case 'pre-output':
return customizationPointName;
case 'response':
case 'postprocess':
return 'responseRoute';
};
}
function getPropertyNameForFlowCustomizationPoint(customizationPointName) {
switch (customizationPointName) {
case 'pre-route':
return ctrl.direction + '-flow-' + customizationPointName;
case 'response':
case 'postprocess':
return ctrl.direction + '-flow-response';
};
}
}
entaxyConnectorsWithFlowController.$inject = ['workspace', 'operationsService', 'entaxyService'];
})(Entaxy || (Entaxy = {}));

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
@ -41,7 +41,7 @@ var Entaxy;
<span class="fa fa-angle-right" ng-if="$ctrl.crumbs.length > 0"></span>
</div>
<div class="crumb" ng-repeat="crumb in $ctrl.crumbs track by $index">
<div class="crumb-info" ng-click="$ctrl.changeLocation(crumb)">
<div class="crumb-info" ng-click="$ctrl.changeLocation($index)">
{{crumb}}
</div>
<span class="fa fa-angle-right"></span>
@ -59,8 +59,7 @@ var Entaxy;
ctrl.crumbs = [];
}
ctrl.changeLocation = function (crumb) {
let index = ctrl.crumbs.indexOf(crumb);
ctrl.changeLocation = function (index) {
ctrl.crumbs.length = index + 1;
}
}

View File

@ -1,54 +0,0 @@
/*-
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
var Entaxy;
(function (Entaxy) {
Entaxy._module
.directive('modalDialog', function(){
return {
restrict: 'AC',
link: function($scope, element) {
var draggableStr = "draggableModal";
var header = $(".modal-header", element);
header.on('mousedown', (mouseDownEvent) => {
var modalDialog = element;
var offset = header.offset();
modalDialog.addClass(draggableStr).parents().on('mousemove', (mouseMoveEvent) => {
$("." + draggableStr, modalDialog.parents()).offset({
top: mouseMoveEvent.pageY - (mouseDownEvent.pageY - offset.top),
left: mouseMoveEvent.pageX - (mouseDownEvent.pageX - offset.left)
});
}).on('mouseup', () => {
modalDialog.removeClass(draggableStr);
});
});
}
}
})
.name;
})(Entaxy || (Entaxy = {}));

View File

@ -1,109 +0,0 @@
/*-
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
var Entaxy;
(function (Entaxy) {
Entaxy._module
.directive('entaxyFileDrop', ['$parse', function ($parse) {
return {
restrict: 'A',
replace: false,
require: 'ngModel',
link: function (scope, element, attrs, ngModel) {
let enterTarget = null;
element.on('dragenter', function (e) {
e.preventDefault();
e.stopPropagation();
enterTarget = e.target;
element.addClass('highlighted');
createNotification();
});
element.on('dragover', function (e) {
e.preventDefault();
e.stopPropagation();
});
element.on('dragleave', function (e) {
if (e.target === enterTarget) {
e.preventDefault();
e.stopPropagation();
element.removeClass('highlighted');
removeNotification();
}
});
let notificationContainer = null;
function createNotification() {
if (notificationContainer === null) {
notificationContainer = document.createElement('div');
notificationContainer.className = 'upload-notification';
let span = document.createElement('span');
span.className = 'fa fa-upload';
notificationContainer.appendChild(span);
notificationContainer.appendChild(document.createTextNode('Drop file to upload'));
let elementWidth = element.width();
let offset = 150 + elementWidth/2 + 20;
notificationContainer.style.left = 'calc(100vw - ' + offset + 'px)';
element.append(notificationContainer);
}
}
function removeNotification() {
if (notificationContainer !== null) {
notificationContainer.parentNode.removeChild(notificationContainer);
notificationContainer = null;
}
}
element.on('drop', function (e) {
e.preventDefault();
e.stopPropagation();
element.removeClass('highlighted');
removeNotification();
if (e.originalEvent.dataTransfer && e.originalEvent.dataTransfer.files.length > 0) {
ngModel.$setViewValue(e.originalEvent.dataTransfer.files[0]);
let processFn = $parse(attrs.processFn);
if (processFn) {
processFn(scope);
}
}
return false;
});
}
};
}])
.name;
})(Entaxy || (Entaxy = {}));

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
@ -32,18 +32,24 @@ var Entaxy;
selectedItem: '<',
view: '<',
changeSelectionFn: '<',
openFn: '<'
openFn: '<',
resourceContextMenuOptions: '<',
folderContextMenuOptions: '<'
},
template:
`
<!-- //todo style add min-width -->
<div class="file-panel no-selection" ng-class="{'tile-theme': $ctrl.view === 'tiles', 'list-theme': $ctrl.view === 'list'}">
<div ng-class="{'tile': $ctrl.view === 'tiles', 'list': $ctrl.view === 'list', 'active': $ctrl.selectedItem === item}"
ng-repeat="item in $ctrl.items" ng-click="$ctrl.changeSelection(item)" ng-dblclick="$ctrl.open(item)">
ng-repeat="item in $ctrl.items" ng-click="$ctrl.changeSelection(item)" ng-dblclick="$ctrl.open(item)"
context-menu item="item"
context-menu-options="item.isFolder ? $ctrl.folderContextMenuOptions : $ctrl.resourceContextMenuOptions">
<div class="icon">
<span ng-class="{'fa fa-folder': item.isFolder, 'fa fa-file': !item.isFolder}"></span>
</div>
<div class="name" data-toggle="tooltip" title="{{item.name}}">
<div class="error" ng-if="item.error">
<span class="pficon pficon-info" data-toggle="tooltip" title="{{item.error}}"></span>
</div>
<div class="name" ng-class="{'has-error': item.error}" data-toggle="tooltip" title="{{item.name}}">
{{ $ctrl.view === 'tiles' ? (item.name | limitTo: 22) : item.name }}{{ ($ctrl.view === 'tiles' && item.name.length > 22) ? '...' : '' }}
</div>
</div>

View File

@ -1,304 +0,0 @@
/*-
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
var Entaxy;
(function (Entaxy) {
Entaxy._module.component('entaxyModal', {
bindings: {
modalInstance: '<',
resolve: '<'
},
template:
`
<div class="entaxy-modal-container">
<div class="modal-header">
<button type="button" class="close" aria-label="Close" ng-click="$ctrl.cancel()">
<span class="pficon pficon-close" aria-hidden="true"></span>
</button>
<h4 class="modal-title">{{$ctrl.modalTitle}}</h4>
</div>
<div ng-if="$ctrl.step1">
<div class="modal-body-header">
<h2>{{$ctrl.firstStepTitle}}</h2>
</div>
<div class="modal-body">
<entaxy-modal-list items="$ctrl.profiles" selected="$ctrl.selectedProfile"
change-selection="$ctrl.changeProfileSelection" enable-dbl-click="true"></entaxy-modal-list>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" ng-click="$ctrl.next()" ng-disabled="!$ctrl.selectedProfile">Next</button>
</div>
</div>
<div ng-if="$ctrl.step2">
<div class="modal-body-header">
<h2>{{$ctrl.secondStepTitle}}</h2>
</div>
<div class="modal-body">
<entaxy-modal-list-with-description items="$ctrl.factories" selected-item="$ctrl.selectedFactory"
change-selection="$ctrl.changeFactorySelection"></entaxy-modal-list-with-description>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" ng-if="$ctrl.profiles" ng-click="$ctrl.back()">Back</button>
<button type="button" class="btn btn-default" ng-click="$ctrl.next()" ng-disabled="!$ctrl.selectedFactory">Next</button>
</div>
</div>
<div ng-if="$ctrl.step3">
<div class="modal-body-header">
<h2>{{$ctrl.thirdStepTitle}}</h2>
</div>
<div class="modal-body">
<entaxy-modal-group-fields groups="$ctrl.groups" fields="$ctrl.formFields"
use-form-dirty="true" is-form-dirty="$ctrl.isFormDirty"
errors="$ctrl.errors" mode="$ctrl.mode"></entaxy-modal-group-fields>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" ng-if="$ctrl.factories.length > 1 || $ctrl.profiles" ng-click="$ctrl.back()">Back</button>
<button type="submit" class="btn btn-primary" ng-click="$ctrl.save()">{{$ctrl.submitBtnTitle}}</button>
</div>
<div>
</div>
`,
controller: entaxyModalController
})
.name;
function entaxyModalController($scope, operationsService, entaxyService) {
'ngInject';
var ctrl = this;
ctrl.$onInit = function() {
ctrl.mode = ctrl.resolve.mode;
if (!ctrl.mode) {
ctrl.cancel('Mode is not defined');
}
ctrl.itemType = ctrl.resolve.itemType ? ctrl.resolve.itemType : 'Item';
let extraToTitle = ctrl.resolve.parentName ? (' to ' + ctrl.resolve.parentName) : '';
ctrl.modalTitle = ctrl.mode + ' ' + ctrl.itemType + extraToTitle;
ctrl.submitBtnTitle = Entaxy.getButtonTitleByMode(ctrl.mode);
let itemName = ctrl.resolve.itemName;
ctrl.firstStepTitle = 'Choose profile to attach connector to';
ctrl.secondStepTitle = ctrl.resolve.secondStepTitle ? ctrl.resolve.secondStepTitle : 'Choose factory';
ctrl.thirdStepTitle = itemName ? ctrl.mode + ' properties for ' + itemName
: ctrl.resolve.thirdStepTitle ? ctrl.resolve.thirdStepTitle : 'Fill in fields';
if (ctrl.mode !== Entaxy.MODAL_MODES.ADD) {
let properties = Object.entries(ctrl.resolve.info.properties);
ctrl.properties = properties.map(property => { return { name: property[0], value: property[1] }; });
}
ctrl.profiles = ctrl.resolve.profiles;
ctrl.factories = ctrl.resolve.factories ? ctrl.resolve.factories : null;
if (!ctrl.factories || ctrl.factories.length === 0) {
ctrl.cancel('Factories are not found');
}
ctrl.factories.sort(Entaxy.compareBy('displayName'));
if (ctrl.profiles) {
ctrl.step1 = true;
ctrl.step2 = false;
ctrl.step3 = false
} else {
if (ctrl.factories.length > 1) {
ctrl.step1 = false;
ctrl.step2 = true;
ctrl.step3 = false;
} else if (ctrl.factories.length === 1) {
ctrl.next();
}
}
}
ctrl.next = function() {
if (ctrl.step1 === true) {
if (ctrl.factories.length > 1) {
ctrl.step1 = false;
ctrl.step2 = true;
} else if (ctrl.factories.length === 1) {
defineFormFields();
}
} else {
defineFormFields();
}
}
function defineFormFields() {
let container = ctrl.formFields ? ctrl.formFields.find(field => field.name === '__entaxyContainerId') : undefined;
if (!ctrl.formFields || ctrl.selectedFactory.name !== ctrl.formFields[0].value
|| (ctrl.profiles && container.value !== ctrl.selectedProfile.name)) {
ctrl.formFields = [];
ctrl.formFields.push({
label: 'Factory Id',
name: 'factoryId',
type: 'java.lang.String',
helpText: null,
value: ctrl.factories.length > 1 ? ctrl.selectedFactory.name : ctrl.factories[0].name,
readOnly: true,
required: ctrl.mode === Entaxy.MODAL_MODES.VIEW ? false : true,
group: 'general'
});
let mbeanName = ctrl.factories.length > 1 ? ctrl.selectedFactory.mbeanName : ctrl.factories[0].mbeanName;
operationsService.executeOperation(mbeanName, { name: 'getFields' }, [ 'init' ])
.then((response) => {
let groups = new Set();
groups.add('general');
_.forEach(JSON.parse(response), (field) => {
let objectId = undefined;
if (ctrl.mode !== Entaxy.MODAL_MODES.ADD) {
objectId = ctrl.resolve.info['objectId'];
}
let profileName = ctrl.selectedProfile ? ctrl.selectedProfile.name : undefined;
let formField = entaxyService.makeFormField(field, objectId, ctrl.properties, ctrl.mode, profileName);
if (formField) {
ctrl.formFields.push(formField);
groups.add(formField.group);
}
});
ctrl.formFields.forEach(formField => formField.type = Entaxy.convertToHtmlInputType(formField.type));
processDependencies();
ctrl.groups = Array.from(groups).map((group) => { return { name: group, displayName: group }; });
ctrl.step1 = false;
ctrl.step2 = false;
ctrl.step3 = true;
});
} else {
ctrl.step1 = false;
ctrl.step2 = false;
ctrl.step3 = true;
}
}
function processDependencies() {
let dependentFormFields = entaxyService.getDependentFormFields(ctrl.formFields);
ctrl.definingFormFields = entaxyService.getDefiningFormFields(dependentFormFields, ctrl.formFields);
for (let i = 0; i < ctrl.definingFormFields.length; i++) {
if (ctrl.definingFormFields[i].value) {
let dependentFormFieldsWithListType = dependentFormFields
.filter(field => (field.typeInfo && field.typeInfo.type === 'list'));
entaxyService.processDependencies(dependentFormFieldsWithListType,
ctrl.definingFormFields,
ctrl.definingFormFields[i].name,
ctrl.definingFormFields[i].value,
undefined);
}
$scope.$watch('$ctrl.definingFormFields[' + i + '].value', function(newValue, oldValue) {
if (newValue !== oldValue) {
entaxyService.processDependencies(dependentFormFields,
ctrl.definingFormFields,
ctrl.definingFormFields[i].name,
newValue,
oldValue);
}
});
}
}
ctrl.back = function() {
if (ctrl.step2 === true) {
ctrl.step1 = true;
ctrl.step2 = false;
} else if (ctrl.step3 === true) {
ctrl.errors = undefined;
ctrl.step2 = true;
ctrl.step3 = false;
}
}
ctrl.cancel = function(reason) {
ctrl.modalInstance.dismiss(reason);
}
ctrl.changeProfileSelection = function(item, isDblClicked) {
ctrl.selectedProfile = item;
if (isDblClicked) {
ctrl.next();
}
}
ctrl.changeFactorySelection = function(item, isDblClicked) {
ctrl.selectedFactory = item;
if (isDblClicked) {
ctrl.next();
}
}
ctrl.save = function() {
if (ctrl.mode === Entaxy.MODAL_MODES.VIEW) {
ctrl.cancel();
}
let isConfirmationNeeded = ctrl.mode === Entaxy.MODAL_MODES.EDIT && !ctrl.isFormDirty;
entaxyService.requestConfirmationForSavingIfNeededAndProceed(isConfirmationNeeded, save);
}
function save () {
let selectedFactory = ctrl.selectedFactory ? ctrl.selectedFactory : ctrl.factories[0];
let profileMBeanName = ctrl.selectedProfile ? ctrl.selectedProfile.mbeanName : undefined;
entaxyService.validateFields(ctrl.formFields, selectedFactory, ctrl.itemType, profileMBeanName)
.then(errors => {
ctrl.errors = errors;
if (Object.keys(ctrl.errors).length === 0) {
let args = entaxyService.getArguments(ctrl.formFields, ctrl.factories);
ctrl.modalInstance.close(args);
}
});
}
}
entaxyModalController.$inject = ['$scope', 'operationsService', 'entaxyService'];
})(Entaxy || (Entaxy = {}));

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
@ -40,38 +40,14 @@ var Entaxy;
<div class="modal-group-fields-container">
<div class="modal-groups-list-container">
<entaxy-modal-list class="group-list" items="$ctrl.groups" items-label="Group" items-label-plural="Groups"
selected="$ctrl.selectedGroup" change-selection="$ctrl.change" filter="$ctrl.matchesFilter"></entaxy-modal-list>
selected="$ctrl.selectedGroup" change-selection="$ctrl.change" filter="$ctrl.matchesFilter">
</entaxy-modal-list>
</div>
<div class="modal-group-fields-form-container">
<form name="entaxyObjectForm" class="form-horizontal">
<div class="form-group" ng-class="{'has-error': $ctrl.errors[formField.name]}"
ng-repeat="formField in $ctrl.viewedFormFields" ng-if="!formField.isBackRef && !formField.isHidden">
<div class="col-sm-4 label-col">
<label class="control-label" ng-class="{'required-pf': formField.required}" for="{{formField.name}}">{{formField.label}}</label>
<button type="button" class="btn btn-link label-description-popover" popover-placement="auto top-left" popover-trigger="'outsideClick'"
uib-popover="{{formField.description}}" ng-if="formField.description">
<span class="pficon pficon-help"></span>
</button>
</div>
<div class="col-sm-7">
<input type="{{formField.type}}" id="{{formField.name}}" placeholder="{{formField.placeholder}}" ng-class="{'form-control': formField.type !== 'checkbox'}"
ng-model="formField.value" ng-readonly="formField.readOnly" ng-disabled="formField.type === 'checkbox' && formField.readOnly"
ng-if="!formField.type.startsWith('entaxy.runtime.') && formField.type !== 'xml:route' && (!formField.typeInfo || (formField.typeInfo && formField.typeInfo.type === 'String'))">
<entaxy-url-input id="{{formField.name}}" model="formField.value" config="formField.typeInfo"
ng-if="formField.type === 'url' && formField.typeInfo" form-controller="entaxyObjectForm"></entaxy-url-input>
<entaxy-select type="formField.type" id="{{formField.name}}" filter="formField.filter" model="formField.value"
update-parent-fn="$ctrl.updateFieldsAfterSelectionChange" options="formField.options" ng-readonly="formField.readOnly"
update-parent="formField.typeInfo ? formField.typeInfo.updateParentFields : false"
creation-enabled="formField.typeInfo ? formField.typeInfo.enablePrivateObjectCreation : false"
ng-if="formField.type.startsWith('entaxy.runtime.')" form-controller="entaxyObjectForm"></entaxy-select>
<entaxy-select-from-enum id="{{formField.name}}" values="formField.typeInfo.values" model="formField.value"
readonly="formField.readOnly" is-empty-included="formField.typeInfo.isEmptyIncluded"
ng-if="formField.typeInfo && (formField.typeInfo.type === 'enum' || formField.typeInfo.type === 'list')"></entaxy-select-from-enum>
<entaxy-xml id="{{formField.name}}" ng-model="formField.value" ng-if="formField.type === 'xml:route'"
mode="$ctrl.localMode" disabled="formField.readOnly && !formField.value" form-controller="entaxyObjectForm"></entaxy-xml>
<span class="help-block" ng-show="$ctrl.errors[formField.name]">{{$ctrl.errors[formField.name]}}</span>
</div>
</div>
<entaxy-form-fields items="$ctrl.viewedFormFields" errors="$ctrl.errors" mode="$ctrl.mode"
update-fields-after-selection-change-fn="$ctrl.updateFieldsAfterSelectionChange"
form-controller="entaxyObjectForm"></entaxy-form-fields>
</form>
</div>
</div>
@ -80,15 +56,21 @@ var Entaxy;
})
.name;
function entaxyModalGroupFieldsController(operationsService, $scope) {
function entaxyModalGroupFieldsController(entaxyService, $scope, $cookies) {
'ngInject';
var ctrl = this;
let ctrl = this;
ctrl.$onInit = function() {
ctrl.localMode = ctrl.mode === Entaxy.MODAL_MODES.ADD ? Entaxy.MODAL_MODES.EDIT : ctrl.mode;
ctrl.selectedGroup = ctrl.groups[0];
let selectedGroupName = $cookies.getObject('profile-properties-group');
if (selectedGroupName) {
let selectedGroup = ctrl.groups.find(group => group.name === selectedGroupName);
ctrl.selectedGroup = selectedGroup ? selectedGroup : ctrl.groups[0];
$cookies.remove('profile-properties-group');
} else {
ctrl.selectedGroup = ctrl.groups[0];
}
if (ctrl.useFormDirty) {
$scope.$watch('entaxyObjectForm.$dirty', function (newValue) {
@ -105,6 +87,9 @@ var Entaxy;
}
});
}
populateDisplayBlocks();
manageDisplayBlocks();
}
ctrl.$onChanges = function(changes) {
@ -123,42 +108,102 @@ var Entaxy;
}
ctrl.matchesFilter = function(group, filter) {
let match = false;
let match;
_.forEach(ctrl.fields.filter((formField) => formField.group === group.name), (field) => {
if (field.tag && field.tag.length !== 0) {
if (field.tag.toLowerCase().match(filter.value.toLowerCase()) !== null) {
let groupFields = ctrl.fields.filter((formField) => formField.group === group.name);
for (let i = 0; i < groupFields.length; i++) {
let field = groupFields[i];
if (!field.isHidden && !field.isBackRef) {
if ((field.tag && field.tag.toLowerCase().match(filter.value.toLowerCase()) !== null) ||
(field.displayName &&
field.displayName.toLowerCase().match(filter.value.toLowerCase()) !== null) ||
field.name.toLowerCase().match(filter.value.toLowerCase()) !== null) {
match = true;
return match;
}
}
});
}
match = group.displayName.toLowerCase().match(filter.value.toLowerCase()) !== null;
return match;
};
ctrl.updateFieldsAfterSelectionChange = function (oldItem, newItem, itemType) {
if (oldItem) {
changeFieldsFromSelected(oldItem, itemType, true);
let displayBlocks = {};
function populateDisplayBlocks() {
if (ctrl.fields && ctrl.fields.length > 1) {
ctrl.fields.forEach(formField => {
if (formField.ui && formField.ui.displayBlocks) {
formField.ui.displayBlocks.forEach(displayBlock => {
if (!displayBlocks[displayBlock]) {
displayBlocks[displayBlock] = [formField];
} else {
displayBlocks[displayBlock].push(formField);
}
});
if (!formField.ui.originProperties) {
formField.ui.originProperties = {
required: formField.required,
isHidden: formField.isHidden
}
}
}
});
}
changeFieldsFromSelected(newItem, itemType, false);
}
function changeFieldsFromSelected(item, itemType, toDefaults) {
function manageDisplayBlocks() {
if (Object.keys(displayBlocks).length > 0) {
ctrl.managingFields = ctrl.fields.filter(formField =>
formField.ui && formField.ui.manageDisplayBlocksByValue);
for (let i = 0; i < ctrl.managingFields.length; i++) {
$scope.$watch('$ctrl.managingFields[' + i + '].value', function (newValue) {
Object.keys(displayBlocks)
.filter(displayBlock => displayBlock !== newValue)
.forEach(displayBlock => {
let fieldsToHide = displayBlocks[displayBlock]
.filter(fieldToHide => fieldToHide.group === ctrl.managingFields[i].group);
fieldsToHide.forEach(formField => {
formField.required = false;
formField.isHidden = true;
if (!formField.ui.transmitAlways) {
formField.ignored = true;
}
});
});
if (displayBlocks[newValue]) {
let fieldsToDisplay = displayBlocks[newValue]
.filter(fieldToDisplay => fieldToDisplay.group === ctrl.managingFields[i].group);
fieldsToDisplay.forEach(formField => {
formField.required = formField.ui.originProperties.required;
formField.isHidden = formField.ui.originProperties.isHidden;
delete formField.ignored;
});
}
});
}
}
}
ctrl.updateFieldsAfterSelectionChange = function (oldItem, newItem) {
if (oldItem) {
changeFieldsFromSelected(oldItem, true);
}
changeFieldsFromSelected(newItem, false);
}
function changeFieldsFromSelected(item, toDefaults) {
if (item.mbeanName) {
operationsService
.executeOperation(item.mbeanName, { name: 'get' + itemType + 'Config' }, [ item.name ])
.then(result => {
let itemInfo = JSON.parse(result);
entaxyService.readConfiguration(item.mbeanName)
.then(itemInfo => {
let properties = itemInfo.properties;
changeFieldsValuesFromProperties(properties, toDefaults);
}).catch(error => {
Core.notification('danger', error, 5000);
Entaxy.notificationError(error);
Entaxy.log.error(error);
});
} else if (item.value) {
@ -174,13 +219,13 @@ var Entaxy;
keys.forEach(key => {
let field = ctrl.fields.find(field => field.name === key);
if (field && !field.isHidden) {
if (field && !field.ignoreChildChanges && !field.isHidden) {
field.value = toDefaults ? field.defaultValue : properties[key];
}
});
}
}
}
entaxyModalGroupFieldsController.$inject = ['operationsService', '$scope'];
entaxyModalGroupFieldsController.$inject = ['entaxyService', '$scope', '$cookies'];
})(Entaxy || (Entaxy = {}));

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
@ -62,9 +62,10 @@ var Entaxy;
})
.name;
function entaxyModalListController() {
function entaxyModalListController($scope) {
'ngInject';
var ctrl = this;
let ctrl = this;
ctrl.$onInit = function() {
ctrl.viewedItems = ctrl.items;
@ -78,12 +79,19 @@ var Entaxy;
}
}
ctrl.$onChanges = function(changes) {
if (changes.selected.previousValue && changes.selected.currentValue && changes.selected.currentValue.name !== changes.selected.previousValue.name) {
$scope.$watch('$ctrl.selected', function (newValue, oldValue) {
if (oldValue && newValue && newValue.name !== oldValue.name) {
ctrl.listConfig.selectedItems = [ ctrl.selected ];
changeSelection();
}
}
});
$scope.$watch('$ctrl.items', function (newValue, oldValue) {
if (newValue !== oldValue) {
ctrl.viewedItems = ctrl.items;
ctrl.toolbarConfig.filterConfig.resultsCount = ctrl.viewedItems.length;
}
});
ctrl.toolbarConfig = {
filterConfig: {
@ -166,5 +174,6 @@ var Entaxy;
}
}
}
entaxyModalListController.$inject = ['$scope'];
})(Entaxy || (Entaxy = {}));

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
@ -30,13 +30,27 @@ var Entaxy;
bindings: {
items: '<',
selectedItem: '<',
changeSelection: '<'
changeSelection: '<',
showDeprecated: '='
},
template:
`
<div class="modal-list-with-description-container">
<div class="modal-list-with-description-list-container">
<entaxy-modal-list items="$ctrl.items" selected="$ctrl.selectedItem" change-selection="$ctrl.changeSelection"
<div class="modal-description-title">
<div class="modal-description-title-direction" ng-if="$ctrl.directed">
Direction:
<input type="radio" ng-model="$ctrl.selectedDirection" value="in">
in
<input type="radio" ng-model="$ctrl.selectedDirection" value="out">
out
</div>
<div class="modal-description-title-deprecated">
<input type="checkbox" ng-model="$ctrl.showDeprecated" value="$ctrl.showDeprecated">
Show deprecated
</div>
</div>
<entaxy-modal-list items="$ctrl.factories" selected="$ctrl.selectedItem" change-selection="$ctrl.changeSelection"
enable-dbl-click="true" filter="$ctrl.matchesFilter"></entaxy-modal-list>
</div>
<div class="modal-description-container">
@ -44,9 +58,7 @@ var Entaxy;
{{$ctrl.title}}
</div>
<div class="modal-description-body">
<div ng-if="$ctrl.selectedItem.description">
{{$ctrl.selectedItem.description}}
</div>
<div ng-if="$ctrl.selectedItem.description" ng-bind-html="$ctrl.selectedItem.description"></div>
<div ng-if="!$ctrl.selectedItem.description">
There is no selected factory.
</div>
@ -58,16 +70,24 @@ var Entaxy;
})
.name;
function entaxyModalListWithDescriptionController() {
function entaxyModalListWithDescriptionController($scope) {
'ngInject';
var ctrl = this;
let ctrl = this;
ctrl.$onInit = function() {
ctrl.title = 'Factory Description:';
ctrl.directed = ctrl.items[0].direction ? true : false;
ctrl.selectedDirection = ctrl.directed ?
ctrl.selectedItem ? ctrl.selectedItem.direction : 'in'
: undefined;
filterFactories(ctrl.showDeprecated);
}
ctrl.matchesFilter = function(factory, filter) {
var match = false;
let match = false;
if (factory.displayName.toLowerCase().match(filter.value.toLowerCase()) !== null ||
factory.name.toLowerCase().match(filter.value.toLowerCase()) !== null ||
@ -78,6 +98,28 @@ var Entaxy;
return match;
};
$scope.$watch('$ctrl.showDeprecated', function (newValue, oldValue) {
if (newValue !== oldValue) {
filterFactories();
}
});
$scope.$watch('$ctrl.selectedDirection', function () {
filterFactories();
});
function filterFactories() {
let factories;
if (ctrl.showDeprecated) {
factories = ctrl.items;
} else {
factories = ctrl.items.filter(item => !item.isDeprecated);
}
ctrl.factories = ctrl.selectedDirection ?
factories.filter(factory => factory.direction === ctrl.selectedDirection) : factories;
}
}
entaxyModalListWithDescriptionController.$inject = ['$scope'];
})(Entaxy || (Entaxy = {}));

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
@ -36,17 +36,25 @@ var Entaxy;
.name;
Entaxy.log.debug("loaded navigation " + Entaxy.navigationModule);
function EntaxyNavigationController($scope, $location, workspace, localStorage, jolokia, $rootScope) {
function EntaxyNavigationController($scope, $location, workspace, localStorage, jolokia, $rootScope,
entaxyAttributesCacheService, entaxyPrivateObjectsCacheService) {
'ngInject';
var ctrl = this;
let ctrl = this;
this.$location = $location;
let selectedMBeanName = workspace.getSelectedMBeanName();
entaxyJmxDomain = localStorage['entaxyJmxDomain'] || "ru.entaxy.esb";
$scope.$on('jmxTreeClicked', function () {
$scope.$on('jmxTreeClicked', function (event, selectedNode) {
ctrl.tabs = getTabs();
var tab = _.find(ctrl.tabs, { path: ctrl.$location.path() });
if (!tab) {
let tab;
if (selectedMBeanName !== selectedNode.objectName) {
selectedMBeanName = selectedNode.objectName;
tab = ctrl.tabs[0];
} else {
tab = _.find(ctrl.tabs, {path: ctrl.$location.path()});
if (!tab) {
tab = ctrl.tabs[0];
}
}
ctrl.$location.path(tab.path);
});
@ -64,48 +72,83 @@ var Entaxy;
var tabs = [];
var enabledRoutes = Object.keys(TAB_CONFIG)
.map(function (config) { return TAB_CONFIG[config].route; })
.filter(function (route) { return _.startsWith(route, '/entaxy'); });
.filter(function (route) { return _.startsWith(route, '/entaxy-management'); });
if (enabledRoutes.length > 0) {
tabs.push(new Nav.HawtioTab(TAB_CONFIG.attributes.title, TAB_CONFIG.attributes.route));
if (workspace.getSelectedMBeanName()) {
if (shouldShowConnectionsTab()) {
tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.connections.title, TAB_CONFIG.connections.route));
} else if (shouldShowProfilesTab()) {
tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.profiles.title, TAB_CONFIG.profiles.route));
// todo smth like goto/$location.search ?
} else if (shouldShowConnectorsInProfileTab()) {
tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.connectorsInProfile.title, TAB_CONFIG.connectorsInProfile.route));
tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.profileProperties.title, TAB_CONFIG.profileProperties.route));
tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.profileDiagram.title, TAB_CONFIG.profileDiagram.route));
} else if (shouldShowConnectorPropertiesTab()) {
tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.connectorProperties.title, TAB_CONFIG.connectorProperties.route));
} else if (shouldShowConnectorsTab()) {
tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.connections.title, TAB_CONFIG.connections.route));
} else if (shouldShowConnectionPropertiesTab()) {
tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.connectionProperties.title, TAB_CONFIG.connectionProperties.route));
} else if (shouldShowProfilesTab()) {
tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.profiles.title, TAB_CONFIG.profiles.route));
} else if (shouldShowProfileTabs()) {
tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.connectorsInProfile.title, TAB_CONFIG.connectorsInProfile.route));
tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.profileProperties.title, TAB_CONFIG.profileProperties.route));
tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.profileDiagram.title, TAB_CONFIG.profileDiagram.route));
} else if (shouldShowConnectorPropertiesTab()) {
tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.connectorProperties.title, TAB_CONFIG.connectorProperties.route));
} else if (shouldShowAllConnectorsTab()) {
tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.connectors.title, TAB_CONFIG.connectors.route));
} else if (shouldShowSourceTab()) {
} else if (shouldShowRoutesTab()) {
tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.routes.title, TAB_CONFIG.routes.route));
} else if (shouldShowSourceTab()) {
tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.routeProperties.title, TAB_CONFIG.routeProperties.route));
tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.source.title, TAB_CONFIG.source.route));
} else if (shouldShowResourcesTab()) {
} else if (shouldShowResourcesTab()) {
tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.resources.title, TAB_CONFIG.resources.route));
} else if (shouldShowServicesTab()) {
} else if (shouldShowServicesTab()) {
tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.services.title, TAB_CONFIG.services.route));
} else if (shouldShowServicePropertiesTab()) {
} else if (shouldShowServicePropertiesTab()) {
tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.serviceProperties.title, TAB_CONFIG.serviceProperties.route));
} else {
let mbeanName = workspace.getSelectedMBeanName();
let parsedMbean = Core.parseMBean(mbeanName);
console.log(parsedMbean);
if (TAB_CONFIG[parsedMbean.attributes.category] &&
TAB_CONFIG[parsedMbean.attributes.category].check &&
TAB_CONFIG[parsedMbean.attributes.category].check(workspace)) {
tabs.unshift(
new Nav.HawtioTab(TAB_CONFIG[parsedMbean.attributes.category].title,
TAB_CONFIG[parsedMbean.attributes.category].route));
}
}
tabs.push(new Nav.HawtioTab(TAB_CONFIG.operations.title, TAB_CONFIG.operations.route));
}
tabs.push(new Nav.HawtioTab(TAB_CONFIG.chart.title, TAB_CONFIG.chart.route));
} else if (shouldShowRealmsTab()) {
tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.realms.title, TAB_CONFIG.realms.route));
} else if (shouldShowRealmPropertiesTab()) {
tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.realmProperties.title, TAB_CONFIG.realmProperties.route));
} else if (shouldShowModuleUserManagement()) {
tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.userManagement.title, TAB_CONFIG.userManagement.route));
} else if (shouldShowRepositoriesTab()) {
tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.repositories.title, TAB_CONFIG.repositories.route));
} else if (shouldShowRepositoryPropertiesTab()) {
tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.repositoryProperties.title, TAB_CONFIG.repositoryProperties.route));
} else if (shouldShowKeyStoresTab()) {
tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.keyStores.title, TAB_CONFIG.keyStores.route));
} else if (shouldShowKeyStorePropertiesTab()) {
tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.keyStoreAliases.title, TAB_CONFIG.keyStoreAliases.route));
tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.keyStoreProperties.title, TAB_CONFIG.keyStoreProperties.route));
} else if (shouldShowVaultsTab()) {
tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.vaults.title, TAB_CONFIG.vaults.route));
} else if (shouldShowVaultPropertiesTab()) {
tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.vaultAliases.title, TAB_CONFIG.vaultAliases.route));
tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.vaultProperties.title, TAB_CONFIG.vaultProperties.route));
} else if (shouldShowConfigPropertiesTab()) {
tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.config.title, TAB_CONFIG.config.route));
} else if (shouldShowRouteLibrariesTab()) {
tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.routeLibraries.title, TAB_CONFIG.routeLibraries.route));
} else if (shouldShowRouteLibraryPropertiesTab()) {
tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.routeLibraryProperties.title, TAB_CONFIG.routeLibraryProperties.route));
} else {
Object.keys(TAB_CONFIG).forEach(key => {
if (key.startsWith('odata')) {
if (TAB_CONFIG[key].check && TAB_CONFIG[key].check(workspace)) {
tabs.unshift(new Nav.HawtioTab(TAB_CONFIG[key].title, TAB_CONFIG[key].route));
}
}
});
}
tabs.push(new Nav.HawtioTab(TAB_CONFIG.operations.title, TAB_CONFIG.operations.route));
} else {
if (shouldShowConnectorsTab()) {
tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.connectorsInProfile.title, TAB_CONFIG.connectorsInProfile.route));
}
if (isAddedRoute()) {
tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.routeProperties.title, TAB_CONFIG.routeProperties.route));
tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.source.title, TAB_CONFIG.source.route));
}
}
// tabs.push(new Nav.HawtioTab(TAB_CONFIG.chart.title, TAB_CONFIG.chart.route));
// tabs.push(new Nav.HawtioTab(TAB_CONFIG.test.title, TAB_CONFIG.test.route));
}
return tabs;
@ -116,38 +159,64 @@ var Entaxy;
workspace.getSelectedMBeanName().endsWith('category=connections');
}
function shouldShowConnectionPropertiesTab() {
let mbeanName = workspace.getSelectedMBeanName();
let parsedMbean = Core.parseMBean(mbeanName);
if (workspace.hasDomainAndProperties(entaxyJmxDomain, {'category': 'connections'}) &&
parsedMbean.attributes.connection && !parsedMbean.attributes.config) {
let attributes = jolokia.getAttribute(mbeanName);
return attributes.ObjectId ? true : false;
} else {
return false;
}
}
function shouldShowProfilesTab() {
return workspace.hasDomainAndProperties(entaxyJmxDomain, {'category': 'profiles'}) &&
workspace.getSelectedMBeanName().endsWith('category=profiles');
}
function shouldShowConnectorsInProfileTab() {
function shouldShowProfileTabs() {
let mbeanName = workspace.getSelectedMBeanName();
let parsedMbean = Core.parseMBean(mbeanName);
return workspace.hasDomainAndProperties(entaxyJmxDomain, {'category': 'profiles'}) &&
parsedMbean.attributes.profile &&
!parsedMbean.attributes.section;
entaxyAttributesCacheService.getAttributes(mbeanName).RuntimeType === Entaxy.RUNTIME_TYPE.PROFILE;
}
function shouldShowConnectorsTab() {
let selectedMbean = workspace.getSelectedMBean();
return selectedMbean.parent && selectedMbean.parent.objectName &&
selectedMbean.parent.domain === entaxyJmxDomain &&
Core.parseMBean(selectedMbean.parent.objectName).attributes.profile &&
entaxyAttributesCacheService
.getAttributes(selectedMbean.parent.objectName).RuntimeType === Entaxy.RUNTIME_TYPE.PROFILE;
}
function shouldShowConnectorPropertiesTab() {
let mbeanName = workspace.getSelectedMBeanName();
let parsedMbean = Core.parseMBean(mbeanName);
return workspace.hasDomainAndProperties(entaxyJmxDomain, {'category': 'profiles'}) &&
workspace.hasDomainAndProperties(entaxyJmxDomain, {'section': 'connectors'}) &&
parsedMbean.attributes.connector;
parsedMbean.attributes.connector &&
entaxyAttributesCacheService.getAttributes(mbeanName).RuntimeType === Entaxy.RUNTIME_TYPE.CONNECTOR;
}
function shouldShowConnectorsTab() {
function shouldShowAllConnectorsTab() {
return workspace.hasDomainAndProperties(entaxyJmxDomain, {'category': 'connectors'}) &&
workspace.getSelectedMBeanName().endsWith('category=connectors');
}
function shouldShowRoutesTab() {
let mbeanName = workspace.getSelectedMBeanName();
return workspace.hasDomainAndProperties(entaxyJmxDomain) &&
entaxyAttributesCacheService.getAttributes(mbeanName).RuntimeType === Entaxy.RUNTIME_TYPE.ROUTE_CONTAINER;
}
function shouldShowSourceTab() {
let mbeanName = workspace.getSelectedMBeanName();
let parsedMbean = Core.parseMBean(mbeanName);
return workspace.hasDomainAndProperties(entaxyJmxDomain, {'category': 'profiles'}) &&
parsedMbean.attributes.profile &&
parsedMbean.attributes.route;
return workspace.hasDomainAndProperties(entaxyJmxDomain) &&
(parsedMbean.attributes.route || parsedMbean.attributes.subroute);
}
function shouldShowResourcesTab() {
@ -168,31 +237,181 @@ var Entaxy;
let mbeanName = workspace.getSelectedMBeanName();
let parsedMbean = Core.parseMBean(mbeanName);
return workspace.hasDomainAndProperties(entaxyJmxDomain, {'category': 'services'}) &&
parsedMbean.attributes.service;
parsedMbean.attributes.service && !parsedMbean.attributes.config;
}
function shouldShowRealmsTab() {
let mbeanName = workspace.getSelectedMBeanName();
let parsedMbean = Core.parseMBean(mbeanName);
return workspace.hasDomainAndProperties(entaxyJmxDomain, {'security': 'jaas'}) &&
!parsedMbean.attributes.realm;
}
function shouldShowRealmPropertiesTab() {
let mbeanName = workspace.getSelectedMBeanName();
let parsedMbean = Core.parseMBean(mbeanName);
return workspace.hasDomainAndProperties(entaxyJmxDomain, {'security': 'jaas'}) &&
parsedMbean.attributes.realm && !parsedMbean.attributes.module && !parsedMbean.attributes.config;
}
function shouldShowModuleUserManagement() {
let mbeanName = workspace.getSelectedMBeanName();
let parsedMbean = Core.parseMBean(mbeanName);
let shouldShow = false;
if (workspace.hasDomainAndProperties(entaxyJmxDomain, {'security': 'jaas'}) &&
parsedMbean.attributes.realm && parsedMbean.attributes.module) {
let attributes = jolokia.getAttribute(mbeanName);
shouldShow = attributes.BackingEngineDriven;
}
return shouldShow;
}
function shouldShowRepositoriesTab() {
return workspace.hasDomainAndProperties(entaxyJmxDomain, {'category': 'repositories'}) &&
workspace.getSelectedMBeanName().endsWith('category=repositories');
}
function shouldShowRepositoryPropertiesTab() {
let mbeanName = workspace.getSelectedMBeanName();
let parsedMbean = Core.parseMBean(mbeanName);
return workspace.hasDomainAndProperties(entaxyJmxDomain, {'category': 'repositories'}) &&
parsedMbean.attributes.repository && !parsedMbean.attributes.config;
}
function shouldShowKeyStoresTab() {
let mbeanName = workspace.getSelectedMBeanName();
let parsedMbean = Core.parseMBean(mbeanName);
return workspace.hasDomainAndProperties(entaxyJmxDomain, {'security': 'keystores'}) &&
!parsedMbean.attributes.keystore;
}
function shouldShowKeyStorePropertiesTab() {
let mbeanName = workspace.getSelectedMBeanName();
let parsedMbean = Core.parseMBean(mbeanName);
return workspace.hasDomainAndProperties(entaxyJmxDomain, {'security': 'keystores'}) &&
parsedMbean.attributes.keystore && !parsedMbean.attributes.config;
}
function shouldShowVaultsTab() {
let mbeanName = workspace.getSelectedMBeanName();
let parsedMbean = Core.parseMBean(mbeanName);
return workspace.hasDomainAndProperties(entaxyJmxDomain, {'security': 'vaults'}) &&
!parsedMbean.attributes.vault;
}
function shouldShowVaultPropertiesTab() {
let mbeanName = workspace.getSelectedMBeanName();
let parsedMbean = Core.parseMBean(mbeanName);
return workspace.hasDomainAndProperties(entaxyJmxDomain, {'security': 'vaults'}) &&
parsedMbean.attributes.vault && !parsedMbean.attributes.config;
}
function shouldShowConfigPropertiesTab() {
let mbeanName = workspace.getSelectedMBeanName();
let parsedMbean = Core.parseMBean(mbeanName);
return workspace.selectionHasDomain(entaxyJmxDomain) && parsedMbean.attributes.config;
}
function shouldShowRouteLibrariesTab() {
return workspace.hasDomainAndProperties(entaxyJmxDomain, {'category': 'route-libraries'}) &&
workspace.getSelectedMBeanName().endsWith('category=route-libraries');
}
function shouldShowRouteLibraryPropertiesTab() {
let mbeanName = workspace.getSelectedMBeanName();
let parsedMbean = Core.parseMBean(mbeanName);
return workspace.hasDomainAndProperties(entaxyJmxDomain, {'category': 'route-libraries'}) &&
parsedMbean.attributes['route-library'] &&
entaxyAttributesCacheService.getAttributes(mbeanName).RuntimeType === Entaxy.RUNTIME_TYPE.ROUTE_LIBRARY;
}
function isAddedRoute() {
let selectedMbean = workspace.getSelectedMBean();
let parentMbeanName = selectedMbean && selectedMbean.parent ?
selectedMbean.parent.objectName : undefined;
if (parentMbeanName) {
let attributes = entaxyAttributesCacheService.getAttributes(parentMbeanName);
if (attributes.RuntimeType === Entaxy.RUNTIME_TYPE.ROUTE_CONTAINER &&
entaxyPrivateObjectsCacheService.hasAddedChildren(parentMbeanName)) {
let addedObjectsInfo = entaxyPrivateObjectsCacheService.getAddedObjectsInfo(parentMbeanName);
for (let i = 0; i < addedObjectsInfo.length; i++) {
if (selectedMbean.key === selectedMbean.parent.key + '-' + addedObjectsInfo[i].ui.id) {
return true;
}
}
}
}
return false;
}
// global event for entaxy extras
$rootScope.$emit('entaxyNavigationInited', $scope);
}
EntaxyNavigationController.$inject = ['$scope', '$location', 'workspace', 'localStorage', 'jolokia', '$rootScope']
EntaxyNavigationController.$inject = ['$scope', '$location', 'workspace', 'localStorage', 'jolokia', '$rootScope',
'entaxyAttributesCacheService', 'entaxyPrivateObjectsCacheService']
function configureRoutes($routeProvider) {
$routeProvider.
when('/entaxy/attributes', { templateUrl: 'plugins/jmx/html/attributes/attributes.html' }).
when('/entaxy/operations', { template: '<operations></operations>' }).
when('/entaxy/charts', { templateUrl: 'plugins/jmx/html/charts.html' }).
when('/entaxy/test', { template: '<entaxy-test></entaxy-test>' }).
when('/entaxy/connections', { template: '<entaxy-connections page-title="Connections"></entaxy-connections>' }).
when('/entaxy/profiles', { template: '<entaxy-profiles page-title="Profiles"></entaxy-profiles>' }).
when('/entaxy/profile/diagram', { template: '<entaxy-profile-diagram></entaxy-profile-diagram>' }).
when('/entaxy/profile/properties', { template: '<entaxy-properties item-name="Profile"></entaxy-properties>' }).
when('/entaxy/profile/connectors', { template: '<entaxy-connectors page-title="Connectors"></entaxy-connectors>' }).
when('/entaxy/connector/properties', { template: '<entaxy-properties item-name="Connector" use-grand-parent-mbean="true"></entaxy-properties>' }).
when('/entaxy/connectors', { template: '<entaxy-all-connectors-table></entaxy-all-connectors-table>' }).
when('/entaxy/route/source', { template: '<entaxy-source></entaxy-source>' }).
when('/entaxy/resources', { template: '<entaxy-resources></entaxy-resources>' }).
when('/entaxy/services', { template: '<entaxy-services page-title="Services"></entaxy-services>' }).
when('/entaxy/service/properties', { template: '<entaxy-properties item-name="Service"></entaxy-properties>' });
$routeProvider.
when(TAB_CONFIG.attributes.route, { templateUrl: 'plugins/jmx/html/attributes/attributes.html' }).
when(TAB_CONFIG.operations.route, { template: '<operations></operations>' }).
when(TAB_CONFIG.chart.route, { templateUrl: 'plugins/jmx/html/charts.html' }).
when(TAB_CONFIG.test.route, { template: '<entaxy-test></entaxy-test>' }).
when(TAB_CONFIG.connections.route,
{ template: '<entaxy-connections page-title="Connections"></entaxy-connections>' }).
when(TAB_CONFIG.connectionProperties.route,
{ template: '<entaxy-properties item-name="Connection"></entaxy-properties>' }).
when(TAB_CONFIG.profiles.route,
{ template: '<entaxy-profiles page-title="Profiles"></entaxy-profiles>' }).
when(TAB_CONFIG.profileDiagram.route,
{ template: '<entaxy-profile-diagram></entaxy-profile-diagram>' }).
when(TAB_CONFIG.profileProperties.route,
{ template: '<entaxy-properties item-name="Profile"></entaxy-properties>' }).
when(TAB_CONFIG.connectorsInProfile.route,
{ template: '<entaxy-connectors page-title="Connectors"></entaxy-connectors>' }).
when(TAB_CONFIG.connectorProperties.route,
{ template: '<entaxy-properties item-name="Connector" use-grand-parent-mbean="true"></entaxy-properties>' }).
when(TAB_CONFIG.connectors.route,
{ template: '<entaxy-all-connectors-table></entaxy-all-connectors-table>' }).
when(TAB_CONFIG.routes.route,
{ template: '<entaxy-routes page-title="Routes"></entaxy-routes>' }).
when(TAB_CONFIG.source.route,
{ template: '<entaxy-source></entaxy-source>' }).
when(TAB_CONFIG.routeProperties.route,
{ template: '<entaxy-properties item-name="Route"></entaxy-properties>' }).
when(TAB_CONFIG.resources.route,
{ template: '<entaxy-resources></entaxy-resources>' }).
when(TAB_CONFIG.services.route,
{ template: '<entaxy-services page-title="Services"></entaxy-services>' }).
when(TAB_CONFIG.serviceProperties.route,
{ template: '<entaxy-properties item-name="Service"></entaxy-properties>' }).
when(TAB_CONFIG.realms.route,
{ template: '<entaxy-realms page-title="Realms"></entaxy-realms>' }).
when(TAB_CONFIG.realmProperties.route,
{ template: '<entaxy-properties item-name="Realm"></entaxy-properties>' }).
when(TAB_CONFIG.userManagement.route,
{ template: '<entaxy-user-management></entaxy-user-management>' }).
when(TAB_CONFIG.repositories.route,
{ template: '<entaxy-repositories page-title="Repositories"></entaxy-repositories>' }).
when(TAB_CONFIG.repositoryProperties.route,
{ template: '<entaxy-properties item-name="Repository"></entaxy-properties>' }).
when(TAB_CONFIG.keyStores.route,
{ template: '<entaxy-key-stores page-title="Key Stores"></entaxy-key-stores>' }).
when(TAB_CONFIG.keyStoreProperties.route,
{ template: '<entaxy-properties item-name="Keystore"></entaxy-properties>' }).
when(TAB_CONFIG.keyStoreAliases.route,
{ template: '<entaxy-aliases object-type="keystore"></entaxy-aliases>' }).
when(TAB_CONFIG.vaults.route,
{ template: '<entaxy-vaults page-title="Vaults"></entaxy-vaults>' }).
when(TAB_CONFIG.vaultProperties.route,
{ template: '<entaxy-properties item-name="Vault"></entaxy-properties>' }).
when(TAB_CONFIG.vaultAliases.route,
{ template: '<entaxy-aliases object-type="vault"></entaxy-aliases>' }).
when(TAB_CONFIG.config.route,
{ template: '<entaxy-config-properties></entaxy-config-properties>' }).
when(TAB_CONFIG.routeLibraries.route,
{ template: '<entaxy-route-libraries page-title="Route Libraries"></entaxy-route-libraries>' }).
when(TAB_CONFIG.routeLibraryProperties.route,
{ template: '<entaxy-properties item-name="Route Library"></entaxy-properties>' });
}
configureRoutes.$inject = ['$routeProvider'];
@ -201,62 +420,130 @@ var Entaxy;
var TAB_CONFIG = {
attributes: {
title: 'Attributes',
route: '/entaxy/attributes'
route: '/entaxy-management/attributes'
},
operations: {
title: 'Operations',
route: '/entaxy/operations'
route: '/entaxy-management/operations'
},
chart: {
title: 'Chart',
route: '/entaxy/charts'
route: '/entaxy-management/charts'
},
test: {
title: 'Test',
route: '/entaxy/test'
route: '/entaxy-management/test'
},
connections: {
title: 'Connections',
route: '/entaxy/connections'
route: '/entaxy-management/connections'
},
connectionProperties: {
title: 'Properties',
route: '/entaxy-management/connection/properties'
},
profiles: {
title: 'Profiles',
route: '/entaxy/profiles'
route: '/entaxy-management/profiles'
},
profileDiagram: {
title: 'Profile Diagram',
route: '/entaxy/profile/diagram'
route: '/entaxy-management/profile/diagram'
},
profileProperties: {
title: 'Properties',
route: '/entaxy/profile/properties'
route: '/entaxy-management/profile/properties'
},
connectorsInProfile: {
title: 'Connectors',
route: '/entaxy/profile/connectors'
route: '/entaxy-management/profile/connectors'
},
connectorProperties: {
title: 'Properties',
route: '/entaxy/connector/properties'
route: '/entaxy-management/connector/properties'
},
connectors: {
title: 'Connectors',
route: '/entaxy/connectors'
route: '/entaxy-management/connectors'
},
routes: {
title: 'Routes',
route: '/entaxy-management/routes'
},
source: {
title: 'Source',
route: '/entaxy/route/source'
route: '/entaxy-management/route/source'
},
routeProperties: {
title: 'Properties',
route: '/entaxy-management/route/properties'
},
resources: {
title: 'Resources',
route: '/entaxy/resources'
route: '/entaxy-management/resources'
},
services: {
title: 'Services',
route: '/entaxy/services'
route: '/entaxy-management/services'
},
serviceProperties: {
title: 'Properties',
route: '/entaxy/service/properties'
route: '/entaxy-management/service/properties'
},
realms: {
title: 'Realms',
route: '/entaxy-management/realms'
},
realmProperties: {
title: 'Properties',
route: '/entaxy-management/realm/properties'
},
userManagement: {
title: 'User Management',
route: '/entaxy-management/realm/module/user-management'
},
repositories: {
title: 'Repositories',
route: '/entaxy-management/repositories'
},
repositoryProperties: {
title: 'Properties',
route: '/entaxy-management/repository/properties'
},
keyStores: {
title: 'Key Stores',
route: '/entaxy-management/keystores'
},
keyStoreProperties: {
title: 'Properties',
route: '/entaxy-management/keystore/properties'
},
keyStoreAliases: {
title: 'Aliases',
route: '/entaxy-management/keystore/aliases'
},
vaults: {
title: 'Vaults',
route: '/entaxy-management/vaults'
},
vaultProperties: {
title: 'Properties',
route: '/entaxy-management/vault/properties'
},
vaultAliases: {
title: 'Aliases',
route: '/entaxy-management/vault/aliases'
},
config: {
title: 'Configuration Properties',
route: '/entaxy-management/config'
},
routeLibraries: {
title: 'Route Libraries',
route: '/entaxy-management/route-libraries'
},
routeLibraryProperties: {
title: 'Properties',
route: '/entaxy-management/route-library/properties'
}
};

View File

@ -1,395 +0,0 @@
/*-
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
var Entaxy;
(function (Entaxy) {
Entaxy._module
.component('entaxyProfileDiagram', {
template:
`
<div id="leader-lines-container" class="profile-diagram-container">
<div class="blocks-container">
<div id="source-block" class="source-block" ng-if="$ctrl.inConnectors && $ctrl.inConnectors.length > 0">
<span>source</span>
</div>
<div id="target-block" class="target-block" ng-if="$ctrl.outConnectors && $ctrl.outConnectors.length > 0">
<span>target</span>
</div>
</div>
<div class="profile-block" ng-click="$ctrl.goToProfileProperties()">
<span class="profile-title">{{$ctrl.profileTitle}}</span>
<entaxy-connectors-with-flow direction="in" connectors="$ctrl.inConnectors" profile-name="$ctrl.profileName"
edit-customization-point-fn="$ctrl.editCustomizationPoint" ng-if="$ctrl.inConnectors && $ctrl.inConnectors.length > 0">
</entaxy-connectors-with-flow>
<entaxy-connectors-with-flow direction="out" connectors="$ctrl.outConnectors" profile-name="$ctrl.profileName"
edit-customization-point-fn="$ctrl.editCustomizationPoint" ng-if="$ctrl.outConnectors && $ctrl.outConnectors.length > 0">
</entaxy-connectors-with-flow>
</div>
<div class="blocks-container">
<div id="integrations-in-block" class="integrations-block" ng-if="$ctrl.inConnectors && $ctrl.inConnectors.length > 0">
<span>integrations</span>
</div>
<div id="default-route-block" class="default-route-block" ng-click="$ctrl.editDefaultRouteProperties()"
ng-if="$ctrl.inConnectors && $ctrl.inConnectors.length > 0">
<span>default-route</span>
</div>
<div id="integrations-out-block" class="integrations-block" ng-if="$ctrl.outConnectors && $ctrl.outConnectors.length > 0">
<span>integrations</span>
</div>
</div>
</div>
`,
controller: entaxyProfileDiagramController
})
.name;
function entaxyProfileDiagramController($scope, workspace, jolokia, $location, operationsService, entaxyService, $uibModal) {
'ngInject';
var ctrl = this;
let selectedMBean = workspace.getSelectedMBean();
ctrl.$onInit = function () {
ctrl.profileName = jolokia.getAttribute(selectedMBean.objectName, 'Name')
ctrl.profileTitle = 'Profile: ' + ctrl.profileName;
populateConnectors();
}
function populateConnectors() {
let inConnectors = [];
let outConnectors = [];
if (selectedMBean && selectedMBean.isFolder) {
let connectorMbeans = entaxyService.getAllChildMBeansByRuntimeType(selectedMBean, 'entaxy.runtime.connector');
connectorMbeans.forEach((mbean) => {
let direction = jolokia.getAttribute(mbean.objectName, 'Direction');
let connector = {
name: jolokia.getAttribute(mbean.objectName, 'Name'),
mbeanName: mbean.objectName
};
if (direction === 'in') {
inConnectors.push(connector);
} else if (direction === 'out') {
outConnectors.push(connector);
}
});
ctrl.inConnectors = inConnectors.sort(Entaxy.compareBy('name'));
ctrl.outConnectors = outConnectors.sort(Entaxy.compareBy('name'));
}
}
// sets top margin for source, target, default-route and integration blocks
setTimeout(function () {
let sourceBlockMarginPlusHeight = 0;
let defaultRouteBlockMarginPlusHeight = 0;
if (ctrl.inConnectors && ctrl.inConnectors.length > 0) {
let padding = 10;
let integrationsInBlock = document.getElementById("integrations-in-block");
let inFlowBlock = document.getElementById("in-flow-block");
let sourceBlock = document.getElementById("source-block");
let defaultRouteBlock = document.getElementById("default-route-block");
let integrationsInBlockHeight = integrationsInBlock.offsetHeight;
let sourceBlockMarginTop = getMarginFromTopElement(inFlowBlock, sourceBlock);
let integrationsInBlockMarginTop = getMarginFromTopElement(inFlowBlock, defaultRouteBlock) -
inFlowBlock.offsetHeight + padding;
let defaultRouteBlockMarginTop = inFlowBlock.offsetHeight - integrationsInBlockHeight - padding;
sourceBlock.style.marginTop = sourceBlockMarginTop + 'px';
integrationsInBlock.style.marginTop = integrationsInBlockMarginTop + 'px';
defaultRouteBlock.style.marginTop = defaultRouteBlockMarginTop + 'px';
sourceBlockMarginPlusHeight = sourceBlockMarginTop + sourceBlock.offsetHeight;
defaultRouteBlockMarginPlusHeight = integrationsInBlockMarginTop + integrationsInBlockHeight +
defaultRouteBlockMarginTop + defaultRouteBlock.offsetHeight;
}
if (ctrl.outConnectors && ctrl.outConnectors.length > 0) {
let outFlowBlock = document.getElementById("out-flow-block");
let targetBlock = document.getElementById("target-block");
let integrationsBlock = document.getElementById("integrations-out-block");
let targetBlockMarginTop = getMarginFromTopElement(outFlowBlock, targetBlock) - sourceBlockMarginPlusHeight;
let integrationsBlockMarginTop = getMarginFromTopElement(outFlowBlock, integrationsBlock) - defaultRouteBlockMarginPlusHeight;
targetBlock.style.marginTop = targetBlockMarginTop + 'px';
integrationsBlock.style.marginTop = integrationsBlockMarginTop + 'px';
}
}, 10);
function getMarginFromTopElement(sourceBlock, targetBlock) {
let sourceBlockOffsetTop = sourceBlock.offsetTop;
let sourceBlockOffsetHeight = sourceBlock.offsetHeight;
let targetBlockOffsetHeight = targetBlock.offsetHeight;
let difference = Math.abs(targetBlockOffsetHeight - sourceBlockOffsetHeight);
let marginTop = sourceBlockOffsetTop + difference / 2;
return marginTop;
}
let lines = [];
// draws lines for in-directed connector block
$scope.$watchCollection('$ctrl.inConnectors', function (newValue, oldValue) {
if (newValue && newValue.length > 0) {
setTimeout(function () {
if (ctrl.inConnectors) {
let pathType = ctrl.inConnectors.length === 1 ? 'straight' : 'grid';
ctrl.inConnectors.forEach((connector) => {
lines.push(new LeaderLine(
LeaderLine.pointAnchor(document.getElementById('source-block'), {x: '100%', y: 12.5}),
document.getElementById(connector.name + '_pre-route'),
{color: 'green', size: 2, path: pathType, startSocketGravity: [15, 0]}
));
lines.push(new LeaderLine(
document.getElementById(connector.name + '_pre-route'),
document.getElementById('in-flow_pre-route'),
{color: 'green', size: 2, path: 'grid', startSocketGravity: [10, 0]}
));
lines.push(new LeaderLine(
document.getElementById(connector.name + '_response'),
LeaderLine.pointAnchor(document.getElementById('source-block'), {x: '100%', y: 44.5}),
{color: 'blue', size: 2, path: pathType, endSocketGravity: [35, 0]}
));
lines.push(new LeaderLine(
document.getElementById('in-flow_response'),
document.getElementById(connector.name + '_response'),
{color: 'blue', size: 2, path: 'grid', startSocketGravity: [-10, 0]}
));
});
lines.push(new LeaderLine(
document.getElementById('in-flow_pre-route'),
LeaderLine.pointAnchor(document.getElementById('default-route-block'), {x: 0, y: 12.5}),
{color: 'green', size: 2, path: 'straight'}
));
lines.push(new LeaderLine(
LeaderLine.pointAnchor(document.getElementById('default-route-block'), {x: 0, y: 44.5}),
document.getElementById('in-flow_response'),
{color: 'blue', size: 2, path: 'straight'}
));
lines.push(new LeaderLine(
LeaderLine.pointAnchor(document.getElementById('default-route-block'), {x: 32.5, y: 0}),
LeaderLine.pointAnchor(document.getElementById('integrations-in-block'), {x: 32.5, y: '100%'}),
{color: 'green', size: 2, path: 'straight'}
));
lines.push(new LeaderLine(
LeaderLine.pointAnchor(document.getElementById('integrations-in-block'), {x: 64.5, y: '100%'}),
LeaderLine.pointAnchor(document.getElementById('default-route-block'), {x: 64.5, y: 0}),
{color: 'blue', size: 2, path: 'straight'}
));
}
}, 50);
}
});
// draws lines for out-directed connector block
$scope.$watchCollection('$ctrl.outConnectors', function (newValue, oldValue) {
if (newValue && newValue.length > 0) {
setTimeout(function () {
if (ctrl.outConnectors) {
let pathType = ctrl.outConnectors.length === 1 ? 'straight' : 'grid';
ctrl.outConnectors.forEach((connector) => {
lines.push(new LeaderLine(
document.getElementById(connector.name + '_pre-output'),
LeaderLine.pointAnchor(document.getElementById('target-block'), {x: '100%', y: 12.5}),
{color: 'green', size: 2, path: pathType, endSocketGravity: [35, 0]}
));
lines.push(new LeaderLine(
document.getElementById('out-flow_pre-route'),
document.getElementById(connector.name + '_pre-output'),
{color: 'green', size: 2, path: 'grid', startSocketGravity: [-10, 0]}
));
lines.push(new LeaderLine(
LeaderLine.pointAnchor(document.getElementById('target-block'), {x: '100%', y: 44.5}),
document.getElementById(connector.name + '_postprocess'),
{color: 'blue', size: 2, path: pathType, startSocketGravity: [15, 0]}
));
lines.push(new LeaderLine(
document.getElementById(connector.name + '_postprocess'),
document.getElementById('out-flow_postprocess'),
{color: 'blue', size: 2, path: 'grid', startSocketGravity: [10, 0]}
));
})
lines.push(new LeaderLine(
LeaderLine.pointAnchor(document.getElementById('integrations-out-block'), {x: 0, y: 12.5}),
document.getElementById('out-flow_pre-route'),
{color: 'green', size: 2, path: 'straight'}
));
lines.push(new LeaderLine(
document.getElementById('out-flow_postprocess'),
LeaderLine.pointAnchor(document.getElementById('integrations-out-block'), {x: 0, y: 44.5}),
{color: 'blue', size: 2, path: 'straight'}
));
}
}, 50);
}
});
// reposition of lines while container size is changed without changing window size
document.querySelector('#leader-lines-container').handleResize = entry => {
lines.forEach(line => line.position());
}
let resizeObserver = new ResizeObserver(entries => {
for (let entry of entries) {
if (entry.target.handleResize) {
entry.target.handleResize(entry);
}
}
});
resizeObserver.observe(document.querySelector('#leader-lines-container'));
// reposition of lines on scroll event
setTimeout(function () {
let contentElement = document.getElementsByClassName("contents")[0];
contentElement.onscroll = (event) => {
lines.forEach(line => line.position());
};
}, 10);
// reposition of lines while jmx-header is loaded after being empty
$scope.$on('jmxTreeClicked', (event, selected) => {
setTimeout(function () {
if (selected.objectName === selectedMBean.objectName) {
lines.forEach(line => line.position());
}
}, 10);
});
$scope.$on('$destroy', function () {
lines.forEach(line => line.remove());
resizeObserver.disconnect();
});
ctrl.goToProfileProperties = function () {
let currentLocationPath = $location.path();
$location.path(currentLocationPath.replace('diagram', 'properties'));
}
ctrl.editDefaultRouteProperties = function () {
let defaultRouteMbean = selectedMBean.findDescendant(child => {
if (child.objectName) {
return child.objectName.endsWith('route=default');
}
});
ctrl.editCustomizationPoint(defaultRouteMbean.objectName, 'doGetRouteConfig', [], 'routeContent');
}
ctrl.editCustomizationPoint = function (mbeanName, operationName, parameters, propertyName) {
operationsService
.executeOperation(mbeanName, {name: operationName}, parameters)
.then(result => {
let args = getArgumentsFromConfig(JSON.parse(result));
let property = args.fields.find(property => property.name === propertyName);
openXmlEditor(property, args);
}).catch(error => {
Core.notification('danger', error, 5000);
Entaxy.log.error(error);
});
}
function getArgumentsFromConfig(configInfo) {
let properties = Object.entries(configInfo.properties);
properties = properties.map(property => {
return {name: property[0], value: property[1]};
});
properties = properties.filter(property => property.name !== '__objectId');
properties = properties.filter(property => property.name !== '##config');
properties.unshift({name: 'objectId', value: configInfo.objectId});
let factoryFolder = entaxyService.getDomainFolder()
.findDescendant(child => child.title === configInfo.factoryId);
let factory = {name: factoryFolder.title, mbeanName: factoryFolder.objectName};
return {fields: properties, factoryId: factory};
}
function openXmlEditor(property, args) {
$uibModal.open({
component: 'entaxyXmlModal',
resolve: {
xml: () => atob(property.value),
mode: () => Entaxy.MODAL_MODES.EDIT
},
size: 'xl',
backdrop: 'static',
windowTopClass: 'modal-top-margin-override'
})
.result.then(xml => {
if (xml && xml.trim().length > 0) { // fixme
property.value = btoa(xml);
entaxyService.saveItem(args);
} else {
Core.notification('danger', 'Value cannot be empty', 5000);
}
});
}
}
entaxyProfileDiagramController.$inject = ['$scope', 'workspace', 'jolokia', '$location', 'operationsService', 'entaxyService', '$uibModal'];
})(Entaxy || (Entaxy = {}));

View File

@ -1,45 +0,0 @@
/*-
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
var Entaxy;
(function (Entaxy) {
Entaxy._module
.component('entaxyProfiles', {
bindings: {
pageTitle: '@'
},
template:
`
<h2>
{{$ctrl.pageTitle}}
</h2>
<entaxy-table runtime-type="entaxy.runtime.profile"
status-name="BundleState" object-name="systemName"></entaxy-table>
`
})
.name;
})(Entaxy || (Entaxy = {}));

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
@ -34,11 +34,19 @@ var Entaxy;
template:
`
<div class="properties-header-container">
<h2>
{{$ctrl.title}}
</h2>
<div>
<h2>
{{$ctrl.title}}
</h2>
<span ng-if="$ctrl.isFormDirty || $ctrl.hasChangedPrivateObjects">
There are unsaved changes
</span>
</div>
<button type="submit" class="btn btn-primary" ng-click="$ctrl.save()">
<button type="submit" class="btn btn-primary" ng-click="$ctrl.saveAll()"
ng-if="$ctrl.private && !$ctrl.isReadOnly()"
ng-disabled="!$ctrl.isOwnerChanged && !$ctrl.isFormDirty">Save all</button>
<button type="submit" class="btn btn-primary" ng-click="$ctrl.save()" ng-if="!$ctrl.isReadOnly()">
{{$ctrl.submitBtnTitle}}
</button>
</div>
@ -53,7 +61,8 @@ var Entaxy;
})
.name;
function entaxyPropertiesController($scope, workspace, operationsService, entaxyService, jolokia, $location) {
function entaxyPropertiesController($scope, workspace, entaxyService, jolokia, $location, $route,
entaxyAttributesCacheService, entaxyPrivateObjectsCacheService) {
'ngInject';
let ctrl = this;
@ -65,29 +74,73 @@ var Entaxy;
let selectedMbean = workspace.getSelectedMBean();
ctrl.title = 'Properties of ' + selectedMbean.title;
ctrl.submitBtnTitle = Entaxy.getButtonTitleByMode(ctrl.mode);
let itemName = jolokia.getAttribute(selectedMbean.objectName, 'Name');
let selectedMbeanName = selectedMbean.objectName;
let mbeanName = selectedMbean.parent.objectName;
if (ctrl.useGrandParentMbean === true) {
mbeanName = selectedMbean.parent.parent.objectName;
if (selectedMbeanName) {
populateExistentObjectInfo(selectedMbeanName);
} else {
populateAddedObjectInfo(selectedMbean);
}
}
function populateExistentObjectInfo(mbeanName) {
let attributes = entaxyAttributesCacheService.getAttributes(mbeanName);
if (attributes.Scope === Entaxy.SCOPE.PRIVATE) {
ctrl.private = true;
ctrl.objectFullId = attributes.ObjectFullId;
ctrl.owner = attributes.Owner;
setOwnerChanged();
ctrl.itemInfo = entaxyPrivateObjectsCacheService.getChangedObjectConfig(ctrl.objectFullId);
if (entaxyPrivateObjectsCacheService.isObjectSetToRemoval(ctrl.objectFullId)) {
ctrl.isToRemoval = true;
ctrl.mode = Entaxy.MODAL_MODES.VIEW;
}
} else if (entaxyPrivateObjectsCacheService.isChanged(mbeanName)) {
ctrl.hasChangedPrivateObjects = true;
}
operationsService
.executeOperation(mbeanName, { name: 'get' + ctrl.itemName + 'Config' }, [ itemName ])
.then(result => {
ctrl.itemInfo = JSON.parse(result);
let properties = Object.entries(ctrl.itemInfo.properties);
ctrl.properties = properties.map(property => { return { name: property[0], value: property[1] }; });
let factory = entaxyService.getDomainFolder()
.findDescendant(child => child.title === ctrl.itemInfo.factoryId);
ctrl.factories = [{ name: factory.title, mbeanName: factory.objectName }];
entaxyService.readObjectClusterState(mbeanName).then(objectClusterState => {
if (objectClusterState !== Entaxy.OBJECT_CLUSTER_STATE.NON_CLUSTERED) {
ctrl.local = objectClusterState === Entaxy.OBJECT_CLUSTER_STATE.LOCAL;
} else {
ctrl.mode = Entaxy.MODAL_MODES.VIEW;
}
}).catch(e => Entaxy.notificationError(e));
if (!ctrl.itemInfo) {
entaxyService.readConfiguration(mbeanName)
.then(result => {
ctrl.itemInfo = result;
ctrl.factories = [ entaxyService.getFactoryByTitle(ctrl.itemInfo.factoryId) ];
makeFormFieldsAndGroups();
}).catch(error => {
Entaxy.notificationError(error);
Entaxy.log.error(error);
});
} else {
ctrl.factories = [ entaxyService.getFactoryByTitle(ctrl.itemInfo.factoryId) ];
makeFormFieldsAndGroups();
}).catch(error => {
Core.notification('danger', error, 5000);
Entaxy.log.error(error);
});
}
}
function populateAddedObjectInfo(mbean) {
ctrl.private = true;
let parentMbeanName = mbean.parent.objectName;
let objectsInfo = entaxyPrivateObjectsCacheService.getAddedObjectsInfo(parentMbeanName);
let objectInfo = objectsInfo.find(objInfo => mbean.key === mbean.parent.key + '-' + objInfo.ui.id);
ctrl.itemInfo = objectInfo;
ctrl.owner = ctrl.itemInfo.ui.owner;
setOwnerChanged();
ctrl.isToRemoval = ctrl.itemInfo.toRemoval;
if (ctrl.isToRemoval) {
ctrl.mode = Entaxy.MODAL_MODES.VIEW;
}
ctrl.factories = [ entaxyService.getFactoryByTitle(ctrl.itemInfo.factoryId) ];
makeFormFieldsAndGroups();
}
function makeFormFieldsAndGroups() {
@ -95,11 +148,12 @@ var Entaxy;
ctrl.formFields = [];
ctrl.formFields.push({
label: 'Factory Id',
label: 'Factory',
name: 'factoryId',
type: 'java.lang.String',
helpText: null,
value: ctrl.factories[0].name,
type: 'text',
description: ctrl.factories[0].description,
value: ctrl.factories[0].displayName,
originalValue: ctrl.factories[0].name,
readOnly: true,
required: true,
group: 'general'
@ -107,7 +161,7 @@ var Entaxy;
let mbeanName = ctrl.factories[0].mbeanName;
operationsService.executeOperation(mbeanName, { name: 'getFields' }, [ 'init' ])
entaxyService.getFields(mbeanName)
.then((response) => {
let groups = new Set();
@ -115,23 +169,26 @@ var Entaxy;
_.forEach(JSON.parse(response), (field) => {
let formField = entaxyService.makeFormField(field, ctrl.itemInfo['objectId'], ctrl.properties, ctrl.mode);
let formField = entaxyService
.makeFormField(field, ctrl.itemInfo.objectId, ctrl.itemInfo.properties,
ctrl.itemInfo.configurableOnly, ctrl.mode);
if (formField) {
ctrl.formFields.push(formField);
groups.add(formField.group);
}
});
ctrl.formFields.forEach(formField => formField.type = Entaxy.convertToHtmlInputType(formField.type));
processDependencies();
if (ctrl.mode !== Entaxy.MODAL_MODES.VIEW) {
processDependencies();
}
ctrl.groups = Array.from(groups).map((group) => { return { name: group, displayName: group }; });
});
}
function processDependencies() {
let dependentFormFields = entaxyService.getDependentFormFields(ctrl.formFields);
let dependentFormFields = entaxyService
.getDependentFormFields(ctrl.formFields, ctrl.itemInfo.configurableOnly);
ctrl.definingFormFields = entaxyService.getDefiningFormFields(dependentFormFields, ctrl.formFields);
for (let i = 0; i < ctrl.definingFormFields.length; i++) {
@ -161,7 +218,7 @@ var Entaxy;
})
$scope.$on("$locationChangeStart", function(event) {
if (ctrl.isFormDirty && !confirm('You have unsaved changes. Do you want to leave the page anyway?')) {
if (ctrl.isFormDirty && !confirm(Entaxy.CONFIRMATION.UNSAVED_CHANGES)) {
event.preventDefault();
ctrl.isTreeOrTabSelectionUpdateNeeded = true;
}
@ -178,24 +235,157 @@ var Entaxy;
});
ctrl.save = function() {
entaxyService.requestConfirmationForSavingIfNeededAndProceed(!ctrl.isFormDirty, save);
let isConfirmationNeeded = !ctrl.isFormDirty && !ctrl.hasChangedPrivateObjects;
entaxyService.requestConfirmationForSavingIfNeededAndProceed(isConfirmationNeeded, save);
}
ctrl.saveAll = function () {
entaxyService.requestConfirmationForSavingOwnerAndProceed(saveAll);
}
function save() {
let fields = JSON.parse(JSON.stringify(ctrl.formFields));
entaxyService.validateFields(fields, ctrl.factories[0], ctrl.itemName)
entaxyService.validateFields(ctrl.formFields, ctrl.factories[0], ctrl.itemName)
.then(errors => {
ctrl.errors = errors;
if (Object.keys(ctrl.errors).length === 0) {
let args = entaxyService.getArguments(fields, ctrl.factories);
entaxyService.saveItem(args);
let selectedMBeanName = workspace.getSelectedMBeanName();
entaxyAttributesCacheService.setToUpdate(selectedMBeanName);
let args = entaxyService.getArguments(ctrl.formFields, ctrl.factories);
if (!ctrl.private) {
args.configProperties = ctrl.itemInfo.properties;
args.configurableOnly = ctrl.itemInfo.configurableOnly;
entaxyService.saveItem(args, ctrl.local);
} else {
let reloadTreeNeeded = false;
let selectedMbean = workspace.getSelectedMBean();
updateFields(args, selectedMbean, reloadTreeNeeded);
if (selectedMbean.objectName) {
entaxyPrivateObjectsCacheService
.addChanges(selectedMbean, ctrl.objectFullId, ctrl.owner, ctrl.itemInfo);
}
Entaxy.notificationSuccess('Operation Succeeded');
if (reloadTreeNeeded) {
reloadTreeAndUpdateLocation();
}
}
ctrl.isFormDirty = false;
}
});
}
function saveAll() {
entaxyService.validateFields(ctrl.formFields, ctrl.factories[0], ctrl.itemName)
.then(errors => {
ctrl.errors = errors;
if (Object.keys(ctrl.errors).length === 0) {
let selectedMBeanName = workspace.getSelectedMBeanName();
entaxyAttributesCacheService.setToUpdate(selectedMBeanName);
let args = entaxyService.getArguments(ctrl.formFields, ctrl.factories);
let reloadTreeNeeded = false;
let selectedMbean = workspace.getSelectedMBean();
updateFields(args, selectedMbean, reloadTreeNeeded);
if (selectedMbean.objectName) {
entaxyPrivateObjectsCacheService
.addChanges(selectedMbean, ctrl.objectFullId, ctrl.owner, ctrl.itemInfo);
}
let ownerMbean = entaxyPrivateObjectsCacheService.findOwnerMbean(selectedMbean, ctrl.owner);
let ownerMbeanName = ownerMbean.objectName;
entaxyService.readObjectClusterState(ownerMbeanName).then(objectClusterState => {
if (objectClusterState !== Entaxy.OBJECT_CLUSTER_STATE.NON_CLUSTERED) {
let local = objectClusterState === Entaxy.OBJECT_CLUSTER_STATE.LOCAL;
entaxyService.readConfiguration(ownerMbeanName)
.then(objectInfo => {
let args = entaxyService.getArgumentsFromConfig(objectInfo);
entaxyService.resolveRoutesFieldValueAndAddNew(args, ownerMbean)
.then(() => {
entaxyService.resolveResourceRefFields(args.fields)
.then(() => entaxyService.saveItem(args, local, updateLocation));
});
}).catch(error => {
Entaxy.notificationError(error);
Entaxy.log.error(error);
});
} else {
Entaxy.notificationError(Entaxy.NON_CLUSTERED_MESSAGE.EDITING);
}
}).catch(e => Entaxy.notificationError(e));
}
});
}
function updateFields(args, selectedMbean, reloadTreeNeeded) {
args.fields.forEach(field => {
if (field.changed) {
if (!selectedMbean.objectName && field.name === ctrl.itemInfo.ui.identifierFieldName) {
reloadTreeNeeded = true;
}
if (field.configured && field.valueToConfig !== undefined) {
ctrl.itemInfo.properties[field.name] = field.valueToConfig;
} else {
ctrl.itemInfo.properties[field.name] = field.value;
}
if (!selectedMbean.objectName) {
let formField = ctrl.itemInfo.ui.formFields
.find(formField => formField.name === field.name);
if (formField) {
formField.value = field.value;
}
}
}
});
}
ctrl.isReadOnly = function () {
return ctrl.mode === Entaxy.MODAL_MODES.VIEW;
}
function updateLocation(properties, objectId) {
if (ctrl.private && objectId && !ctrl.objectFullId) {
let nid = $location.search().nid;
let oldId = ctrl.itemInfo.ui.id;
$location.search('nid', nid.replace('-' + oldId, ''));
}
}
function setOwnerChanged() {
if (ctrl.private) {
ctrl.isOwnerChanged = entaxyPrivateObjectsCacheService
.isOwnerChanged(workspace.getSelectedMBean(), ctrl.owner);
}
}
function reloadTreeAndUpdateLocation() {
let nid = $location.search().nid;
let oldId = ctrl.itemInfo.ui.id;
ctrl.itemInfo.ui.id = ctrl.itemInfo.properties[ctrl.itemInfo.ui.identifierFieldName];
workspace.loadTree();
$location.search('nid', nid.replace(oldId, ctrl.itemInfo.ui.id));
}
$scope.$on(Jmx.TreeEvent.Updated, () => {
$route.reload();
});
}
entaxyPropertiesController.$inject = ['$scope', 'workspace', 'operationsService', 'entaxyService', 'jolokia', '$location'];
entaxyPropertiesController.$inject = ['$scope', 'workspace', 'entaxyService', 'jolokia', '$location', '$route',
'entaxyAttributesCacheService', 'entaxyPrivateObjectsCacheService'];
})(Entaxy || (Entaxy = {}));

View File

@ -1,170 +0,0 @@
/*-
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
var Entaxy;
(function (Entaxy) {
Entaxy._module.component('entaxyResourceViewerModal', {
bindings: {
modalInstance: '<',
resolve: '<'
},
template:
`
<div class="entaxy-modal-container">
<div class="modal-header">
<button type="button" class="close" aria-label="Close" ng-click="$ctrl.cancel()">
<span class="pficon pficon-close" aria-hidden="true"></span>
</button>
<h4 class="modal-title">{{$ctrl.modalTitle}}</h4>
</div>
<div class="modal-body-without-header" style="margin-top: 0;">
<div class="modal-resources-viewer-container">
<entaxy-crumbs root-crumb="$ctrl.protocol" crumbs="$ctrl.crumbs"></entaxy-crumbs>
<entaxy-file-panel items="$ctrl.items" selected-item="$ctrl.selectedItem" view="$ctrl.view"
change-selection-fn="$ctrl.changeSelection" open-fn="$ctrl.open"></entaxy-file-panel>
</div>
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-primary" ng-click="$ctrl.save()">Select</button>
</div>
</div>
`,
controller: entaxyResourceViewerModalController
})
.name;
function entaxyResourceViewerModalController($uibModal, $scope, workspace, operationsService, entaxyService) {
'ngInject';
let ctrl = this;
let entaxyJmxDomain = localStorage['entaxyJmxDomain'] || "ru.entaxy.esb";
ctrl.$onInit = function() {
ctrl.modalTitle = 'Select Resources';
ctrl.view = 'tiles';
ctrl.protocol = ctrl.resolve.config.resourceProvider;
let provider = entaxyService.getDomainFolder().findDescendant(child => {
let childObjectName = child.objectName;
if (childObjectName && childObjectName.startsWith(entaxyJmxDomain) && childObjectName.endsWith('provider=' + ctrl.protocol)) {
return child;
}
});
ctrl.providerMBeanName = provider.objectName;
ctrl.filter = ctrl.resolve.config.filter;
ctrl.enableFolderSelection = ctrl.resolve.config.target === 'folder' ? true : false;
let location = ctrl.resolve.location;
if (location && location.includes(':')) {
let path = location.split(':')[1];
let splitPath = path.split('/');
if (!ctrl.enableFolderSelection) {
splitPath.pop();
}
// todo else check if the last item in path is folder or not
ctrl.crumbs = splitPath;
} else {
ctrl.crumbs = [];
}
}
$scope.$watchCollection('$ctrl.crumbs', function(newValue, oldValue) {
ctrl.selectedItem = null;
updateItems();
})
ctrl.changeSelection = function (item) {
ctrl.selectedItem = item;
}
ctrl.open = function (item) {
if (item.isFolder === true) {
ctrl.crumbs.push(item.name);
} else {
ctrl.changeSelection(item);
ctrl.save();
}
}
function updateItems() {
let path = getPath();
operationsService
.executeOperation(ctrl.providerMBeanName, { name: 'getResourcesInfo' }, [ path ])
.then((result) => {
let items = JSON.parse(result);
if (Array.isArray(ctrl.filter) && ctrl.filter.length > 0) {
items = items.filter(item => {
let match = false;
if (item.isFolder) {
return true;
}
ctrl.filter.forEach(filter => {
if (filter.startsWith('*') && item.name.endsWith(filter.substring(1, filter.length))) {
match = true;
}
});
return match;
});
} else if (ctrl.filter && ctrl.filter.startsWith('*')) {
items = items.filter(item => item.isFolder || item.name.endsWith(ctrl.filter.substring(1, ctrl.filter.length)));
}
ctrl.items = items.sort(Entaxy.compareBy('name')).sort((a, b) => b.isFolder - a.isFolder);
})
.catch((error) => {
Entaxy.log.error(error);
Core.notification('danger', 'An error occurred while getting resources.', 5000);
})
}
function getPath() {
let path = '';
if (ctrl.crumbs && ctrl.crumbs.length > 0) {
path = ctrl.crumbs.join('/');
}
return path;
}
ctrl.cancel = function(reason) {
ctrl.modalInstance.dismiss(reason);
}
ctrl.save = function() {
if ((!ctrl.enableFolderSelection && !ctrl.selectedItem.isFolder) || ctrl.enableFolderSelection) {
let separator = getPath().length > 0 ? '/' : '';
let location = ctrl.protocol + ':' + getPath() + separator + ctrl.selectedItem.name;
ctrl.modalInstance.close(location);
}
}
}
entaxyResourceViewerModalController.$inject = ['$uibModal', '$scope', 'workspace', 'operationsService', 'entaxyService'];
})(Entaxy || (Entaxy = {}));

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
@ -34,30 +34,43 @@ var Entaxy;
Resources
</h2>
<p class="text-muted">{{$ctrl.location}}</p>
<button type="button" class="btn-clipboard" data-toggle="tooltip" title="Copy location to clipboard" ng-click="$ctrl.copyLocationToClipboard()">
<span class="fa fa-copy"></span>
<entaxy-copy-to-clipboard-button title="Copy location to clipboard"
text-to-copy="$ctrl.location"></entaxy-copy-to-clipboard-button>
<button type="button" data-toggle="tooltip" title="Change location view"
ng-click="$ctrl.changeLocationView()">
<span class="fa pficon-optimize"></span>
</button>
<button type="button" data-toggle="tooltip" title="Create folder" ng-click="$ctrl.createFolder()">
<span class="pficon pficon-add-circle-o"></span>
<div class="divider"></div>
<button type="button" data-toggle="tooltip" title="Upload resource" ng-click="$ctrl.triggerUpload()">
<span class="fa fa-upload"></span>
<input type="file" id="file-input" name="file-input" set-file-model
ng-model="$ctrl.file" ng-change="$ctrl.upload($ctrl.file)">
</button>
<button type="button" data-toggle="tooltip" title="Change to list" ng-click="$ctrl.changeView('list')" ng-if="$ctrl.view === 'tiles'">
<button type="button" data-toggle="tooltip" title="Change to list" ng-click="$ctrl.changeView('list')"
ng-if="$ctrl.view === 'tiles'">
<span class="fa fa-list"></span>
</button>
<button type="button" data-toggle="tooltip" title="Change to tiles" ng-click="$ctrl.changeView('tiles')" ng-if="$ctrl.view === 'list'">
<button type="button" data-toggle="tooltip" title="Change to tiles" ng-click="$ctrl.changeView('tiles')"
ng-if="$ctrl.view === 'list'">
<span class="fa fa-th"></span>
</button>
</div>
<entaxy-crumbs root-crumb="$ctrl.protocol" crumbs="$ctrl.crumbs"></entaxy-crumbs>
<div class="resources-file-drop-zone" entaxy-file-drop ng-model="$ctrl.file" process-fn="$ctrl.upload($ctrl.file)">
<div class="file-panel-container">
<div class="resources-file-drop-zone" entaxy-file-drop ng-model="$ctrl.file"
process-fn="$ctrl.upload($ctrl.file)">
<div class="file-panel-container" context-menu context-menu-options="$ctrl.contextMenuOptions">
<entaxy-file-panel items="$ctrl.items" selected-item="$ctrl.selectedItem" view="$ctrl.view"
change-selection-fn="$ctrl.changeSelection" open-fn="$ctrl.open"></entaxy-file-panel>
change-selection-fn="$ctrl.changeSelection" open-fn="$ctrl.open"
resource-context-menu-options="$ctrl.resourceContextMenuOptions"
folder-context-menu-options="$ctrl.folderContextMenuOptions"></entaxy-file-panel>
</div>
<div class="meta-info" resizable r-directions="['left']" ng-if="$ctrl.selectedItem && $ctrl.selectedItem.metadata">
<div class="meta-info" resizable r-directions="['left']"
ng-if="$ctrl.selectedItem && $ctrl.selectedItem.metadata">
<uib-tabset active="$ctrl.activeTab" class="meta-tabs">
<uib-tab ng-repeat="(section, info) in $ctrl.selectedItem.metadata track by $index" heading="{{section}}">
<uib-tab ng-repeat="(section, info) in $ctrl.selectedItem.metadata track by $index"
heading="{{section}}">
<div class="json-formatter">
<json-formatter json="info" open="1"></json-formatter>
</div>
@ -70,26 +83,81 @@ var Entaxy;
})
.name;
function entaxyResourcesController(workspace, $scope, jolokiaService, operationsService, restService, $timeout, $uibModal) {
function entaxyResourcesController(workspace, $scope, jolokia, entaxyService, entaxyResourcesService,
$timeout, $uibModal, $cookies) {
'ngInject';
let ctrl = this;
let selectedMbeanName = workspace.getSelectedMBeanName();
let clientFolders = [];
const ENTAXY_RESOURCE_PREFIX = 'entaxy-resource://';
ctrl.isFullLocationView = true;
ctrl.contextMenuOptions = [
{
name: 'Create folder',
actionFn: createFolder
},
{
name: 'Upload',
actionFn: uploadResource
},
{
name: 'Paste',
actionFn: pasteResource
}
];
ctrl.resourceContextMenuOptions = [
{
name: 'Download',
actionFn: downloadResource
},
{
name: 'Copy',
actionFn: copyResource
},
{
name: 'Cut',
actionFn: cutResource
},
{
name: 'Remove',
actionFn: removeResource
},
{
divider: true
}
].concat(ctrl.contextMenuOptions);
ctrl.folderContextMenuOptions = [
{
name: 'Paste to folder',
actionFn: pasteResourceToFolder
},
{
name: 'Remove',
actionFn: removeResource
},
{
divider: true
}
].concat(ctrl.contextMenuOptions);
ctrl.$onInit = function () {
ctrl.view = 'list';
jolokiaService.getAttribute(selectedMbeanName, 'Protocol')
.then((protocol) => {
ctrl.protocol = protocol;
ctrl.crumbs = [];
});
ctrl.protocol = jolokia.getAttribute(selectedMbeanName, 'Protocol');
let path = $cookies.getObject(ctrl.protocol);
ctrl.crumbs = path ? path.split('/') : [];
}
$scope.$watchCollection('$ctrl.crumbs', function(newValue, oldValue) {
$scope.$watchCollection('$ctrl.crumbs', function() {
ctrl.selectedItem = null;
ctrl.location = getLocation();
ctrl.location = ctrl.isFullLocationView ? getFullLocation() : getLocation();
$cookies.putObject(ctrl.protocol, getPath());
updateItems();
})
@ -97,9 +165,14 @@ var Entaxy;
ctrl.view = view;
}
ctrl.changeLocationView = function () {
ctrl.location = ctrl.isFullLocationView ? getLocation() : getFullLocation();
ctrl.isFullLocationView = !ctrl.isFullLocationView;
}
ctrl.changeSelection = function (item) {
ctrl.selectedItem = item;
ctrl.location = getLocation();
ctrl.location = ctrl.isFullLocationView ? getFullLocation() : getLocation();
$timeout(function () {
ctrl.activeTab = 0;
});
@ -114,122 +187,196 @@ var Entaxy;
function updateItems() {
let path = getPath();
operationsService
.executeOperation(selectedMbeanName, { name: 'getResourcesInfo' }, [ path ])
.then((result) => {
let items = JSON.parse(result);
items.forEach(item => {
if (item.metadata) {
Object.keys(item.metadata).forEach(section => {
item.metadata[section] = JSON.parse(item.metadata[section]);
});
}
});
items = items.concat(getClientFoldersToAdd(items));
entaxyResourcesService.getResourcesInfo(selectedMbeanName, path)
.then(originItems => {
items = originItems
.concat(entaxyResourcesService.getClientFoldersToAdd(clientFolders, originItems, ctrl.crumbs));
ctrl.items = items.sort(Entaxy.compareBy('name')).sort((a, b) => b.isFolder - a.isFolder);
})
.catch((error) => {
Entaxy.log.error(error);
Core.notification('danger', 'An error occurred while getting resources.', 5000);
})
}
function getPath() {
let path = '';
if (ctrl.crumbs && ctrl.crumbs.length > 0) {
path = ctrl.crumbs.join('/');
return entaxyResourcesService.getPath(ctrl.crumbs);
}
function getLocationWithoutProtocol(folderSelectionEnabled) {
let isItemSelected = ctrl.selectedItem &&
(!ctrl.selectedItem.isFolder || (folderSelectionEnabled && ctrl.selectedItem.isFolder));
let separator = getPath().length > 0 && isItemSelected ? '/' : '';
let selectedItemName = isItemSelected ? ctrl.selectedItem.name : '';
return getPath() + separator + selectedItemName;
}
function getLocation(folderSelectionEnabled) {
return ctrl.protocol + ':' + getLocationWithoutProtocol(folderSelectionEnabled);
}
function getFullLocation() {
return ENTAXY_RESOURCE_PREFIX + ctrl.protocol + '/' + getLocationWithoutProtocol();
}
function createFolder() {
entaxyResourcesService.addFolder(ctrl.items, clientFolders, ctrl.crumbs);
}
function uploadResource() {
ctrl.triggerUpload();
}
function downloadResource(item) {
let path = isItemSelected(item) ?
getLocationWithoutProtocol(true) :
getLocationWithoutProtocol(true) + '/' + item.name;
entaxyResourcesService.downloadResource(selectedMbeanName, path)
.then(result => {
entaxyService.downloadFileFromBase64StringContent(result, item.name);
}).catch(error => {
Entaxy.notificationError(error);
Entaxy.log.error(error);
});
}
function copyResource(item) {
setCopyConfig(item, false);
}
function cutResource(item) {
setCopyConfig(item, true);
}
function setCopyConfig(item, removeSource) {
Entaxy.resourceCopyConfig.sourceResourcePath = isItemSelected(item) ?
getLocation(true) : getLocation(true) + '/' + item.name;
Entaxy.resourceCopyConfig.sourceResourceName = item.name;
Entaxy.resourceCopyConfig.removeSource = removeSource;
}
function pasteResource() {
if (Entaxy.resourceCopyConfig.sourceResourcePath) {
let path = getPath();
pasteWithUniquenessCheck(ctrl.items, path);
}
return path;
}
ctrl.copyLocationToClipboard = function() {
let clipboard = new ClipboardJS('.btn-clipboard', {
text: (trigger) => ctrl.location
});
setTimeout(() => clipboard.destroy(), 1000);
}
function pasteResourceToFolder(item) {
if (Entaxy.resourceCopyConfig.sourceResourcePath) {
let path = isItemSelected(item) ?
getLocationWithoutProtocol(true) :
getLocationWithoutProtocol(true) + '/' + item.name;
function getLocation() {
let separator = getPath().length > 0 ? '/' : '';
let selectedItemName = ctrl.selectedItem && !ctrl.selectedItem.isFolder ? ctrl.selectedItem.name : '';
return ctrl.protocol + ':' + getPath() + separator + selectedItemName;
}
ctrl.createFolder = function () {
$uibModal.open({
component: 'entaxyAddFolderModal',
resolve: {
names: () => ctrl.items.filter((item) => item.isFolder).map((item) => item.name)
},
size: 'sm-custom',
backdrop: 'static',
windowTopClass: 'modal-top-margin-center-override'
})
.result.then(name => {
let newFolder = {
name: name,
isFolder: true,
crumbs: ctrl.crumbs.map((crumb) => crumb)
};
ctrl.items.push(newFolder);
ctrl.items = ctrl.items.sort(Entaxy.compareBy('name')).sort((a, b) => b.isFolder - a.isFolder);
clientFolders.push(newFolder);
});
}
function getClientFoldersToAdd(items) {
let foldersToAdd = [];
if (clientFolders.length > 0) {
clientFolders = clientFolders.filter((folder) => {
let isSaved = true;
if (folder.crumbs.length == ctrl.crumbs.length && (folder.crumbs.length == 0 ||
(folder.crumbs.length > 0 && folder.crumbs[folder.crumbs.length - 1] ===
ctrl.crumbs[ctrl.crumbs.length - 1]))) {
items.forEach((item) => {
if (item.isFolder && item.name === folder.name) {
isSaved = false;
}
});
if (isSaved) {
foldersToAdd.push(folder);
}
}
return isSaved;
entaxyResourcesService.getResourcesInfo(selectedMbeanName, path)
.then(items => {
pasteWithUniquenessCheck(items, path);
})
.catch((error) => {
Entaxy.log.error(error);
Entaxy.notificationError('An error occurred while getting resources.');
});
}
}
return foldersToAdd;
function pasteWithUniquenessCheck(items, path) {
let copiedDuplicateItem = items.find(item => item.name === Entaxy.resourceCopyConfig.sourceResourceName);
if (copiedDuplicateItem && !copiedDuplicateItem.isFolder) {
$uibModal.open({
component: 'entaxySimpleResourceNameInputModal',
resolve: {
title: () => 'Change resource name',
names: () => items.filter((item) => !item.isFolder).map((item) => item.name),
name: () => Entaxy.resourceCopyConfig.sourceResourceName,
type: () => 'Resource'
},
size: 'sm-custom',
backdrop: 'static',
windowTopClass: 'modal-top-margin-center-override'
})
.result.then(name => {
paste(Entaxy.resourceCopyConfig.sourceResourcePath, path, name);
});
} else {
paste(Entaxy.resourceCopyConfig.sourceResourcePath, path, Entaxy.resourceCopyConfig.sourceResourceName);
}
}
function paste(from, to, name) {
const fullToPath = to + '/' + name;
entaxyResourcesService.pasteResource(selectedMbeanName, from, fullToPath)
.then(result => {
if (Entaxy.resourceCopyConfig.removeSource) {
entaxyResourcesService.removeResource(selectedMbeanName,
Entaxy.resourceCopyConfig.sourceResourcePath)
.then(result => {
Entaxy.resourceCopyConfig.sourceResourcePath = ctrl.protocol + ':' + fullToPath;
Entaxy.resourceCopyConfig.sourceResourceName = name;
Entaxy.resourceCopyConfig.removeSource = false;
updateItems();
}).catch(error => {
Entaxy.notificationError(error);
Entaxy.log.error(error);
});
} else {
updateItems();
}
}).catch(error => {
Entaxy.notificationError(error);
Entaxy.log.error(error);
});
}
function removeResource(item) {
let title = 'Confirm Removing Resource';
let resourceType = item.isFolder ? 'folder' : 'resource';
let message = 'Do you want to remove ' + resourceType + ' ' + item.name + '?';
entaxyService.openConfirmationWindow(title, message)
.then(() => {
let path = isItemSelected(item) ?
getLocationWithoutProtocol(true) :
getLocationWithoutProtocol(true) + '/' + item.name;
entaxyResourcesService.removeResource(selectedMbeanName, path)
.then((result) => {
Entaxy.notificationSuccess('Resource ' + item.name + ' was successfully removed');
if (isItemSelected(item)) {
ctrl.selectedItem = undefined;
}
updateItems();
})
.catch((error) => {
Entaxy.log.error(error);
Entaxy.notificationError('An error occurred while removing resource ' + item.name);
});
});
}
function isItemSelected(item) {
return ctrl.selectedItem && ctrl.selectedItem.name === item.name;
}
ctrl.triggerUpload = function () {
document.getElementById('file-input').click();
}
ctrl.upload = function (file) {
if (!file) {
return;
}
let fd = new FormData();
fd.append('file', file);
fd.append('protocol', ctrl.protocol);
let separator = getPath().length > 0 ? '/' : '';
fd.append('path', getPath() + separator + file.name);
let uploadPromise = entaxyResourcesService
.uploadFile(file, ctrl.protocol, getPath() + separator + file.name);
restService.post('/cxf/file-upload/upload/resource', fd)
.then((response) => {
Core.notification('success', 'File ' + response.data + ' was successfully uploaded.', 3000);
updateItems();
})
.catch((error) => {
Entaxy.log.error(error);
Core.notification('danger', 'An error occurred while uploading the file.', 5000);
});
if (uploadPromise) {
uploadPromise.then((response) => {
Entaxy.notificationSuccess('File ' + response.data + ' was successfully uploaded.');
updateItems();
})
.catch((error) => {
Entaxy.log.error(error);
Entaxy.notificationError('An error occurred while uploading the file.');
});
}
}
}
entaxyResourcesController.$inject = ['workspace', '$scope', 'jolokiaService', 'operationsService', 'restService', '$timeout', '$uibModal'];
entaxyResourcesController.$inject = ['workspace', '$scope', 'jolokia', 'entaxyService', 'entaxyResourcesService',
'$timeout', '$uibModal', '$cookies'];
})(Entaxy || (Entaxy = {}));

View File

@ -1,204 +0,0 @@
/*-
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
var Entaxy;
(function (Entaxy) {
Entaxy._module
.component('entaxySelect', {
bindings: {
type: '<',
filter: '<',
model: '=',
updateParent: '<',
updateParentFn: '<',
options: '=',
creationEnabled: '<',
formController: '<'
},
template:
`
<div class="custom-select">
<button type="button" class="btn-select form-control dropdown-toggle" id="filter" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{{$ctrl.selectedOption.name}}
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li ng-repeat="option in $ctrl.options" id="option.name" ng-click="$ctrl.changeSelection(option)">{{ option.name }}</li>
<li id="addItem" class="dropdown-option-new" ng-click="$ctrl.showModal()" ng-if="$ctrl.creationEnabled">
<span class="pficon pficon-add-circle-o"></span>
{{$ctrl.createObjectOptionTitle}}
</li>
</ul>
</div>
`,
controller: entaxySelectController
})
.name;
function entaxySelectController(workspace, jolokiaService, jolokia, $q, $uibModal, entaxyService) {
'ngInject';
let ctrl = this;
ctrl.$onInit = function() {
ctrl.itemType = Entaxy.getItemTypeFromRuntimeType(ctrl.type);
if (ctrl.creationEnabled) {
ctrl.createObjectOptionTitle = 'New private ' + ctrl.itemType + '...';
}
if (!ctrl.options) {
let domain = entaxyService.getDomainFolder();
let typedMBeans = entaxyService.getAllChildMBeansByRuntimeType(domain, ctrl.type);
if (ctrl.filter) {
let filteredMbeans = [];
typedMBeans.forEach(mbean => {
let label = jolokia.getAttribute(mbean.objectName, 'Label');
if (label.match(ctrl.filter)) {
filteredMbeans.push(mbean);
}
});
typedMBeans = filteredMbeans;
}
let items = typedMBeans.map(mbean => { return { name: jolokia.getAttribute(mbean.objectName, 'Name') }; });
if (items && items.length > 0) {
ctrl.options = items.sort(Entaxy.compareBy('name'));
ctrl.changeSelection(items[0]);
} else {
ctrl.options = [];
let notificationType = ctrl.creationEnabled ? 'warning' : 'danger';
Core.notification(notificationType, 'There are no suitable ' + ctrl.itemType, 5000);
// todo close the modal if creation isn't enabled
}
} else {
ctrl.selectedOption = ctrl.options.find((option) => option.name === ctrl.model || option.value === ctrl.model);
}
}
ctrl.changeSelection = function (option) {
if (ctrl.selectedOption !== option) {
let previousOption = ctrl.selectedOption;
ctrl.selectedOption = option;
ctrl.model = option.value ? option.value : option.name;
if (previousOption && ctrl.formController && !ctrl.formController.$dirty) {
ctrl.formController.$setDirty();
}
if (ctrl.updateParent) {
if (previousOption) {
Core.notification('warning',
'Changing ' + ctrl.itemType + ' field value may lead to changes in other fields of the current object. ' +
'Please, make sure to revise all fields before accepting.', 10000);
}
ctrl.updateParentFn(previousOption, option, Entaxy.capitalize(ctrl.itemType));
}
}
}
ctrl.showModal = function() {
let factories = [];
let promises = [];
let factoryFolder = entaxyService.getDomainFolder().findDescendant(child => child.title === ctrl.type);
if (factoryFolder && factoryFolder.children) {
factoryFolder.children.forEach((child) => {
promises.push(jolokiaService.getAttributes(child.objectName, ['Abstract', 'DisplayName', 'Label', 'Description', 'Deprecated'])
.then((result) => {
let label = result['Label'];
if (!result['Abstract']) {
if (!ctrl.filter || (ctrl.filter && label && label.indexOf(ctrl.filter) > -1)) {
factories.push({
name: child.title,
displayName: result['DisplayName'] ? result['DisplayName'] : child.title,
label: result['Label'],
mbeanName: child.objectName,
description: result['Description'] ? result['Description'] : 'There is no description for this factory.',
additionalInfo: result['Deprecated'] ? ['[DEPRECATED]'] : undefined
});
}
}
}));
});
$uibModal.open({
component: 'entaxyModal',
resolve: {
mode: () => Entaxy.MODAL_MODES.ADD,
itemType: () => Entaxy.capitalize(ctrl.itemType),
factories: $q.all(promises).then(() => factories)
},
size: 'xl',
backdrop: 'static',
windowTopClass: 'modal-top-margin-override'
})
.result.then(args => {
addItem(args);
},
reason => {
if (reason) {
Core.notification('danger', reason, 5000);
}
});
}
}
function addItem(args) {
let factoryId = args.factoryId.name;
let objectId = args.fields.find((field) => field.name === 'objectId').value;
let fields = objectId ? args.fields.filter((field) => field.name !== 'objectId') : args.fields;
let properties = fields.reduce((obj, cur) => ({ ...obj, [cur.name] : cur.value }), {});
let newObjectProperties = {
factoryId: factoryId,
objectId: objectId,
scope: 'private',
properties: properties
};
let newObjectOption = {
name: objectId ? objectId : ('private-' + ctrl.itemType),
value: newObjectProperties
};
ctrl.options.push(newObjectOption);
ctrl.changeSelection(newObjectOption);
}
}
entaxySelectController.$inject = ['workspace', 'jolokiaService', 'jolokia', '$q', '$uibModal', 'entaxyService'];
})(Entaxy || (Entaxy = {}));

View File

@ -1,86 +0,0 @@
/*-
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
var Entaxy;
(function (Entaxy) {
Entaxy._module
.component('entaxySelectFromEnum', {
bindings: {
values: '<',
isEmptyIncluded: '<',
model: '=',
readonly: '<'
},
template:
`
<select class="form-control" ng-options="option.name for option in $ctrl.options" ng-model="$ctrl.selectedOption"
ng-change="$ctrl.changeSelection()" ng-disabled="$ctrl.readonly">
`,
controller: entaxySelectFromEnumController
})
.name;
function entaxySelectFromEnumController($scope) {
'ngInject';
let ctrl = this;
let emptyValue = { name: '--Empty value--' };
ctrl.$onInit = function() {
populateOptions();
}
function populateOptions() {
ctrl.options = (ctrl.values && ctrl.values.length > 0) ? ctrl.values.map(value => { return { name: value } }) : [];
if (ctrl.isEmptyIncluded !== false) {
ctrl.options.unshift(emptyValue);
}
}
$scope.$watchCollection('$ctrl.values', function(newValue, oldValue) {
if (newValue !== oldValue) {
populateOptions();
let currentSelectedOption = ctrl.options.find((option) => option.name === ctrl.selectedOption.name);
ctrl.selectedOption = currentSelectedOption ? currentSelectedOption : ctrl.options[0];
ctrl.changeSelection();
}
});
$scope.$watch('$ctrl.model', function(newValue, oldValue) {
ctrl.selectedOption = ctrl.model ? ctrl.options.find((option) => option.name === ctrl.model) : ctrl.options[0];
ctrl.changeSelection();
});
ctrl.changeSelection = function () {
ctrl.model = (ctrl.selectedOption === emptyValue) ? undefined : ctrl.selectedOption.name;
}
}
entaxySelectFromEnumController.$inject = ['$scope'];
})(Entaxy || (Entaxy = {}));

View File

@ -1,45 +0,0 @@
/*-
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
var Entaxy;
(function (Entaxy) {
Entaxy._module
.component('entaxyServices', {
bindings: {
pageTitle: '@'
},
template:
`
<h2>
{{$ctrl.pageTitle}}
</h2>
<entaxy-table runtime-type="entaxy.runtime.service"
status-name="BundleState" object-name="systemName"></entaxy-table>
`
})
.name;
})(Entaxy || (Entaxy = {}));

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
@ -34,13 +34,23 @@ var Entaxy;
<h2>
Source
</h2>
<span class="route-source-error-message" ng-if="$ctrl.xml.trim().length === 0">*{{$ctrl.errorMessage}}</span>
<span ng-if="$ctrl.xml.trim().length === 0">
{{$ctrl.errorMessage}}
</span>
<span ng-if="($ctrl.isDirty || $ctrl.hasChangedPrivateObjects) && $ctrl.xml.trim().length > 0">
There are unsaved changes
</span>
</div>
<button type="submit" class="btn btn-primary" ng-click="$ctrl.save()" ng-if="$ctrl.isContentPresent">Save changes</button>
<button type="submit" class="btn btn-primary" ng-click="$ctrl.saveAll()"
ng-if="$ctrl.isContentPresent && !$ctrl.readOnly && $ctrl.private"
ng-disabled="!$ctrl.isOwnerChanged && !$ctrl.isDirty">Save all</button>
<button type="submit" class="btn btn-primary" ng-click="$ctrl.save()"
ng-if="$ctrl.isContentPresent && !$ctrl.readOnly">Save</button>
</div>
<div ng-if="$ctrl.isContentPresent">
<div ng-if="$ctrl.isContentReady">
<div class="xml-route-source-container">
<entaxy-xml-editor class="xml-editor" source-doc="$ctrl.xml"></entaxy-xml-editor>
<entaxy-xml-editor class="xml-editor" source-doc="$ctrl.xml" read-only="$ctrl.readOnly">
</entaxy-xml-editor>
</div>
</div>
<div ng-if="$ctrl.isContentPresent === false">There is no viewable content.</div>
@ -49,7 +59,8 @@ var Entaxy;
})
.name;
function entaxySourceController(workspace, $location, operationsService, $scope, entaxyService) {
function entaxySourceController(workspace, $location, operationsService, $scope,
entaxyService, entaxyAttributesCacheService, entaxyPrivateObjectsCacheService) {
'ngInject';
let ctrl = this;
@ -57,35 +68,88 @@ var Entaxy;
ctrl.$onInit = function() {
let mbeanName = workspace.getSelectedMBeanName();
let selectedMbean = workspace.getSelectedMBean();
let selectedMbeanName = selectedMbean.objectName;
operationsService
.executeOperation(mbeanName, { name: 'doGetRouteConfig' }, [])
.then(result => {
let info = JSON.parse(result);
if (selectedMbeanName) {
populateExistentObjectInfo(selectedMbeanName);
} else {
populateAddedObjectInfo(selectedMbean);
}
}
let xml = info.properties.routeContent;
if (xml) {
ctrl.isContentPresent = true;
function populateExistentObjectInfo(mbeanName) {
let attributes = entaxyAttributesCacheService.getAttributes(mbeanName);
ctrl.objectId = info.objectId;
ctrl.factoryId = info.factoryId;
ctrl.scope = info.scope;
ctrl.systemName = info.properties.systemName;
if (attributes.Scope === Entaxy.SCOPE.PRIVATE) {
ctrl.private = true;
ctrl.objectFullId = attributes.ObjectFullId;
ctrl.owner = attributes.Owner;
ctrl.isToRemoval = entaxyPrivateObjectsCacheService.isObjectSetToRemoval(ctrl.objectFullId);
ctrl.itemInfo = entaxyPrivateObjectsCacheService.getChangedObjectConfig(ctrl.objectFullId);
} else if (entaxyPrivateObjectsCacheService.isChanged(mbeanName)) {
ctrl.hasChangedPrivateObjects = true;
}
ctrl.xml = atob(xml);
entaxyService.readObjectClusterState(mbeanName).then(objectClusterState => {
ctrl.nonClustered = objectClusterState === Entaxy.OBJECT_CLUSTER_STATE.NON_CLUSTERED;
if (ctrl.nonClustered) {
Entaxy.notificationInfo(Entaxy.NON_CLUSTERED_MESSAGE.EDITING);
} else {
ctrl.isContentPresent = false;
ctrl.local = objectClusterState === Entaxy.OBJECT_CLUSTER_STATE.LOCAL;
}
}).catch(e => Entaxy.notificationError(e));
}).catch(error => {
Core.notification('danger', error, 5000);
Entaxy.log.error(error);
});
if (!ctrl.itemInfo) {
entaxyService.readConfiguration(mbeanName).then(info => {
init(info);
if (ctrl.isContentPresent) {
if (!ctrl.private) {
ctrl.args = entaxyService.getArgumentsFromConfig(info);
} else {
ctrl.itemInfo = info;
}
}
});
} else {
init(ctrl.itemInfo);
}
}
function populateAddedObjectInfo(mbean) {
ctrl.private = true;
let parentMbeanName = mbean.parent.objectName;
let objectsInfo = entaxyPrivateObjectsCacheService.getAddedObjectsInfo(parentMbeanName);
let objectInfo = objectsInfo.find(objInfo => mbean.key === mbean.parent.key + '-' + objInfo.ui.id);
ctrl.itemInfo = objectInfo;
ctrl.owner = ctrl.itemInfo.ui.owner;
ctrl.isToRemoval = ctrl.itemInfo.toRemoval;
init(objectInfo);
}
function init(info) {
setOwnerChanged();
ctrl.readOnly = info.configurableOnly || ctrl.nonClustered || ctrl.isToRemoval;
let routeContent = info.properties.routeContent;
if (routeContent) {
ctrl.isContentPresent = true;
entaxyService.getXmlFromConfigPropertyValue(routeContent).then(xml => {
ctrl.isContentReady = true;
ctrl.xml = xml;
});
} else {
ctrl.isContentPresent = false;
}
}
$scope.$watch('$ctrl.xml', function (newValue, oldValue) {
if (newValue && oldValue) {
if (newValue && oldValue && newValue !== oldValue) {
if (!ctrl.isDirty) {
ctrl.isDirty = true;
}
@ -97,7 +161,7 @@ var Entaxy;
})
$scope.$on("$locationChangeStart", function(event) {
if (ctrl.isDirty && !confirm('You have unsaved changes. Do you want to leave the page anyway?')) {
if (ctrl.isDirty && !confirm(Entaxy.CONFIRMATION.UNSAVED_CHANGES)) {
event.preventDefault();
ctrl.isTreeOrTabSelectionUpdateNeeded = true;
}
@ -114,30 +178,108 @@ var Entaxy;
});
ctrl.save = function() {
entaxyService.requestConfirmationForSavingIfNeededAndProceed(!ctrl.isDirty, save);
let isConfirmationNeeded = !ctrl.isDirty && !ctrl.hasChangedPrivateObjects;
entaxyService.requestConfirmationForSavingIfNeededAndProceed(isConfirmationNeeded, save);
};
ctrl.saveAll = function () {
entaxyService.requestConfirmationForSavingOwnerAndProceed(saveAll);
}
function save() {
if (ctrl.xml.trim().length !== 0) {
let factoryFolder = entaxyService.getDomainFolder()
.findDescendant(child => child.title === ctrl.factoryId);
let mbeanName = factoryFolder.objectName
let properties = { systemName: ctrl.systemName, routeContent: btoa(ctrl.xml) };
let instructions = {"@LIFECYCLE":["general"]};
let base64Xml = Entaxy.stringToBase64(ctrl.xml);
if (!ctrl.private) {
let property = ctrl.args.fields.find(property => property.name === 'routeContent');
property.value = base64Xml;
operationsService.executeOperation(mbeanName, { name: 'createObjectByInstructions' }, [ ctrl.objectId, ctrl.scope, instructions, properties ] )
.then(result => {
let tableHtml = Entaxy.createTableFromResponse(result);
Entaxy.notification('success', tableHtml, 10000);
}).catch(error => {
Core.notification('danger', error, 5000);
Entaxy.log.error(error);
});
entaxyService.resolveRoutesFieldValueAndAddNew(ctrl.args, workspace.getSelectedMBean())
.then(() => {
entaxyService.saveItem(ctrl.args, ctrl.local, update);
});
} else {
ctrl.itemInfo.properties.routeContent = base64Xml;
ctrl.isDirty = false;
let selectedMbean = workspace.getSelectedMBean();
if (selectedMbean.objectName) {
entaxyPrivateObjectsCacheService
.addChanges(selectedMbean, ctrl.objectFullId, ctrl.owner, ctrl.itemInfo);
} else {
let routeContentFormField = ctrl.itemInfo.ui.formFields
.find(formField => formField.name === 'routeContent');
routeContentFormField.value = ctrl.xml;
}
Entaxy.notificationSuccess('Operation Succeeded');
update();
}
}
}
function saveAll() {
if (ctrl.xml.trim().length !== 0) {
let base64Xml = Entaxy.stringToBase64(ctrl.xml);
ctrl.itemInfo.properties.routeContent = base64Xml;
let selectedMbean = workspace.getSelectedMBean();
if (selectedMbean.objectName) {
entaxyPrivateObjectsCacheService
.addChanges(selectedMbean, ctrl.objectFullId, ctrl.owner, ctrl.itemInfo);
} else {
let routeContentFormField = ctrl.itemInfo.ui.formFields
.find(formField => formField.name === 'routeContent');
routeContentFormField.value = ctrl.xml;
}
let ownerMbean = entaxyPrivateObjectsCacheService.findOwnerMbean(selectedMbean, ctrl.owner);
let ownerMbeanName = ownerMbean.objectName;
entaxyService.readObjectClusterState(ownerMbeanName).then(objectClusterState => {
if (objectClusterState !== Entaxy.OBJECT_CLUSTER_STATE.NON_CLUSTERED) {
let local = objectClusterState === Entaxy.OBJECT_CLUSTER_STATE.LOCAL;
entaxyService.readConfiguration(ownerMbeanName)
.then(objectInfo => {
let args = entaxyService.getArgumentsFromConfig(objectInfo);
entaxyService.resolveRoutesFieldValueAndAddNew(args, ownerMbean)
.then(() => {
entaxyService.resolveResourceRefFields(args.fields)
.then(() => entaxyService.saveItem(args, local, update));
});
}).catch(error => {
Entaxy.notificationError(error);
Entaxy.log.error(error);
});
} else {
Entaxy.notificationError(Entaxy.NON_CLUSTERED_MESSAGE.EDITING);
}
}).catch(e => Entaxy.notificationError(e));
}
}
function update(properties, objectId) {
if (ctrl.private && objectId && !ctrl.objectFullId) {
let nid = $location.search().nid;
let oldId = ctrl.itemInfo.ui.id;
$location.search('nid', nid.replace('-' + oldId, ''));
}
if (!ctrl.private && objectId) {
ctrl.hasChangedPrivateObjects = entaxyPrivateObjectsCacheService
.isChanged(workspace.getSelectedMBeanName());
}
setOwnerChanged();
ctrl.isDirty = false;
}
function setOwnerChanged() {
if (ctrl.private) {
ctrl.isOwnerChanged = entaxyPrivateObjectsCacheService
.isOwnerChanged(workspace.getSelectedMBean(), ctrl.owner);
}
}
}
entaxySourceController.$inject = ['workspace', '$location', 'operationsService', '$scope', 'entaxyService'];
entaxySourceController.$inject = ['workspace', '$location', 'operationsService', '$scope',
'entaxyService', 'entaxyAttributesCacheService', 'entaxyPrivateObjectsCacheService'];
})(Entaxy || (Entaxy = {}));

View File

@ -1,267 +0,0 @@
/*-
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
var Entaxy;
(function (Entaxy) {
Entaxy._module
.component('entaxyTable', {
bindings: {
runtimeType: '@',
statusName: '@',
objectName: '@',
isParentDependent: '<',
extraPrimaryActionsConfig: '<'
},
template:
`
<pf-toolbar class="entaxy-toolbar" config="$ctrl.toolbarConfig"></pf-toolbar>
<pf-table-view config="$ctrl.tableConfig"
columns="$ctrl.tableColumns"
action-buttons="$ctrl.tableActionButtons"
menu-actions="$ctrl.menuActions"
page-config="$ctrl.pageConfig"
items="$ctrl.viewedItems">
</pf-table-view>
`,
controller: EntaxyTableController
})
.name;
function EntaxyTableController(workspace, $location, $scope, $q, jolokia, jolokiaService, operationsService, entaxyService) {
'ngInject';
var ctrl = this;
ctrl.workspace = workspace;
let filterValues = Entaxy.getAllBundleStates();
ctrl.tableConfig = {
selectionMatchProp: 'displayName',
showCheckboxes: false
};
ctrl.toolbarConfig = {
filterConfig: {
fields: [
{
id: 'displayName',
title: 'Name',
placeholder: 'Filter by Name...',
filterType: 'text'
},
{
id: 'status',
title: 'Status',
placeholder: 'Filter by Status...',
filterType: 'select',
filterValues: filterValues
}
],
appliedFilters: [],
onFilterChange: filterChange
},
isTableView: true
};
ctrl.tableColumns = [
{ header: 'Name', itemField: 'displayName' },
{ header: 'Status', itemField: 'status' }
];
ctrl.pageConfig = Entaxy.getStandardPageConfig();
function filterChange(filters) {
ctrl.viewedItems = Entaxy.applyFilters(ctrl.items, filters, matchesFilter);
ctrl.toolbarConfig.filterConfig.resultsCount = ctrl.viewedItems.length;
};
function matchesFilter(item, filter) {
let match = true;
if (filter.id === 'displayName') {
match = item.displayName.match(filter.value) !== null;
} else if (filter.id === 'status') {
match = item.status === filter.value;
}
return match;
};
ctrl.items = [];
ctrl.viewedItems = [];
ctrl.$onInit = function() {
populateTable();
ctrl.itemType = Entaxy.capitalize(Entaxy.getItemTypeFromRuntimeType(ctrl.runtimeType));
let primaryActions = [ { name: 'Add ' + ctrl.itemType, actionFn: () => ctrl.showModal(Entaxy.MODAL_MODES.ADD) } ];
if (ctrl.extraPrimaryActionsConfig) {
let extraPrimaryActions = ctrl.extraPrimaryActionsConfig.primaryActions;
primaryActions = primaryActions.concat(extraPrimaryActions);
if (ctrl.extraPrimaryActionsConfig.isTableUpdateNeeded) {
ctrl.extraPrimaryActionsConfig.updateTableFn = populateTable;
}
}
ctrl.toolbarConfig.actionsConfig = {
primaryActions: primaryActions
};
ctrl.tableActionButtons = [
{ name: 'Start', title: 'Start ' + ctrl.itemType, actionFn: startItem },
{ name: 'Stop', title: 'Stop ' + ctrl.itemType, actionFn: stopItem },
{ name: 'Uninstall', title: 'Uninstall ' + ctrl.itemType, actionFn: uninstallItem }
];
ctrl.menuActions = [
{ name: 'View Properties', title: 'View ' + ctrl.itemType + ' Properties', actionFn: showPropertiesModal },
{ name: 'Edit Properties', title: 'Edit ' + ctrl.itemType + ' Properties', actionFn: showPropertiesModal }
];
}
function showPropertiesModal(action, item) {
if (action.name === 'View Properties') {
ctrl.showModal(Entaxy.MODAL_MODES.VIEW, item);
} else if (action.name === 'Edit Properties') {
ctrl.showModal(Entaxy.MODAL_MODES.EDIT, item);
}
}
function populateTable() {
let items = [];
let promises = [];
let selectedMBean = workspace.getSelectedMBean();
if (selectedMBean && selectedMBean.isFolder) {
let children = entaxyService.getAllChildMBeansByRuntimeType(selectedMBean, ctrl.runtimeType);
if (children) {
children.forEach((child) => {
promises.push(jolokiaService.getAttributes(child.objectName, [ctrl.statusName, 'Name', 'DisplayName'])
.then((response) => {
items.push({
name: response['Name'],
displayName: response['DisplayName'] === '' || response['DisplayName'].startsWith('ERROR') ? response['Name'] : response['DisplayName'],
status: response[ctrl.statusName],
mbeanName: child.objectName
});
}));
});
$q.all(promises)
.then(() => {
ctrl.items = items;
ctrl.viewedItems = items;
let filters = ctrl.toolbarConfig.filterConfig.appliedFilters;
if (filters.length > 0) {
filterChange(filters);
} else {
ctrl.toolbarConfig.filterConfig.resultsCount = items.length;
}
});
}
}
}
ctrl.showModal = function(mode, item) {
if (mode === Entaxy.MODAL_MODES.ADD) {
let parentName;
if (ctrl.isParentDependent === true) {
let selectedMbeanName = workspace.getSelectedMBeanName();
parentName = jolokia.getAttribute(selectedMbeanName, 'Name');
}
let resolve = {
mode: () => mode,
itemType: () => ctrl.itemType,
parentName: () => parentName
};
entaxyService.openAddItemModalAndProcessResults(resolve, updateLocation);
} else {
let mbeanName = workspace.getSelectedMBeanName();
entaxyService.openEditItemModalAndProcessResults(mbeanName, ctrl.itemType, item.name, mode);
}
}
function updateLocation(properties, objectId) {
if (!ctrl.isParentDependent) {
changeLocation(properties[ctrl.objectName] ? properties[ctrl.objectName] : objectId);
}
}
function changeLocation(itemName) {
let currentLocation = $location.search();
$location.search('nid', currentLocation.nid + '-' + itemName);
}
$scope.$on(Jmx.TreeEvent.Updated, () => {
populateTable();
});
function startItem(action, item) {
if (item.status !== 'Active') {
processOperation('start', item.name);
} else {
Core.notification('info', ctrl.itemType + ' has been already started');
}
}
function stopItem(action, item) {
if (item.status !== 'Resolved') {
processOperation('stop', item.name);
} else {
Core.notification('info', ctrl.itemType + ' has been already stopped');
}
}
function uninstallItem(action, item) {
let operationName = ctrl.isParentDependent ? 'remove' : 'uninstall';
let title = 'Confirm Uninstalling';
let message = 'Do you want to uninstall ' + ctrl.itemType.toLowerCase() + ' ' + item.displayName + '?';
entaxyService.openConfirmationWindow(title, message).then(() => {
processOperation(operationName, item.name);
});
}
function processOperation(operationName, selectedItemName) {
let mbeanName = workspace.getSelectedMBeanName();
let operation = { name: operationName + ctrl.itemType };
entaxyService.processTableOperation(mbeanName, operation, selectedItemName);
}
ctrl.dismissAlert = () => ctrl.alert = null;
}
EntaxyTableController.$inject = ['workspace', '$location', '$scope', '$q', 'jolokia', 'jolokiaService', 'operationsService', 'entaxyService'];
})(Entaxy || (Entaxy = {}));

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -1,73 +0,0 @@
/*-
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
var Entaxy;
(function (Entaxy) {
Entaxy._module
.component('entaxyUrlInput', {
bindings: {
model: '=',
config: '<',
formController: '<'
},
template:
`
<div class="input-with-button">
<input type="text" ng-model="$ctrl.model" ng-class="{'form-control': true}" readonly>
<button class="entaxy-view-resources-form" ng-click="$ctrl.openViewer()">Select...</button>
</div>
`,
controller: entaxyUrlInputController
})
.name;
function entaxyUrlInputController(workspace, $uibModal) {
'ngInject';
let ctrl = this;
ctrl.openViewer = function() {
$uibModal.open({
component: 'entaxyResourceViewerModal',
resolve: {
location: () => ctrl.model,
config: () => ctrl.config
},
size: 'xl',
backdrop: 'static',
windowTopClass: 'modal-top-margin-override'
})
.result.then(location => {
if (ctrl.model !== location && ctrl.formController && !ctrl.formController.$dirty) {
ctrl.formController.$setDirty();
}
ctrl.model = location;
});
}
}
entaxyUrlInputController.$inject = ['workspace', '$uibModal'];
})(Entaxy || (Entaxy = {}));

View File

@ -1,71 +0,0 @@
/*-
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
var Entaxy;
(function (Entaxy) {
Entaxy._module
.component('entaxyXml', {
bindings: {
ngModel: '=',
mode: '<',
disabled: '<',
formController: '<'
},
template:
`
<button class="entaxy-xml-form" ng-click="$ctrl.openEditor()" ng-disabled="$ctrl.disabled">{{$ctrl.mode}}</button>
`,
controller: entaxyXmlController
})
.name;
function entaxyXmlController(workspace, $uibModal) {
'ngInject';
let ctrl = this;
ctrl.openEditor = function() {
$uibModal.open({
component: 'entaxyXmlModal',
resolve: {
xml: () => ctrl.ngModel,
mode: () => ctrl.mode
},
size: 'xl',
backdrop: 'static',
windowTopClass: 'modal-top-margin-override'
})
.result.then(xml => {
if (ctrl.ngModel !== xml && ctrl.formController && !ctrl.formController.$dirty) {
ctrl.formController.$setDirty();
}
ctrl.ngModel = xml;
});
}
}
entaxyXmlController.$inject = ['workspace', '$uibModal'];
})(Entaxy || (Entaxy = {}));

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -1,79 +0,0 @@
/*-
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
var Entaxy;
(function (Entaxy) {
Entaxy._module.component('entaxyXmlModal', {
bindings: {
modalInstance: '<',
resolve: '<'
},
template:
`
<div class="entaxy-modal-container">
<div class="modal-header">
<button type="button" class="close" aria-label="Close" ng-click="$ctrl.cancel()">
<span class="pficon pficon-close" aria-hidden="true"></span>
</button>
<h4 class="modal-title">{{$ctrl.modalTitle}}</h4>
</div>
<div class="modal-body-without-header">
<div class="xml-editor-container">
<entaxy-xml-editor class="xml-editor" source-doc="$ctrl.xml" read-only="$ctrl.readOnly"></entaxy-xml-editor>
</div>
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-primary" ng-click="$ctrl.save($ctrl.formFields)">{{$ctrl.btnTitle}}</button>
</div>
</div>
`,
controller: entaxyXmlModalController
})
.name;
function entaxyXmlModalController($uibModal) {
'ngInject';
let ctrl = this;
ctrl.$onInit = function() {
ctrl.mode = ctrl.resolve.mode;
ctrl.modalTitle = ctrl.mode + ' XML';
ctrl.btnTitle = Entaxy.getButtonTitleByMode(ctrl.mode);
ctrl.readOnly = ctrl.mode === Entaxy.MODAL_MODES.VIEW;
ctrl.xml = ctrl.resolve.xml;
}
ctrl.cancel = function(reason) {
ctrl.modalInstance.dismiss(reason);
}
ctrl.save = function() {
ctrl.modalInstance.close(ctrl.xml);
}
}
entaxyXmlModalController.$inject = ['$uibModal'];
})(Entaxy || (Entaxy = {}));

Some files were not shown because too many files have changed in this diff Show More