Closed vkuznet closed 7 years ago
Admins should be able to change priority of the request. And, we may have other actions. Therefore to avoid growth of option I think it should be better to use JSON doc for such manipulation, e.g.
transfer2go -agent=main-agent -action=JSON
where JSON would represent action request, e.g.
{"requestID": id, "action": "approve"}
{"requestID": id, "priority":2}
And, add -format option to return data either in plain tabular ASCII format or json.
The first version of the code already exists, see https://github.com/vkuznet/transfer2go/blob/master/client/client.go#L374
But it would be nice to generalize it according to description in this issue.
The -requests option is implement in CLI (3dbfe37). It can be done as following:
transfer2go -agent=main-agent -requests=pending
INFO[0000] <TransferRequest id=1505312493 priority=0 status= ts=0 file=file.root block= dataset= srcUrl=http://localhost:8000 srcAlias=sourceAgent dstUrl=http://localhost:9000 dstAlias=destinationAgent delay=0>
Final piece was added into this commit: 42529bb Now users can do
transfer2go -agent=main-agent -action='{"id":1505312493, "action":"approve"}'
We need both CLI and web interfaces to approve or delete requests in main agent. The initial web UI exists, now we need CLI counterpart. It should do the following:
Then, we need to have ability to approve certain request