Project

General

Profile

Bug #34528

mgr/dashboard: Disallow editing of read-only config options

Added by Tatjana Dehler 4 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
dashboard/general
Target version:
Start date:
08/30/2018
Due date:
% Done:

0%

Source:
Tags:
dashboard
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

Description

There are some read-only config options and we need to prevent the user from editing them. E.g. the "Edit" button needs to be disabled in the frontend.

Unfortunately the information if a config option is read-only or not is not included in the form json return value e.g.:

/ceph/build # bin/ceph config dump --format=json-pretty

[
    {
        "section": "global",
        "name": "mon_pg_warn_min_per_osd",
        "value": "3" 
    },
    {
        "section": "global",
        "name": "osd_pool_default_min_size",
        "value": "1" 
    },
    {
        "section": "global",
        "name": "osd_pool_default_size",
        "value": "3" 
    },...
]

It's only covered by the "text" view:

ceph-dev /ceph/build # bin/ceph config dump
WHO    MASK LEVEL    OPTION                         VALUE       RO 
global      advanced mon_pg_warn_min_per_osd        3              
global      advanced osd_pool_default_min_size      1              
global      advanced osd_pool_default_size          3              
  mon       advanced mon_allow_pool_delete          true           
  mon       advanced mon_data_avail_crit            1              
  mon       advanced mon_data_avail_warn            2              
  mon       advanced mon_osd_reporter_subtree_level osd            
  mgr       unknown  mgr/dashboard/x/server_port    41251       *  
  mgr       unknown  mgr/restful/x/server_port      42251       *  

The first step would be to expose the information in the json format and integrate the usage in the back- and frontend of the dashboard afterwards.

Also available in: Atom PDF