Solved

Custom Views owner

  • 17 March 2023
  • 2 replies
  • 106 views

Badge +1

Hi everyone,

 is there a simple way to know who created a public view ?

Thank you

icon

Best answer by Dalfo 22 March 2023, 11:05

View original

2 replies

Userlevel 1
Badge +6

Ciao, if you consider an SQL query simple, here a possible solution:

 

SELECT
cv.name,
cvur.is_owner,
c.contact_name,
c.contact_email
FROM custom_views AS cv
INNER JOIN custom_view_user_relation AS cvur ON cv.custom_view_id = cvur.custom_view_id
INNER JOIN contact AS c ON cvur.user_id = c.contact_id
WHERE cv.public = 1
;

 

And this is is the output on my test machine:

$ cat /tmp/public_custom_view.sql | mysql -u centreon -p centreon
Enter password:
name is_owner contact_name contact_email
test public 1 Administrator_Centreon root@localhost
test public 0 User user@localhost
Badge +1

Thanks a lot Dalfo.

This is useful.

Reply