WebUI: Use data adapter to load facet header data

Fixes: https://pagure.io/freeipa/issue/8339
Reviewed-By: Alexander Bokovoy <abbra@users.noreply.github.com>
This commit is contained in:
Peter Keresztes Schmidt
2020-05-31 01:40:45 +02:00
committed by Florence Blanc-Renaud
parent 7de1a93ce4
commit 517c7ab215

View File

@@ -1382,6 +1382,8 @@ exp.facet_header = IPA.facet_header = function(spec) {
var that = exp.simple_facet_header(spec);
that.adapter = builder.build('adapter', spec.adapter || 'adapter', { context: that });
that.update_breadcrumb = function(pkey) {
if (!that.breadcrumb) return;
@@ -1502,7 +1504,7 @@ exp.facet_header = IPA.facet_header = function(spec) {
*/
that.load = function(data) {
if (!data) return;
var result = data.result.result;
var result = that.adapter.get_record(data);
if (!that.facet.disable_facet_tabs) {
var pkey = that.facet.get_pkey();