@@ -1825,8 +1825,8 @@ def adapt_param_edit(adapter_uuid_sel, adapt_info_list, adapt_enabled, adapt_nam
1825
1825
def cas_param_load (cas_uuid_sel ):
1826
1826
cas_url = 'http://' + tvh_url + ':' + tvh_port + '/api/idnode/load?uuid=' + str (cas_uuid_sel )
1827
1827
cas_load = requests .get (cas_url ).json ()
1828
- cas_param_list = []
1829
- cas_param_list_id = []
1828
+ cas_param_list = ['DELETE CONDITIONAL ACCESS CLIENT' ]
1829
+ cas_param_list_id = ['' ]
1830
1830
for param in cas_load ['entries' ][0 ]['params' ]:
1831
1831
cas_label = param ['caption' ]
1832
1832
cas_id = param ['id' ]
@@ -1850,8 +1850,17 @@ def cas_param_load(cas_uuid_sel):
1850
1850
param_list_add = cas_label + ': ' + str (cas_value )
1851
1851
cas_param_list .append (param_list_add )
1852
1852
cas_param_list_id .append (cas_id )
1853
- sel_param = dialog .select ('CA Configuration - Select parameter to edit' , list = cas_param_list )
1854
- if sel_param >= 0 :
1853
+ sel_param_title = cas_label + ' Client Configuration - Select parameter to edit'
1854
+ sel_param = dialog .select (sel_param_title , list = cas_param_list )
1855
+ if sel_param == 0 :
1856
+ confirm_del = dialog .yesno ('Confirm delete CA client' , 'Are you sure want to delete the ' + cas_label + ' client?' )
1857
+ if not confirm_del :
1858
+ cas_param_load (cas_uuid_sel )
1859
+ else :
1860
+ delete_cas_url = 'http://' + tvh_url + ':' + tvh_port + '/api/idnode/delete?uuid=["' + cas_uuid_sel + '"]'
1861
+ delete_cas = requests .get (delete_cas_url )
1862
+ cas ()
1863
+ if sel_param > 0 :
1855
1864
cas_param_sel = cas_param_list_id [sel_param ]
1856
1865
cas_param_type = find_param_item (cas_load , cas_param_sel , 'type' )
1857
1866
cas_param_desc = find_param_item (cas_load , cas_param_sel , 'description' )
@@ -2651,7 +2660,7 @@ def dvr():
2651
2660
def cas ():
2652
2661
cas_url = 'http://' + tvh_url + ':' + tvh_port + '/api/caclient/list'
2653
2662
cas = requests .get (cas_url ).json ()
2654
- cas_name = ["Setup New Conditional Access Entry " ]
2663
+ cas_name = ["Setup New Conditional Access Client " ]
2655
2664
cas_uuid = [0 ]
2656
2665
for cas_n in cas ['entries' ]:
2657
2666
cas_name .append (cas_n ['title' ])
0 commit comments