DetailPageLayoutView.js 27.9 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
/**
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

define(['require',
    'backbone',
21
    'hbs!tmpl/detail_page/DetailPageLayoutView_tmpl',
22
    'hbs!tmpl/common/buttons_tmpl',
23
    'utils/Utils',
24
    'utils/CommonViewFunction',
25
    'utils/Globals',
26 27
    'utils/Enums',
    'utils/Messages',
28
    'utils/UrlLinks'
29
], function(require, Backbone, DetailPageLayoutViewTmpl, ButtonsTmpl, Utils, CommonViewFunction, Globals, Enums, Messages, UrlLinks) {
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
    'use strict';

    var DetailPageLayoutView = Backbone.Marionette.LayoutView.extend(
        /** @lends DetailPageLayoutView */
        {
            _viewName: 'DetailPageLayoutView',

            template: DetailPageLayoutViewTmpl,

            /** Layout sub regions */
            regions: {
                REntityDetailTableLayoutView: "#r_entityDetailTableLayoutView",
                RSchemaTableLayoutView: "#r_schemaTableLayoutView",
                RTagTableLayoutView: "#r_tagTableLayoutView",
                RLineageLayoutView: "#r_lineageLayoutView",
45
                RAuditTableLayoutView: "#r_auditTableLayoutView",
46
                RReplicationAuditTableLayoutView: "#r_replicationAuditTableLayoutView",
47 48
                RProfileLayoutView: "#r_profileLayoutView",
                RRelationshipLayoutView: "#r_relationshipLayoutView"
49 50
            },
            /** ui selector cache */
51
            ui: {
52
                tagClick: '[data-id="tagClick"]',
53
                termClick: '[data-id="termClick"]',
54
                propagatedTagDiv: '[data-id="propagatedTagDiv"]',
55 56
                title: '[data-id="title"]',
                editButton: '[data-id="editButton"]',
57
                editButtonContainer: '[data-id="editButtonContainer"]',
58 59 60
                description: '[data-id="description"]',
                editBox: '[data-id="editBox"]',
                deleteTag: '[data-id="deleteTag"]',
61
                deleteTerm: '[data-id="deleteTerm"]',
62
                addTag: '[data-id="addTag"]',
63
                addTerm: '[data-id="addTerm"]',
64
                tagList: '[data-id="tagList"]',
65
                termList: '[data-id="termList"]',
66
                propagatedTagList: '[data-id="propagatedTagList"]',
67 68
                tablist: '[data-id="tab-list"] li',
                entityIcon: '[data-id="entityIcon"]'
69
            },
70 71
            templateHelpers: function() {
                return {
72
                    entityUpdate: Globals.entityUpdate
73 74
                };
            },
75 76 77
            /** ui events hash */
            events: function() {
                var events = {};
78
                events["click " + this.ui.editButton] = 'onClickEditEntity';
79
                events["click " + this.ui.tagClick] = function(e) {
80
                    if (e.target.nodeName.toLocaleLowerCase() != "i") {
81 82 83 84 85
                        Utils.setUrl({
                            url: '#!/tag/tagAttribute/' + e.currentTarget.textContent,
                            mergeBrowserUrl: false,
                            trigger: true
                        });
86 87
                    }
                };
88 89 90 91 92
                events["click " + this.ui.termClick] = function(e) {
                    if (e.target.nodeName.toLocaleLowerCase() != "i") {
                        Utils.setUrl({
                            url: '#!/glossary/' + $(e.currentTarget).find('i').data('guid'),
                            mergeBrowserUrl: false,
93
                            urlParams: { gType: "term", viewType: "term", fromView: "entity" },
94 95 96 97 98
                            trigger: true
                        });
                    }
                };
                events["click " + this.ui.addTerm] = 'onClickAddTermBtn';
99
                events["click " + this.ui.deleteTag] = 'onClickTagCross';
100
                events["click " + this.ui.deleteTerm] = 'onClickTermCross';
101
                events["click " + this.ui.addTag] = 'onClickAddTagBtn';
102 103 104 105 106 107 108 109 110 111
                events["click " + this.ui.tablist] = function(e) {
                    var tabValue = $(e.currentTarget).attr('role');
                    Utils.setUrl({
                        url: Utils.getUrlState.getQueryUrl().queyParams[0],
                        urlParams: { tabActive: tabValue || 'properties' },
                        mergeBrowserUrl: false,
                        trigger: false,
                        updateTabState: true
                    });

112
                };
113 114 115 116 117 118 119
                return events;
            },
            /**
             * intialize a new DetailPageLayoutView Layout
             * @constructs
             */
            initialize: function(options) {
120
                _.extend(this, _.pick(options, 'value', 'collection', 'id', 'entityDefCollection', 'typeHeaders', 'enumDefCollection', 'classificationDefCollection', 'glossaryCollection'));
121
                $('body').addClass("detail-page");
122 123
            },
            bindEvents: function() {
124
                var that = this;
125
                this.listenTo(this.collection, 'reset', function() {
126 127
                    this.entityObject = this.collection.first().toJSON();
                    var collectionJSON = this.entityObject.entity;
128
                    this.activeEntityDef = this.entityDefCollection.fullCollection.find({ name: collectionJSON.typeName });
129

130
                    if (collectionJSON && _.startsWith(collectionJSON.typeName, "AtlasGlossary")) {
131 132
                        this.$(".termBox").hide();
                    }
133
                    // MergerRefEntity.
134 135 136 137 138 139 140 141 142
                    Utils.findAndMergeRefEntity({
                        attributeObject: collectionJSON.attributes,
                        referredEntities: this.entityObject.referredEntities
                    });

                    Utils.findAndMergeRefEntity({
                        attributeObject: collectionJSON.relationshipAttributes,
                        referredEntities: this.entityObject.referredEntities
                    });
143

144 145 146 147 148 149 150 151 152 153 154 155
                    // check if entity is process
                    var isProcess = false,
                        superTypes = Utils.getNestedSuperTypes({ data: this.activeEntityDef.toJSON(), collection: this.entityDefCollection }),
                        isLineageRender = _.find(superTypes, function(type) {
                            if (type === "DataSet" || type === "Process") {
                                if (type === "Process") {
                                    isProcess = true;
                                }
                                return true;
                            }
                        });

156 157
                    if (collectionJSON && collectionJSON.guid) {
                        var tagGuid = collectionJSON.guid;
158
                        this.readOnly = Enums.entityStateReadOnly[collectionJSON.status];
159
                    } else {
160
                        var tagGuid = this.id;
161
                    }
162 163 164 165 166
                    if (this.readOnly) {
                        this.$el.addClass('readOnly');
                    } else {
                        this.$el.removeClass('readOnly');
                    }
167
                    if (collectionJSON) {
168
                        this.name = Utils.getName(collectionJSON);
169 170
                        if (collectionJSON.attributes) {
                            if (this.name && collectionJSON.typeName) {
171
                                this.name = this.name + ' (' + _.escape(collectionJSON.typeName) + ')';
172
                            }
173
                            if (!this.name && collectionJSON.typeName) {
174
                                this.name = _.escape(collectionJSON.typeName);
175
                            }
176
                            this.description = collectionJSON.attributes.description;
177
                            if (this.name) {
178
                                this.ui.title.show();
179
                                var titleName = '<span>' + this.name + '</span>';
180
                                if (this.readOnly) {
181
                                    titleName += '<button title="Deleted" class="btn btn-action btn-md deleteBtn"><i class="fa fa-trash"></i> Deleted</button>';
182 183
                                }
                                this.ui.title.html(titleName);
184
                                var entityData = _.extend({ "serviceType": this.activeEntityDef && this.activeEntityDef.get('serviceType'), "isProcess": isProcess }, collectionJSON);
185 186 187 188 189 190 191 192
                                if (this.readOnly) {
                                    this.ui.entityIcon.addClass('disabled');
                                } else {
                                    this.ui.entityIcon.removeClass('disabled');
                                }
                                this.ui.entityIcon.attr('title', _.escape(collectionJSON.typeName)).html('<img src="' + Utils.getEntityIconPath({ entityData: entityData }) + '"/>').find("img").on('error', function() {
                                    this.src = Utils.getEntityIconPath({ entityData: entityData, errorUrl: this.src });
                                });
193
                            } else {
194
                                this.ui.title.hide();
195 196
                            }
                            if (this.description) {
197
                                this.ui.description.show();
198
                                this.ui.description.html('<span>' + _.escape(this.description) + '</span>');
199
                            } else {
200
                                this.ui.description.hide();
201 202
                            }
                        }
203
                        if (collectionJSON.classifications) {
204
                            this.generateTag(collectionJSON.classifications);
205
                        } else {
206
                            this.generateTag([]);
207
                        }
208
                        if (collectionJSON.relationshipAttributes && collectionJSON.relationshipAttributes.meanings) {
209
                            this.generateTerm(collectionJSON.relationshipAttributes.meanings);
210
                        }
211
                        if (Globals.entityTypeConfList && _.isEmptyArray(Globals.entityTypeConfList)) {
212
                            this.ui.editButtonContainer.html(ButtonsTmpl({ btn_edit: true }));
213 214
                        } else {
                            if (_.contains(Globals.entityTypeConfList, collectionJSON.typeName)) {
215
                                this.ui.editButtonContainer.html(ButtonsTmpl({ btn_edit: true }));
216 217
                            }
                        }
218 219 220 221 222 223
                        if (collectionJSON.attributes && collectionJSON.attributes.columns) {
                            var valueSorted = _.sortBy(collectionJSON.attributes.columns, function(val) {
                                return val.attributes.position
                            });
                            collectionJSON.attributes.columns = valueSorted;
                        }
224
                    }
225
                    this.hideLoader();
226 227 228
                    var obj = {
                        entity: collectionJSON,
                        guid: this.id,
229
                        entityName: this.name,
230
                        typeHeaders: this.typeHeaders,
231
                        entityDefCollection: this.entityDefCollection,
232
                        fetchCollection: this.fetchCollection.bind(that),
233
                        enumDefCollection: this.enumDefCollection,
234
                        classificationDefCollection: this.classificationDefCollection,
235
                        glossaryCollection: this.glossaryCollection,
236 237 238
                        attributeDefs: (function() {
                            return that.getEntityDef(collectionJSON);
                        })()
239
                    }
240
                    this.renderEntityDetailTableLayoutView(obj);
241
                    this.renderRelationshipLayoutView(obj);
242
                    this.renderAuditTableLayoutView(obj);
243
                    this.renderTagTableLayoutView(obj);
244 245

                    // To render profile tab check for attribute "profileData" or typeName = "hive_db","hbase_namespace"
246 247
                    if (collectionJSON && (!_.isUndefined(collectionJSON.attributes['profileData']) || collectionJSON.typeName === "hive_db" || collectionJSON.typeName === "hbase_namespace")) {
                        if (collectionJSON.typeName === "hive_db" || collectionJSON.typeName === "hbase_namespace") {
248 249 250 251 252 253
                            this.$('.profileTab a').text("Tables")
                        }
                        this.$('.profileTab').show();
                        this.renderProfileLayoutView(_.extend({}, obj, {
                            entityDetail: collectionJSON.attributes,
                            profileData: collectionJSON.attributes.profileData,
254 255
                            typeName: collectionJSON.typeName,
                            value: that.value
256 257 258
                        }));
                    }

259
                    if (this.activeEntityDef) {
260 261 262 263 264
                        //to display ReplicationAudit tab
                        if (collectionJSON && collectionJSON.typeName === "AtlasServer") {
                            this.$('.replicationTab').show();
                            this.renderReplicationAuditTableLayoutView(obj);
                        }
265 266
                        // To render Schema check attribute "schemaElementsAttribute"
                        var schemaOptions = this.activeEntityDef.get('options');
267 268
                        var schemaElementsAttribute = schemaOptions && schemaOptions.schemaElementsAttribute;
                        if (!_.isEmpty(schemaElementsAttribute)) {
269 270
                            this.$('.schemaTable').show();
                            this.renderSchemaLayoutView(_.extend({}, obj, {
271
                                attribute: collectionJSON.relationshipAttributes[schemaElementsAttribute] || collectionJSON.attributes[schemaElementsAttribute]
272 273 274 275 276 277 278 279 280 281 282
                            }));
                        } else if (this.value && this.value.tabActive == "schema") {
                            Utils.setUrl({
                                url: Utils.getUrlState.getQueryUrl().queyParams[0],
                                urlParams: { tabActive: 'properties' },
                                mergeBrowserUrl: false,
                                trigger: true,
                                updateTabState: true
                            });
                        }

283
                        if (isLineageRender) {
284
                            this.$('.lineageGraph').show();
285
                            this.renderLineageLayoutView(_.extend(obj, {
286
                                processCheck: isProcess,
287
                                fetchCollection: this.fetchCollection.bind(this),
288
                            }));
289 290 291 292 293 294 295 296 297
                        } else if (this.value && this.value.tabActive == "lineage") {
                            Utils.setUrl({
                                url: Utils.getUrlState.getQueryUrl().queyParams[0],
                                urlParams: { tabActive: 'properties' },
                                mergeBrowserUrl: false,
                                trigger: true,
                                updateTabState: true
                            });
                        }
298
                    }
299 300


301
                }, this);
302
                this.listenTo(this.collection, 'error', function(model, response) {
303
                    this.$('.fontLoader-relative').removeClass('show');
304 305 306 307 308 309
                    if (response.responseJSON) {
                        Utils.notifyError({
                            content: response.responseJSON.errorMessage || response.responseJSON.error
                        });
                    }
                }, this);
310
            },
311 312
            onRender: function() {
                var that = this;
313
                this.bindEvents();
314
                Utils.showTitleLoader(this.$('.page-title .fontLoader'), this.$('.entityDetail'));
315
                this.$('.fontLoader-relative').addClass('show'); // to show tab loader
316
            },
317
            onShow: function() {
318 319 320
                if (this.value && this.value.tabActive) {
                    this.$('.nav.nav-tabs').find('[role="' + this.value.tabActive + '"]').addClass('active').siblings().removeClass('active');
                    this.$('.tab-content').find('[role="' + this.value.tabActive + '"]').addClass('active').siblings().removeClass('active');
321 322 323
                    $("html, body").animate({ scrollTop: (this.$('.tab-content').offset().top + 1200) }, 1000);
                }
            },
324 325 326 327 328
            onDestroy: function() {
                if (!Utils.getUrlState.isDetailPage()) {
                    $('body').removeClass("detail-page");
                }
            },
329 330 331
            fetchCollection: function() {
                this.collection.fetch({ reset: true });
            },
332
            getEntityDef: function(entityObj) {
333 334 335 336 337 338 339 340 341 342 343
                if (this.activeEntityDef) {
                    var data = this.activeEntityDef.toJSON();
                    var attributeDefs = Utils.getNestedSuperTypeObj({
                        data: data,
                        attrMerge: true,
                        collection: this.entityDefCollection
                    });
                    return attributeDefs;
                } else {
                    return [];
                }
344
            },
345
            onClickTagCross: function(e) {
346
                var that = this,
347 348
                    tagName = $(e.currentTarget).parent().text(),
                    entityGuid = $(e.currentTarget).data("entityguid");
349
                CommonViewFunction.deleteTag(_.extend({}, {
350 351
                    guid: that.id,
                    associatedGuid: that.id != entityGuid ? entityGuid : null,
352 353
                    msg: "<div class='ellipsis'>Remove: " + "<b>" + _.escape(tagName) + "</b> assignment from" + " " + "<b>" + this.name + "?</b></div>",
                    titleMessage: Messages.removeTag,
354 355
                    okText: "Remove",
                    showLoader: that.showLoader.bind(that),
356
                    hideLoader: that.hideLoader.bind(that),
357
                    tagName: tagName,
358 359 360
                    callback: function() {
                        that.fetchCollection();
                    }
361
                }));
362
            },
363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386
            onClickTermCross: function(e) {
                var $el = $(e.currentTarget),
                    termGuid = $el.data('guid'),
                    termName = $el.text(),
                    that = this,
                    termObj = _.find(this.collection.first().get('entity').relationshipAttributes.meanings, { guid: termGuid });
                CommonViewFunction.removeCategoryTermAssociation({
                    termGuid: termGuid,
                    model: {
                        guid: that.id,
                        relationshipGuid: termObj.relationshipGuid
                    },
                    collection: that.glossaryCollection,
                    msg: "<div class='ellipsis'>Remove: " + "<b>" + _.escape(termName) + "</b> assignment from" + " " + "<b>" + this.name + "?</b></div>",
                    titleMessage: Messages.glossary.removeTermfromEntity,
                    isEntityView: true,
                    buttonText: "Remove",
                    showLoader: that.showLoader.bind(that),
                    hideLoader: that.hideLoader.bind(that),
                    callback: function() {
                        that.fetchCollection();
                    }
                });
            },
387
            generateTag: function(tagObject) {
388
                var that = this,
389 390 391 392 393 394
                    tagData = "",
                    propagatedTagListData = "",
                    tag = {
                        'self': [],
                        'propagated': []
                    };
395
                _.each(tagObject, function(val) {
396
                    val.entityGuid === that.id ? tag['self'].push(val) : tag['propagated'].push(val);
397
                });
398
                _.each(tag.self, function(val) {
399
                    tagData += '<span class="btn btn-action btn-sm btn-icon btn-blue" data-id="tagClick"><span title=' + val.typeName + ' >' + val.typeName + '</span><i class="fa fa-close" data-id="deleteTag" data-type="tag" title="Remove Tag"></i></span>';
400 401
                });
                _.each(tag.propagated, function(val) {
402 403
                    var crossButton = '<i class="fa fa-close" data-id="deleteTag" data-entityguid="' + val.entityGuid + '" data-type="tag" title="Remove Tag"></i>';
                    propagatedTagListData += '<span class="btn btn-action btn-sm btn-icon btn-blue" title=' + val.typeName + ' data-id="tagClick"><span>' + val.typeName + '</span>' + ((that.id !== val.entityGuid && val.entityStatus === "DELETED") ? crossButton : "") + '</span>';
404 405
                });
                propagatedTagListData !== "" ? this.ui.propagatedTagDiv.show() : this.ui.propagatedTagDiv.hide();
406
                this.ui.tagList.find("span.btn").remove();
407
                this.ui.propagatedTagList.find("span.btn").remove();
408
                this.ui.tagList.prepend(tagData);
409 410
                this.ui.propagatedTagList.html(propagatedTagListData);

411
            },
412
            generateTerm: function(data) {
413 414 415
                var that = this,
                    termData = "";
                _.each(data, function(val) {
416
                    if (val.relationshipStatus == "ACTIVE") {
417
                        termData += '<span class="btn btn-action btn-sm btn-icon btn-blue" title=' + _.escape(val.displayText) + ' data-id="termClick"><span>' + _.escape(val.displayText) + '</span><i class="fa fa-close" data-id="deleteTerm" data-guid="' + val.guid + '" data-type="term" title="Remove Term"></i></span>';
418
                    }
419 420 421 422
                });
                this.ui.termList.find("span.btn").remove();
                this.ui.termList.prepend(termData);
            },
423 424 425 426 427 428
            hideLoader: function() {
                Utils.hideTitleLoader(this.$('.page-title .fontLoader'), this.$('.entityDetail'));
            },
            showLoader: function() {
                Utils.showTitleLoader(this.$('.page-title .fontLoader'), this.$('.entityDetail'));
            },
429 430
            onClickAddTagBtn: function(e) {
                var that = this;
431
                require(['views/tag/AddTagModalView'], function(AddTagModalView) {
432 433
                    var tagList = [];
                    _.map(that.entityObject.entity.classifications, function(obj) {
434 435 436 437 438 439 440 441 442 443 444 445 446 447 448
                        if (obj.entityGuid === that.id) {
                            tagList.push(obj.typeName);
                        }
                    });
                    var view = new AddTagModalView({
                        guid: that.id,
                        tagList: tagList,
                        callback: function() {
                            that.fetchCollection();
                        },
                        showLoader: that.showLoader.bind(that),
                        hideLoader: that.hideLoader.bind(that),
                        collection: that.classificationDefCollection,
                        enumDefCollection: that.enumDefCollection
                    });
449 450 451 452 453 454
                    view.modal.on('ok', function() {
                        Utils.showTitleLoader(that.$('.page-title .fontLoader'), that.$('.entityDetail'));
                    });
                });
            },
            onClickAddTermBtn: function(e) {
455 456 457 458 459
                var that = this,
                    entityGuid = that.id,
                    associatedTerms = this.collection.first().get('entity').relationshipAttributes.meanings;


460 461 462 463 464 465
                require(['views/glossary/AssignTermLayoutView'], function(AssignTermLayoutView) {
                    var view = new AssignTermLayoutView({
                        guid: that.id,
                        callback: function() {
                            that.fetchCollection();
                        },
466
                        associatedTerms: associatedTerms,
467 468 469 470
                        showLoader: that.showLoader.bind(that),
                        hideLoader: that.hideLoader.bind(that),
                        glossaryCollection: that.glossaryCollection
                    });
471 472 473
                    view.modal.on('ok', function() {
                        Utils.showTitleLoader(that.$('.page-title .fontLoader'), that.$('.entityDetail'));
                    });
474 475
                });
            },
476
            renderEntityDetailTableLayoutView: function(obj) {
477 478
                var that = this;
                require(['views/entity/EntityDetailTableLayoutView'], function(EntityDetailTableLayoutView) {
479
                    that.REntityDetailTableLayoutView.show(new EntityDetailTableLayoutView(obj));
480 481
                });
            },
482
            renderTagTableLayoutView: function(obj) {
483 484
                var that = this;
                require(['views/tag/TagDetailTableLayoutView'], function(TagDetailTableLayoutView) {
485
                    that.RTagTableLayoutView.show(new TagDetailTableLayoutView(obj));
486 487
                });
            },
488
            renderLineageLayoutView: function(obj) {
489
                var that = this;
490 491
                require(['views/graph/LineageLayoutView'], function(LineageLayoutView) {
                    that.RLineageLayoutView.show(new LineageLayoutView(obj));
492
                });
493
            },
494 495 496 497 498 499
            renderRelationshipLayoutView: function(obj) {
                var that = this;
                require(['views/graph/RelationshipLayoutView'], function(RelationshipLayoutView) {
                    that.RRelationshipLayoutView.show(new RelationshipLayoutView(obj));
                });
            },
500
            renderSchemaLayoutView: function(obj) {
501
                var that = this;
502 503
                require(['views/schema/SchemaLayoutView'], function(SchemaLayoutView) {
                    that.RSchemaTableLayoutView.show(new SchemaLayoutView(obj));
504 505
                });
            },
506
            renderAuditTableLayoutView: function(obj) {
507
                var that = this;
508 509
                require(['views/audit/AuditTableLayoutView'], function(AuditTableLayoutView) {
                    that.RAuditTableLayoutView.show(new AuditTableLayoutView(obj));
510
                });
511 512 513 514 515 516
            },
            renderReplicationAuditTableLayoutView: function(obj) {
                var that = this;
                require(['views/audit/ReplicationAuditTableLayoutView'], function(ReplicationAuditTableLayoutView) {
                    that.RReplicationAuditTableLayoutView.show(new ReplicationAuditTableLayoutView(obj));
                });
517
            },
518 519 520 521 522 523
            renderProfileLayoutView: function(obj) {
                var that = this;
                require(['views/profile/ProfileLayoutView'], function(ProfileLayoutView) {
                    that.RProfileLayoutView.show(new ProfileLayoutView(obj));
                });
            },
524 525 526 527 528 529 530 531
            onClickEditEntity: function(e) {
                var that = this;
                $(e.currentTarget).blur();
                require([
                    'views/entity/CreateEntityLayoutView'
                ], function(CreateEntityLayoutView) {
                    var view = new CreateEntityLayoutView({
                        guid: that.id,
532
                        entityDefCollection: that.entityDefCollection,
533
                        typeHeaders: that.typeHeaders,
534 535 536 537 538 539
                        callback: function() {
                            that.fetchCollection();
                        }
                    });

                });
540 541 542
            }
        });
    return DetailPageLayoutView;
543
});