I was told that running your dishwasher with a large measuring cup (I use a three-cup size) of vinegar on the bottom rack was a good way to clean said dishwasher.
Put those cloudy glasses on the top rack when you do this and they’ll clear up just fine.