DetailPageLayoutView.js 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492
  1. define([ "require", "backbone", "hbs!tmpl/detail_page/DetailPageLayoutView_tmpl", "utils/Utils", "utils/CommonViewFunction", "utils/Globals", "utils/Enums", "utils/Messages", "utils/UrlLinks", "collection/VEntityList" ], function(require, Backbone, DetailPageLayoutViewTmpl, Utils, CommonViewFunction, Globals, Enums, Messages, UrlLinks, VEntityList) {
  2. "use strict";
  3. var DetailPageLayoutView = Backbone.Marionette.LayoutView.extend({
  4. _viewName: "DetailPageLayoutView",
  5. template: DetailPageLayoutViewTmpl,
  6. regions: {
  7. REntityDetailTableLayoutView: "#r_entityDetailTableLayoutView",
  8. RSchemaTableLayoutView: "#r_schemaTableLayoutView",
  9. RTagTableLayoutView: "#r_tagTableLayoutView",
  10. RLineageLayoutView: "#r_lineageLayoutView",
  11. RAuditTableLayoutView: "#r_auditTableLayoutView",
  12. RPendingTaskTableLayoutView: "#r_pendingTaskTableLayoutView",
  13. RReplicationAuditTableLayoutView: "#r_replicationAuditTableLayoutView",
  14. RProfileLayoutView: "#r_profileLayoutView",
  15. RRelationshipLayoutView: "#r_relationshipLayoutView",
  16. REntityUserDefineView: "#r_entityUserDefineView",
  17. REntityLabelDefineView: "#r_entityLabelDefineView",
  18. REntityBusinessMetadataView: "#r_entityBusinessMetadataView"
  19. },
  20. ui: {
  21. tagClick: '[data-id="tagClick"]',
  22. pTagCountClick: '[data-id="pTagCountClick"]',
  23. termClick: '[data-id="termClick"]',
  24. propagatedTagDiv: '[data-id="propagatedTagDiv"]',
  25. title: '[data-id="title"]',
  26. description: '[data-id="description"]',
  27. editBox: '[data-id="editBox"]',
  28. deleteTag: '[data-id="deleteTag"]',
  29. deleteTerm: '[data-id="deleteTerm"]',
  30. addTag: '[data-id="addTag"]',
  31. addTerm: '[data-id="addTerm"]',
  32. tagList: '[data-id="tagList"]',
  33. termList: '[data-id="termList"]',
  34. propagatedTagList: '[data-id="propagatedTagList"]',
  35. tablist: '[data-id="tab-list"] li',
  36. entityIcon: '[data-id="entityIcon"]',
  37. backButton: '[data-id="backButton"]'
  38. },
  39. templateHelpers: function() {
  40. return {
  41. entityUpdate: Globals.entityUpdate,
  42. isTasksEnabled: Globals.isTasksEnabled
  43. };
  44. },
  45. events: function() {
  46. var events = {};
  47. return events["click " + this.ui.tagClick] = function(e) {
  48. "i" != e.target.nodeName.toLocaleLowerCase() && Utils.setUrl({
  49. url: "#!/tag/tagAttribute/" + e.currentTarget.textContent,
  50. mergeBrowserUrl: !1,
  51. trigger: !0
  52. });
  53. }, events["click " + this.ui.pTagCountClick] = function(e) {
  54. var tag = $(e.currentTarget).parent().children().first().text();
  55. Utils.setUrl({
  56. url: "#!/detailPage/" + this.id + "?tabActive=classification&filter=" + tag,
  57. mergeBrowserUrl: !1,
  58. trigger: !0
  59. });
  60. }, events["click " + this.ui.termClick] = function(e) {
  61. "i" != e.target.nodeName.toLocaleLowerCase() && Utils.setUrl({
  62. url: "#!/glossary/" + $(e.currentTarget).find("i").data("guid"),
  63. mergeBrowserUrl: !1,
  64. urlParams: {
  65. gType: "term",
  66. viewType: "term",
  67. fromView: "entity"
  68. },
  69. trigger: !0
  70. });
  71. }, events["click " + this.ui.addTerm] = "onClickAddTermBtn", events["click " + this.ui.deleteTag] = "onClickTagCross",
  72. events["click " + this.ui.deleteTerm] = "onClickTermCross", events["click " + this.ui.addTag] = "onClickAddTagBtn",
  73. events["click " + this.ui.tablist] = function(e) {
  74. var tabValue = $(e.currentTarget).attr("role");
  75. Utils.setUrl({
  76. url: Utils.getUrlState.getQueryUrl().queyParams[0],
  77. urlParams: {
  78. tabActive: tabValue || "properties"
  79. },
  80. mergeBrowserUrl: !1,
  81. trigger: !1,
  82. updateTabState: !0
  83. });
  84. }, events["click " + this.ui.backButton] = function() {
  85. Utils.backButtonClick();
  86. }, events;
  87. },
  88. initialize: function(options) {
  89. _.extend(this, _.pick(options, "value", "collection", "id", "entityDefCollection", "typeHeaders", "enumDefCollection", "classificationDefCollection", "glossaryCollection", "businessMetadataDefCollection", "searchVent")),
  90. $("body").addClass("detail-page"), this.collection = new VEntityList([], {}), this.collection.url = UrlLinks.entitiesApiUrl({
  91. guid: this.id,
  92. minExtInfo: !0
  93. }), this.fetchCollection();
  94. },
  95. bindEvents: function() {
  96. var that = this;
  97. this.listenTo(this.collection, "reset", function() {
  98. this.entityObject = this.collection.first().toJSON();
  99. var collectionJSON = this.entityObject.entity;
  100. if (this.activeEntityDef = this.entityDefCollection.fullCollection.find({
  101. name: collectionJSON.typeName
  102. }), !this.activeEntityDef) return Utils.backButtonClick(), Utils.notifyError({
  103. content: "Unknown Entity-Type"
  104. }), !0;
  105. collectionJSON && _.startsWith(collectionJSON.typeName, "AtlasGlossary") && this.$(".termBox").hide(),
  106. Utils.findAndMergeRefEntity({
  107. attributeObject: collectionJSON.attributes,
  108. referredEntities: this.entityObject.referredEntities
  109. }), Utils.findAndMergeRefEntity({
  110. attributeObject: collectionJSON.relationshipAttributes,
  111. referredEntities: this.entityObject.referredEntities
  112. }), Utils.findAndMergeRelationShipEntity({
  113. attributeObject: collectionJSON.attributes,
  114. relationshipAttributes: collectionJSON.relationshipAttributes
  115. });
  116. var isProcess = !1, typeName = Utils.getName(collectionJSON, "typeName"), superTypes = Utils.getNestedSuperTypes({
  117. data: this.activeEntityDef.toJSON(),
  118. collection: this.entityDefCollection
  119. }), isLineageRender = _.find(superTypes, function(type) {
  120. if ("DataSet" === type || "Process" === type) return "Process" === type && (isProcess = !0),
  121. !0;
  122. });
  123. if (isLineageRender || (isLineageRender = "DataSet" === typeName || "Process" === typeName || null),
  124. collectionJSON && collectionJSON.guid) {
  125. collectionJSON.guid;
  126. this.readOnly = Enums.entityStateReadOnly[collectionJSON.status];
  127. } else {
  128. this.id;
  129. }
  130. if (this.readOnly ? this.$el.addClass("readOnly") : this.$el.removeClass("readOnly"),
  131. collectionJSON) {
  132. if (this.name = Utils.getName(collectionJSON), collectionJSON.attributes) {
  133. if (collectionJSON.typeName && (collectionJSON.attributes.typeName = _.escape(collectionJSON.typeName)),
  134. this.name && collectionJSON.typeName && (this.name = this.name + " (" + _.escape(collectionJSON.typeName) + ")"),
  135. !this.name && collectionJSON.typeName && (this.name = _.escape(collectionJSON.typeName)),
  136. this.description = collectionJSON.attributes.description, this.name) {
  137. this.ui.title.show();
  138. var titleName = "<span>" + this.name + "</span>";
  139. this.readOnly && (titleName += '<button title="Deleted" class="btn btn-action btn-md deleteBtn"><i class="fa fa-trash"></i> Deleted</button>'),
  140. this.ui.title.html(titleName), void 0 === collectionJSON.attributes.serviceType ? void 0 === Globals.serviceTypeMap[collectionJSON.typeName] && this.activeEntityDef && (Globals.serviceTypeMap[collectionJSON.typeName] = this.activeEntityDef.get("serviceType")) : void 0 === Globals.serviceTypeMap[collectionJSON.typeName] && (Globals.serviceTypeMap[collectionJSON.typeName] = collectionJSON.attributes.serviceType);
  141. var entityData = _.extend({
  142. serviceType: Globals.serviceTypeMap[collectionJSON.typeName],
  143. isProcess: isProcess
  144. }, collectionJSON);
  145. this.readOnly ? this.ui.entityIcon.addClass("disabled") : this.ui.entityIcon.removeClass("disabled"),
  146. this.ui.entityIcon.attr("title", _.escape(collectionJSON.typeName)).html('<img src="' + Utils.getEntityIconPath({
  147. entityData: entityData
  148. }) + '"/>').find("img").on("error", function() {
  149. this.src = Utils.getEntityIconPath({
  150. entityData: entityData,
  151. errorUrl: this.src
  152. });
  153. });
  154. } else this.ui.title.hide();
  155. this.description ? (this.ui.description.show(), this.ui.description.html("<span>" + _.escape(this.description) + "</span>")) : this.ui.description.hide();
  156. }
  157. var tags = {
  158. self: [],
  159. propagated: [],
  160. propagatedMap: {},
  161. combineMap: {}
  162. };
  163. if (collectionJSON.classifications) {
  164. var tagObject = collectionJSON.classifications;
  165. _.each(tagObject, function(val) {
  166. var typeName = val.typeName;
  167. val.entityGuid === that.id ? tags.self.push(val) : (tags.propagated.push(val), tags.propagatedMap[typeName] ? tags.propagatedMap[typeName].count++ : (tags.propagatedMap[typeName] = val,
  168. tags.propagatedMap[typeName].count = 1)), void 0 === tags.combineMap[typeName] && (tags.combineMap[typeName] = val);
  169. }), tags.self = _.sortBy(tags.self, "typeName"), tags.propagated = _.sortBy(tags.propagated, "typeName"),
  170. this.generateTag(tags);
  171. } else this.generateTag([]);
  172. if (collectionJSON.relationshipAttributes && collectionJSON.relationshipAttributes.meanings && this.generateTerm(collectionJSON.relationshipAttributes.meanings),
  173. Globals.entityTypeConfList && _.isEmptyArray(Globals.entityTypeConfList) ? this.editEntity = !0 : _.contains(Globals.entityTypeConfList, collectionJSON.typeName) && (this.editEntity = !0),
  174. collectionJSON.attributes && collectionJSON.attributes.columns) {
  175. var valueSorted = _.sortBy(collectionJSON.attributes.columns, function(val) {
  176. return val.attributes && val.attributes.position;
  177. });
  178. collectionJSON.attributes.columns = valueSorted;
  179. }
  180. }
  181. this.hideLoader();
  182. var obj = {
  183. entity: collectionJSON,
  184. guid: this.id,
  185. entityName: this.name,
  186. typeHeaders: this.typeHeaders,
  187. tags: tags,
  188. entityDefCollection: this.entityDefCollection,
  189. fetchCollection: this.fetchCollection.bind(that),
  190. enumDefCollection: this.enumDefCollection,
  191. classificationDefCollection: this.classificationDefCollection,
  192. glossaryCollection: this.glossaryCollection,
  193. businessMetadataCollection: this.activeEntityDef.get("businessAttributeDefs"),
  194. searchVent: this.searchVent,
  195. attributeDefs: function() {
  196. return that.getEntityDef(collectionJSON);
  197. }(),
  198. editEntity: this.editEntity || !1
  199. };
  200. if (obj.renderAuditTableLayoutView = function() {
  201. that.renderAuditTableLayoutView(obj);
  202. }, this.renderEntityDetailTableLayoutView(obj), this.renderEntityUserDefineView(obj),
  203. this.renderEntityLabelDefineView(obj), obj.businessMetadataCollection && this.renderEntityBusinessMetadataView(obj),
  204. this.renderRelationshipLayoutView(obj), this.renderAuditTableLayoutView(obj), this.renderTagTableLayoutView(obj),
  205. Globals.isTasksEnabled && this.renderPendingTaskTableLayoutView(), !collectionJSON || _.isUndefined(collectionJSON.attributes.profileData) && "hive_db" !== collectionJSON.typeName && "hbase_namespace" !== collectionJSON.typeName ? (this.$(".profileTab").hide(),
  206. this.redirectToDefaultTab("profile")) : ("hive_db" !== collectionJSON.typeName && "hbase_namespace" !== collectionJSON.typeName || this.$(".profileTab a").text("Tables"),
  207. this.$(".profileTab").show(), this.renderProfileLayoutView(_.extend({}, obj, {
  208. entityDetail: collectionJSON.attributes,
  209. profileData: collectionJSON.attributes.profileData,
  210. typeName: collectionJSON.typeName,
  211. value: that.value
  212. }))), this.activeEntityDef) {
  213. collectionJSON && "AtlasServer" === collectionJSON.typeName ? (this.$(".replicationTab").show(),
  214. this.renderReplicationAuditTableLayoutView(obj)) : (this.$(".replicationTab").hide(),
  215. this.redirectToDefaultTab("raudits"));
  216. var schemaOptions = this.activeEntityDef.get("options"), schemaElementsAttribute = schemaOptions && schemaOptions.schemaElementsAttribute;
  217. _.isEmpty(schemaElementsAttribute) ? (this.$(".schemaTable").hide(), this.redirectToDefaultTab("schema")) : (this.$(".schemaTable").show(),
  218. this.renderSchemaLayoutView(_.extend({}, obj, {
  219. attribute: collectionJSON.relationshipAttributes[schemaElementsAttribute] || collectionJSON.attributes[schemaElementsAttribute]
  220. }))), isLineageRender ? (this.$(".lineageGraph").show(), this.renderLineageLayoutView(_.extend(obj, {
  221. processCheck: isProcess,
  222. fetchCollection: this.fetchCollection.bind(this)
  223. }))) : (this.$(".lineageGraph").hide(), this.redirectToDefaultTab("lineage"));
  224. }
  225. }, this), this.listenTo(this.collection, "error", function(model, response) {
  226. this.$(".fontLoader-relative").removeClass("show"), response.responseJSON && Utils.notifyError({
  227. content: response.responseJSON.errorMessage || response.responseJSON.error
  228. });
  229. }, this);
  230. },
  231. onRender: function() {
  232. this.bindEvents(), Utils.showTitleLoader(this.$(".page-title .fontLoader"), this.$(".entityDetail")),
  233. this.$(".fontLoader-relative").addClass("show");
  234. },
  235. redirectToDefaultTab: function(tabName) {
  236. var regionRef = null;
  237. switch (tabName) {
  238. case "schema":
  239. regionRef = this.RSchemaTableLayoutView;
  240. break;
  241. case "lineage":
  242. regionRef = this.RLineageLayoutView;
  243. break;
  244. case "raudits":
  245. regionRef = this.RReplicationAuditTableLayoutView;
  246. break;
  247. case "profile":
  248. regionRef = this.RProfileLayoutView;
  249. }
  250. regionRef && (regionRef.destroy(), regionRef.$el.empty()), (this.value && this.value.tabActive == tabName || this.$(".tab-content .tab-pane.active").attr("role") === tabName) && Utils.setUrl({
  251. url: Utils.getUrlState.getQueryUrl().queyParams[0],
  252. urlParams: {
  253. tabActive: "properties"
  254. },
  255. mergeBrowserUrl: !1,
  256. trigger: !0,
  257. updateTabState: !0
  258. });
  259. },
  260. manualRender: function(options) {
  261. if (options) {
  262. var oldId = this.id;
  263. _.extend(this, _.pick(options, "value", "id")), this.id !== oldId && (this.collection.url = UrlLinks.entitiesApiUrl({
  264. guid: this.id,
  265. minExtInfo: !0
  266. }), this.fetchCollection()), this.updateTab();
  267. }
  268. },
  269. updateTab: function() {
  270. this.value && this.value.tabActive && (this.$(".nav.nav-tabs").find('[role="' + this.value.tabActive + '"]').addClass("active").siblings().removeClass("active"),
  271. this.$(".tab-content").find('[role="' + this.value.tabActive + '"]').addClass("active").siblings().removeClass("active"),
  272. $("html, body").animate({
  273. scrollTop: this.$(".tab-content").offset().top + 1200
  274. }, 1e3));
  275. },
  276. onShow: function() {
  277. this.updateTab();
  278. },
  279. onDestroy: function() {
  280. Utils.getUrlState.isDetailPage() || $("body").removeClass("detail-page");
  281. },
  282. fetchCollection: function() {
  283. this.collection.fetch({
  284. reset: !0
  285. });
  286. },
  287. getEntityDef: function(entityObj) {
  288. if (this.activeEntityDef) {
  289. var data = this.activeEntityDef.toJSON(), attributeDefs = Utils.getNestedSuperTypeObj({
  290. data: data,
  291. attrMerge: !0,
  292. collection: this.entityDefCollection
  293. });
  294. return attributeDefs;
  295. }
  296. return [];
  297. },
  298. onClickTagCross: function(e) {
  299. var that = this, tagName = $(e.currentTarget).parent().text(), entityGuid = $(e.currentTarget).data("entityguid");
  300. CommonViewFunction.deleteTag(_.extend({}, {
  301. guid: that.id,
  302. associatedGuid: that.id != entityGuid ? entityGuid : null,
  303. msg: "<div class='ellipsis-with-margin'>Remove: <b>" + _.escape(tagName) + "</b> assignment from <b>" + this.name + "?</b></div>",
  304. titleMessage: Messages.removeTag,
  305. okText: "Remove",
  306. showLoader: that.showLoader.bind(that),
  307. hideLoader: that.hideLoader.bind(that),
  308. tagName: tagName,
  309. callback: function() {
  310. that.searchVent && that.searchVent.trigger("Classification:Count:Update"), that.fetchCollection();
  311. }
  312. }));
  313. },
  314. onClickTermCross: function(e) {
  315. var $el = $(e.currentTarget), termGuid = $el.data("guid"), termName = $el.text(), that = this, termObj = _.find(this.collection.first().get("entity").relationshipAttributes.meanings, {
  316. guid: termGuid
  317. });
  318. CommonViewFunction.removeCategoryTermAssociation({
  319. termGuid: termGuid,
  320. model: {
  321. guid: that.id,
  322. relationshipGuid: termObj.relationshipGuid
  323. },
  324. collection: that.glossaryCollection,
  325. msg: "<div class='ellipsis-with-margin'>Remove: <b>" + _.escape(termName) + "</b> assignment from <b>" + this.name + "?</b></div>",
  326. titleMessage: Messages.glossary.removeTermfromEntity,
  327. isEntityView: !0,
  328. buttonText: "Remove",
  329. showLoader: that.showLoader.bind(that),
  330. hideLoader: that.hideLoader.bind(that),
  331. callback: function() {
  332. that.fetchCollection();
  333. }
  334. });
  335. },
  336. generateTag: function(tagObject) {
  337. var tagData = "", propagatedTagListData = "";
  338. _.each(tagObject.self, function(val) {
  339. tagData += '<span class="btn btn-action btn-sm btn-icon btn-blue" data-id="tagClick"><span>' + val.typeName + '</span><i class="fa fa-close" data-id="deleteTag" data-type="tag" title="Remove Classification"></i></span>';
  340. }), _.each(tagObject.propagatedMap, function(val, key) {
  341. propagatedTagListData += '<span class="btn btn-action btn-sm btn-icon btn-blue"><span data-id="tagClick">' + val.typeName + "</span>" + (val.count > 1 ? '<span class="active" data-id="pTagCountClick">(' + val.count + ")</span>" : "") + "</span>";
  342. }), "" !== propagatedTagListData ? this.ui.propagatedTagDiv.show() : this.ui.propagatedTagDiv.hide(),
  343. this.ui.tagList.find("span.btn").remove(), this.ui.propagatedTagList.find("span.btn").remove(),
  344. this.ui.tagList.prepend(tagData), this.ui.propagatedTagList.html(propagatedTagListData);
  345. },
  346. generateTerm: function(data) {
  347. var termData = "";
  348. _.each(data, function(val) {
  349. termData += '<span class="btn btn-action btn-sm btn-icon btn-blue" data-id="termClick"><span>' + _.escape(val.displayText) + '</span><i class="' + ("ACTIVE" == val.relationshipStatus ? "fa fa-close" : "") + '" data-id="deleteTerm" data-guid="' + val.guid + '" data-type="term" title="Remove Term"></i></span>';
  350. }), this.ui.termList.find("span.btn").remove(), this.ui.termList.prepend(termData);
  351. },
  352. hideLoader: function() {
  353. Utils.hideTitleLoader(this.$(".page-title .fontLoader"), this.$(".entityDetail"));
  354. },
  355. showLoader: function() {
  356. Utils.showTitleLoader(this.$(".page-title .fontLoader"), this.$(".entityDetail"));
  357. },
  358. onClickAddTagBtn: function(e) {
  359. var that = this;
  360. require([ "views/tag/AddTagModalView" ], function(AddTagModalView) {
  361. var tagList = [];
  362. _.map(that.entityObject.entity.classifications, function(obj) {
  363. obj.entityGuid === that.id && tagList.push(obj.typeName);
  364. });
  365. var view = new AddTagModalView({
  366. guid: that.id,
  367. tagList: tagList,
  368. callback: function() {
  369. that.searchVent && that.searchVent.trigger("Classification:Count:Update"), that.fetchCollection();
  370. },
  371. showLoader: that.showLoader.bind(that),
  372. hideLoader: that.hideLoader.bind(that),
  373. collection: that.classificationDefCollection,
  374. enumDefCollection: that.enumDefCollection
  375. });
  376. view.modal.on("ok", function() {
  377. Utils.showTitleLoader(that.$(".page-title .fontLoader"), that.$(".entityDetail"));
  378. });
  379. });
  380. },
  381. assignTermModalView: function(glossaryCollection, obj) {
  382. var that = this, terms = 0;
  383. _.each(glossaryCollection.fullCollection.models, function(model) {
  384. model.get("terms") && (terms += model.get("terms").length);
  385. }), terms ? require([ "views/glossary/AssignTermLayoutView" ], function(AssignTermLayoutView) {
  386. var view = new AssignTermLayoutView({
  387. guid: obj.guid,
  388. callback: function() {
  389. that.fetchCollection();
  390. },
  391. associatedTerms: obj.associatedTerms,
  392. showLoader: that.showLoader.bind(that),
  393. hideLoader: that.hideLoader.bind(that),
  394. glossaryCollection: glossaryCollection
  395. });
  396. view.modal.on("ok", function() {
  397. Utils.showTitleLoader(that.$(".page-title .fontLoader"), that.$(".entityDetail"));
  398. });
  399. }) : Utils.notifyInfo({
  400. content: "There are no available terms that can be associated with this entity"
  401. });
  402. },
  403. onClickAddTermBtn: function(e) {
  404. var that = this, entityObj = this.collection.first().get("entity"), obj = {
  405. guid: this.id,
  406. associatedTerms: []
  407. };
  408. this.glossaryCollection.fetch({
  409. success: function(glossaryCollection) {
  410. that.assignTermModalView(glossaryCollection, obj);
  411. },
  412. reset: !0
  413. }), entityObj && entityObj.relationshipAttributes && entityObj.relationshipAttributes.meanings && (obj.associatedTerms = entityObj.relationshipAttributes.meanings);
  414. },
  415. renderEntityDetailTableLayoutView: function(obj) {
  416. var that = this;
  417. require([ "views/entity/EntityDetailTableLayoutView" ], function(EntityDetailTableLayoutView) {
  418. that.REntityDetailTableLayoutView.show(new EntityDetailTableLayoutView(obj));
  419. });
  420. },
  421. renderEntityUserDefineView: function(obj) {
  422. var that = this;
  423. require([ "views/entity/EntityUserDefineView" ], function(EntityUserDefineView) {
  424. that.REntityUserDefineView.show(new EntityUserDefineView(obj));
  425. });
  426. },
  427. renderEntityLabelDefineView: function(obj) {
  428. var that = this;
  429. require([ "views/entity/EntityLabelDefineView" ], function(EntityLabelDefineView) {
  430. that.REntityLabelDefineView.show(new EntityLabelDefineView(obj));
  431. });
  432. },
  433. renderEntityBusinessMetadataView: function(obj) {
  434. var that = this;
  435. require([ "views/entity/EntityBusinessMetaDataView" ], function(EntityBusinessMetaDataView) {
  436. that.REntityBusinessMetadataView.show(new EntityBusinessMetaDataView(obj));
  437. });
  438. },
  439. renderTagTableLayoutView: function(obj) {
  440. var that = this;
  441. require([ "views/tag/TagDetailTableLayoutView" ], function(TagDetailTableLayoutView) {
  442. that.RTagTableLayoutView.show(new TagDetailTableLayoutView(obj));
  443. });
  444. },
  445. renderPendingTaskTableLayoutView: function() {
  446. var that = this;
  447. require([ "views/detail_page/PendingTaskTableLayoutView" ], function(PendingTaskTableLayoutView) {
  448. that.RPendingTaskTableLayoutView.show(new PendingTaskTableLayoutView());
  449. });
  450. },
  451. renderLineageLayoutView: function(obj) {
  452. var that = this;
  453. require([ "views/graph/LineageLayoutView" ], function(LineageLayoutView) {
  454. that.RLineageLayoutView.show(new LineageLayoutView(obj));
  455. });
  456. },
  457. renderRelationshipLayoutView: function(obj) {
  458. var that = this;
  459. require([ "views/graph/RelationshipLayoutView" ], function(RelationshipLayoutView) {
  460. that.RRelationshipLayoutView.show(new RelationshipLayoutView(obj));
  461. });
  462. },
  463. renderSchemaLayoutView: function(obj) {
  464. var that = this;
  465. require([ "views/schema/SchemaLayoutView" ], function(SchemaLayoutView) {
  466. that.RSchemaTableLayoutView.show(new SchemaLayoutView(obj));
  467. });
  468. },
  469. renderAuditTableLayoutView: function(obj) {
  470. var that = this;
  471. require([ "views/audit/AuditTableLayoutView" ], function(AuditTableLayoutView) {
  472. that.RAuditTableLayoutView.show(new AuditTableLayoutView(obj));
  473. });
  474. },
  475. renderReplicationAuditTableLayoutView: function(obj) {
  476. var that = this;
  477. require([ "views/audit/ReplicationAuditTableLayoutView" ], function(ReplicationAuditTableLayoutView) {
  478. that.RReplicationAuditTableLayoutView.show(new ReplicationAuditTableLayoutView(obj));
  479. });
  480. },
  481. renderProfileLayoutView: function(obj) {
  482. var that = this;
  483. require([ "views/profile/ProfileLayoutView" ], function(ProfileLayoutView) {
  484. that.RProfileLayoutView.show(new ProfileLayoutView(obj));
  485. });
  486. }
  487. });
  488. return DetailPageLayoutView;
  489. });