lmcadm 0.17.0 → 0.18.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: 38c8fafe1ca6ada1a72b6d9e77d3c356c2ebfe59951494ce39df0264551493d9
4
- data.tar.gz: 25c529b60448aabcab330df1b6827179a914cbf51e23e91dbdd70c8df6221413
3
+ metadata.gz: ca0dd10565f531737baa49a5fbfef88cd87428354379bfea56479b695f6a9447
4
+ data.tar.gz: 057bef12dff7c5b8ec69b6f833343789c4682595b6bd99f4dbce64b1a740b6af
5
5
  SHA512:
6
- metadata.gz: df4eeae40e1204dcb9cf34974db6f5ee96ea39929a4bb6f0a8991f968d937def265ce304a6398ed78b007594726cf60307304d0098e7ca0ac3d6c1d98793cef3
7
- data.tar.gz: 5ac6a4adc086263d8d06fe8e76c7c200b5c4ca65a53df89d003bfca74d74ddf53f94806e7590ba789a1625bd86158f3aec989f7c2120104a4b5179808d941777
6
+ metadata.gz: b4d94f44775a0c2bea6b8e0c7376af6e7b21268670f0bc119e83d1ea2de670e8477012e717eb52df18651af18c51186551e4c71f10bd1d78bf5b4838df486f4f
7
+ data.tar.gz: f45285b9223ada9c9213f99e351335f59aff2e6f9ee0038b12efe14cec3e8f0bdc6564f87db76082efce72d36128de84e45d2d50ae4414a10170f779fa6edb91
@@ -25,11 +25,11 @@ jobs:
25
25
  - uses: papeloto/action-zip@v1
26
26
  with:
27
27
  files: lmcadm.exe LICENSE.txt
28
- dest: ${{ github.event.release.tag_name }}-win.zip
28
+ dest: lmcadm-${{ github.event.release.tag_name }}-win.zip
29
29
  - name: Release
30
30
  uses: softprops/action-gh-release@v1
31
31
  with:
32
- files: ${{ github.event.release.tag_name }}-win.zip
32
+ files: lmcadm-${{ github.event.release.tag_name }}-win.zip
33
33
  env:
34
34
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35
35
 
data/README.md CHANGED
@@ -81,6 +81,7 @@ Available types are
81
81
  * .max
82
82
  * .avg
83
83
 
84
+ Example use:
84
85
 
85
86
  lmcadm monitor -A "ExampleProject" raw --type scalar --period MINUTE10 \
86
87
  device_info cloud_rtt.max 3e19ada7-86fa-4809-a14e-7174b018603d
@@ -91,6 +92,8 @@ Available types are
91
92
  This dumps the raw values response as json.
92
93
  To further extract data, use something that can parse json, like `jq`[1].
93
94
 
95
+ Example use:
96
+
94
97
  lmcadm monitor -A "SDN-DEMO (LANCOM Visitor)" raw --type json --period MINUTE1 \
95
98
  wan_info_json interfaces a6871a81-84f3-4c57-a20e-c3410b47e895 | jq ' .[]["DSL-CH-1"].rxRate'
96
99
 
@@ -85,10 +85,22 @@ module LMCAdm #:nodoc:
85
85
  }
86
86
  monitordata = result.body.items[name]
87
87
  puts result.body.inspect if _g[:debug]
88
- if options[:type] == "scalar"
88
+ if options[:type] == 'scalar'
89
89
  puts monitordata.values
90
- elsif options[:type] == "json"
90
+ elsif options[:type] == 'json'
91
91
  puts JSON.pretty_generate monitordata.to_h[:values]
92
+ elsif options[:type] == 'table'
93
+ table_data = monitordata.values.map { |v|
94
+ row = v.first
95
+ hash = {}
96
+ monitordata.keys.each_with_index { |k, index|
97
+ unless row[index].nil?
98
+ hash[k] = v.first[index]
99
+ end
100
+ }
101
+ hash
102
+ }
103
+ tp table_data
92
104
  end
93
105
  end
94
106
 
@@ -1,3 +1,3 @@
1
1
  module LMCAdm
2
- VERSION = '0.17.0'
2
+ VERSION = '0.18.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lmcadm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.0
4
+ version: 0.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - erpel
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-06-17 00:00:00.000000000 Z
11
+ date: 2021-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler