Commit becdb93
committed
https://perconadev.atlassian.net/issues/DISTMYSQL-370
Problem:
When the instance has tags and the user hits 'Refresh' button in the
instance config modal window, tags disappear.
Problem:
When we query for the instance detais it does not contain tags info.
There is a separate API endpoint to retrieve a single instance tags.
So these two things has to be done separately.
Before the fix the information about tags related to the particular
instance were retrieved and cached during instance rendering on the
cluster view in renderInstanceElement() function.
It is an asynchronous process, but it worked fine as it was very
unlikely that the user opens the instance's config modal dialog before
tags were retrieved. Then, the config window used already cached tags.
However, when the user hits 'Refresh' button, the config modal window
is rendered immediately, before tags are retrieved, which results in
empty tags after refresh.
Solution:
Do not cache tags during renderInstanceElement(). Just request and
render the proper icon asynchronously.
Do the same for the config modal window. Just request tags and render
them asynchronously.
Possible improvement:
Probably it would be better if instances returned by the API already
contained related tags (like /api/cluster/clusterHint), or if we had
a dedicated API for retrieving tags related for a given set
of instances. For now, let's leave it as it is, improve if needed.1 parent 41f55e8 commit becdb93
1 file changed
+11
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
385 | 385 | | |
386 | 386 | | |
387 | 387 | | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
395 | 398 | | |
396 | 399 | | |
397 | 400 | | |
| |||
975 | 978 | | |
976 | 979 | | |
977 | 980 | | |
978 | | - | |
979 | | - | |
980 | 981 | | |
981 | | - | |
| 982 | + | |
982 | 983 | | |
983 | 984 | | |
984 | 985 | | |
| |||
0 commit comments