Explorar o código

[web日志]修改如果只有一个node,不显示*

st %!s(int64=5) %!d(string=hai) anos
pai
achega
f78b5912f6
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      o2web/source/x_component_LogViewer/Main.js

+ 3 - 1
o2web/source/x_component_LogViewer/Main.js

@@ -61,7 +61,9 @@ MWF.xApplication.LogViewer.Main = new Class({
         o2.Actions.load("x_program_center").CommandAction.getNodeInfoList(
             function( json ){
                 var nodeList = json.data.nodeList;
-                new Element("option", {"value": "*", "text": "*"}).inject(this.nodeSelect);
+                if(nodeList.length>1){
+                    new Element("option", {"value": "*", "text": "*"}).inject(this.nodeSelect);
+                }
                 nodeList.each(function (node) {
                     new Element("option", {
                         "value": node.node.nodeAgentPort,