Пример #1
0
        public override string Execute(int consoleWidth)
        {
            lock (_js.jsLock)
            {
                JobNode _node = null;
                Job     _job  = _js.LGetJob((Int32)pars.GetPar("id").argValues[0], out _node);

                if (OParUsed("n"))
                {
                    _job.name = (string)pars.GetPar("n").argValues[0];
                }

                if (OParUsed("t"))
                {
                    _job.time = ParseJobTime(this);
                }

                if (OParUsed("rule"))
                {
                    List <JobRule> _rules = ParseJobNotificationRules(pars, _job.outp);
                    _job.rules = _rules;
                }

                if (OParUsed("ne"))
                {
                    _job.notiFlag = true;
                }
                else
                {
                    _job.notiFlag = false;
                }

                return("<color><green>Job updated.");
            }
        }
Пример #2
0
 public override string Execute(int consoleWidth)
 {
     lock (_js.jsLock)
     {
         JobNode _node;
         Job     _job = _js.LGetJob((int)pars.GetPar("id").argValues[0], out _node);
         if (_job != null)
         {
             _job.settings = ParseJobNotificationSettings(pars);
             return("<color><green>Rules set.");
         }
         else
         {
             return("<color><red>Job does not exist!");
         }
     }
 }
Пример #3
0
 public override string Execute(int consoleWidth)
 {
     lock (_js.jsLock)
     {
         JobNode _node = null;
         Job     _job  = _js.LGetJob((int)pars.GetPar("id").argValues[0], out _node);
         if (_job != null)
         {
             foreach (OutputDescriptor _desc in _job.outp.outputs)
             {
                 output += "<color><yellow>>OutDesc.: <color><white>" + _desc.name + "\n";
                 output += "<color><yellow> Type:     <color><white>" + _desc.dataType.ToString() + "\n\n";
             }
             return(output);
         }
         else
         {
             throw new JobException("Job does not exist!", null);
         }
     }
 }
Пример #4
0
 public override string Execute(int consoleWidth)
 {
     if (OParUsed("id"))
     {
         lock (_js.jsLock)
         {
             JobNode _node;
             Job     _job = _js.LGetJob((int)pars.GetPar("id").argValues[0], out _node);
             if (_job != null)
             {
                 output = GetJobInfo(_job);
                 return(output);
             }
             else
             {
                 return("<color><red>Job does not exist!");
             }
         }
     }
     else
     {
         lock (_js.jsLock)
         {
             List <JobNode> _nodes = _js.LGetNodes();
             foreach (JobNode _node in _nodes)
             {
                 foreach (Job _job in _node.jobs)
                 {
                     output += GetJobInfo(_job);
                     output += GetJobSpecificInfo(_job);
                     output += "\n";
                 }
             }
             return(output);
         }
     }
 }