If you installed Ambari from 1.3.2 then it will be Ambari version 22.214.171.124
You can run rpm -qa | grep ambari
Or you can enter psql:
psql -U ambari ambari (default password is bigdata)
select * from metainfo;
This will give you the version of Ambari.
The ambari version will not affect the HUE install, only the HDP stack. However with Ambari, you will need to modify the xml files from within ambari and not directly.