Parcourir la source

血缘表格名称修改。

jie il y a 1 an
Parent
commit
a217587828
1 fichiers modifiés avec 31 ajouts et 31 suppressions
  1. 31 31
      atlas/js/views/graph/LineageLayoutView.js

+ 31 - 31
atlas/js/views/graph/LineageLayoutView.js

@@ -37,18 +37,18 @@ define([ "require", "backbone", "hbs!tmpl/graph/LineageLayoutView_tmpl", "collec
         },
         events: function() {
             var events = {};
-            return events["click " + this.ui.checkHideProcess] = "onCheckUnwantedEntity", events["click " + this.ui.checkDeletedEntity] = "onCheckUnwantedEntity", 
-            events["change " + this.ui.selectDepth] = "onSelectDepthChange", events["click " + this.ui.filterToggler] = "onClickFilterToggler", 
-            events["click " + this.ui.boxClose] = "toggleBoxPanel", events["click " + this.ui.settingToggler] = "onClickSettingToggler", 
-            events["click " + this.ui.lineageFullscreenToggler] = "onClickLineageFullscreenToggler", 
-            events["click " + this.ui.searchToggler] = "onClickSearchToggler", events["click " + this.ui.saveSvg] = "onClickSaveSvg", 
-            events["click " + this.ui.resetLineage] = "onClickResetLineage", events["click " + this.ui.onZoomIn] = "onClickZoomIn", 
-            events["click " + this.ui.onZoomOut] = "onClickZoomOut", events["change " + this.ui.labelFullName] = "onClickLabelFullName", 
+            return events["click " + this.ui.checkHideProcess] = "onCheckUnwantedEntity", events["click " + this.ui.checkDeletedEntity] = "onCheckUnwantedEntity",
+            events["change " + this.ui.selectDepth] = "onSelectDepthChange", events["click " + this.ui.filterToggler] = "onClickFilterToggler",
+            events["click " + this.ui.boxClose] = "toggleBoxPanel", events["click " + this.ui.settingToggler] = "onClickSettingToggler",
+            events["click " + this.ui.lineageFullscreenToggler] = "onClickLineageFullscreenToggler",
+            events["click " + this.ui.searchToggler] = "onClickSearchToggler", events["click " + this.ui.saveSvg] = "onClickSaveSvg",
+            events["click " + this.ui.resetLineage] = "onClickResetLineage", events["click " + this.ui.onZoomIn] = "onClickZoomIn",
+            events["click " + this.ui.onZoomOut] = "onClickZoomOut", events["change " + this.ui.labelFullName] = "onClickLabelFullName",
             events;
         },
         initialize: function(options) {
-            _.extend(this, _.pick(options, "processCheck", "guid", "entity", "entityName", "entityDefCollection", "actionCallBack", "fetchCollection", "attributeDefs")), 
-            this.collection = new VLineageList(), this.typeMap = {}, this.apiGuid = {}, this.edgeCall, 
+            _.extend(this, _.pick(options, "processCheck", "guid", "entity", "entityName", "entityDefCollection", "actionCallBack", "fetchCollection", "attributeDefs")),
+            this.collection = new VLineageList(), this.typeMap = {}, this.apiGuid = {}, this.edgeCall,
             this.filterObj = {
                 isProcessHideCheck: !1,
                 isDeletedEntityHideCheck: !1,
@@ -58,8 +58,8 @@ define([ "require", "backbone", "hbs!tmpl/graph/LineageLayoutView_tmpl", "collec
             }, this.labelFullText = !1;
         },
         onRender: function() {
-            this.ui.searchToggler.prop("disabled", !0), this.$graphButtonsEl = this.$(".graph-button-group button, select[data-id='selectDepth']"), 
-            this.fetchGraphData(), this.layoutRendered && this.layoutRendered(), this.processCheck && this.hideCheckForProcess(), 
+            this.ui.searchToggler.prop("disabled", !0), this.$graphButtonsEl = this.$(".graph-button-group button, select[data-id='selectDepth']"),
+            this.fetchGraphData(), this.layoutRendered && this.layoutRendered(), this.processCheck && this.hideCheckForProcess(),
             this.ui.selectDepth.select2({
                 data: _.sortBy([ 3, 6, 9, 12, 15, 18, 21 ]),
                 tags: !0,
@@ -72,7 +72,7 @@ define([ "require", "backbone", "hbs!tmpl/graph/LineageLayoutView_tmpl", "collec
         },
         onClickLineageFullscreenToggler: function(e) {
             var icon = $(e.currentTarget).find("i"), panel = $(e.target).parents(".tab-pane").first();
-            icon.toggleClass("fa-expand fa-compress"), icon.hasClass("fa-expand") ? icon.parent("button").attr("data-original-title", "Full Screen") : icon.parent("button").attr("data-original-title", "Default View"), 
+            icon.toggleClass("fa-expand fa-compress"), icon.hasClass("fa-expand") ? icon.parent("button").attr("data-original-title", "Full Screen") : icon.parent("button").attr("data-original-title", "Default View"),
             panel.toggleClass("fullscreen-mode");
             var node = this.$("svg").parent()[0].getBoundingClientRect();
             this.LineageHelperRef.updateOptions({
@@ -81,13 +81,13 @@ define([ "require", "backbone", "hbs!tmpl/graph/LineageLayoutView_tmpl", "collec
             }), this.calculateLineageDetailPanelHeight();
         },
         onCheckUnwantedEntity: function(e) {
-            "checkHideProcess" === $(e.target).data("id") ? this.filterObj.isProcessHideCheck = e.target.checked : this.filterObj.isDeletedEntityHideCheck = e.target.checked, 
+            "checkHideProcess" === $(e.target).data("id") ? this.filterObj.isProcessHideCheck = e.target.checked : this.filterObj.isDeletedEntityHideCheck = e.target.checked,
             this.LineageHelperRef.refresh();
         },
         toggleBoxPanel: function(options) {
             var el = options && options.el;
             options && options.nodeDetailToggler, options.currentTarget;
-            this.$el.find(".show-box-panel").removeClass("show-box-panel"), el && el.addClass && el.addClass("show-box-panel"), 
+            this.$el.find(".show-box-panel").removeClass("show-box-panel"), el && el.addClass && el.addClass("show-box-panel"),
             this.$("circle.node-detail-highlight").removeClass("node-detail-highlight");
         },
         toggleLoader: function(element) {
@@ -159,10 +159,10 @@ define([ "require", "backbone", "hbs!tmpl/graph/LineageLayoutView_tmpl", "collec
                     if (!that.isDestroyed) {
                         data.legends = !options || options.legends;
                         var relationsReverse = data.relations ? data.relations.reverse() : null, lineageMaxRelationCount = 9e3;
-                        relationsReverse.length > lineageMaxRelationCount && (data.relations = relationsReverse.splice(relationsReverse.length - lineageMaxRelationCount, relationsReverse.length - 1), 
+                        relationsReverse.length > lineageMaxRelationCount && (data.relations = relationsReverse.splice(relationsReverse.length - lineageMaxRelationCount, relationsReverse.length - 1),
                         Utils.notifyInfo({
                             content: "Lineage exceeds display parameters and hence only upto 9000 relationships from this lineage can be displayed"
-                        })), that.lineageRelationshipLength = data.relations.length, that.createGraph(data), 
+                        })), that.lineageRelationshipLength = data.relations.length, that.createGraph(data),
                         that.renderLineageTypeSearch(data);
                     }
                 },
@@ -239,7 +239,7 @@ define([ "require", "backbone", "hbs!tmpl/graph/LineageLayoutView_tmpl", "collec
             });
         },
         noLineage: function() {
-            this.$(".fontLoader").hide(), this.$(".depth-container").hide(), this.$("svg").html('<text x="50%" y="50%" alignment-baseline="middle" text-anchor="middle">No lineage data found</text>'), 
+            this.$(".fontLoader").hide(), this.$(".depth-container").hide(), this.$("svg").html('<text x="50%" y="50%" alignment-baseline="middle" text-anchor="middle">No lineage data found</text>'),
             this.actionCallBack && this.actionCallBack();
         },
         hideCheckForProcess: function() {
@@ -253,7 +253,7 @@ define([ "require", "backbone", "hbs!tmpl/graph/LineageLayoutView_tmpl", "collec
                     _.isEmpty(data) || _.each(data.guidEntityMap, function(obj, index) {
                         var nodeData = that.LineageHelperRef.getNode(obj.guid);
                         (that.filterObj.isProcessHideCheck || that.filterObj.isDeletedEntityHideCheck) && nodeData && (nodeData.isProcess || nodeData.isDeleted) || (typeStr += '<option value="' + obj.guid + '">' + obj.displayText + "</option>");
-                    }), that.ui.lineageTypeSearch.html(typeStr), that.initilizelineageTypeSearch(), 
+                    }), that.ui.lineageTypeSearch.html(typeStr), that.initilizelineageTypeSearch(),
                     resolve();
                 } catch (e) {
                     console.log(e), reject(e);
@@ -272,7 +272,7 @@ define([ "require", "backbone", "hbs!tmpl/graph/LineageLayoutView_tmpl", "collec
                         guid: selectedNode
                     });
                 }
-            }), this.searchNodeObj.selectedNode && (this.ui.lineageTypeSearch.val(this.searchNodeObj.selectedNode), 
+            }), this.searchNodeObj.selectedNode && (this.ui.lineageTypeSearch.val(this.searchNodeObj.selectedNode),
             this.ui.lineageTypeSearch.trigger("change.select2"));
         },
         updateRelationshipDetails: function(options) {
@@ -281,19 +281,19 @@ define([ "require", "backbone", "hbs!tmpl/graph/LineageLayoutView_tmpl", "collec
                 var typeName = initialData.typeName || guid, attributeDefs = initialData && initialData.entityDef ? initialData.entityDef.attributeDefs : null;
                 this.$("[data-id='typeName']").text(typeName), this.entityModel = new VEntity({});
                 var config = {
-                    guid: "guid",
-                    typeName: "typeName",
-                    name: "name",
-                    qualifiedName: "qualifiedName",
-                    owner: "owner",
-                    createTime: "createTime",
-                    status: "status",
-                    classificationNames: "classifications",
-                    meanings: "term"
+                    guid: "编号",
+                    typeName: "类型名称",
+                    name: "名称",
+                    qualifiedName: "限定名称",
+                    owner: "所有者",
+                    createTime: "创建时间",
+                    status: "状态",
+                    classificationNames: "分类",
+                    meanings: "术语"
                 }, data = {};
                 _.each(config, function(valKey, key) {
                     var val = initialData[key];
-                    _.isUndefined(val) && initialData.attributes && initialData.attributes[key] && (val = initialData.attributes[key]), 
+                    _.isUndefined(val) && initialData.attributes && initialData.attributes[key] && (val = initialData.attributes[key]),
                     val && (data[valKey] = val);
                 }), this.ui.nodeDetailTable.html(CommonViewFunction.propertyTable({
                     scope: this,
@@ -305,9 +305,9 @@ define([ "require", "backbone", "hbs!tmpl/graph/LineageLayoutView_tmpl", "collec
         },
         calculateLineageDetailPanelHeight: function() {
             var $parentContainer = $("#tab-lineage .resizeGraph"), $panel = $parentContainer.find(".fix-box"), $parentHeight = $parentContainer.find(".fix-box, tbody").removeAttr("style").height() - 48, $tBody = $panel.find("tbody"), panelHeight = $tBody.height() + 100;
-            $parentHeight < panelHeight && (panelHeight = $parentHeight), $panel.css("height", panelHeight + "px"), 
+            $parentHeight < panelHeight && (panelHeight = $parentHeight), $panel.css("height", panelHeight + "px"),
             $tBody.css("height", "100%");
         }
     });
     return LineageLayoutView;
-});
+});