Warn user when no meters in metrics panel

Avoid generating an exception by first checking if there is a
meter before calling replace method on it.
Give the user a nice warning if there are no meters available. This cannot be
done in the get method because this is an AJAX call to fetch JSON data.

Change-Id: I1536474c85083fb0bb3876e6650a3c928625a5c5
Closes-bug: #1274823
Merge "Warn user when no meters in metrics panel"