(maint) Dropdown generation dynamic

Prior to this commit, the dropdowns only worked with v2, and were
staticly created. This commit fixes that by adding dynamic generation of
dropdowns for all puppetDB versions.