Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
centreon
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Groupe EDF
Public
centreon
Commits
eafe2f02
Commit
eafe2f02
authored
Mar 09, 2018
by
Guillaume28
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(customview): Fix share custom view (#6109)
parent
977563e9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
2 deletions
+21
-2
features/CustomViews.feature
features/CustomViews.feature
+19
-0
www/api/class/centreon_home_customview.class.php
www/api/class/centreon_home_customview.class.php
+2
-2
No files found.
features/CustomViews.feature
View file @
eafe2f02
...
...
@@ -7,12 +7,14 @@ Feature: Custom views
Given
I am logged in a Centreon server with some widgets
# public views
@critical
Scenario
:
Share public custom view
Given
a publicly shared custom view
When
a user wishes to add a new custom view
Then
he can add the public view
And
he cannot modify the content of the shared view
@critical
Scenario
:
Remove public share
Given
a publicly shared custom view
And
a user is using the public view
...
...
@@ -20,6 +22,7 @@ Feature: Custom views
Then
the view is not visible anymore
And
the user can use the public view again
@critical
Scenario
:
Remove public share by owner
Given
a publicly shared custom view
And
a user is using the public view
...
...
@@ -27,12 +30,14 @@ Feature: Custom views
Then
the view is not visible anymore for the user
# user shared locked views
@critical
Scenario
:
Share read-only custom view with users
Given
a custom view shared in read only with a user
When
the user wishes to add a new custom view
Then
he can add the shared view
And
he cannot modify the content of the shared view
@critical
Scenario
:
Remove read-only custom view shared with users
Given
a custom view shared in read only with a user
And
the user is using the shared view
...
...
@@ -40,12 +45,14 @@ Feature: Custom views
Then
the view is not visible anymore
And
the user can use the shared view again
@critical
Scenario
:
Update a read only custom view shared with users
Given
a custom view shared in read only with a user
And
the user is using the shared view
When
the owner modifies the custom view
Then
the changes are reflected on all users displaying the custom view
@critical
Scenario
:
Delete a shared custom view
Given
a custom view shared in read only with a user
And
the user is using the shared view
...
...
@@ -53,11 +60,13 @@ Feature: Custom views
Then
the view is removed for all users displaying the custom view
# user shared not locked views
@critical
Scenario
:
Modify a shared view
Given
a shared custom view
When
the user is using the shared view
Then
he can modify the content of the shared view
@critical
Scenario
:
Remove an unlocked shared view
Given
a shared custom view
And
the user is using the shared view
...
...
@@ -65,6 +74,7 @@ Feature: Custom views
Then
the view is not visible anymore
And
the user can use the shared view again
@critical
Scenario
:
Modify an unlocked shared view and applies changes
Given
a shared custom view
And
the user is using the shared view
...
...
@@ -72,6 +82,7 @@ Feature: Custom views
Then
the changes are reflected on all users displaying the custom view
#Then a warning is shown to the user who wants to apply the changes
@critical
Scenario
:
Deletion of an unlocked shared view
Given
a shared custom view
And
the user is using the shared view
...
...
@@ -80,12 +91,14 @@ Feature: Custom views
And
the view is removed for the owner
# contact groups shared locked views
@critical
Scenario
:
Share read-only custom view with groups
Given
a custom view shared in read only with a group
When
the user wishes to add a new custom view
Then
he can add the shared view
And
he cannot modify the content of the shared view
@critical
Scenario
:
Remove read-only custom view shared with groups
Given
a custom view shared in read only with a group
And
the user is using the shared view
...
...
@@ -93,12 +106,14 @@ Feature: Custom views
Then
the view is not visible anymore
And
the user can use the shared view again
@critical
Scenario
:
Update a read only custom view shared with groups
Given
a custom view shared in read only with a group
And
the user is using the shared view
When
the owner modifies the custom view
Then
the changes are reflected on all users displaying the custom view
@critical
Scenario
:
Delete a shared custom view with groups
Given
a custom view shared in read only with a group
And
the user is using the shared view
...
...
@@ -106,11 +121,13 @@ Feature: Custom views
Then
the view is removed for all users displaying the custom view
# contact groups shared not locked views
@critical
Scenario
:
Modify a shared view with groups
Given
a shared custom view with a group
When
the user is using the shared view
Then
he can modify the content of the shared view
@critical
Scenario
:
Remove an unlocked shared view with groups
Given
a shared custom view with a group
And
the user is using the shared view
...
...
@@ -118,6 +135,7 @@ Feature: Custom views
Then
the view is not visible anymore
And
the user can use the shared view again
@critical
Scenario
:
Modify an unlocked shared view with groups and applies changes
Given
a shared custom view with a group
And
the user is using the shared view
...
...
@@ -125,6 +143,7 @@ Feature: Custom views
Then
the changes are reflected on all users displaying the custom view
#Then a warning is shown to the user who wants to apply the changes
@critical
Scenario
:
Deletion of an unlocked shared view with groups
Given
a shared custom view with a group
And
the user is using the shared view
...
...
www/api/class/centreon_home_customview.class.php
View file @
eafe2f02
...
...
@@ -76,12 +76,12 @@ class CentreonHomeCustomview extends CentreonWebService
'WHERE cvur2.user_id = '
.
$centreon
->
user
->
user_id
.
' '
.
'AND cvur2.is_consumed = 1) '
.
(
count
(
$q
)
>
0
?
'AND d.name like ? '
:
''
)
.
'
) tmp ORDER BY tmp.
name'
;
'
ORDER BY
name'
;
$stmt
=
$this
->
pearDB
->
prepare
(
$query
);
$dbResult
=
$this
->
pearDB
->
execute
(
$stmt
,
$q
);
while
(
$row
=
$dbResult
->
fetch
())
{
while
(
$row
=
$dbResult
->
fetch
Row
())
{
$views
[]
=
array
(
'id'
=>
$row
[
'custom_view_id'
],
'text'
=>
$row
[
'name'
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment