Merge pull request #1187 from wazuh/edit-group-from-table

Added an option to edit the group configuration from the groups table
This commit is contained in:
Jesús Ángel 2019-01-29 16:05:15 +01:00 committed by GitHub
commit 957e49d782
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 1 deletions

View File

@ -566,4 +566,11 @@ export function GroupsController(
}
$scope.$broadcast('wazuhSearch', {});
};
// Come from the pencil icon on the groups table
$scope.$on('openGroupFromList',(ev,parameters) => {
$scope.editingFile = true;
$scope.groupsSelectedTab = 'files';
return $scope.loadGroup(parameters.group).then(() => $scope.editGroupAgentConfig());
})
}

View File

@ -332,6 +332,10 @@ app.directive('wzTable', function () {
$scope.removingGroup = null;
return init();
};
$scope.editGroup = group => {
$scope.$emit('openGroupFromList',{group})
}
},
template
};

View File

@ -39,7 +39,9 @@
<i ng-if="removingGroup !== item.name && item.name !== 'default'" ng-click="showConfirmRemoveGroup($event, item); $event.stopPropagation()"
class="fa fa-fw fa-trash cursor-pointer" tooltip="Remove this group" tooltip-placement="left"
aria-hidden="true"></i>
<span class="wz-padding-left-8" ng-if="removingGroup !== item.name && item.name === 'default'">-</span>
<i ng-if="removingGroup !== item.name" ng-click="editGroup(item); $event.stopPropagation()"
class="fa fa-fw fa-pencil cursor-pointer" tooltip="Edit this group configuration" tooltip-placement="left"
aria-hidden="true"></i>
<div ng-if="removingGroup === item.name && item.name !== 'default'">
<div layout="row">
<span class="euiToastHeader__title font-size-12">Group {{item.name}} will be removed</span>