AutolabJS / autolabcli

Command line client for AutolabJS
https://autolabjs.github.io
GNU General Public License v3.0
10 stars 10 forks source link

[WIP] Implements `show` commands #117

Open mukkachaitanya opened 5 years ago

mukkachaitanya commented 5 years ago

Requirements

Description of the Change

Benefits

Possible Drawbacks

Applicable Issues

mukkachaitanya commented 5 years ago

Output of autolabjs show status command :

Output
| Fetching request results, please wait...
 { components:
   [ { role: 'execution_node', hostname: '10.1.*.***', port: '8091', status: 'up' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8092', status: 'up' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8093', status: 'up' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8094', status: 'up' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8095', status: 'up' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8096', status: 'up' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8097', status: 'up' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8098', status: 'up' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8099', status: 'up' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8100', status: 'up' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8101', status: 'up' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8102', status: 'up' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8103', status: 'up' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8104', status: 'up' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8105', status: 'up' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8106', status: 'up' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8107', status: 'up' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8108', status: 'up' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8109', status: 'up' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8110', status: 'up' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8091', status: 'down' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8092', status: 'down' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8093', status: 'down' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8094', status: 'down' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8095', status: 'down' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8096', status: 'down' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8097', status: 'down' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8098', status: 'down' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8099', status: 'down' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8100', status: 'down' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8101', status: 'down' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8102', status: 'down' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8103', status: 'down' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8104', status: 'down' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8105', status: 'down' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8106', status: 'down' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8107', status: 'down' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8108', status: 'down' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8109', status: 'down' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8110', status: 'down' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8091', status: 'up' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8092', status: 'up' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8093', status: 'up' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8094', status: 'up' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8095', status: 'up' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8096', status: 'up' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8097', status: 'up' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8098', status: 'up' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8099', status: 'up' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8100', status: 'up' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8101', status: 'up' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8102', status: 'up' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8103', status: 'up' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8104', status: 'up' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8105', status: 'up' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8106', status: 'up' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8107', status: 'up' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8108', status: 'up' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8109', status: 'up' },
     { role: 'execution_node', hostname: '10.1.*.***', port: '8110', status: 'up' },
     { role: 'load_balancer',
       hostname: 'autolab.bits-goa.ac.in',
       port: '8081',
       cmd: 'log',
       status: 'up' } ],
  job_queue_length: 0,
  timestamp: 'Wed Jan 23 2019 12:58:55 GMT+0530 (IST)' }

(hostnames hidded purposefully)

prasadtalasila commented 5 years ago

@mukkachaitanya I can't see the presentation code in lib/model/show.js which actually hides the IP addresses of the execution nodes.

mukkachaitanya commented 5 years ago

@mukkachaitanya I can't see the presentation code in lib/model/show.js which actually hides the IP addresses of the execution nodes.

The IP is hidden here on GitHub. The actual code output doesn't sir.

codecov[bot] commented 5 years ago

Codecov Report

Merging #117 into dev will decrease coverage by 0.09%. The diff coverage is 98.75%.

Impacted file tree graph

@@            Coverage Diff            @@
##              dev     #117     +/-   ##
=========================================
- Coverage   99.28%   99.18%   -0.1%     
=========================================
  Files          24       29      +5     
  Lines         695      856    +161     
=========================================
+ Hits          690      849    +159     
- Misses          5        7      +2
Flag Coverage Δ
#integration 93.92% <91.3%> (-0.32%) :arrow_down:
#unit 99.18% <98.75%> (-0.1%) :arrow_down:
Impacted Files Coverage Δ
lib/cli/input/show.js 100% <100%> (ø)
lib/controller/validate/show.js 100% <100%> (ø)
lib/controller/show.js 100% <100%> (ø)
lib/controller/index.js 100% <100%> (ø) :arrow_up:
lib/cli/output/show.js 100% <100%> (ø)
lib/model/show.js 95.83% <95.83%> (ø)
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b0534f8...afde03d. Read the comment docs.

mukkachaitanya commented 5 years ago

Output of autolabjs show score command : image

(ID hidden purposefully)

prasadtalasila commented 5 years ago

@mukkachaitanya The output of autolabjs show score looks good. Please remember to add the display score option for a user (autolabjs show score -l lab_name -i student_id).

mukkachaitanya commented 5 years ago

@mukkachaitanya The output of autolabjs show score looks good. Please remember to add the display score option for a user (autolabjs show score -l lab_name -i student_id).

That is also implemented, sir. image