release version 1.12.0

This commit is contained in:
2026-02-18 23:32:39 +03:00
parent 24ce86f470
commit 5d0e27b3e2
2858 changed files with 18366 additions and 113588 deletions

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>ru.entaxy.esb.ui</groupId>
<artifactId>entaxy-hawtio</artifactId>
<version>1.11.0</version>
<version>1.12.0</version>
</parent>
<groupId>ru.entaxy.esb.ui.hawtio</groupId>
<artifactId>entaxy-management-plugin</artifactId>

View File

@@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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,7 +36,7 @@ var Entaxy;
'dragstart',
function(e) {
e.dataTransfer.effectAllowed = 'move';
e.dataTransfer.setData("text/html", e.target.id);
e.dataTransfer.setData("text/plain", e.target.id);
this.classList.add('drag');
return false;
},
@@ -67,7 +67,7 @@ var Entaxy;
e.stopPropagation();
if ($scope.handleDropFn) {
let droppedElementId = e.dataTransfer.getData("text/html");
let droppedElementId = e.dataTransfer.getData("text/plain");
$scope.droppedElementId = droppedElementId;
$scope.handleDropFn($scope);
}

View File

@@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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-atlasmap-plugin
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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
@@ -51,6 +51,10 @@ var Entaxy;
ctrl.sourceDoc = newValue;
});
$scope.$watch('$ctrl.sourceDoc', function (newValue) {
$scope.source = newValue;
});
setTimeout(function() {
if (ctrl.readOnly === true) {
$scope.editor.options.readOnly = true;

View File

@@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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
@@ -35,6 +35,7 @@ var Entaxy;
openFn: '<',
resourceContextMenuOptions: '<',
admResourceContextMenuOptions: '<',
openapiResourceContextMenuOptions: '<',
folderContextMenuOptions: '<'
},
template:
@@ -89,12 +90,19 @@ var Entaxy;
ctrl.getContextMenuOptions = function (item) {
return item.isFolder ?
ctrl.folderContextMenuOptions :
isAdm(item) ? ctrl.admResourceContextMenuOptions : ctrl.resourceContextMenuOptions;
isAdm(item) ? ctrl.admResourceContextMenuOptions :
isOpenApi(item) ? ctrl.openapiResourceContextMenuOptions : ctrl.resourceContextMenuOptions;
}
function isAdm(item) {
let splitName = item.name.split('.');
const splitName = item.name.split('.');
return splitName.length > 1 && splitName.pop() === 'adm';
}
function isOpenApi(item) {
const splitName = item.name.split('.');
const extension = splitName.length > 1 ? splitName.pop() : undefined;
return extension === 'yaml' || extension === 'json';
}
}
})(Entaxy || (Entaxy = {}));

View File

@@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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
@@ -83,12 +83,14 @@ var Entaxy;
empty-option-name="formField.typeInfo.emptyOptionName" ng-if="$ctrl.isSelectFromEnum(formField)"
set-focused="$ctrl.setFocusOn === formField.name"></entaxy-select-from-enum>
<entaxy-xml id="{{formField.name}}" ng-model="formField.value" mode="$ctrl.localMode"
ng-if="$ctrl.isXml(formField)" readonly="formField.readOnly"
ng-if="$ctrl.isXml(formField)" readonly="formField.readOnly" route-type="formField.routeType"
name="formField.label" customization-point-info="formField.customizationPointInfo"
form-controller="$ctrl.formController" set-focused="$ctrl.setFocusOn === formField.name"></entaxy-xml>
<entaxy-list-input id="{{formField.name}}" items="formField.value" ng-if="$ctrl.isList(formField)"
creation-enabled="formField.typeInfo && formField.typeInfo.enablePrivateObjectCreation"
creation-types="formField.typeInfo ? formField.typeInfo.privateObjectTypes : undefined"
item-factory-filter="formField.itemFactoryFilter" mode="$ctrl.mode"
item-factory-filter="formField.itemFactoryFilter" mode="$ctrl.mode" owner="formField.owner"
identifier-field-name="formField.typeInfo ? formField.typeInfo.useAsIdentifier : undefined"
readonly="formField.readOnly" validation="formField.validation"
item-title-template="formField.typeInfo ? formField.typeInfo.itemTitle : undefined"
errors="$ctrl.errors[formField.name]" form-controller="$ctrl.formController"></entaxy-list-input>
@@ -141,7 +143,7 @@ var Entaxy;
};
ctrl.isSimpleInput = function (formField) {
return !isRuntimeTyped(formField.type)
return !entaxyService.isRuntimeTyped(formField.type)
&& formField.type !== TYPES.PASSWORD
&& formField.type !== TYPES.LIST
&& formField.type !== TYPES.XML_ROUTE
@@ -164,11 +166,11 @@ var Entaxy;
}
ctrl.isEntaxySelect = function (formField) {
return isRuntimeTyped(formField.type) && !formField.innerObject;
return entaxyService.isRuntimeTyped(formField.type) && !formField.innerObject;
}
ctrl.isInnerObjectInput = function (formField) {
return isRuntimeTyped(formField.type) && formField.innerObject;
return entaxyService.isRuntimeTyped(formField.type) && formField.innerObject;
}
ctrl.isSelectFromEnum = function (formField) {
@@ -193,11 +195,6 @@ var Entaxy;
return formField.type === TYPES.MAP;
}
function isRuntimeTyped(formFieldType) {
return formFieldType.startsWith(Entaxy.RUNTIME_TYPE_PREFIX) ||
formFieldType.startsWith(Entaxy.RUNTIME_TYPE_SECURITY_PREFIX);
}
ctrl.handleEnter = function (event) {
if (event.keyCode == 13) {
event.preventDefault();

View File

@@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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
@@ -139,6 +139,9 @@ var Entaxy;
ctrl.info = undefined;
ctrl.mode = Entaxy.MODAL_MODES.ADD;
ctrl.buttonTitle = Entaxy.MODAL_MODES.ADD;
if (ctrl.formController && !ctrl.formController.$dirty) {
ctrl.formController.$setDirty();
}
}
}
entaxyInnerObjectInputController.$inject = ['workspace', 'entaxyService', '$uibModal'];

View File

@@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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
@@ -35,6 +35,8 @@ var Entaxy;
readonly: '<',
validation: '<',
mode: '<',
owner: '<',
identifierFieldName: '<',
errors: '<',
formController: '<'
},
@@ -72,7 +74,8 @@ var Entaxy;
</div>
</div>
<div class="list-input-item-content" ng-show="item.open">
<entaxy-list-item-content form-fields="item.formFields" errors="item.errors" mode="$ctrl.mode">
<entaxy-list-item-content form-fields="item.formFields" errors="item.errors" mode="$ctrl.mode"
identifier-field-name="$ctrl.identifierFieldName" update-bckp-fn="$ctrl.updateBckp">
</entaxy-list-item-content>
</div>
</div>
@@ -82,7 +85,7 @@ var Entaxy;
})
.name;
function entaxyListInputController(workspace, $q, $uibModal, entaxyService) {
function entaxyListInputController(workspace, $q, $uibModal, entaxyService, entaxyXmlBckpService) {
'ngInject';
let ctrl = this;
@@ -175,65 +178,88 @@ var Entaxy;
}
ctrl.showModal = function () {
if (!ctrl.factories) {
let allFactories = [];
let promises = [];
let allFactories = [];
let promises = [];
if (ctrl.itemFactoryFilter) {
promises.push(
entaxyService.getFactoriesByFilterSearch(ctrl.itemFactoryFilter)
.then(factories => allFactories = factories));
} else {
ctrl.creationTypes.forEach(type => {
if (ctrl.itemFactoryFilter) {
promises.push(
entaxyService.getFactoriesByType(type.name)
.then(factories => allFactories = allFactories.concat(factories)));
});
}
if (promises.length > 0) {
let checkUniqueness = ctrl.validation && ctrl.validation.rules ?
ctrl.validation.rules.checkChildrenUniqueness : undefined;
let checkUniquenessFields = {};
if (checkUniqueness) {
checkUniqueness.fields.forEach(field => {
checkUniquenessFields[field] = [];
if (ctrl.items) {
ctrl.items.forEach(item => {
let formField = item.formFields.find(formField => formField.name === field);
checkUniquenessFields[field].push(formField.value);
});
}
entaxyService.getFactoriesByFilterSearch(ctrl.itemFactoryFilter)
.then(factories => allFactories = factories));
} else {
ctrl.creationTypes.forEach(type => {
promises.push(
entaxyService.getFactoriesByType(type.name)
.then(factories => allFactories = allFactories.concat(factories)));
});
}
$uibModal.open({
component: 'entaxyModal',
resolve: {
mode: () => Entaxy.MODAL_MODES.ADD,
itemType: () => ctrl.itemTypes.join(' or '),
factories: $q.all(promises).then(() => allFactories),
returnFormFields: () => true,
checkUniquenessParentFields: () => checkUniquenessFields
},
size: 'xl',
backdrop: 'static',
windowTopClass: 'modal-top-margin-override'
})
.result.then(formFields => {
addItem(formFields);
},
reason => {
if (reason) {
Entaxy.notificationError(reason);
}
});
if (promises.length > 0) {
$q.all(promises).then(() => {
ctrl.factories = allFactories;
openModalAndProcessResults();
});
}
} else {
openModalAndProcessResults();
}
}
function openModalAndProcessResults() {
let checkUniqueness = ctrl.validation && ctrl.validation.rules ?
ctrl.validation.rules.checkChildrenUniqueness : undefined;
let checkUniquenessFields = {};
if (checkUniqueness) {
checkUniqueness.fields.forEach(field => {
checkUniquenessFields[field] = [];
if (ctrl.items) {
ctrl.items.forEach(item => {
let formField = item.formFields.find(formField => formField.name === field);
checkUniquenessFields[field].push(formField.value);
});
}
});
}
$uibModal.open({
component: 'entaxyModal',
resolve: {
mode: () => Entaxy.MODAL_MODES.ADD,
itemType: () => ctrl.itemTypes.join(' or '),
factories: () => ctrl.factories,
returnFormFields: () => true,
checkUniquenessParentFields: () => checkUniquenessFields,
owner: () => ctrl.owner
},
size: 'xl',
backdrop: 'static',
windowTopClass: 'modal-top-margin-override'
})
.result.then(formFields => {
addItem(formFields);
},
reason => {
if (reason) {
Entaxy.notificationError(reason);
}
});
}
function addItem(formFields) {
let factoryField = formFields[0];
let factoryName = factoryField.originalValue ? factoryField.originalValue : factoryField.value;
let factory = ctrl.factories.find((factory) => factory.name === factoryName);
let idField = formFields.find(formField => formField.name === ctrl.identifierFieldName);
formFields.forEach(formField => {
if (formField.customizationPointInfo) {
formField.customizationPointInfo.id = idField.value;
}
});
entaxyXmlBckpService.updateDraftsBckpDataKey(ctrl.owner, factory.type, factory.name, idField.value);
if (!ctrl.items) {
ctrl.items = [];
}
@@ -245,7 +271,13 @@ var Entaxy;
setDirty();
}
ctrl.updateBckp = function (newValue, oldValue, factoryName) {
let factory = ctrl.factories.find((factory) => factory.name === factoryName);
entaxyXmlBckpService.updateDraftsBckpDataKey(ctrl.owner, factory.type, factory.name, newValue, oldValue);
}
}
entaxyListInputController.$inject = ['workspace', '$q', '$uibModal', 'entaxyService'];
entaxyListInputController.$inject = ['workspace', '$q', '$uibModal', 'entaxyService', 'entaxyXmlBckpService'];
})(Entaxy || (Entaxy = {}));

View File

@@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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
@@ -29,7 +29,9 @@ var Entaxy;
bindings: {
formFields: '<',
mode: '<',
errors: '<'
errors: '<',
identifierFieldName: '<',
updateBckpFn: '<'
},
template:
`
@@ -45,9 +47,12 @@ var Entaxy;
})
.name;
function EntaxyListItemContentController() {
function EntaxyListItemContentController($scope) {
'ngInject';
let ctrl = this;
let watcher;
let watcherTimeout;
ctrl.$onInit = function() {
let groups = new Set();
@@ -57,8 +62,34 @@ var Entaxy;
if (!formField.isBackRef && !formField.isHidden) {
groups.add(formField.group);
}
if (ctrl.mode !== Entaxy.MODAL_MODES.VIEW && formField.name === ctrl.identifierFieldName) {
ctrl.idFormField = formField;
}
});
if (ctrl.idFormField && ctrl.updateBckpFn) {
let factoryField = ctrl.formFields[0];
let factoryName = factoryField.originalValue ? factoryField.originalValue : factoryField.value;
watcher = $scope.$watch('$ctrl.idFormField.value', function (newValue, oldValue) {
if (newValue && newValue !== oldValue) {
if (!ctrl.oldIdValue) {
ctrl.oldIdValue = oldValue;
}
clearTimeout(watcherTimeout);
watcherTimeout = setTimeout(function () {
ctrl.updateBckpFn(newValue, ctrl.oldIdValue, factoryName);
ctrl.oldIdValue = oldValue;
ctrl.formFields.forEach(formField => {
if (formField.customizationPointInfo) {
formField.customizationPointInfo.id = newValue;
}
});
}, 500);
}
});
}
ctrl.groups = Array.from(groups).map((group) => {
return {
name: group,
@@ -77,5 +108,13 @@ var Entaxy;
}
}
}
$scope.$on('$destroy', function() {
if (watcher) {
watcher();
}
});
}
EntaxyListItemContentController.$inject = ['$scope'];
})(Entaxy || (Entaxy = {}));

View File

@@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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,7 +32,10 @@ var Entaxy;
mode: '<',
readonly: '<',
setFocused: '<',
formController: '<'
formController: '<',
routeType: '<',
name: '<',
customizationPointInfo: '<'
},
template:
`
@@ -45,7 +48,7 @@ var Entaxy;
})
.name;
function entaxyXmlController(workspace, $scope, $uibModal) {
function entaxyXmlController(workspace, $scope, $uibModal, entaxyXmlBckpService) {
'ngInject';
let ctrl = this;
@@ -56,16 +59,38 @@ var Entaxy;
(ctrl.ngModel === undefined || (angular.isString(ctrl.ngModel) && ctrl.ngModel.trim().length === 0));
});
ctrl.openEditor = function() {
ctrl.openEditor = function () {
let storedData = entaxyXmlBckpService.getStoredDataPretty(ctrl.customizationPointInfo);
let hasStoredData = storedData !== undefined;
if (!ctrl.readonly && storedData && storedData !== ctrl.ngModel) {
entaxyXmlBckpService.shouldUseStoredDataConfirmation().then(isConfirmed => {
openEditor(isConfirmed ? storedData : ctrl.ngModel, isConfirmed, hasStoredData);
});
} else {
openEditor(ctrl.ngModel, false, hasStoredData);
}
}
function openEditor(xml, isDirty, hasStoredData) {
if (isDirty && ctrl.formController && !ctrl.formController.$dirty) {
ctrl.formController.$setDirty();
}
$uibModal.open({
component: 'entaxyXmlModal',
resolve: {
xml: () => ctrl.ngModel,
mode: () => ctrl.readonly ? Entaxy.MODAL_MODES.VIEW : ctrl.mode
xml: () => xml,
mode: () => ctrl.readonly ? Entaxy.MODAL_MODES.VIEW : ctrl.mode,
routeType: () => ctrl.routeType,
routeName: () => ctrl.name,
customizationPointInfo: () => ctrl.customizationPointInfo,
isDirty: () => isDirty,
hasStoredData: () => hasStoredData
},
size: 'xl',
backdrop: 'static',
windowClass: 'modal-expandable',
windowTopClass: 'modal-top-margin-override'
})
.result.then(xml => {
@@ -76,6 +101,6 @@ var Entaxy;
});
}
}
entaxyXmlController.$inject = ['workspace', '$scope', '$uibModal'];
entaxyXmlController.$inject = ['workspace', '$scope', '$uibModal', 'entaxyXmlBckpService'];
})(Entaxy || (Entaxy = {}));

View File

@@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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
@@ -45,7 +45,7 @@ var Entaxy;
</span>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" ng-click="$ctrl.cancel()">Cancel</button>
<button type="button" class="btn btn-default" ng-click="$ctrl.cancel('dismiss')">Cancel</button>
<button type="submit" class="btn btn-primary" ng-click="$ctrl.confirm()">Confirm</button>
</div>
</div>

View File

@@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-atlasmap-plugin
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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,21 +2,21 @@
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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
@@ -40,11 +40,19 @@ var Entaxy;
<h4 class="modal-title">{{$ctrl.modalTitle}}</h4>
</div>
<div class="modal-body-without-header">
<div class="syntax-highlighting-container">
<label class="control-label" for="syntaxHighlighting">Syntax highlighting</label>
<entaxy-select-from-enum id="syntaxHighlighting"
values="$ctrl.selectValues" model="$ctrl.editorMode"
is-empty-included="false" sort-needed="true"></entaxy-select-from-enum>
<div class="entaxy-resource-editor-controls-container">
<label class="control-label" for="syntaxHighlighting">Syntax highlighting</label>
<entaxy-select-from-enum id="syntaxHighlighting" class="highlighting-enum"
values="$ctrl.extensionSelectValues" model="$ctrl.editorMode"
is-empty-included="false" sort-needed="true"></entaxy-select-from-enum>
<!-- <label class="control-label" for="encoding">Encoding</label>-->
<!-- <entaxy-select-from-enum id="encoding" class="encoding-enum"-->
<!-- values="$ctrl.encodingSelectValues" model="$ctrl.selectedEncoding"-->
<!-- is-empty-included="false"></entaxy-select-from-enum>-->
<!-- <input class="form-control" ng-model="$ctrl.customEncoding"-->
<!-- ng-if="$ctrl.selectedEncoding === 'Custom'"/>-->
<!-- <button class="btn-std" ng-if="$ctrl.selectedEncoding === 'Custom'"-->
<!-- ng-disabled="!$ctrl.customEncoding" ng-click="$ctrl.applyEncoding(true)">Apply</button>-->
</div>
<div class="entaxy-resource-editor-container">
<entaxy-editor class="entaxy-editor" mode="$ctrl.editorMode" source-doc="$ctrl.resourceContent">
@@ -74,6 +82,8 @@ var Entaxy;
'ngInject';
let ctrl = this;
const DEFAULT_ENCODING = 'UTF-8';
const CUSTOM_ENCODING = 'Custom';
ctrl.$onInit = function() {
entaxyHotkeysService.setHotkeys($scope, getHotkeysConfigs());
@@ -86,7 +96,22 @@ var Entaxy;
displayValue: 'json',
value: { name: 'javascript', json: true }
};
ctrl.selectValues = [ ftlType, jsonType, 'xml', 'yaml', 'txt' ];
ctrl.extensionSelectValues = [ ftlType, jsonType, 'xml', 'yaml', 'txt' ];
const encodings = Entaxy.configuration[Entaxy.CONFIGURATION_KEYS.RESOURCES_ENCODINGS];
ctrl.encodingSelectValues = encodings.includes(DEFAULT_ENCODING) ?
encodings.concat([CUSTOM_ENCODING]) :
[DEFAULT_ENCODING].concat(encodings).concat([CUSTOM_ENCODING]);
if (ctrl.resolve.encoding) {
if (ctrl.encodingSelectValues.includes(ctrl.resolve.encoding)) {
ctrl.selectedEncoding = ctrl.resolve.encoding;
} else {
ctrl.selectedEncoding = CUSTOM_ENCODING;
ctrl.customEncoding = ctrl.resolve.encoding;
}
} else {
ctrl.selectedEncoding = DEFAULT_ENCODING;
}
ctrl.modalTitle = 'Edit resource: ' + ctrl.resolve.resourceName;
ctrl.resourceContent = ctrl.resolve.resourceContent;
@@ -104,7 +129,7 @@ var Entaxy;
return 'xml';
case 'json':
case 'ftl':
return ctrl.selectValues.find(value => value.displayValue === extension).value;
return ctrl.extensionSelectValues.find(value => value.displayValue === extension).value;
case 'yaml':
case 'txt':
return extension;
@@ -113,16 +138,59 @@ var Entaxy;
}
}
const resourceContentWatcher = $scope.$watch('$ctrl.resourceContent', function (newValue, oldValue) {
if (newValue !== oldValue) {
ctrl.isDirty = true;
}
});
$scope.$watch('$ctrl.isDirty', function () {
if (ctrl.isDirty) {
resourceContentWatcher();
}
});
$scope.$on('modal.closing', function(event, reason) {
if (reason === Entaxy.MODAL_CANCEL_REASON.ESCAPE_KEY_PRESS) {
event.preventDefault();
ctrl.cancel();
}
});
$scope.$watch('$ctrl.selectedEncoding', function (newValue, oldValue) {
if (newValue !== CUSTOM_ENCODING && newValue !== oldValue) {
ctrl.applyEncoding();
}
});
ctrl.applyEncoding = function (isCustom) {
const encoding = isCustom ? ctrl.customEncoding : ctrl.selectedEncoding;
entaxyResourcesService.getResource(ctrl.resolve.location, true, encoding)
.then(resourceContent => {
ctrl.resourceContent = resourceContent;
ctrl.isDirty = true;
});
}
ctrl.cancel = function(reason) {
ctrl.modalInstance.dismiss(reason);
if (!reason && ctrl.isDirty) {
entaxyResourcesService.openConfirmClosingModal().then(() => {
ctrl.modalInstance.dismiss(reason);
});
} else {
ctrl.modalInstance.dismiss(reason);
}
}
ctrl.save = function(writeIntoSource) {
if (validate()) {
const encoding = ctrl.selectedEncoding === CUSTOM_ENCODING ?
ctrl.customEncoding : ctrl.selectedEncoding;
if (writeIntoSource) {
ctrl.modalInstance.close({
writeIntoSource: writeIntoSource,
content: ctrl.resourceContent
content: ctrl.resourceContent,
encoding: encoding
});
} else {
entaxyResourcesService.openResourceNameInputModal(
@@ -134,6 +202,7 @@ var Entaxy;
ctrl.modalInstance.close({
writeIntoSource: writeIntoSource,
content: ctrl.resourceContent,
encoding: encoding,
name: name
});
});

View File

@@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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
@@ -74,7 +74,7 @@ var Entaxy;
<div ng-if="$ctrl.step3">
<div class="modal-body-header form-header">
<h2>{{$ctrl.thirdStepTitle}}</h2>
<span ng-if="$ctrl.shouldShowChangesNote()">
<span class="no-selection" ng-if="$ctrl.shouldShowChangesNote()">
There are unsaved changes
</span>
</div>
@@ -119,7 +119,8 @@ var Entaxy;
ctrl.itemType = ctrl.resolve.itemType ? ctrl.resolve.itemType : 'Item';
let extraToTitle = ctrl.resolve.parentName ? (' to ' + ctrl.resolve.parentName) : '';
let extraToTitle = ctrl.resolve.parent && ctrl.resolve.parent.name ?
(' to ' + ctrl.resolve.parent.name) : '';
ctrl.modalTitle = ctrl.mode + ' ' + ctrl.itemType + extraToTitle;
@@ -216,10 +217,25 @@ var Entaxy;
objectId = ctrl.resolve.info['objectId'];
}
let profileName = ctrl.selectedContainer ?
ctrl.selectedContainer.name : ctrl.resolve.parentName;
ctrl.selectedContainer.name :
ctrl.resolve.parent ? ctrl.resolve.parent.name : undefined;
let formField = entaxyService.makeFormField(field, objectId, ctrl.properties,
ctrl.configurableOnly, ctrl.mode, ctrl.resolve.itemMbeanName, profileName);
if (formField) {
if (formField.customizationPointInfo && formField.customizationPointInfo.isDraft) {
formField.customizationPointInfo.factory = {
type: ctrl.selectedFactory.type,
name: ctrl.selectedFactory.name
};
let owner = getOwner();
if (owner) {
formField.customizationPointInfo.owner = owner;
}
}
if (ctrl.mode === Entaxy.MODAL_MODES.ADD && formField.type === 'list') {
formField.owner = 'draft-owner:' +
ctrl.selectedFactory.type + ':' + ctrl.selectedFactory.name;
}
ctrl.formFields.push(formField);
if (!formField.isBackRef && !formField.isHidden) {
groups.add(formField.group);
@@ -349,12 +365,24 @@ var Entaxy;
let args = entaxyService.getArguments(ctrl.formFields, ctrl.factories);
args.configProperties = ctrl.properties;
args.configurableOnly = ctrl.configurableOnly;
args.objectInfo = {
objectMbeanName: ctrl.resolve.itemMbeanName,
owner: getOwner()
}
ctrl.modalInstance.close(args);
}
}
});
}
function getOwner() {
if (ctrl.resolve.owner) {
return ctrl.resolve.owner;
} else if (ctrl.resolve.parent || ctrl.selectedContainer) {
return ctrl.resolve.parent ? ctrl.resolve.parent.fullId : ctrl.selectedContainer.fullId;
}
}
function getHotkeysConfigs() {
return [
{

View File

@@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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,7 +40,7 @@ var Entaxy;
<h4 class="modal-title">{{$ctrl.modalTitle}}</h4>
</div>
<div class="modal-body-without-header" ng-class="{'entaxy-resource-save-mode': $ctrl.saveMode}">
<div class="modal-resources-viewer-container">
<div class="modal-resources-viewer-container" ng-class="{'has-providers': $ctrl.providers}">
<div class="modal-resources-viewer-header-container">
<div class="provider-selector" ng-if="$ctrl.providers">
<span>Provider:</span>
@@ -53,6 +53,14 @@ var Entaxy;
ng-click="$ctrl.addFolder()" ng-if="$ctrl.folderAddingEnabled">
<span class="pficon pficon-add-circle-o"></span>
</button>
<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'">
<span class="fa fa-th"></span>
</button>
</div>
</div>
<entaxy-file-panel items="$ctrl.items" selected-items="$ctrl.selectedItems" view="$ctrl.view"
@@ -295,6 +303,10 @@ var Entaxy;
return entaxyResourcesService.getResourcesInfo(ctrl.providerMBeanName, path);
}
ctrl.changeView = function (view) {
ctrl.view = view;
}
ctrl.cancel = function(reason) {
ctrl.modalInstance.dismiss(reason);
}
@@ -326,7 +338,7 @@ var Entaxy;
if (!selectedItem.isFolder || ctrl.folderSelectionEnabled) {
let path = entaxyResourcesService.getPath(ctrl.crumbs);
let folderLocation = getFolderLocation(path);
let separator = path.length > 0 ? '/' : '';
let separator = folderLocation.endsWith(':') ? '' : '/';
let location = folderLocation + separator + selectedItem.name;
locations.push(location);
}
@@ -340,7 +352,15 @@ var Entaxy;
let folderLocation = getFolderLocation(path);
if (ctrl.saveMode) {
if (!folderLocation.endsWith(ctrl.extension)) {
folderLocation += '/' + ctrl.name;
if (ctrl.useShortUrl) {
if (folderLocation.endsWith(':')) {
folderLocation += ctrl.name;
} else {
folderLocation += '/' + ctrl.name;
}
} else {
folderLocation += '/' + ctrl.name;
}
}
}
ctrl.modalInstance.close(ctrl.multipleSelectionEnabled ? [ folderLocation ] : folderLocation);
@@ -351,7 +371,10 @@ var Entaxy;
}
function getFolderLocation(path) {
return ctrl.useShortUrl ? ctrl.protocol + ':' + path : 'entaxy-resource://' + ctrl.protocol + '/' + path;
const separator = path.length == 0 ? '' : '/';
return ctrl.useShortUrl ?
ctrl.protocol + ':' + path :
'entaxy-resource://' + ctrl.protocol + separator + path;
}
function validate() {

View File

@@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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
@@ -37,13 +37,43 @@ var Entaxy;
<button type="button" class="close" aria-label="Close" ng-click="$ctrl.cancel()">
<span class="pficon pficon-close" aria-hidden="true"></span>
</button>
<button type="button" class="expand" aria-label="Expand"
ng-click="$ctrl.expand()" ng-if="$ctrl.expanded === false">
<span class="fa fa-expand" aria-hidden="true"></span>
</button>
<button type="button" class="compress" aria-label="Compress"
ng-click="$ctrl.compress()" ng-if="$ctrl.expanded === true">
<span class="fa fa-compress" aria-hidden="true"></span>
</button>
<h4 class="modal-title">{{$ctrl.modalTitle}}</h4>
</div>
<div class="modal-body-without-header">
<div class="entaxy-editor-container">
<entaxy-xml-editor class="entaxy-editor" source-doc="$ctrl.xml" read-only="$ctrl.readOnly">
</entaxy-xml-editor>
</div>
<div class="entaxy-editor-modal-body">
<uib-tabset active="$ctrl.selectedTabIndex" ng-if="$ctrl.systemParameters">
<uib-tab heading="Design">
<div class="entaxy-editor-container designer" ng-if="$ctrl.selectedTabIndex === 0">
<entaxy-kaoto-console source-doc="$ctrl.xml" update-fn="$ctrl.updateXml"
readonly="$ctrl.readOnly" system-parameters="$ctrl.systemParameters"
route-type="$ctrl.resolve.routeType" route-name="$ctrl.resolve.routeName">
</entaxy-kaoto-console>
</div>
</uib-tab>
<uib-tab heading="Source">
<div class="entaxy-editor-container" ng-if="$ctrl.selectedTabIndex === 1">
<entaxy-xml-editor class="entaxy-editor" source-doc="$ctrl.xml" read-only="$ctrl.readOnly">
</entaxy-xml-editor>
</div>
</uib-tab>
<div class="xml-modal-autosave-container">
<div>
<span class="autosave-notification no-selection" ng-if="$ctrl.isDirty"
ng-class="{'hide': !$ctrl.showAutosaveNotification, 'show': $ctrl.showAutosaveNotification}">
Local autosave completed
</span>
<button class="btn btn-default" ng-click="$ctrl.restore()" ng-disabled="!$ctrl.hasStoredData"
data-toggle="tooltip" title="Restore from last local autosave">Restore</button>
</div>
</div>
</uib-tabset>
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-primary" ng-click="$ctrl.save()">{{$ctrl.btnTitle}}</button>
@@ -54,23 +84,148 @@ var Entaxy;
})
.name;
function entaxyXmlModalController($uibModal, $scope, entaxyHotkeysService) {
function entaxyXmlModalController($uibModal, $scope, entaxyHotkeysService, entaxyService, localStorage, $interval,
entaxyXmlBckpService) {
'ngInject';
let ctrl = this;
const AUTOSAVE_INTERVAL_S = Entaxy.configuration[Entaxy.CONFIGURATION_KEYS.AUTOSAVE_INTERVAL_ROUTES];
const AUTOSAVE_INTERVAL = AUTOSAVE_INTERVAL_S ? AUTOSAVE_INTERVAL_S * 1000 : 60 * 1000;
let dismissBckp = false;
ctrl.$onInit = function() {
entaxyHotkeysService.setHotkeys($scope, getHotkeysConfigs());
entaxyService.fetchSystemParameters().then(parameters => {
ctrl.systemParameters = parameters;
});
ctrl.isDirty = ctrl.resolve.isDirty ?? false;
ctrl.hasStoredData = ctrl.resolve.hasStoredData;
ctrl.mode = ctrl.resolve.mode;
ctrl.modalTitle = ctrl.mode + ' XML';
ctrl.btnTitle = ctrl.resolve.defineButtonTitleByMode ? Entaxy.getButtonTitleByMode(ctrl.mode) : 'Ok';
ctrl.readOnly = ctrl.mode === Entaxy.MODAL_MODES.VIEW;
dismissBckp = ctrl.readOnly;
ctrl.xml = ctrl.resolve.xml;
ctrl.expanded = false;
ctrl.customizationPointInfo = ctrl.resolve.customizationPointInfo;
if (ctrl.customizationPointInfo) {
let extraTitle = ': ';
if (ctrl.customizationPointInfo.object) {
extraTitle += ctrl.customizationPointInfo.object.displayName + ' / ';
}
if (ctrl.customizationPointInfo.customizationPoint) {
extraTitle += ctrl.customizationPointInfo.customizationPoint.displayName;
}
ctrl.modalTitle += extraTitle;
if (ctrl.mode !== Entaxy.MODAL_MODES.VIEW) {
$scope.startAutosave();
}
}
}
let autosaveTask;
$scope.startAutosave = function() {
if (angular.isDefined(autosaveTask)) return;
autosaveTask = $interval(saveIntoStorage, AUTOSAVE_INTERVAL);
}
$scope.stopAutosave = function() {
if (angular.isDefined(autosaveTask)) {
$interval.cancel(autosaveTask);
autosaveTask = undefined;
}
}
$scope.$on('$destroy', function() {
if (!dismissBckp) {
saveIntoStorage();
}
$scope.stopAutosave();
});
let autosaveNotificationTimeout;
function saveIntoStorage() {
if (ctrl.isDirty) {
entaxyXmlBckpService.saveIntoStorage(ctrl.customizationPointInfo, ctrl.xml);
if (!ctrl.hasStoredData) {
ctrl.hasStoredData = true;
}
clearTimeout(autosaveNotificationTimeout);
setAutosaveNotificationVisibility(true);
autosaveNotificationTimeout = setTimeout(() => setAutosaveNotificationVisibility(false), 1000);
}
}
function setAutosaveNotificationVisibility(isVisible) {
ctrl.showAutosaveNotification = isVisible;
}
ctrl.restore = function () {
entaxyXmlBckpService.restoreFromStorage(ctrl.customizationPointInfo, ctrl.updateXml);
}
ctrl.expand = function() {
let currentModal = entaxyService.expandModal();
let xmlContainer = currentModal.getElementsByClassName('entaxy-editor-container')[0];
xmlContainer.classList.add('container-expanded');
ctrl.expanded = true;
}
ctrl.compress = function() {
let currentModal = entaxyService.compressModal();
let xmlContainer = currentModal.getElementsByClassName('entaxy-editor-container')[0];
xmlContainer.classList.remove('container-expanded');
ctrl.expanded = false;
}
$scope.$on('modal.closing', function(event, reason) {
if (reason === Entaxy.MODAL_CANCEL_REASON.ESCAPE_KEY_PRESS) {
event.preventDefault();
ctrl.cancel();
}
});
ctrl.cancel = function(reason) {
ctrl.modalInstance.dismiss(reason);
if (!reason && ctrl.mode !== Entaxy.MODAL_MODES.VIEW && ctrl.isDirty) {
let title = 'Confirm closing';
let message = 'There are unsaved changes: closing the modal will dismiss them ' +
'and clean up locally stored value. Do you want to proceed and close the modal anyway?';
entaxyService.openConfirmationWindow(title, message).then(() => {
dismissBckp = true;
entaxyXmlBckpService.clearBckp(ctrl.customizationPointInfo);
ctrl.modalInstance.dismiss(reason);
});
} else {
if (ctrl.readOnly) {
dismissBckp = true;
}
ctrl.modalInstance.dismiss(reason);
}
}
const xmlWatcher = $scope.$watch('$ctrl.xml', function (newValue, oldValue) {
if (newValue !== oldValue) {
ctrl.isDirty = true;
}
});
$scope.$watch('$ctrl.isDirty', function () {
if (ctrl.isDirty) {
xmlWatcher();
}
});
ctrl.updateXml = function (xml) {
ctrl.xml = xml;
}
ctrl.save = function() {
@@ -90,6 +245,13 @@ var Entaxy;
return [
{
...Entaxy.getSaveHotkeyDescription(),
callback: function (event) {
event.preventDefault();
saveIntoStorage();
}
},
{
...Entaxy.getSaveAsHotkeyDescription(),
callback: function (event) {
event.preventDefault();
ctrl.save();
@@ -98,6 +260,7 @@ var Entaxy;
];
}
}
entaxyXmlModalController.$inject = ['$uibModal', '$scope', 'entaxyHotkeysService'];
entaxyXmlModalController.$inject = ['$uibModal', '$scope', 'entaxyHotkeysService', 'entaxyService', 'localStorage',
'$interval', 'entaxyXmlBckpService'];
})(Entaxy || (Entaxy = {}));

View File

@@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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
@@ -93,9 +93,9 @@ var Entaxy;
tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.connectors.title, TAB_CONFIG.connectors.route));
} else if (shouldShowRoutesTab()) {
tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.routes.title, TAB_CONFIG.routes.route));
} else if (shouldShowSourceTab()) {
} else if (shouldShowContentTab()) {
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.unshift(new Nav.HawtioTab(TAB_CONFIG.content.title, TAB_CONFIG.content.route));
} else if (shouldShowResourcesTab()) {
tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.resources.title, TAB_CONFIG.resources.route));
} else if (shouldShowServicesTab()) {
@@ -144,7 +144,7 @@ var Entaxy;
}
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.unshift(new Nav.HawtioTab(TAB_CONFIG.content.title, TAB_CONFIG.content.route));
}
}
@@ -163,7 +163,7 @@ var Entaxy;
let mbeanName = workspace.getSelectedMBeanName();
let parsedMbean = Core.parseMBean(mbeanName);
if (workspace.hasDomainAndProperties(entaxyJmxDomain, {'category': 'connections'}) &&
parsedMbean.attributes.connection && !parsedMbean.attributes.config) {
mbeanNameHasAttribute(parsedMbean, 'connection') && mbeanIsNotConfig(parsedMbean)) {
let attributes = jolokia.getAttribute(mbeanName);
return attributes.ObjectId ? true : false;
} else {
@@ -180,7 +180,7 @@ var Entaxy;
let mbeanName = workspace.getSelectedMBeanName();
let parsedMbean = Core.parseMBean(mbeanName);
return workspace.hasDomainAndProperties(entaxyJmxDomain, {'category': 'profiles'}) &&
parsedMbean.attributes.profile &&
mbeanNameHasAttribute(parsedMbean, 'profile') &&
entaxyAttributesCacheService.getAttributes(mbeanName).RuntimeType === Entaxy.RUNTIME_TYPE.PROFILE;
}
@@ -197,7 +197,7 @@ var Entaxy;
let mbeanName = workspace.getSelectedMBeanName();
let parsedMbean = Core.parseMBean(mbeanName);
return workspace.hasDomainAndProperties(entaxyJmxDomain, {'category': 'profiles'}) &&
parsedMbean.attributes.connector &&
mbeanNameHasAttribute(parsedMbean, 'connector') &&
entaxyAttributesCacheService.getAttributes(mbeanName).RuntimeType === Entaxy.RUNTIME_TYPE.CONNECTOR;
}
@@ -212,46 +212,49 @@ var Entaxy;
entaxyAttributesCacheService.getAttributes(mbeanName).RuntimeType === Entaxy.RUNTIME_TYPE.ROUTE_CONTAINER;
}
function shouldShowSourceTab() {
function shouldShowContentTab() {
let mbeanName = workspace.getSelectedMBeanName();
let parsedMbean = Core.parseMBean(mbeanName);
return workspace.hasDomainAndProperties(entaxyJmxDomain) &&
(parsedMbean.attributes.route || parsedMbean.attributes.subroute);
(mbeanNameHasAttribute(parsedMbean, 'route') ||
mbeanNameHasAttribute(parsedMbean, 'subroute'));
}
function shouldShowResourcesTab() {
let mbeanName = workspace.getSelectedMBeanName();
let parsedMbean = Core.parseMBean(mbeanName);
return workspace.hasDomainAndProperties(entaxyJmxDomain, {'category': 'resource'}) &&
parsedMbean.attributes.provider;
mbeanNameHasAttribute(parsedMbean, 'provider');
}
function shouldShowServicesTab() {
let mbeanName = workspace.getSelectedMBeanName();
let parsedMbean = Core.parseMBean(mbeanName);
return workspace.hasDomainAndProperties(entaxyJmxDomain, {'category': 'services'}) &&
!parsedMbean.attributes.service;
!mbeanNameHasAttribute(parsedMbean, 'service');
}
function shouldShowServicePropertiesTab() {
let mbeanName = workspace.getSelectedMBeanName();
let parsedMbean = Core.parseMBean(mbeanName);
return workspace.hasDomainAndProperties(entaxyJmxDomain, {'category': 'services'}) &&
parsedMbean.attributes.service && !parsedMbean.attributes.config;
mbeanNameHasAttribute(parsedMbean, 'service') && mbeanIsNotConfig(parsedMbean);
}
function shouldShowRealmsTab() {
let mbeanName = workspace.getSelectedMBeanName();
let parsedMbean = Core.parseMBean(mbeanName);
return workspace.hasDomainAndProperties(entaxyJmxDomain, {'security': 'jaas'}) &&
!parsedMbean.attributes.realm;
!mbeanNameHasAttribute(parsedMbean, '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;
mbeanNameHasAttribute(parsedMbean, 'realm') &&
!mbeanNameHasAttribute(parsedMbean, 'module') &&
mbeanIsNotConfig(parsedMbean);
}
function shouldShowModuleUserManagement() {
@@ -259,7 +262,8 @@ var Entaxy;
let parsedMbean = Core.parseMBean(mbeanName);
let shouldShow = false;
if (workspace.hasDomainAndProperties(entaxyJmxDomain, {'security': 'jaas'}) &&
parsedMbean.attributes.realm && parsedMbean.attributes.module) {
mbeanNameHasAttribute(parsedMbean, 'realm') &&
mbeanNameHasAttribute(parsedMbean, 'module')) {
let attributes = jolokia.getAttribute(mbeanName);
shouldShow = attributes.BackingEngineDriven;
}
@@ -275,41 +279,41 @@ var Entaxy;
let mbeanName = workspace.getSelectedMBeanName();
let parsedMbean = Core.parseMBean(mbeanName);
return workspace.hasDomainAndProperties(entaxyJmxDomain, {'category': 'repositories'}) &&
parsedMbean.attributes.repository && !parsedMbean.attributes.config;
mbeanNameHasAttribute(parsedMbean, 'repository') && mbeanIsNotConfig(parsedMbean);
}
function shouldShowKeyStoresTab() {
let mbeanName = workspace.getSelectedMBeanName();
let parsedMbean = Core.parseMBean(mbeanName);
return workspace.hasDomainAndProperties(entaxyJmxDomain, {'security': 'keystores'}) &&
!parsedMbean.attributes.keystore;
!mbeanNameHasAttribute(parsedMbean, 'keystore');
}
function shouldShowKeyStorePropertiesTab() {
let mbeanName = workspace.getSelectedMBeanName();
let parsedMbean = Core.parseMBean(mbeanName);
return workspace.hasDomainAndProperties(entaxyJmxDomain, {'security': 'keystores'}) &&
parsedMbean.attributes.keystore && !parsedMbean.attributes.config;
mbeanNameHasAttribute(parsedMbean, 'keystore') && mbeanIsNotConfig(parsedMbean);
}
function shouldShowVaultsTab() {
let mbeanName = workspace.getSelectedMBeanName();
let parsedMbean = Core.parseMBean(mbeanName);
return workspace.hasDomainAndProperties(entaxyJmxDomain, {'security': 'vaults'}) &&
!parsedMbean.attributes.vault;
!mbeanNameHasAttribute(parsedMbean, 'vault');
}
function shouldShowVaultPropertiesTab() {
let mbeanName = workspace.getSelectedMBeanName();
let parsedMbean = Core.parseMBean(mbeanName);
return workspace.hasDomainAndProperties(entaxyJmxDomain, {'security': 'vaults'}) &&
parsedMbean.attributes.vault && !parsedMbean.attributes.config;
mbeanNameHasAttribute(parsedMbean, 'vault') && mbeanIsNotConfig(parsedMbean);
}
function shouldShowConfigPropertiesTab() {
let mbeanName = workspace.getSelectedMBeanName();
let parsedMbean = Core.parseMBean(mbeanName);
return workspace.selectionHasDomain(entaxyJmxDomain) && parsedMbean.attributes.config;
return workspace.selectionHasDomain(entaxyJmxDomain) && mbeanNameHasAttribute(parsedMbean, 'config');
}
function shouldShowRouteLibrariesTab() {
@@ -321,7 +325,7 @@ var Entaxy;
let mbeanName = workspace.getSelectedMBeanName();
let parsedMbean = Core.parseMBean(mbeanName);
return workspace.hasDomainAndProperties(entaxyJmxDomain, {'category': 'route-libraries'}) &&
parsedMbean.attributes['route-library'] &&
mbeanNameHasAttribute(parsedMbean, 'route-library') &&
entaxyAttributesCacheService.getAttributes(mbeanName).RuntimeType === Entaxy.RUNTIME_TYPE.ROUTE_LIBRARY;
}
@@ -344,6 +348,14 @@ var Entaxy;
return false;
}
function mbeanNameHasAttribute(parsedMbean, attributeName) {
return parsedMbean.attributes[attributeName] !== undefined;
}
function mbeanIsNotConfig(parsedMbean) {
return parsedMbean.attributes.config === undefined;
}
// global event for entaxy extras
$rootScope.$emit('entaxyNavigationInited', $scope);
}
@@ -374,7 +386,7 @@ var Entaxy;
{ 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,
when(TAB_CONFIG.content.route,
{ template: '<entaxy-source></entaxy-source>' }).
when(TAB_CONFIG.routeProperties.route,
{ template: '<entaxy-properties item-name="Route"></entaxy-properties>' }).
@@ -473,9 +485,9 @@ var TAB_CONFIG = {
title: 'Routes',
route: '/entaxy-management/routes'
},
source: {
title: 'Source',
route: '/entaxy-management/route/source'
content: {
title: 'Content',
route: '/entaxy-management/route/content'
},
routeProperties: {
title: 'Properties',

View File

@@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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
@@ -94,7 +94,7 @@ var Entaxy;
let propertyName = getPropertyNameForConnectorCustomizationPoint(customizationPoint);
ctrl.editCustomizationPointFn(connector.mbeanName, propertyName, connector);
ctrl.editCustomizationPointFn(connector.mbeanName, propertyName, customizationPoint, connector);
}
ctrl.editProfileProperties = function (groupName, event) {
@@ -109,7 +109,7 @@ var Entaxy;
let selectedMbeanName = workspace.getSelectedMBeanName();
let propertyName = getPropertyNameForFlowCustomizationPoint(customizationPoint);
ctrl.editCustomizationPointFn(selectedMbeanName, propertyName);
ctrl.editCustomizationPointFn(selectedMbeanName, propertyName, customizationPoint);
}
function getPropertyNameForConnectorCustomizationPoint(customizationPointName) {

View File

@@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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
@@ -99,7 +99,8 @@ var Entaxy;
function entaxyProfileDiagramController($scope, workspace, jolokia, $location, $q,
entaxyService, entaxyProfileDiagramService, entaxyAttributesCacheService,
entaxyPrivateObjectsCacheService, $uibModal, $route, $cookies) {
entaxyPrivateObjectsCacheService, entaxyXmlBckpService, $uibModal, $route,
$cookies) {
'ngInject';
let ctrl = this;
@@ -172,12 +173,16 @@ var Entaxy;
let factory = entaxyService.getFactoryByTitle(factoryName);
let selectedMbeanName = workspace.getSelectedMBeanName();
let parentName = jolokia.getAttribute(selectedMbeanName, 'Name');
const attributes = entaxyAttributesCacheService.getAttributes(selectedMbeanName);
let parent = {
name: attributes.Name,
fullId: attributes.ObjectFullId
};
let resolve = {
mode: () => Entaxy.MODAL_MODES.ADD,
itemType: () => 'Connector',
parentName: () => parentName,
parent: () => parent,
factories: () => [ factory ]
};
@@ -457,6 +462,7 @@ var Entaxy;
$scope.$on(Jmx.TreeEvent.Updated, () => {
if (ctrl.connectorAdded) {
ctrl.connectorAdded = false;
$route.reload();
}
});
@@ -513,17 +519,17 @@ var Entaxy;
event.stopPropagation();
if (defaultRouteMbean) {
ctrl.editCustomizationPoint(defaultRouteMbean.objectName, 'routeContent');
ctrl.editCustomizationPoint(defaultRouteMbean.objectName, 'routeContent', 'default-route');
} else {
Entaxy.notificationError('Default route is not found.');
}
}
ctrl.editCustomizationPoint = function (mbeanName, propertyName, connector) {
ctrl.editCustomizationPoint = function (mbeanName, propertyName, customizationPoint, connector) {
if (entaxyProfileDiagramService.hasChanges(mbeanName)) {
let changes = entaxyProfileDiagramService.getChanges(mbeanName);
processPropertyAndOpenXmlEditor(changes, propertyName, mbeanName, true);
processPropertyAndOpenXmlEditor(changes, propertyName, customizationPoint, mbeanName, true);
} else {
entaxyService.readConfiguration(mbeanName)
.then(objectInfo => {
@@ -531,7 +537,7 @@ var Entaxy;
let changes = entaxyProfileDiagramService.createChangesConfig(mbeanName, objectInfo.objectId,
args, objectInfo.configurableOnly, connector);
processPropertyAndOpenXmlEditor(changes, propertyName, mbeanName);
processPropertyAndOpenXmlEditor(changes, propertyName, customizationPoint, mbeanName);
}).catch(error => {
Entaxy.notificationError(error);
@@ -540,13 +546,13 @@ var Entaxy;
}
}
function processPropertyAndOpenXmlEditor(changes, propertyName, mbeanName, isRoutesFieldResolved) {
function processPropertyAndOpenXmlEditor(changes, propertyName, customizationPoint, mbeanName, isRoutesFieldResolved) {
let args = changes.args;
let property = args.fields.find(property => property.name === propertyName);
if (property.value) {
if (isRoutesFieldResolved) {
resolveConfirmationAndOpenXmlEditor(changes, property, propertyName, mbeanName);
resolveConfirmationAndOpenXmlEditor(changes, property, propertyName, customizationPoint, mbeanName);
} else {
let selectedMbean = workspace.getSelectedMBean();
let mbean = selectedMbean.objectName === mbeanName ?
@@ -554,7 +560,7 @@ var Entaxy;
entaxyService.resolveRoutesFieldValueAndAddNew(args, mbean)
.then(() => {
resolveConfirmationAndOpenXmlEditor(changes, property, propertyName, mbeanName);
resolveConfirmationAndOpenXmlEditor(changes, property, propertyName, customizationPoint, mbeanName);
});
}
} else {
@@ -562,7 +568,7 @@ var Entaxy;
}
}
function resolveConfirmationAndOpenXmlEditor(changes, property, propertyName, mbeanName) {
function resolveConfirmationAndOpenXmlEditor(changes, property, propertyName, customizationPoint, mbeanName) {
entaxyService.readObjectClusterState(mbeanName).then(objectClusterState => {
let isNonClustered = objectClusterState === Entaxy.OBJECT_CLUSTER_STATE.NON_CLUSTERED;
if (isNonClustered) {
@@ -570,7 +576,7 @@ var Entaxy;
}
if (changes.configurableOnly || isNonClustered) {
getXmlAndOpenEditor(property, mbeanName, true, changes);
getXmlAndOpenEditor(property, customizationPoint, mbeanName, true, changes);
} else {
let args = changes.args;
let factoryMbeanName = args.factoryId.mbeanName;
@@ -578,12 +584,14 @@ var Entaxy;
let fields = JSON.parse(response);
let currentField = fields.find(field => field.name === propertyName);
const UI = '@UI';
const routeType = currentField[UI] ? currentField[UI].routeType : undefined;
let managedByFieldName = currentField[UI] ? currentField[UI].managedBy : undefined;
if (managedByFieldName) {
let managingFieldProperty = args.fields
.find(field => field.name === managedByFieldName);
if (managingFieldProperty.value) {
getXmlAndOpenEditor(property, mbeanName, changes.configurableOnly, changes);
getXmlAndOpenEditor(property, customizationPoint, mbeanName,
changes.configurableOnly, changes, routeType);
} else {
let managingField = fields.find(field => field.name === managedByFieldName);
let title = 'Confirm editing';
@@ -592,33 +600,53 @@ var Entaxy;
entaxyService.openConfirmationWindow(title, message).then(() => {
managingFieldProperty.value = true;
getXmlAndOpenEditor(property, mbeanName, changes.configurableOnly, changes);
getXmlAndOpenEditor(property, customizationPoint, mbeanName,
changes.configurableOnly, changes, routeType);
});
}
} else {
getXmlAndOpenEditor(property, mbeanName, changes.configurableOnly, changes);
getXmlAndOpenEditor(property, customizationPoint, mbeanName,
changes.configurableOnly, changes, routeType);
}
});
}
}).catch(e => Entaxy.notificationError(e));
}
function getXmlAndOpenEditor(property, mbeanName, readOnly, changes) {
function getXmlAndOpenEditor(property, customizationPoint, mbeanName, readOnly, changes, routeType) {
entaxyService.getXmlFromConfigPropertyValue(property.value)
.then(xml => openXmlEditor(xml, property, mbeanName, readOnly, changes));
.then(xml => {
const customizationPointInfo = getCustomizationPointInfo(mbeanName, property, customizationPoint);
let resolve = {
mode: () => readOnly ? Entaxy.MODAL_MODES.VIEW : Entaxy.MODAL_MODES.EDIT,
routeType: () => routeType,
routeName: () => customizationPoint,
customizationPointInfo: () => customizationPointInfo
};
let storedDataRaw = entaxyXmlBckpService.getStoredData(customizationPointInfo);
let hasStoredData = storedDataRaw !== undefined;
if (!readOnly && storedDataRaw && property.value !== storedDataRaw) {
let storedData = Entaxy.base64ToString(storedDataRaw);
entaxyXmlBckpService.shouldUseStoredDataConfirmation().then(isConfirmed => {
resolve.isDirty = () => isConfirmed;
resolve.hasStoredData = () => hasStoredData;
openXmlEditor(isConfirmed ? storedData : xml, resolve, property, mbeanName, changes);
});
} else {
resolve.hasStoredData = () => hasStoredData;
openXmlEditor(xml, resolve, property, mbeanName, changes);
}
});
}
function openXmlEditor(originXml, property, mbeanName, readOnly, changes) {
function openXmlEditor(originXml, resolve, property, mbeanName, changes) {
resolve.xml = () => originXml;
$uibModal.open({
component: 'entaxyXmlModal',
resolve: {
xml: () => originXml,
mode: () => readOnly ? Entaxy.MODAL_MODES.VIEW : Entaxy.MODAL_MODES.EDIT
},
resolve: resolve,
size: 'xl',
backdrop: 'static',
windowTopClass: 'modal-top-margin-override'
windowClass: 'modal-expandable'
})
.result.then(xml => {
if (xml && xml.trim().length > 0) { // fixme
@@ -642,6 +670,26 @@ var Entaxy;
});
}
function getCustomizationPointInfo(mbeanName, property, customizationPoint) {
const attributes = entaxyAttributesCacheService.getAttributes(mbeanName);
let displayName = customizationPoint;
if (property.name.startsWith('in-flow')) {
displayName = 'IN-FLOW / ' + customizationPoint;
} else if (property.name === 'connector-selector' || property.name.startsWith('out-flow')) {
displayName = 'OUT-FLOW / ' + customizationPoint;
}
return {
object: {
fullId: attributes.ObjectFullId,
displayName: attributes.DisplayName ?? attributes.Name
},
customizationPoint: {
name: property.name,
displayName: displayName
}
};
}
ctrl.saveProfile = function (event) {
event.stopPropagation();
@@ -668,8 +716,34 @@ var Entaxy;
function save(mbeanName) {
let args = entaxyProfileDiagramService.getArgs(mbeanName);
entaxyService.resolveResourceRefFields(args.fields)
.then(() => entaxyService.saveItem(args, false, ctrl.update));
if (args) {
entaxyService.resolveResourceRefFields(args.fields)
.then(() => {
args.objectInfo = {
objectMbeanName: mbeanName
};
entaxyService.saveItem(args, false, ctrl.update);
});
} else {
entaxyService.readConfiguration(mbeanName)
.then(objectInfo => {
let args = entaxyService.getArgumentsFromConfig(objectInfo);
const mbean = workspace.getSelectedMBean().findDescendant(child => child.objectName === mbeanName);
entaxyService.resolveRoutesFieldValueAndAddNew(args, mbean)
.then(() => {
entaxyService.resolveResourceRefFields(args.fields)
.then(() => {
args.objectInfo = {
objectMbeanName: mbeanName
};
entaxyService.saveItem(args, false, ctrl.update);
});
});
}).catch(error => {
Entaxy.notificationError(error);
Entaxy.log.error(error);
});
}
}
ctrl.update = function (properties, objectId) {
@@ -708,6 +782,6 @@ var Entaxy;
entaxyProfileDiagramController.$inject = ['$scope', 'workspace', 'jolokia', '$location', '$q',
'entaxyService', 'entaxyProfileDiagramService', 'entaxyAttributesCacheService',
'entaxyPrivateObjectsCacheService', '$uibModal', '$route', '$cookies'];
'entaxyPrivateObjectsCacheService', 'entaxyXmlBckpService', '$uibModal', '$route', '$cookies'];
})(Entaxy || (Entaxy = {}));

View File

@@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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
@@ -38,7 +38,7 @@ var Entaxy;
<h2>
{{$ctrl.title}}
</h2>
<span ng-if="$ctrl.isFormDirty || $ctrl.hasChangedPrivateObjects">
<span class="no-selection" ng-if="$ctrl.isFormDirty || $ctrl.hasChangedPrivateObjects">
There are unsaved changes
</span>
</div>
@@ -61,8 +61,9 @@ var Entaxy;
})
.name;
function entaxyPropertiesController($scope, workspace, entaxyService, jolokia, $location, $route, entaxyHotkeysService,
entaxyAttributesCacheService, entaxyPrivateObjectsCacheService) {
function entaxyPropertiesController($scope, workspace, entaxyService, jolokia, $location, $route,
entaxyHotkeysService, entaxyAttributesCacheService,
entaxyPrivateObjectsCacheService, entaxyXmlBckpService) {
'ngInject';
let ctrl = this;
@@ -120,14 +121,14 @@ var Entaxy;
.then(result => {
ctrl.itemInfo = result;
ctrl.factories = [ entaxyService.getFactoryByTitle(ctrl.itemInfo.factoryId) ];
makeFormFieldsAndGroups();
makeFormFieldsAndGroups(mbeanName);
}).catch(error => {
Entaxy.notificationError(error);
Entaxy.log.error(error);
});
} else {
ctrl.factories = [ entaxyService.getFactoryByTitle(ctrl.itemInfo.factoryId) ];
makeFormFieldsAndGroups();
makeFormFieldsAndGroups(mbeanName);
}
}
@@ -150,7 +151,7 @@ var Entaxy;
makeFormFieldsAndGroups();
}
function makeFormFieldsAndGroups() {
function makeFormFieldsAndGroups(objectMbeanName) {
ctrl.formFields = [];
@@ -166,9 +167,9 @@ var Entaxy;
group: 'general'
});
let mbeanName = ctrl.factories[0].mbeanName;
let factoryMbeanName = ctrl.factories[0].mbeanName;
entaxyService.getFields(mbeanName)
entaxyService.getFields(factoryMbeanName)
.then((response) => {
let groups = new Set();
@@ -178,8 +179,24 @@ var Entaxy;
let formField = entaxyService
.makeFormField(field, ctrl.itemInfo.objectId, ctrl.itemInfo.properties,
ctrl.itemInfo.configurableOnly, ctrl.mode);
ctrl.itemInfo.configurableOnly, ctrl.mode, objectMbeanName);
if (formField) {
if (formField.type === 'xml:route' && !objectMbeanName) {
formField.customizationPointInfo = {
isDraft: true,
owner: ctrl.owner,
id: ctrl.itemInfo.ui.id,
factory: {
name: ctrl.itemInfo.factoryId,
type: ctrl.itemInfo.type
},
customizationPoint: {
name: formField.name,
displayName: formField.label
}
};
}
ctrl.formFields.push(formField);
if (!formField.isBackRef && !formField.isHidden) {
groups.add(formField.group);
@@ -269,13 +286,15 @@ var Entaxy;
args.configProperties = ctrl.itemInfo.properties;
args.configurableOnly = ctrl.itemInfo.configurableOnly;
args.objectInfo = {
objectMbeanName: selectedMBeanName
};
entaxyService.saveItem(args, ctrl.local);
} else {
let reloadTreeNeeded = false;
let selectedMbean = workspace.getSelectedMBean();
updateFields(args, selectedMbean, reloadTreeNeeded);
let reloadTreeNeeded = updateFields(args, selectedMbean);
if (selectedMbean.objectName) {
entaxyPrivateObjectsCacheService
@@ -285,6 +304,7 @@ var Entaxy;
Entaxy.notificationSuccess('Operation Succeeded');
if (reloadTreeNeeded) {
updateRouteBckps();
reloadTreeAndUpdateLocation();
}
}
@@ -305,10 +325,9 @@ var Entaxy;
let args = entaxyService.getArguments(ctrl.formFields, ctrl.factories);
let reloadTreeNeeded = false;
let selectedMbean = workspace.getSelectedMBean();
updateFields(args, selectedMbean, reloadTreeNeeded);
updateFields(args, selectedMbean);
if (selectedMbean.objectName) {
entaxyPrivateObjectsCacheService
@@ -326,11 +345,28 @@ var Entaxy;
.then(objectInfo => {
let args = entaxyService.getArgumentsFromConfig(objectInfo);
entaxyService.resolveRoutesFieldValueAndAddNew(args, ownerMbean)
.then(() => {
entaxyService.resolveResourceRefFields(args.fields)
.then(() => entaxyService.saveItem(args, local, updateLocation));
});
if (ctrl.itemInfo.type === Entaxy.RUNTIME_TYPE.ROUTE) {
entaxyService.resolveRoutesFieldValueAndAddNew(args, ownerMbean)
.then(() => {
entaxyService.resolveResourceRefFields(args.fields)
.then(() => {
args.objectInfo = {
objectMbeanName: ownerMbeanName
};
entaxyService.saveItem(args, local, updateLocation);
});
});
} else {
entaxyService.resolveListFieldValueForSaving(args, ownerMbean).then(() => {
entaxyService.resolveResourceRefFields(args.fields)
.then(() => {
args.objectInfo = {
objectMbeanName: ownerMbeanName
};
entaxyService.saveItem(args, local, updateLocation);
});
});
}
}).catch(error => {
Entaxy.notificationError(error);
Entaxy.log.error(error);
@@ -343,7 +379,8 @@ var Entaxy;
});
}
function updateFields(args, selectedMbean, reloadTreeNeeded) {
function updateFields(args, selectedMbean) {
let reloadTreeNeeded = false;
args.fields.forEach(field => {
if (field.changed) {
if (!selectedMbean.objectName && field.name === ctrl.itemInfo.ui.identifierFieldName) {
@@ -363,6 +400,7 @@ var Entaxy;
}
}
});
return reloadTreeNeeded;
}
ctrl.isReadOnly = function () {
@@ -384,6 +422,19 @@ var Entaxy;
}
}
function updateRouteBckps() {
let newId = ctrl.itemInfo.properties[ctrl.itemInfo.ui.identifierFieldName];
ctrl.formFields.forEach(formField => {
if (formField.customizationPointInfo) {
formField.customizationPointInfo.id = newId;
}
});
entaxyXmlBckpService.updateDraftsBckpDataKey(ctrl.itemInfo.ui.owner, ctrl.itemInfo.type,
ctrl.itemInfo.factoryId, newId, ctrl.itemInfo.ui.id);
}
function reloadTreeAndUpdateLocation() {
let nid = $location.search().nid;
let oldId = ctrl.itemInfo.ui.id;
@@ -420,6 +471,7 @@ var Entaxy;
}
}
entaxyPropertiesController.$inject = ['$scope', 'workspace', 'entaxyService', 'jolokia', '$location', '$route',
'entaxyHotkeysService', 'entaxyAttributesCacheService', 'entaxyPrivateObjectsCacheService'];
'entaxyHotkeysService', 'entaxyAttributesCacheService', 'entaxyPrivateObjectsCacheService',
'entaxyXmlBckpService'];
})(Entaxy || (Entaxy = {}));

View File

@@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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
@@ -65,9 +65,10 @@ var Entaxy;
change-selection-fn="$ctrl.changeSelection" open-fn="$ctrl.open"
resource-context-menu-options="$ctrl.resourceContextMenuOptions"
adm-resource-context-menu-options="$ctrl.admResourceContextMenuOptions"
openapi-resource-context-menu-options="$ctrl.openApiResourceContextMenuOptions"
folder-context-menu-options="$ctrl.folderContextMenuOptions"></entaxy-file-panel>
</div>
<div class="meta-info" resizable r-directions="['left']"
<div class="meta-info" resizable r-directions="['left']" r-flex r-width="300"
ng-if="$ctrl.selectedItems && $ctrl.selectedItems.length == 1 && $ctrl.selectedItems[0].metadata">
<uib-tabset active="$ctrl.activeTab" class="meta-tabs">
<uib-tab ng-repeat="(section, info) in $ctrl.selectedItems[0].metadata track by $index"
@@ -145,6 +146,13 @@ var Entaxy;
}
].concat(ctrl.resourceContextMenuOptions);
ctrl.openApiResourceContextMenuOptions = [
{
name: 'Open in OpenAPI Editor',
actionFn: openInApiEditor
}
].concat(ctrl.resourceContextMenuOptions);
ctrl.folderContextMenuOptions = [
{
name: 'Paste to folder',
@@ -216,8 +224,8 @@ var Entaxy;
saveResource(
getPath() + '/' + name,
'',
null,
'Resource ' + name + ' was successfully added',
true,
name);
});
}
@@ -245,7 +253,10 @@ var Entaxy;
resourceName: () => item.name,
resourceContent: () => resourceContent,
extension: () => extension,
names: () => ctrl.items.map((item) => item.name)
names: () => ctrl.items.map((item) => item.name),
location: () => location,
encoding: () => item.metadata && item.metadata.resource ?
item.metadata.resource.encoding : undefined
},
size: 'xl',
backdrop: 'static'
@@ -255,16 +266,17 @@ var Entaxy;
saveResource(
getLocationWithoutProtocol(),
data.content,
data.encoding,
'Resource ' + item.name + ' was successfully edited',
false);
item.name);
} else {
let path = getPath();
let separator = path.length > 0 ? '/' : '';
saveResource(
path + separator + data.name,
data.content,
data.encoding,
'Resource ' + data.name + ' was successfully added',
true,
data.name);
}
});
@@ -303,21 +315,57 @@ var Entaxy;
});
}
function openTransformationEditorInTab() {
function openTransformationEditorInTab(item) {
if (ctrl.selectedItems.length > 1) {
ctrl.changeSelection(item, false);
}
let currentLocation = $location.absUrl();
let finalLocation = currentLocation.substring(0, currentLocation.indexOf('entaxy-management'))
.concat('entaxy-transformation?location=').concat(getLocation());
$window.open(finalLocation, '_blank');
}
function saveResource(path, content, notificationMessage, isUpdateNeeded, selectAfterSavingByName) {
function openInApiEditor(item) {
if (ctrl.selectedItems.length > 1) {
ctrl.changeSelection(item, false);
}
let location = getLocation();
$location.search('location', location);
$uibModal.open({
component: 'entaxySwaggerConsoleModal',
resolve: {
resourceName: () => item.name,
names: () => ctrl.items.map((item) => item.name),
location: () => location
},
size: 'xxl',
backdrop: 'static'
}).result
.then((newName) => {
$location.search('location', null);
const message = newName ?
'Resource ' + newName + ' was successfully added' :
'Resource ' + item.name + ' was successfully edited';
Entaxy.notificationSuccess(message);
updateItems(newName ?? item.name);
})
.catch((reason) => {
$location.search('location', null);
if (reason && reason !== Entaxy.MODAL_CANCEL_REASON.ESCAPE_KEY_PRESS) {
Entaxy.notificationError(reason);
}
});
}
function saveResource(path, content, encoding, notificationMessage, selectAfterSavingByName) {
entaxyResourcesService
.saveResource(selectedMbeanName, path, content)
.saveResource(selectedMbeanName, path, content, encoding)
.then(() => {
Entaxy.notificationSuccess(notificationMessage);
if (isUpdateNeeded) {
updateItems(selectAfterSavingByName);
}
updateItems(selectAfterSavingByName);
}).catch(error => {
Entaxy.notificationError(error);
Entaxy.log.error(error);
@@ -546,18 +594,21 @@ var Entaxy;
}
ctrl.upload = function (file) {
let separator = getPath().length > 0 ? '/' : '';
let uploadPromise = entaxyResourcesService
.uploadFile(file, ctrl.protocol, getPath() + separator + file.name);
const separator = getPath().length > 0 ? '/' : '';
const path = getPath() + separator + file.name;
if (uploadPromise) {
uploadPromise.then((response) => {
Entaxy.notificationSuccess('File ' + response.data + ' was successfully uploaded.');
const reader = new FileReader();
reader.readAsBinaryString(file);
reader.onloadend = function () {
const base64String = btoa(reader.result);
entaxyResourcesService.uploadResource(selectedMbeanName, path, base64String).then(() => {
Entaxy.notificationSuccess('Resource ' + file.name + ' was successfully uploaded.');
updateItems();
})
.catch((error) => {
Entaxy.log.error(error);
Entaxy.notificationError('An error occurred while uploading the file.');
Entaxy.notificationError('An error occurred while uploading the resource.');
updateItems();
});
}
}

View File

@@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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,15 +32,25 @@ var Entaxy;
<div class="route-source-header-container">
<div>
<h2>
Source
{{$ctrl.currentView}}
</h2>
<button type="submit" class="btn btn-primary" ng-click="$ctrl.changeView()"
data-toggle="tooltip" title="Change to {{$ctrl.isDesignView ? 'source' : 'design'}} view">{{$ctrl.isDesignView ? 'Source' : 'Design'}}</button>
<span ng-if="$ctrl.xml.trim().length === 0">
{{$ctrl.errorMessage}}
</span>
<span ng-if="($ctrl.isDirty || $ctrl.hasChangedPrivateObjects) && $ctrl.xml.trim().length > 0">
<span class="no-selection"
ng-if="($ctrl.isDirty || $ctrl.hasChangedPrivateObjects) && $ctrl.xml.trim().length > 0">
There are unsaved changes
</span>
</div>
<span class="autosave-notification no-selection"
ng-class="{'hide': !$ctrl.showAutosaveNotification, 'show': $ctrl.showAutosaveNotification}">
Local autosave completed
</span>
<button class="btn btn-default" ng-click="$ctrl.restore()" ng-disabled="!$ctrl.hasStoredData"
data-toggle="tooltip" title="Restore from last local autosave">Restore</button>
<div class="divider"></div>
<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>
@@ -49,8 +59,13 @@ var Entaxy;
</div>
<div ng-if="$ctrl.isContentReady">
<div class="xml-route-source-container">
<entaxy-xml-editor class="entaxy-editor" source-doc="$ctrl.xml" read-only="$ctrl.readOnly">
<entaxy-xml-editor class="entaxy-editor" source-doc="$ctrl.xml" read-only="$ctrl.readOnly"
ng-if="!$ctrl.isDesignView">
</entaxy-xml-editor>
<entaxy-kaoto-console source-doc="$ctrl.xml" update-fn="$ctrl.updateXml" readonly="$ctrl.readOnly"
system-parameters="$ctrl.systemParameters" ng-if="$ctrl.isDesignView"
route-type="$ctrl.routeType" route-name="$ctrl.routeName">
</entaxy-kaoto-console>
</div>
</div>
<div ng-if="$ctrl.isContentPresent === false">There is no viewable content.</div>
@@ -59,16 +74,32 @@ var Entaxy;
})
.name;
function entaxySourceController(workspace, $location, operationsService, $scope, entaxyHotkeysService,
entaxyService, entaxyAttributesCacheService, entaxyPrivateObjectsCacheService) {
function entaxySourceController(workspace, $location, $scope, $uibModal, entaxyService, entaxyHotkeysService,
entaxyAttributesCacheService, entaxyPrivateObjectsCacheService,
entaxyXmlBckpService, $interval) {
'ngInject';
let ctrl = this;
ctrl.errorMessage = 'Value cannot be empty';
const VIEW = {
SOURCE: 'Source',
DESIGN: 'Design'
};
const ROUTE_CONTENT = 'routeContent';
const AUTOSAVE_INTERVAL_S = Entaxy.configuration[Entaxy.CONFIGURATION_KEYS.AUTOSAVE_INTERVAL_ROUTES];
const AUTOSAVE_INTERVAL = AUTOSAVE_INTERVAL_S ? AUTOSAVE_INTERVAL_S * 1000 : 60 * 1000;
let dismissBckp = false;
ctrl.$onInit = function() {
entaxyHotkeysService.setHotkeys($scope, getHotkeysConfigs());
entaxyService.fetchSystemParameters().then(parameters => {
ctrl.systemParameters = parameters;
});
ctrl.currentView = VIEW.DESIGN;
ctrl.isDesignView = true;
let selectedMbean = workspace.getSelectedMBean();
let selectedMbeanName = selectedMbean.objectName;
@@ -82,6 +113,9 @@ var Entaxy;
function populateExistentObjectInfo(mbeanName) {
let attributes = entaxyAttributesCacheService.getAttributes(mbeanName);
setRouteType(attributes.FactoryId);
ctrl.routeName = attributes.DisplayName;
if (attributes.Scope === Entaxy.SCOPE.PRIVATE) {
ctrl.private = true;
ctrl.objectFullId = attributes.ObjectFullId;
@@ -92,6 +126,11 @@ var Entaxy;
ctrl.hasChangedPrivateObjects = true;
}
ctrl.customizationPointInfo = {
object: { fullId: attributes.ObjectFullId },
customizationPoint: { name: ROUTE_CONTENT }
};
entaxyService.readObjectClusterState(mbeanName).then(objectClusterState => {
ctrl.nonClustered = objectClusterState === Entaxy.OBJECT_CLUSTER_STATE.NON_CLUSTERED;
if (ctrl.nonClustered) {
@@ -125,30 +164,131 @@ var Entaxy;
let objectsInfo = entaxyPrivateObjectsCacheService.getAddedObjectsInfo(parentMbeanName);
let objectInfo = objectsInfo.find(objInfo => mbean.key === mbean.parent.key + '-' + objInfo.ui.id);
setRouteType(objectInfo.factoryId);
ctrl.routeName = objectInfo.properties.displayName ?
objectInfo.properties.displayName : objectInfo.properties.routeId;
ctrl.itemInfo = objectInfo;
ctrl.owner = ctrl.itemInfo.ui.owner;
ctrl.isToRemoval = ctrl.itemInfo.toRemoval;
ctrl.customizationPointInfo = {
isDraft: true,
id: objectInfo.ui.id,
owner: ctrl.owner,
factory: {
name: objectInfo.factoryId,
type: objectInfo.type
},
customizationPoint: {
name: ROUTE_CONTENT
}
};
init(objectInfo);
}
function init(info) {
setOwnerChanged();
ctrl.readOnly = info.configurableOnly || ctrl.nonClustered || ctrl.isToRemoval;
dismissBckp = ctrl.readOnly;
let routeContent = info.properties.routeContent;
if (routeContent) {
ctrl.isContentPresent = true;
entaxyService.getXmlFromConfigPropertyValue(routeContent).then(xml => {
ctrl.isContentReady = true;
ctrl.xml = xml;
if (ctrl.customizationPointInfo && !ctrl.readOnly) {
let storedData = entaxyXmlBckpService.getStoredDataPretty(ctrl.customizationPointInfo);
if (storedData) {
ctrl.hasStoredData = true;
}
if (storedData && storedData !== xml) {
entaxyXmlBckpService.shouldUseStoredDataConfirmation().then(isConfirmed => {
ctrl.xml = isConfirmed ? storedData : xml;
if (isConfirmed) {
ctrl.isDirty = true;
}
ctrl.isContentReady = true;
}).catch(reason => {
if (!reason) {
ctrl.xml = xml;
ctrl.isContentReady = true;
}
});
} else {
ctrl.xml = xml;
ctrl.isContentReady = true;
}
$scope.startAutosave();
}
});
} else {
ctrl.isContentPresent = false;
}
}
let autosaveTask;
$scope.startAutosave = function() {
if (angular.isDefined(autosaveTask)) return;
autosaveTask = $interval(saveIntoStorage, AUTOSAVE_INTERVAL);
}
$scope.stopAutosave = function() {
if (angular.isDefined(autosaveTask)) {
$interval.cancel(autosaveTask);
autosaveTask = undefined;
}
}
$scope.$on('$destroy', function() {
if (!dismissBckp) {
saveIntoStorage();
}
$scope.stopAutosave();
});
function setRouteType(factoryId) {
const factoryMbean = entaxyService.getFolderByTitle(factoryId);
entaxyService.getFields(factoryMbean.objectName).then(response => {
const fields = JSON.parse(response);
const field = fields.find(field => field.name === ROUTE_CONTENT);
if (field && field['@UI']) {
const routeType = field['@UI'].routeType;
ctrl.routeType = routeType ? routeType : 'entaxy:object-route';
}
});
}
ctrl.updateXml = function (xml) {
ctrl.xml = xml;
}
let autosaveNotificationTimeout;
function saveIntoStorage() {
if (ctrl.isDirty) {
entaxyXmlBckpService.saveIntoStorage(ctrl.customizationPointInfo, ctrl.xml);
if (!ctrl.hasStoredData) {
ctrl.hasStoredData = true;
}
clearTimeout(autosaveNotificationTimeout);
setAutosaveNotificationVisibility(true);
autosaveNotificationTimeout = setTimeout(() => setAutosaveNotificationVisibility(false), 1000);
}
}
function setAutosaveNotificationVisibility(isVisible) {
ctrl.showAutosaveNotification = isVisible;
}
ctrl.restore = function () {
entaxyXmlBckpService.restoreFromStorage(ctrl.customizationPointInfo, ctrl.updateXml);
}
$scope.$watch('$ctrl.xml', function (newValue, oldValue) {
if (newValue && oldValue && newValue !== oldValue) {
if (!ctrl.isDirty) {
@@ -178,6 +318,11 @@ var Entaxy;
}
});
ctrl.changeView = function () {
ctrl.currentView = ctrl.isDesignView ? VIEW.SOURCE : VIEW.DESIGN;
ctrl.isDesignView = ctrl.currentView === VIEW.DESIGN;
}
ctrl.save = function() {
let isConfirmationNeeded = !ctrl.isDirty && !ctrl.hasChangedPrivateObjects;
entaxyService.requestConfirmationForSavingIfNeededAndProceed(isConfirmationNeeded, save);
@@ -189,13 +334,19 @@ var Entaxy;
function save() {
if (ctrl.xml.trim().length !== 0) {
saveIntoStorage();
let base64Xml = Entaxy.stringToBase64(ctrl.xml);
if (!ctrl.private) {
let property = ctrl.args.fields.find(property => property.name === 'routeContent');
let property = ctrl.args.fields.find(property => property.name === ROUTE_CONTENT);
property.value = base64Xml;
entaxyService.resolveRoutesFieldValueAndAddNew(ctrl.args, workspace.getSelectedMBean())
let selectedMbean = workspace.getSelectedMBean();
entaxyService.resolveRoutesFieldValueAndAddNew(ctrl.args, selectedMbean)
.then(() => {
ctrl.args.objectInfo = {
objectMbeanName: selectedMbean.objectName
};
entaxyService.saveItem(ctrl.args, ctrl.local, update);
});
} else {
@@ -207,7 +358,7 @@ var Entaxy;
.addChanges(selectedMbean, ctrl.objectFullId, ctrl.owner, ctrl.itemInfo);
} else {
let routeContentFormField = ctrl.itemInfo.ui.formFields
.find(formField => formField.name === 'routeContent');
.find(formField => formField.name === ROUTE_CONTENT);
routeContentFormField.value = ctrl.xml;
}
@@ -219,6 +370,8 @@ var Entaxy;
function saveAll() {
if (ctrl.xml.trim().length !== 0) {
saveIntoStorage();
let base64Xml = Entaxy.stringToBase64(ctrl.xml);
ctrl.itemInfo.properties.routeContent = base64Xml;
@@ -228,7 +381,7 @@ var Entaxy;
.addChanges(selectedMbean, ctrl.objectFullId, ctrl.owner, ctrl.itemInfo);
} else {
let routeContentFormField = ctrl.itemInfo.ui.formFields
.find(formField => formField.name === 'routeContent');
.find(formField => formField.name === ROUTE_CONTENT);
routeContentFormField.value = ctrl.xml;
}
@@ -246,7 +399,12 @@ var Entaxy;
entaxyService.resolveRoutesFieldValueAndAddNew(args, ownerMbean)
.then(() => {
entaxyService.resolveResourceRefFields(args.fields)
.then(() => entaxyService.saveItem(args, local, update));
.then(() => {
args.objectInfo = {
objectMbeanName: ownerMbean.objectName
};
entaxyService.saveItem(args, local, update);
});
});
}).catch(error => {
Entaxy.notificationError(error);
@@ -304,7 +462,8 @@ var Entaxy;
];
}
}
entaxySourceController.$inject = ['workspace', '$location', 'operationsService', '$scope', 'entaxyHotkeysService',
'entaxyService', 'entaxyAttributesCacheService', 'entaxyPrivateObjectsCacheService'];
entaxySourceController.$inject = ['workspace', '$location', '$scope', '$uibModal', 'entaxyService',
'entaxyHotkeysService', 'entaxyAttributesCacheService', 'entaxyPrivateObjectsCacheService',
'entaxyXmlBckpService', '$interval'];
})(Entaxy || (Entaxy = {}));

View File

@@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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;
})
.name;
function EntaxyRoutesTableController(workspace, $location, $scope, $uibModal, entaxyService,
function EntaxyRoutesTableController(workspace, $location, $scope, $uibModal, entaxyService, entaxyXmlBckpService,
entaxyAttributesCacheService, entaxyPrivateObjectsCacheService) {
'ngInject';
@@ -257,7 +257,8 @@ var Entaxy;
itemType: () => itemTypes,
factories: () => factories,
returnFormFields: () => true,
checkUniquenessParentFields: () => checkUniquenessFields
checkUniquenessParentFields: () => checkUniquenessFields,
owner: () => attributes.ObjectFullId
},
size: 'xl',
backdrop: 'static',
@@ -289,6 +290,12 @@ var Entaxy;
}
let routeType = args.factoryId.attributes['typeinfo.routeType'];
formFields.forEach(formField => {
if (formField.customizationPointInfo) {
formField.customizationPointInfo.id = properties[identifierFieldName];
}
});
let itemInfo = {
objectId: objectId,
factoryId: args.factoryId.name,
@@ -304,6 +311,9 @@ var Entaxy;
}
};
entaxyXmlBckpService.updateDraftsBckpDataKey(ownerFullId, itemInfo.type, itemInfo.factoryId,
properties[identifierFieldName]);
let selectedMbean = workspace.getSelectedMBean();
entaxyPrivateObjectsCacheService.addNew(selectedMbean, itemInfo);
@@ -361,6 +371,6 @@ var Entaxy;
}
EntaxyRoutesTableController.$inject = ['workspace', '$location', '$scope', '$uibModal', 'entaxyService',
'entaxyAttributesCacheService', 'entaxyPrivateObjectsCacheService'];
'entaxyXmlBckpService', 'entaxyAttributesCacheService', 'entaxyPrivateObjectsCacheService'];
})(Entaxy || (Entaxy = {}));

View File

@@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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
@@ -206,13 +206,19 @@ var Entaxy;
let parentMBeanName = ctrl.populationParentMbeanName ?
ctrl.populationParentMbeanName : workspace.getSelectedMBeanName();
let parentName = ctrl.isParentDependent === true ?
jolokia.getAttribute(parentMBeanName, 'Name') : undefined;
let parent;
if (ctrl.isParentDependent) {
const attributes = entaxyAttributesCacheService.getAttributes(parentMBeanName);
parent = {
name: attributes.Name,
fullId: attributes.ObjectFullId
};
}
let resolve = {
mode: () => mode,
itemType: () => ctrl.itemType,
parentName: () => parentName
parent: () => parent
};
entaxyService.openAddItemModalAndProcessResults(resolve, ctrl.runtimeType, updateLocation);

View File

@@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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
@@ -51,6 +51,10 @@ var Entaxy;
ctrl.sourceDoc = newValue;
});
$scope.$watch('$ctrl.sourceDoc', function (newValue) {
$scope.xml = newValue;
});
setTimeout(function() {
if (ctrl.readOnly === true) {
$scope.xmlEditor.options.readOnly = true;

View File

@@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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
@@ -26,6 +26,9 @@
var Entaxy;
(function (Entaxy) {
const FORBIDDEN_ERROR_REGEX = /^ERROR: Reading attribute .+ \(class java\.lang\.SecurityException\)$/;
Entaxy.FORBIDDEN_ERROR_REGEX = FORBIDDEN_ERROR_REGEX;
const MODAL_MODES = {
VIEW: 'View',
EDIT: 'Edit',
@@ -495,7 +498,9 @@ var Entaxy;
NOTIFICATION_TIMEOUT_TABLE: 'notification.timeout.table',
PAGE_SIZE: 'page.size',
PAGE_SIZE_INCREMENTS: 'page.size.increments',
HEALTHCHECK_INTERVAL: 'healthcheck.interval'
HEALTHCHECK_INTERVAL: 'healthcheck.interval',
AUTOSAVE_INTERVAL_ROUTES: 'autosave.interval.routes',
RESOURCES_ENCODINGS: 'resources.encodings'
}
Entaxy.CONFIGURATION_KEYS = CONFIGURATION_KEYS;
@@ -507,7 +512,9 @@ var Entaxy;
[CONFIGURATION_KEYS.NOTIFICATION_TIMEOUT_TABLE]: 10000,
[CONFIGURATION_KEYS.PAGE_SIZE]: 10,
[CONFIGURATION_KEYS.PAGE_SIZE_INCREMENTS]: [5, 10, 20, 50, 100],
[CONFIGURATION_KEYS.HEALTHCHECK_INTERVAL]: 15000
[CONFIGURATION_KEYS.HEALTHCHECK_INTERVAL]: 15000,
[CONFIGURATION_KEYS.AUTOSAVE_INTERVAL_ROUTES]: 60,
[CONFIGURATION_KEYS.RESOURCES_ENCODINGS]: ['UTF-8', 'Windows-1251']
}
}

View File

@@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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
@@ -140,36 +140,48 @@ var Entaxy = (function (Entaxy) {
angular.forEach(domain.children, (node) => {
node.class = 'entaxy-node-icon';
angular.forEach(['platform', 'runtime'], (folderName) => {
let folder = domain.findDescendant(child => child.title === folderName);
if (folder) {
folder.class = createClassName(folderName);
}
});
const platform = getNodeChildAndSetClass(node, 'platform');
const runtime = getNodeChildAndSetClass(node, 'runtime');
angular.forEach(
['factories', 'search', 'route-component-libraries', 'data-management',
'resource', 'connectors', 'security', 'configs', 'objects'],
(folderName) => {
addClassRecursive(
domain.findDescendant(child => child.title === folderName),
createClassName(folderName)
);
}
);
if (platform) {
addClassRecursiveToChildren(platform, ['factories', 'search', 'route-component-libraries']);
}
if (runtime) {
addClassRecursiveToChildren(runtime, ['data-management', 'repositories', 'resource',
'connectors', 'security', 'configs', 'objects']);
angular.forEach(
['connections', 'profiles', 'services', 'repositories', 'route-libraries'],
(folderName) => {
addClassToParentAndItsChildrenUsingRuntimeType(domain
.findDescendant(child => child.title === folderName));
}
)
angular.forEach(
['connections', 'profiles', 'services', 'route-libraries'],
(folderName) => {
addClassToParentAndItsChildrenUsingRuntimeType(
runtime.children.find(child => child.title === folderName));
}
)
}
});
}
}
});
function getNodeChildAndSetClass(node, title) {
let nodeChild = node.children.find(child => child.title === title);
if (nodeChild) {
nodeChild.class = createClassName(title);
}
return nodeChild;
}
function addClassRecursiveToChildren(node, childrenTitles) {
childrenTitles.forEach(folderName =>
{
addClassRecursive(
node.children.find(child => child.title === folderName),
createClassName(folderName)
);
}
);
}
function addClassRecursive(folder, className) {
if (folder) {
folder.class = className;
@@ -259,8 +271,6 @@ var Entaxy = (function (Entaxy) {
if (tree) {
let domain = tree.get(entaxyJmxDomain);
if (domain) {
console.log('domain ');
console.log(domain.children);
mBeansTreeLocalization(domain.children);
}
}
@@ -281,7 +291,11 @@ var Entaxy = (function (Entaxy) {
let attributes = entaxyAttributesCacheService.getAttributes(child.objectName);
if (attributes.RuntimeType && attributes.DisplayName &&
attributes.RuntimeType !== Entaxy.RUNTIME_TYPE.ROUTE_CONTAINER) {
child.title = attributes.DisplayName;
if (attributes.DisplayName.match(Entaxy.FORBIDDEN_ERROR_REGEX)) {
child.title = '**********';
} else {
child.title = attributes.DisplayName;
}
}
}
useDisplayName(child.children);
@@ -400,5 +414,6 @@ const L10N = {
['route-libraries']: 'Библиотеки маршрутов',
['route-component-libraries']: 'Библиотеки компонентов маршрутов',
['data-management']: 'Управление данными',
['data-mappers']: 'Маппинг данных'
['data-mappers']: 'Маппинг данных',
['caches']: 'Кэш'
};

View File

@@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* entaxy-management-plugin
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* Copyright (C) 2020 - 2026 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

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