예제 #1
0
        public override string Execute(int consoleWidth)
        {
            output += _js.GetNodesStats();
            output += "<color><yellow>" + ConsoleTable.GetSplitline(consoleWidth);

            string[] _tableRow = _tableRow = new string[] { "Node-ID", "Node-Name", "Node-State", "MAC-Address", "IP-Address", "Jobs Init." };
            output += ConsoleTable.FormatStringArray(consoleWidth, _tableRow);
            output += ConsoleTable.GetSplitline(consoleWidth);
            output += "<color><white>";

            lock (_js.jsLock)
            {
                List <JobNode> _nodes = _js.LGetNodes();
                foreach (JobNode _temp in _nodes)
                {
                    _tableRow[0] = _temp.id.ToString();
                    _tableRow[1] = _temp.name;
                    _tableRow[2] = _js.NodeState(_temp.state);
                    _tableRow[3] = _temp.mac.ToString();
                    _tableRow[4] = _temp.ip.ToString();
                    _tableRow[5] = _temp.jobs.Count.ToString();
                    output      += ConsoleTable.FormatStringArray(consoleWidth, _tableRow);
                }
            }

            return(output);
        }
예제 #2
0
 public override string Execute(int consoleWidth)
 {
     output += _js.GetJSStats() + "\n";
     output += _js.GetJSScheduleStats() + "\n";
     output += _js.GetNodesStats() + "\n";
     output += _js.GetJobsStats();
     return(output);
 }