[webui] don't cache the length but the full array

fixes #494
[api] refactor wizard controller to avoid code quality test failure