get ip in controller instead of in view (for last commit)

get ip in controller instead of in view (for last commit)

Signed-off-by: Ray Allen <ray@ray-Lenovo-IdeaPad-S400.(none)>