Removed cloud providers from packed images page if disabled through policy.
Refactor code to reduce duplication.