[ZBXNEXT-3073] Private screens Created: 2015 Dec 15  Updated: 2016 Jan 28  Resolved: 2016 Jan 28

Status: Closed
Project: ZABBIX FEATURE REQUESTS
Component/s: API (A), Frontend (F)
Affects Version/s: None
Fix Version/s: 3.0.0alpha6

Type: Change Request Priority: Blocker
Reporter: Ivo Kurzemnieks Assignee: Unassigned
Resolution: Fixed Votes: 1
Labels: screens
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

It would be nice to support private screens with ability of sharing it with other users and user groups.



 Comments   
Comment by Krishna Moorthy [ 2015 Dec 15 ]

help me guys i wnt 2 do project over ths tool.

Comment by richlv [ 2015 Dec 15 ]

moorthy938, you might want to contact community members about general topics - this issue tracker is for feature requests.
please see http://zabbix.org/wiki/Getting_help for details.

Comment by Oleg Egorov (Inactive) [ 2015 Dec 21 ]

Specification at https://www.zabbix.org/wiki/Docs/specs/ZBXNEXT-3073

Comment by Oleg Egorov (Inactive) [ 2015 Dec 23 ]

(1) [I] Please review schema changes and database upgrade patch in r57340 and r57358

iivs Templated screens have userid, but regular screens have not. Should be the other way around.

REOPENED.

oleg.egorov RESOLVED IN r57502

iivs Looks good now. Thanks!
CLOSED

Comment by Ivo Kurzemnieks [ 2016 Jan 06 ]

(2)
Translation strings added:

  • All screens
  • Cannot set "%1$s" for template screen "%2$s".
  • Duplicate "name" value "%1$s" for screen.
  • Duplicate userid "%1$s" in users for screen "%2$s".
  • Duplicate usrgrpid "%1$s" in user groups for screen "%2$s".
  • Empty screen ID.
  • Field "%1$s" is missing a value for screen "%2$s".
  • Incorrect "permission" value "%1$s" in user groups for screen "%2$s".
  • Incorrect "permission" value "%1$s" in users for screen "%2$s".
  • Incorrect "private" value "%1$s" for screen "%2$s".
  • Incorrect user ID specified for screen "%1$s".
  • Incorrect user group ID specified for screen "%1$s".
  • Only administrators can set screen owner.
  • Screen "%1$s" is public and read-only sharing is disallowed.
  • Screen name cannot be empty.
  • Screen owner cannot be empty.
  • Sharing option "%1$s" is missing a value for screen "%2$s".
  • User "%1$s" is screen "%2$s" owner.
  • User group sharing is missing parameters: %1$s for screen "%2$s".
  • User sharing is missing parameters: %1$s for screen "%2$s".

Removed translation strings:

  • Delete network map?

iivs CLOSED

Comment by Ivo Kurzemnieks [ 2016 Jan 06 ]

(3)

Argument 2 passed to CScreen::updateReal() must be of the type array, none given, called in C:\Development\ZBXNEXT-3073\frontends\php\include\classes\api\services\CTemplateScreen.php on line 592 and defined [hosts.php:134 → CFrontendApiWrapper->update() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CTemplateScreen->update() → CScreen->updateReal() in include\classes\api\services\CScreen.php:1011]

oleg.egorov RESOLVED in r57481

iivs CLOSED

Comment by Ivo Kurzemnieks [ 2016 Jan 06 ]

(4) screen.update: Instead of extendObjects() you should use extendFromObjects() and merge only the name. Other fields like templateid is risky to merge in that array.

oleg.egorov RESOLVED in r57525

iivs CLOSED

Comment by Ivo Kurzemnieks [ 2016 Jan 06 ]

(5)

  • The code piece in CScreen.php 342-362 was incorrect. API was selecting all records and made screens accessible to users with no permissions. This is now fixed.
  • The code piece in CScreen.php: 1080-1094 was placed incorrectly inside loop. This is now fixed.
    Please review r57440, r57443
  • Fixed minor coding style issue in r57536.

oleg.egorov Super great! CLOSED

Comment by Ivo Kurzemnieks [ 2016 Jan 06 ]

(6) It would be nice to restrict users from possibly setting sharing values for templated screens. For example: Cannot set "%1$s" for template screen "%2$s". As for templatedscreen.get method, we could remove "userid" and "private" fields from requests, since they do not play any role (for now).

oleg.egorov RESOLVED in r57548

iivs Great!
CLOSED

Comment by Ivo Kurzemnieks [ 2016 Jan 06 ]

(7) In documentation is mentioned that read permission for screen element is needed if user wants to add this element to a screen. Right now it seems like user needs to have read-write permissions.

oleg.egorov RESOLVED IN r57469

iivs CLOSED

Comment by Ivo Kurzemnieks [ 2016 Jan 07 ]

(8) Performing screen.update and updating only list of users, I get an error: Cannot perform update statement on table "screens" without values.

oleg.egorov RESOLVED in r57528

iivs Same error when trying to change private/public.

REOPENED

oleg.egorov CANNOT REPRODUCE

iivs Strange. Seems like I too can no longer reproduce this.
CLOSED

Comment by Ivo Kurzemnieks [ 2016 Jan 08 ]

(9) When cloning a screen, it fills owner field with "undefined".

oleg.egorov RESOLVED in r57503

iivs Cloning a screen and then adding results in error: Field "screenid" is mandatory.

REOPENED

oleg.egorov RESOLVED in r57529

iivs screenconf.php: 59, 126-129 looks like this code is redundant.
monitoring.screen.edit.js.php: 78 "Create screen" is translatable when form accessed the first time. Here it is no longer translatable. Since it doesn't matter, maybe we can just name it $('#form').val('clone');. Otherwise it may be confusing when looking for "Create screen" particular string.

REOPENED

oleg.egorov RESOLVED in r57539 and r57549

iivs Thanks!
CLOSED

Comment by Ivo Kurzemnieks [ 2016 Jan 08 ]

(10)

  • screenconf.php: 276 for $userids you can use only array keys, no point in assigning values too. Same for $user_groupids
  • screenconf.php: 343 $data['current_user_userid'] seems to be unused. Please, check.
  • configuration.sceen.edit.php: 66 $screen_ownerid = $data['screen']['userid']; it looks like the variable can have either a value or an empty string. So the if on line 69 should check $screen_ownerid === ''
  • configuration.sceen.edit.php: 228 missing blank like before return.

oleg.egorov RESOLVED in r57533

iivs CLOSED

Comment by Ivo Kurzemnieks [ 2016 Jan 08 ]

(11)

  • template screen edit form:
    Undefined index: users [screenconf.php:348 → CView->render() → include() in include\views\configuration.screen.edit.php:41]
  • creating a templated screen via form:
    Incorrect value "" for unsigned int field "userid". [screenconf.php:201 → CFrontendApiWrapper->create() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CScreen->create() → DB::insert() → DB::checkValueTypes() → DB::exception() in include\classes\db\DB.php:340]
  • creating a templated screen via API works, but userid is assigned to that screen. Templated screens should have no userid. That's already mentioned in (6).

oleg.egorov RESOLVED in r57544

iivs CLOSED

Comment by Ivo Kurzemnieks [ 2016 Jan 11 ]

(12) Export screen as superadmin and XML contains errors:

[error] Undefined offset: 632 [screenconf.php:111 → CConfigurationExport->export() → CConfigurationExport->gatherData() → CConfigurationExport->gatherScreens() → CConfigurationExport->prepareScreenExport() in include\classes\export\CConfigurationExport.php:1076]
[error] Undefined offset: 633 [screenconf.php:111 → CConfigurationExport->export() → CConfigurationExport->gatherData() → CConfigurationExport->gatherScreens() → CConfigurationExport->prepareScreenExport() in include\classes\export\CConfigurationExport.php:1076]

iivs Results from corrupted database. Problem is in templated screens API validation. Mentioned in ZBX-3783 (23).
CLOSED

Comment by Ivo Kurzemnieks [ 2016 Jan 12 ]

(13)

  • Screens (for example with "host issues" elements) are now missing group and host validation.
  • If no parameters are given and previous page was "All screens", screens.php should redirect to screenconf.php.

oleg.egorov RESOLVED in r57555

iivs CLOSED

Comment by Ivo Kurzemnieks [ 2016 Jan 12 ]

(14) Configuration -> Templates -> Screens highlights Monitoring -> Screens in main menu.

iivs Moved to ZBX-10305

CLOSED

Comment by Ivo Kurzemnieks [ 2016 Jan 12 ]

(15) When trying to import screens that user is unable to see, but they exist I get "No permissions to referred object or it does not exist!" error. In import referencer instead of SQL, we should use Screen API. We will get different results that way and different error message.

oleg.egorov RESOLVED in r57563

iivs CLOSED

Comment by Ivo Kurzemnieks [ 2016 Jan 12 ]

(16) The screen list should display read-only screens. It currently displays read-write screens.

iivs RESOLVED in r57567

iivs Please, review my changes in r57568

oleg.egorov Thanks! CLOSED

Comment by Oleg Egorov (Inactive) [ 2016 Jan 13 ]

Available in pre-3.0.0alpha6 (trunk) r57596.

Comment by Oleg Egorov (Inactive) [ 2016 Jan 20 ]

(17) API documentation:

Updated documentation:

iivs "screen" is not a method.

oleg.egorov RESOLVED

iivs

  • New options "userids", "selectUsers" and "selectUserGroups" are not mentioned.
  • New properties "users", "userGroups" are not mentioned.
  • "userid", "private" should be mentioned in map object page. Possibly tables are required "Map users" a "Map user groups"

REOPENED

oleg.egorov Updated pages

RESOLVED

iivs

REOPENED

oleg.egorov Changed in:
https://www.zabbix.com/documentation/3.0/manual/api/reference/screen
https://www.zabbix.com/documentation/3.0/manual/api/reference/screen/get
https://www.zabbix.com/documentation/3.0/manual/api/reference/screen/object

RESOLVED

iivs CLOSED

Comment by Ivo Kurzemnieks [ 2016 Jan 21 ]

(18)

  • At least one screenshot seems to be outdated in #viewing_screens. There is no dropdown of screens and there is a naviation to "All screens".
  • Also let's add that note about required read-write change to read-only permissions to elements.

martins-v The screenshot has been updated.

The permission change mentioned in https://www.zabbix.com/documentation/3.0/manual/introduction/whatsnew300#private_maps_screens_and_slide_shows and permissions also better described in https://www.zabbix.com/documentation/3.0/manual/config/visualisation/screens#overview (last three paragraphs of 'overview')

RESOLVED.

iivs Thanks!

CLOSED

Generated at Thu Mar 28 12:14:25 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.