emasser 1.0.6 → 3.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 04d5fabb5cd03ea2303313f9556bb0ab4758642acce449e545c06385db62e995
4
- data.tar.gz: 8de5b75a59d1cf87539accfb26fef79fc6ab3633753726ab13a8db176d063286
3
+ metadata.gz: 2b3d87539ff54e458a5cb685536e4c7cc2b8e7d96ddf422630dcdc9a9c29f666
4
+ data.tar.gz: e978da6dfe8802c853c461b5348905410d392e6d90bd6450ccadcffd38cdf79d
5
5
  SHA512:
6
- metadata.gz: d76892c176a01f532bc1fc3025a400bc31a09217aac8622bb96c71aac92be66abbee84115c6a88dd1244890182a68bab75500d7b3138cdc4ba3a59088059313a
7
- data.tar.gz: 76af52e24772b720e3a5fd6f45af2acd4356c6eb808c50b309b95a079ad854988797a576ff05dd1a9e029c53dce40c2f5fc1a31fe4b05eb7221a020ec75ccb43
6
+ metadata.gz: 7d827cffd0e07e02c61caa01bb19c1426d16e0cdc27990ed82da2a0eb92b9d23afd3613a5bb8a8e1e99b6f11bef547c2ab0724c35f3c2bdabdcb13d4c65f3bb7
7
+ data.tar.gz: a4c7e792fe74dd160fa745006d8801660a4e0e7b07244ba81daddf7f13325a8345cd73e8021adf5261775e2dd1f85a64a05170299d66796be8ce12d632309abe
data/Gemfile.lock CHANGED
@@ -1,18 +1,18 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- emasser (1.0.6)
4
+ emasser (3.4.0)
5
5
  activesupport (~> 6.1.4)
6
6
  colorize (~> 0.8.1)
7
7
  dotenv (~> 2.7.6)
8
- emass_client (~> 1.0, != 1.0.3)
8
+ emass_client (~> 3.0)
9
9
  rubyzip (~> 2.3.2)
10
10
  thor (~> 1.1.0)
11
11
 
12
12
  GEM
13
13
  remote: https://rubygems.org/
14
14
  specs:
15
- activesupport (6.1.6)
15
+ activesupport (6.1.7)
16
16
  concurrent-ruby (~> 1.0, >= 1.0.2)
17
17
  i18n (>= 1.6, < 2)
18
18
  minitest (>= 5.1)
@@ -27,14 +27,14 @@ GEM
27
27
  concurrent-ruby (1.1.10)
28
28
  diff-lcs (1.5.0)
29
29
  dotenv (2.7.6)
30
- emass_client (1.0.6)
30
+ emass_client (3.4.0)
31
31
  typhoeus (~> 1.0, >= 1.0.1)
32
32
  ethon (0.15.0)
33
33
  ffi (>= 1.15.0)
34
34
  ffi (1.15.5-x64-mingw32)
35
- i18n (1.10.0)
35
+ i18n (1.12.0)
36
36
  concurrent-ruby (~> 1.0)
37
- minitest (5.15.0)
37
+ minitest (5.16.3)
38
38
  parallel (1.22.1)
39
39
  parser (3.1.2.0)
40
40
  ast (~> 2.4.1)
@@ -78,11 +78,11 @@ GEM
78
78
  thor (1.1.0)
79
79
  typhoeus (1.4.0)
80
80
  ethon (>= 0.9.0)
81
- tzinfo (2.0.4)
81
+ tzinfo (2.0.5)
82
82
  concurrent-ruby (~> 1.0)
83
83
  unicode-display_width (2.1.0)
84
84
  yaml (0.2.0)
85
- zeitwerk (2.5.4)
85
+ zeitwerk (2.6.0)
86
86
 
87
87
  PLATFORMS
88
88
  x64-mingw32
data/docs/features.md CHANGED
@@ -65,9 +65,25 @@ The CLI invoke commands listed in this document shows them when executing from t
65
65
  * [/api/systems/{systemId}/approval/cac](#get-cac)
66
66
  * [/api/systems/{systemId}/approval/pac](#get-pac)
67
67
  * [/api/cmmc-assessments](#get-cmmc)
68
- * [/api/workflow-definitions](#get-workflowdefinitions)
69
- * [/api/systems/{systemId}/workflow-instances](#get-workflowinstances)
70
-
68
+ * [/api/workflow-definitions](#get-workflow_definitions)
69
+ * [/api/systems/{systemId}/workflow-instances](#get-workflow_instances)
70
+ * [/api/dashboards/system-status-details](#get-dashboards)
71
+ * [/api/dashboards/system-control-compliance-summary](#get-dashboards)
72
+ * [/api/dashboards/system-security-controls-details](#get-dashboards)
73
+ * [/api/dashboards/system-assessment-procedures-details](#get-dashboards)
74
+ * [/api/dashboards/system-poam-summary](#get-dashboards)
75
+ * [/api/dashboards/system-poam-details](#get-dashboards)
76
+ * [/api/dashboards/system-hardware-summary](#get-dashboards)
77
+ * [/api/dashboards/system-hardware-details](#get-dashboards)
78
+ * [/api/dashboards/system-associations-details](#get-dashboards)
79
+ * [/api/dashboards/user-system-assignments-details](#get-dashboards)
80
+ * [/api/dashboards/system-privacy-summary](#get-dashboards)
81
+ * [/api/dashboards/va-omb-fisma-saop-summary](#get-dashboards)
82
+ * [/api/dashboards/va-system-aa-summary](#get-dashboards)
83
+ * [/api/dashboards/va-system-a2-summary](#get-dashboards)
84
+ * [/api/dashboards/va-system-pl-109-reporting-summary](#get-dashboards)
85
+ * [/api/dashboards/va-system-fisma-inventory-summary](#get-dashboards)
86
+
71
87
  ### POST
72
88
  * [/api/systems/{systemId}/test-results](#post-test_results)
73
89
  * [/api/systems/{systemId}/poam](#post-poams)
@@ -78,7 +94,7 @@ The CLI invoke commands listed in this document shows them when executing from t
78
94
  * [/api/systems/{systemId}/static-code-scans](#post-static_code_scan)
79
95
  * [/api/systems/{systemId}/cloud-resource-results](#post-cloudresource)
80
96
  * [/api/systems/{systemId}/container-scan-results](#post-container)
81
-
97
+
82
98
  ### PUT
83
99
  * [/api/systems/{systemId}/controls](#put-controls)
84
100
  * [/api/systems/{systemId}/poams](#put-poams)
@@ -102,6 +118,7 @@ Each CLI endpoint command has several layers of help.
102
118
  emasser get cac # Get location of one or many controls in...
103
119
  emasser get cmmc # Get CMMC assessment information
104
120
  emasser get controls # Get system Controls
121
+ emasser get dashboards # Get dashboard information
105
122
  emasser get help [COMMAND] # Describe subcommands or one specific su...
106
123
  emasser get milestones # Get system Milestones
107
124
  emasser get pac # Get status of active workflows in a system
@@ -381,10 +398,11 @@ There are two get endpoints that provides the ability to view existing `Artifact
381
398
  |--ccis |String - The system CCIS string numerical value|
382
399
  |--systemOnly |BOOLEAN - true or false|
383
400
 
401
+
384
402
  - export - Retrieves the file artifacts (if compress is true the file binary contents are returned, otherwise the file textual contents are returned.)
385
- ````
386
- $ bundle exec exe/emasser get artifacts export --systemId=SYSTEMID
387
- ````
403
+ ````
404
+ $ bundle exec exe/emasser get artifacts export --systemId=SYSTEMID
405
+ ````
388
406
  - required parameters are:
389
407
 
390
408
  |parameter | type or values |
@@ -393,6 +411,7 @@ There are two get endpoints that provides the ability to view existing `Artifact
393
411
  |--filename |The artifact file name |
394
412
 
395
413
  - optional parameter is:
414
+
396
415
  |parameter | type or values |
397
416
  |-------------|:----------------------------------|
398
417
  |--compress |BOOLEAN - true or false. |
@@ -440,7 +459,7 @@ To view Cybersecurity Maturity Model Certification (CMMC) Assessments use the fo
440
459
 
441
460
  $ bundle exec exe/emasser get workflow_definitions forSite --sinceDate=SINCEDATE
442
461
 
443
- - Required parameters are:
462
+ - Required parameter is:
444
463
 
445
464
  |parameter | type or values |
446
465
  |----------------|:--------------------------------------|
@@ -463,13 +482,14 @@ To view Workflow Definitions use the following command:
463
482
  | | cloudServiceProvider, commonControlProvider |
464
483
 
465
484
  [top](#api-endpoints-provided)
466
-
467
485
  ### ```get workflow_instances```
486
+
468
487
  ----
469
488
  There are two get endpoints to view workflow instances:
470
489
  - all
490
+ ```
471
491
  $ bundle exec exe/emasser get workflow_instances all
472
-
492
+ ```
473
493
  - Optional parameters are:
474
494
 
475
495
  |parameter | type or values |
@@ -480,8 +500,9 @@ There are two get endpoints to view workflow instances:
480
500
  |--status |Possible values: active, inactive, all |
481
501
 
482
502
  - byWorkflowInstanceId
483
- $ bundle exec exe/emasser get workflow_instances byWorkflowInstanceId --workflowInstanceId=--WORKFLOWID
484
-
503
+ ```
504
+ $ bundle exec exe/emasser get workflow_instances byWorkflowInstanceId --workflowInstanceId=WORKFLOWID
505
+ ```
485
506
  - required parameter is:
486
507
 
487
508
  |parameter | type or values |
@@ -489,7 +510,92 @@ There are two get endpoints to view workflow instances:
489
510
  |--workflowInstanceId |Integer - Unique workflow instance identifier |
490
511
 
491
512
  [top](#api-endpoints-provided)
513
+ ### ```get dashboards```
514
+
515
+ ----
516
+ The Dashboards endpoints provide the ability to view data contained in dashboard exports. In the eMASS front end, these dashboard exports are generated as Excel exports.
517
+
518
+ All endpoint calls utilize the same parameter values, they are:
519
+ - Required parameter is:
492
520
 
521
+ |parameter | type or values |
522
+ |--------------|:------------------------------------------------|
523
+ |--orgId |Integer - The organization identification number |
524
+
525
+ - Optional parameters are:
526
+
527
+ |parameter | type or values |
528
+ |-------------|:--------------------------------------------------------------|
529
+ |--pageIndex |Integer - The index of the starting page (default first page 0)|
530
+ |--pageSize |Integer - The number of entries per page (default 20000) |
531
+
532
+ Available commands are:
533
+ - Get systems status detail dashboard information
534
+ ```
535
+ $ bundle exec exe/emasser get status_details --orgId=ORGID
536
+ ```
537
+ - Get systems control compliance summary dashboard information
538
+ ```
539
+ $ bundle exec exe/emasser get control_compliance_summary --orgId=ORGID
540
+ ```
541
+ - Get systems security control details dashboard information
542
+ ```
543
+ $ bundle exec exe/emasser get security_control_details --orgId=ORGID
544
+ ```
545
+ - Get systems assessment procedures details dashboard information
546
+ ```
547
+ $ bundle exec exe/emasser get assessment_procedures_details --orgId=ORGID
548
+ ```
549
+ - Get systems POA&Ms summary dashboard information
550
+ ```
551
+ $ bundle exec exe/emasser get poam_summary --orgId=ORGID
552
+ ```
553
+ - Get system POA&Ms details dashboard information
554
+ ```
555
+ $ bundle exec exe/emasser get poam_details --orgId=ORGID
556
+ ```
557
+ - Get system hardware summary dashboard information
558
+ ```
559
+ $ bundle exec exe/emasser get hardware_summary --orgId=ORGID
560
+ ```
561
+ - Get system hardware details dashboard information
562
+ ```
563
+ $ bundle exec exe/emasser get hardware_details --orgId=ORGID
564
+ ```
565
+ - Get system associations details dashboard information
566
+ ```
567
+ $ bundle exec exe/emasser get associations_details --orgId=ORGID
568
+ ```
569
+ - Get user system assignments details dashboard information
570
+ ```
571
+ $ bundle exec exe/emasser get assignments_details --orgId=ORGID
572
+ ```
573
+ - Get user system privacy summary dashboard information
574
+ ```
575
+ $ bundle exec exe/emasser get privacy_summary --orgId=ORGID
576
+ ```
577
+ - Get VA OMB-FISMA SAOP summary dashboard information
578
+ ```
579
+ $ bundle exec exe/emasser get fisma_saop_summary --orgId=ORGID
580
+ ```
581
+ - Get VA system A&A summary dashboard information
582
+ ```
583
+ $ bundle exec exe/emasser get va_aa_summary --orgId=ORGID
584
+ ```
585
+ - Get VA system A2.0 summary dashboard information
586
+ ```
587
+ $ bundle exec exe/emasser get va_a2_summary --orgId=ORGID
588
+ ```
589
+ - Get VA System P.L. 109 reporting summary dashboard information
590
+ ```
591
+ $ bundle exec exe/emasser get va_pl_109_summary --orgId=ORGID
592
+ ```
593
+ - Get VA system FISMA inventory summary dashboard information
594
+ ```
595
+ $ bundle exec exe/emasser get fisma_inventory_summary --orgId=ORGID
596
+ ```
597
+
598
+ [top](#api-endpoints-provided)
493
599
 
494
600
  ## Usage - POST
495
601
 
data/emasser.gemspec CHANGED
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
29
29
  spec.add_runtime_dependency 'dotenv', '~> 2.7.6'
30
30
  spec.add_runtime_dependency 'rubyzip', '~> 2.3.2'
31
31
  spec.add_runtime_dependency 'thor', '~> 1.1.0'
32
- spec.add_runtime_dependency 'emass_client', '~> 1.0', '!= 1.0.3'
32
+ spec.add_runtime_dependency 'emass_client', '~> 3.0'
33
33
 
34
34
  spec.add_development_dependency 'bundler', '~> 2.3'
35
35
  spec.add_development_dependency 'bundler-audit', '~> 0.7'
data/lib/emasser/get.rb CHANGED
@@ -44,7 +44,7 @@ module Emasser
44
44
  puts to_output_hash(result).green
45
45
  rescue EmassClient::ApiError => e
46
46
  puts 'Exception when calling TestApi->test_connection'.red
47
- puts to_output_hash(e)
47
+ puts to_output_hash(e).yellow
48
48
  end
49
49
  end
50
50
 
@@ -623,6 +623,282 @@ module Emasser
623
623
  end
624
624
  end
625
625
 
626
+ # The Dashboards endpoints provide the ability to view data contained in dashboard exports.
627
+ # In the eMASS front end, these dashboard exports are generated as Excel exports.
628
+ # Each dashboard dataset available from the API is automatically updated with the current
629
+ # configuration of the dashboard and the instance of eMASS as the dashboard changes.
630
+ #
631
+ # Endpoints:
632
+ # /api/dashboards/system-status-details - Get systems status detail dashboard information
633
+ # /api/dashboards/system-control-compliance-summary - Get systems control compliance summary dashboard information
634
+ # /api/dashboards/system-security-controls-details - Get systems security control details dashboard information
635
+ # /api/dashboards/system-assessment-procedures-details - Get systems assessment procedures details dashboard information
636
+ # /api/dashboards/system-poam-summary - Get systems POA&Ms summary dashboard information
637
+ # /api/dashboards/system-poam-details - Get system POA&Ms details dashboard information
638
+ # /api/dashboards/system-hardware-summary - Get system hardware summary dashboard information
639
+ # /api/dashboards/system-hardware-details - Get system hardware details dashboard information
640
+ # /api/dashboards/system-associations-details - Get system associations details dashboard information
641
+ # /api/dashboards/user-system-assignments-details - Get user system assignments details dashboard information
642
+ # /api/dashboards/system-privacy-summary - Get user system privacy summary dashboard information
643
+ # /api/dashboards/va-omb-fisma-saop-summary - Get VA OMB-FISMA SAOP summary dashboard information
644
+ # /api/dashboards/va-system-aa-summary - Get VA system A&A summary dashboard information
645
+ # /api/dashboards/va-system-a2-summary - Get VA system A2.0 summary dashboard information
646
+ # /api/dashboards/va-system-pl-109-reporting-summary - Get VA System P.L. 109 reporting summary dashboard information
647
+ # /api/dashboards/va-system-fisma-inventory-summary - Get VA system FISMA inventory summary dashboard information
648
+ class Dashboards < SubCommandBase
649
+ def self.exit_on_failure?
650
+ true
651
+ end
652
+
653
+ # Required parameters/fields
654
+ class_option :orgId, type: :numeric, required: true,
655
+ desc: 'A numeric value representing the system identification'
656
+
657
+ # Optional parameters/fields
658
+ class_option :pageIndex, type: :numeric, required: false, desc: 'The page number to be returned, if not specified starts at page 0'
659
+ class_option :pageSize, type: :numeric, required: false, desc: 'The total entries per page, default is 20,000'
660
+
661
+ # /api/dashboards/system-status-details
662
+ desc 'status_details', 'Get systems status detail dashboard information'
663
+ def status_details
664
+ optional_options_keys = optional_options(@_initializer).keys
665
+ optional_options = to_input_hash(optional_options_keys, options)
666
+
667
+ result = EmassClient::DashboardsApi.new.get_system_status_details(
668
+ options[:orgId], optional_options
669
+ )
670
+ puts to_output_hash(result).green
671
+ rescue EmassClient::ApiError => e
672
+ puts 'Exception when calling DashboardsApi->get_system_status_details'.red
673
+ puts to_output_hash(e).yellow
674
+ end
675
+
676
+ # /api/dashboards/system-control-compliance-summary
677
+ desc 'control_compliance_summary', 'Get systems control compliance summary dashboard information'
678
+ def control_compliance_summary
679
+ optional_options_keys = optional_options(@_initializer).keys
680
+ optional_options = to_input_hash(optional_options_keys, options)
681
+
682
+ result = EmassClient::DashboardsApi.new.get_system_control_compliance_summary(
683
+ options[:orgId], optional_options
684
+ )
685
+ puts to_output_hash(result).green
686
+ rescue EmassClient::ApiError => e
687
+ puts 'Exception when calling DashboardsApi->get_system_control_compliance_summary'.red
688
+ puts to_output_hash(e).yellow
689
+ end
690
+
691
+ # /api/dashboards/system-security-controls-details
692
+ desc 'security_control_details', 'Get systems security control details dashboard information'
693
+ def security_control_details
694
+ optional_options_keys = optional_options(@_initializer).keys
695
+ optional_options = to_input_hash(optional_options_keys, options)
696
+
697
+ result = EmassClient::DashboardsApi.new.get_system_security_control_details(
698
+ options[:orgId], optional_options
699
+ )
700
+ puts to_output_hash(result).green
701
+ rescue EmassClient::ApiError => e
702
+ puts 'Exception when calling DashboardsApi->get_system_security_control_details'.red
703
+ puts to_output_hash(e).yellow
704
+ end
705
+
706
+ # /api/dashboards/system-security-controls-details
707
+ desc 'assessment_procedures_details', 'Get systems assessment procedures details dashboard information'
708
+ def assessment_procedures_details
709
+ optional_options_keys = optional_options(@_initializer).keys
710
+ optional_options = to_input_hash(optional_options_keys, options)
711
+
712
+ result = EmassClient::DashboardsApi.new.get_system_assessment_procedures_details(
713
+ options[:orgId], optional_options
714
+ )
715
+ puts to_output_hash(result).green
716
+ rescue EmassClient::ApiError => e
717
+ puts 'Exception when calling DashboardsApi->get_system_assessment_procedures_details'.red
718
+ puts to_output_hash(e).yellow
719
+ end
720
+
721
+ # /api/dashboards/system-poam-summary
722
+ desc 'poam_summary', 'Get systems POA&Ms summary dashboard information'
723
+ def poam_summary
724
+ optional_options_keys = optional_options(@_initializer).keys
725
+ optional_options = to_input_hash(optional_options_keys, options)
726
+
727
+ result = EmassClient::DashboardsApi.new.get_system_poam_summary(
728
+ options[:orgId], optional_options
729
+ )
730
+ puts to_output_hash(result).green
731
+ rescue EmassClient::ApiError => e
732
+ puts 'Exception when calling DashboardsApi->get_system_poam_summary'.red
733
+ puts to_output_hash(e).yellow
734
+ end
735
+
736
+ # /api/dashboards/system-poam-details
737
+ desc 'poam_details', 'Get system POA&Ms details dashboard information'
738
+ def poam_details
739
+ optional_options_keys = optional_options(@_initializer).keys
740
+ optional_options = to_input_hash(optional_options_keys, options)
741
+
742
+ result = EmassClient::DashboardsApi.new.get_system_poam_details(
743
+ options[:orgId], optional_options
744
+ )
745
+ puts to_output_hash(result).green
746
+ rescue EmassClient::ApiError => e
747
+ puts 'Exception when calling DashboardsApi->get_system_poam_details'.red
748
+ puts to_output_hash(e).yellow
749
+ end
750
+
751
+ # /api/dashboards/system-hardware-summary
752
+ desc 'hardware_summary', 'Get system hardware summary dashboard information'
753
+ def hardware_summary
754
+ optional_options_keys = optional_options(@_initializer).keys
755
+ optional_options = to_input_hash(optional_options_keys, options)
756
+
757
+ result = EmassClient::DashboardsApi.new.get_system_hardware_summary(
758
+ options[:orgId], optional_options
759
+ )
760
+ puts to_output_hash(result).green
761
+ rescue EmassClient::ApiError => e
762
+ puts 'Exception when calling DashboardsApi->get_system_hardware_summary'.red
763
+ puts to_output_hash(e).yellow
764
+ end
765
+
766
+ # /api/dashboards/system-hardware-details
767
+ desc 'hardware_details', 'Get system hardware details dashboard information'
768
+ def hardware_details
769
+ optional_options_keys = optional_options(@_initializer).keys
770
+ optional_options = to_input_hash(optional_options_keys, options)
771
+
772
+ result = EmassClient::DashboardsApi.new.get_system_hardware_details(
773
+ options[:orgId], optional_options
774
+ )
775
+ puts to_output_hash(result).green
776
+ rescue EmassClient::ApiError => e
777
+ puts 'Exception when calling DashboardsApi->get_system_hardware_details'.red
778
+ puts to_output_hash(e).yellow
779
+ end
780
+
781
+ # /api/dashboards/system-associations-details
782
+ desc 'associations_details', 'Get system associations details dashboard information'
783
+ def associations_details
784
+ optional_options_keys = optional_options(@_initializer).keys
785
+ optional_options = to_input_hash(optional_options_keys, options)
786
+
787
+ result = EmassClient::DashboardsApi.new.get_system_associations_details(
788
+ options[:orgId], optional_options
789
+ )
790
+ puts to_output_hash(result).green
791
+ rescue EmassClient::ApiError => e
792
+ puts 'Exception when calling DashboardsApi->get_system_associations_details'.red
793
+ puts to_output_hash(e).yellow
794
+ end
795
+
796
+ # /api/dashboards/user-system-assignments-details
797
+ desc 'assignments_details', 'Get user system assignments details dashboard information'
798
+ def assignments_details
799
+ optional_options_keys = optional_options(@_initializer).keys
800
+ optional_options = to_input_hash(optional_options_keys, options)
801
+
802
+ result = EmassClient::DashboardsApi.new.get_user_system_assignments_details(
803
+ options[:orgId], optional_options
804
+ )
805
+ puts to_output_hash(result).green
806
+ rescue EmassClient::ApiError => e
807
+ puts 'Exception when calling DashboardsApi->get_user_system_assignments_details'.red
808
+ puts to_output_hash(e).yellow
809
+ end
810
+
811
+ # /api/dashboards/system-privacy-summary
812
+ desc 'privacy_summary', 'Get user system privacy summary dashboard information'
813
+ def privacy_summary
814
+ optional_options_keys = optional_options(@_initializer).keys
815
+ optional_options = to_input_hash(optional_options_keys, options)
816
+
817
+ result = EmassClient::DashboardsApi.new.get_system_privacy_summary(
818
+ options[:orgId], optional_options
819
+ )
820
+ puts to_output_hash(result).green
821
+ rescue EmassClient::ApiError => e
822
+ puts 'Exception when calling DashboardsApi->get_system_privacy_summary'.red
823
+ puts to_output_hash(e).yellow
824
+ end
825
+
826
+ # /api/dashboards/va-omb-fisma-saop-summary
827
+ desc 'fisma_saop_summary', 'Get VA OMB-FISMA SAOP summary dashboard information'
828
+ def fisma_saop_summary
829
+ optional_options_keys = optional_options(@_initializer).keys
830
+ optional_options = to_input_hash(optional_options_keys, options)
831
+
832
+ result = EmassClient::DashboardsApi.new.get_va_omb_fsma_saop_summary(
833
+ options[:orgId], optional_options
834
+ )
835
+ puts to_output_hash(result).green
836
+ rescue EmassClient::ApiError => e
837
+ puts 'Exception when calling DashboardsApi->get_va_omb_fsma_saop_summary'.red
838
+ puts to_output_hash(e).yellow
839
+ end
840
+
841
+ # /api/dashboards/va-system-aa-summary
842
+ desc 'va_aa_summary', 'Get VA system A&A summary dashboard information'
843
+ def va_aa_summary
844
+ optional_options_keys = optional_options(@_initializer).keys
845
+ optional_options = to_input_hash(optional_options_keys, options)
846
+
847
+ result = EmassClient::DashboardsApi.new.get_va_system_aa_summary(
848
+ options[:orgId], optional_options
849
+ )
850
+ puts to_output_hash(result).green
851
+ rescue EmassClient::ApiError => e
852
+ puts 'Exception when calling DashboardsApi->get_va_system_aa_summary'.red
853
+ puts to_output_hash(e).yellow
854
+ end
855
+
856
+ # /api/dashboards/va-system-a2-summary
857
+ desc 'va_a2_summary', 'Get VA system A2.0 summary dashboard information'
858
+ def va_a2_summary
859
+ optional_options_keys = optional_options(@_initializer).keys
860
+ optional_options = to_input_hash(optional_options_keys, options)
861
+
862
+ result = EmassClient::DashboardsApi.new.get_va_system_a2_summary(
863
+ options[:orgId], optional_options
864
+ )
865
+ puts to_output_hash(result).green
866
+ rescue EmassClient::ApiError => e
867
+ puts 'Exception when calling DashboardsApi->get_va_system_a2_summary'.red
868
+ puts to_output_hash(e).yellow
869
+ end
870
+
871
+ # /api/dashboards/va-system-pl-109-reporting-summary
872
+ desc 'va_pl_109_summary', 'Get VA System P.L. 109 reporting summary dashboard information'
873
+ def va_pl_109_summary
874
+ optional_options_keys = optional_options(@_initializer).keys
875
+ optional_options = to_input_hash(optional_options_keys, options)
876
+
877
+ result = EmassClient::DashboardsApi.new.get_va_system_pl109_reporting_summary(
878
+ options[:orgId], optional_options
879
+ )
880
+ puts to_output_hash(result).green
881
+ rescue EmassClient::ApiError => e
882
+ puts 'Exception when calling DashboardsApi->get_va_system_pl109_reporting_summary'.red
883
+ puts to_output_hash(e).yellow
884
+ end
885
+
886
+ # /api/dashboards/va-system-fisma-inventory-summary
887
+ desc 'fisma_inventory_summary', 'Get VA system FISMA inventory summary dashboard information'
888
+ def fisma_inventory_summary
889
+ optional_options_keys = optional_options(@_initializer).keys
890
+ optional_options = to_input_hash(optional_options_keys, options)
891
+
892
+ result = EmassClient::DashboardsApi.new.get_va_system_fisma_invetory_summary(
893
+ options[:orgId], optional_options
894
+ )
895
+ puts to_output_hash(result).green
896
+ rescue EmassClient::ApiError => e
897
+ puts 'Exception when calling DashboardsApi->get_va_system_fisma_invetory_summary'.red
898
+ puts to_output_hash(e).yellow
899
+ end
900
+ end
901
+
626
902
  class Get < SubCommandBase
627
903
  desc 'test', 'Test connection to the configured eMASS server'
628
904
  subcommand 'test', Test
@@ -665,6 +941,9 @@ module Emasser
665
941
 
666
942
  desc 'workflow_instances', 'Get workflow instance by system and/or ID in a system'
667
943
  subcommand 'workflow_instances', WorkflowInstances
944
+
945
+ desc 'dashboards', 'Get dashboard information'
946
+ subcommand 'dashboards', Dashboards
668
947
  end
669
948
  end
670
949
  # rubocop:enable Naming/MethodName
@@ -79,7 +79,7 @@ module OutputConverters
79
79
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity, Style/TernaryParentheses
80
80
  # rubocop:enable Style/IfWithBooleanLiteralBranches, Style/RescueStandardError, Metrics/BlockNesting
81
81
 
82
- # rubocop:disable Style/IdenticalConditionalBranches, Performance/RedundantMatch, Performance/RegexpMatch
82
+ # rubocop:disable Style/IdenticalConditionalBranches
83
83
  def change_to_datetime(obj)
84
84
  if obj.nil?
85
85
  return obj
@@ -96,8 +96,8 @@ module OutputConverters
96
96
  obj_entry[key] = hash_array
97
97
  data_obj.merge!(obj_entry)
98
98
  else
99
- if /\w(date|Date)/.match(key.to_s)
100
- value = value.nil? ? value : Time.at(value)
99
+ if /(date|Date)/.match?(key.to_s)
100
+ value = value.nil? ? value : Time.at(value.to_i)
101
101
  end
102
102
  obj_entry[key] = value
103
103
  data_obj.merge!(obj_entry)
@@ -107,5 +107,5 @@ module OutputConverters
107
107
  return data_obj
108
108
  # rubocop:enable Style/RedundantReturn
109
109
  end
110
- # rubocop:enable Style/IdenticalConditionalBranches, Performance/RedundantMatch, Performance/RegexpMatch
110
+ # rubocop:enable Style/IdenticalConditionalBranches
111
111
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Emasser
4
- VERSION = '1.0.6'
4
+ VERSION = '3.4.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: emasser
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 3.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amndeep Singh Mann
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: exe
14
14
  cert_chain: []
15
- date: 2022-06-17 00:00:00.000000000 Z
15
+ date: 2022-09-23 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: activesupport
@@ -90,20 +90,14 @@ dependencies:
90
90
  requirements:
91
91
  - - "~>"
92
92
  - !ruby/object:Gem::Version
93
- version: '1.0'
94
- - - "!="
95
- - !ruby/object:Gem::Version
96
- version: 1.0.3
93
+ version: '3.0'
97
94
  type: :runtime
98
95
  prerelease: false
99
96
  version_requirements: !ruby/object:Gem::Requirement
100
97
  requirements:
101
98
  - - "~>"
102
99
  - !ruby/object:Gem::Version
103
- version: '1.0'
104
- - - "!="
105
- - !ruby/object:Gem::Version
106
- version: 1.0.3
100
+ version: '3.0'
107
101
  - !ruby/object:Gem::Dependency
108
102
  name: bundler
109
103
  requirement: !ruby/object:Gem::Requirement