[pmg-devel] applied-series: [PATCH pmg-api 1/1] API: Actions: also return if action is editable

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Oct 23 19:25:53 CEST 2019


On 10/23/19 7:06 PM, Stoiko Ivanov wrote:
> Thanks for the patches!
> 
> checked the code (learned about oisedit) - looks good to me!
> 
> applied both locally - tested them - works as advertised!
> 
> for both patches:
> Reviewed-By: Stoiko Ivanov <s.ivanov at proxmox.com>
> Tested-By: Stoiko Ivanov <s.ivanov at proxmox.com>

applied with Stoikos R-b and T-b, thanks to both..

Albeit, I shortly pondered if the extra column really make sense,
or if the remove/edit button disabling would be already enough..
But, we do not have much information or columns here, so it probably
doesn't hurts UX..

> 
> 
> On Wed, 23 Oct 2019 13:56:06 +0200
> Dominik Csapak <d.csapak at proxmox.com> wrote:
> 
>> we can use this in the gui to set the state of the edit/remove buttons
>>
>> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
>> ---
>>  src/PMG/API2/Action.pm | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/src/PMG/API2/Action.pm b/src/PMG/API2/Action.pm
>> index 7dd225d..a71f27d 100644
>> --- a/src/PMG/API2/Action.pm
>> +++ b/src/PMG/API2/Action.pm
>> @@ -31,6 +31,7 @@ my $format_action_object = sub {
>>      $data->{id} = "$data->{ogroup}_$data->{id}";
>>      $data->{name} = $og->{name};
>>      $data->{info} = $og->{info};
>> +    $data->{editable} = $action->oisedit();
>>  
>>      return $data;
>>  };
> 



More information about the pmg-devel mailing list