DetailPageLayoutView.js 28 KB

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