-
Notifications
You must be signed in to change notification settings - Fork 240
Added hide custom view functionality #8980
base: develop
Are you sure you want to change the base?
Added hide custom view functionality #8980
Conversation
Hi @alfredosilvestre-natixis, |
Hello, I can't see why the build has failed since it looks like I can't connect to the jenkins url. On my test platform it working correctly. |
Don't worry, we will manage the build. |
LGTM |
$stmt = $this->db->prepare($query); | ||
$stmt->bindParam(':customViewId', $customViewId, PDO::PARAM_INT); | ||
$stmt->bindParam(':userId', $this->userId, PDO::PARAM_INT); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$query .= ' DELETE FROM widget_preferences WHERE ' .
' widget_view_id in (SELECT widget_view_id FROM centreon.widget_views WHERE ' .
' custom_view_id = :customViewId) ' .
' AND user_id = :userId';
$stmt = $this->db->prepare($query);
$stmt->bindParam(':customViewId', $customViewId, PDO::PARAM_INT);
$stmt->bindParam(':userId', $this->userId, PDO::PARAM_INT);
$stmt->bindParam(':userId', $this->userId, PDO::PARAM_INT); | ||
} else { | ||
$query = 'DELETE FROM custom_view_user_relation WHERE ' . | ||
' custom_view_id = :customViewId AND user_id = :userId'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
' custom_view_id = :customViewId AND user_id = :userId;';
I accidentally removed my fork repository while trying to fix it, so I don't know if it is possible to add more commits to this PR. I left a comment because there was a bug when removing the view the widget_preferences are not removed |
Hi @alfredosilvestre-natixis we have a new process regarding the implementation of new features, we submit the idea on "The Watch" and if this improvement idea wins enough votes, we can retain it, prioritize it, etc. Your idea has been submitted on "Tha watch" and is currently awaiting some vote https://thewatch.centreon.com/ideas/add-hide-functionality-to-custom-views-1032 |
Description
This new functionality allows to hide a custom view without deleting it.
It is useful if you want to cleanup your custom views list that you shared without having to delete them.
It also adds clarity by having a clear distinction between the action for hiding a view and for deleting a view because currently there is only a "Delete view" button.
Fixes
#4721
Type of change
Target serie
How this pull request can be tested ?
Checklist