* Run only two permission queries, one for edit and one for delete,
storing the results in local variables. Previously, there were
multiple permission queries for view, edit, and/or delete,
including an N+1 for edit inside the metric destination loop.
The view permissions queries are unnecessary as the route checks
for view permissions, so those were eliminated. Unnecessary
nested checks for edit permissions were also eliminated, since
we don't need to check for changes to permissions during the
action.
* Fix connection string handling so that
"Waiting for host to be ready..." is shown as expected if the
resource does not have a connection string.
Simply HA display by using a hash constant for expected values.
After changes:
Line Coverage: 99.95% (11689 / 11695)
Branch Coverage: 99.2% (3095 / 3120)