iTop icon indicating copy to clipboard operation
iTop copied to clipboard

N°1350 - Audit improvements

Open larhip opened this issue 2 years ago • 5 comments

With this PR I would like to improve the audit feature of iTop in two aspects:

  • 47414cc - Make it possible to configure the report color in the audit results (i.e. configure that the result should be only display as green in case of zero audit errors)
  • 3dd1e90 - Deals with the issue that currently it is not possible to evaluate only some audit categories

Especially for the second commit the implementation is not final, but it should give you an idea about the concept: What I basically did:

  • Create a new class "Audit Domain" with an many to many relation to audit categories (for some reasons it was not possible to use tag set so I used a "normal" relation)
  • For the audit page it is now possible to select an audit domain which should get evaluated rather than evaluate always all categories
  • It is configureable where the start page of audits should the new "pre-selection" or the old behavior

Before going further with my implementation I would be pretty thankful for some feedback, whether the direction would be okay for you? 🙏

Cheers Lars

larhip avatar Aug 16 '22 15:08 larhip

Putting this PR to "Pending functional review" directly so we can give Lars feedback on how we would like things to be done. Technical review can be done later on.

Molkobain avatar Aug 31 '22 13:08 Molkobain

@larhip would you have some screenshots on how it looks after your change?

Hipska avatar Aug 31 '22 14:08 Hipska

For sure, find some screenshots below (created with Safari :-P)

Linking Domains to Audit Category

image

Select wich domain to be reviewed

image

Audit result for a domain image

Configure error tolerance image

larhip avatar Aug 31 '22 14:08 larhip

I had a demo by Lars on this PR. All the proposed ideas are useful and I have no better design than what is proposed. For me the PR is functionally ok and can be processed further, with a goal of being included in the 3.1 version

v-dumas avatar Sep 12 '22 15:09 v-dumas

Accepted in functional review, technical review will be next month.

Molkobain avatar Sep 13 '22 14:09 Molkobain

  • Create a new class "Audit Domain" with an many to many relation to audit categories (for some reasons it was not possible to use tag set so I used a "normal" relation)

@larhip why couldn't you use a tagset attribute instead of the lnk relation? Otherwise it was accepted during technical review once requested changes have been made.

Molkobain avatar Dec 06 '22 16:12 Molkobain

Thanks for your Review @Molkobain ! Sorry for my delay but I was not able to find some time earlier :-(

@larhip why couldn't you use a tagset attribute instead of the lnk relation? Otherwise it was accepted during technical review once requested changes have been made.

I tired to use attribute tags during an initial implementation, but I was not able to use them, since AuditCategory is a "core class" defined in PHP and loaded earlier that the tags stuff.. Unfortunately the audit stuff is not a separated module (like itop-data-audit) so I needed a different solution.

larhip avatar Dec 30 '22 11:12 larhip

Accepted during technical review

Molkobain avatar Jan 03 '23 16:01 Molkobain

Hello @larhip ,

When checking out the PR, AuditDomain and lnkAuditCategoryToAuditDomain tables are not created in the DB during setup, which leads to a crash when opening the audit categories. Can you check your branch on a clean iTop instance?

Thanks

Molkobain avatar Jan 04 '23 10:01 Molkobain

When checking out the PR, AuditDomain and lnkAuditCategoryToAuditDomain tables are not created in the DB during setup, which leads to a crash when opening the audit categories. Can you check your branch on a clean iTop instance?

Checked this and added a "require_once" in core/autoload.php again to make it run.

larhip avatar Jan 09 '23 15:01 larhip

Accepted during functional review for 3.1

piRGoif avatar Jan 10 '23 15:01 piRGoif

As the 2 commits were clean enough and make sense, I made a rebase instead of a squash

Molkobain avatar Jan 10 '23 17:01 Molkobain

@larhip Just wondering, how is the user supposed to create new AuditDomain? I tried to create a Dashet Badge with Audit Domain without success, it's not in the list. Should we create a specific menu, just for creating Audit Domain, or replace the Audit Category Search menu, by a dashboard menu, with a list of Category and a list of Domain?

v-dumas avatar Jan 24 '23 08:01 v-dumas

@larhip and @Molkobain the PR is supposed to be merged, also, with itop develop branch, running the audit does not propose me to select any Audit Domain, it directly performs the audit for All. Have we mist something in the merge?

I have not found any mean to run it just for one Audit Domain. Wondering if this resulting audit could be in an asynchronous tab of the Audit Domain object itself or an action from that Audit Domain...

v-dumas avatar Apr 18 '23 15:04 v-dumas

Ok, my fault, I mist this new configuration parameter: audit.enable_selection_landing_page to enable Audit Domain selection

v-dumas avatar Apr 18 '23 15:04 v-dumas