Gabriel Orstadius-Bui created NIFI-16065:
--------------------------------------------
Summary: Asynchronously load versioning information
Key: NIFI-16065
URL: https://issues.apache.org/jira/browse/NIFI-16065
Project: Apache NiFi
Issue Type: Improvement
Components: NiFi API
Affects Versions: 2.10.0
Reporter: Gabriel Orstadius-Bui
Waiting for the response of versioning related requests, such as loading local
modifications ({_}/process-groups/\{id}/local-modifications{_}), often takes a
long time, especially when using the Git-Based Registries such as Bitbucket
which is what we primarily use.
As a user of the UI, it is thus feels quite sluggish whenever these methods are
called, since everything freezes until the response has arrived.
I thus wanted to suggest that such methods use the same design as requests such
as reverting local changes ({_}/versions/revert-requests/\{id}"{_}), where a
RequestEntity is returned (which contains info about the progress etc).
Having the possibility to get an exact percentage of the progress made is not
really the point, but rather for example having the dialog which will show the
local changes (when the request finishes) to pop-up immediately and having the
possibility to cancel (delete) the request by closing the dialog if the request
is taking too long.
Aside from loading local modifications, 2 other requests which would benefit
from this design (even though they are not really used in the UI?) are these:
# Loading the versions of a versioned flow
({_}/flow/registries/\{registryId}/buckets/\{bucketId}/flows/\{flowId}/versions{_}
# Comparing versions
({_}/flow/registries/\{registry-id}/branches/\{branch-id-a}/buckets/\{bucket-id-a}/flows/\{flow-id-a}/\{version-a}/diff/branches/\{branch-id-b}/buckets/\{bucket-id-b}/flows/\{flow-id-b}/\{version-b}){_}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)