An equitable action is an action which may be brought for the purpose of restraining the threatened infliction of wrongs or injuries, and the prevention of threatened illegal action.