added ping server on save that gives the state active if ping is successful