aly 0.3.2 → 0.3.3

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: a8ccc78283759268e2374660bf543b44bee7b49e715c8e78da7584897e54c3a9
4
- data.tar.gz: 27df10c05d066cf96d34b4d6c7e67701a4d9a53a5662535215e0489861d3a4b9
3
+ metadata.gz: 6f4b613a0c93e9ea9f7a8bf871be047d304cd0bca3b74cf0087dd1a108669cab
4
+ data.tar.gz: 7e903e4afbe0b1b634c83182efa9717de20a393a35685aaf18699ec565aee72e
5
5
  SHA512:
6
- metadata.gz: b7265019730f3b3b5620a0502f416cf74705f711df7fb49228b699d98a59efe9666293cccb314f41afe3a3a79d72e9ea2758465ba37a4af5bcc384f4291d0191
7
- data.tar.gz: f1498dc9304a8c8f88bf10540142708cf1b094aa58865a0755d47894d2ec9fc0d9adb16c4cc5d8b5797cc7dc3b258388b0a6954865472fafee6df8b95b18a825
6
+ metadata.gz: d05f179882ed0090b7e2ab180c91c9ed01bbb101c3a9d169fc9b9ddf6ce1ade2892f8b01b27eaa3d342ddaadb60e797d06e45e91952e20861a498b46c3b72936
7
+ data.tar.gz: 2502e19639d64471221a0693854a5a9bc67e2821284d94ce707dd04d3bb1ea3d0d1a423736ce0538379935ad99b4b27d2bf4a32330d7a56ca6a52666c8d619f2
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- aly (0.3.2)
4
+ aly (0.3.3)
5
5
  terminal-table (~> 1.8.0)
6
6
  thor (~> 0.20.0)
7
7
 
data/lib/aly/app.rb CHANGED
@@ -35,7 +35,20 @@ module Aly
35
35
  end
36
36
  end
37
37
 
38
- if options['detail']
38
+ if options['full']
39
+ selected = selected.map do |row|
40
+ {
41
+ Id: row['InstanceId'],
42
+ Name: row['InstanceName'],
43
+ PrivateIP: row['PrivateIP'],
44
+ PublicIP: row['PublicIP'],
45
+ CPU: row['Cpu'],
46
+ RAM: "#{row['Memory'] / 1024.0} GB",
47
+ WEB: "https://ecs.console.aliyun.com/#/server/#{row['InstanceId']}/monitor?regionId=#{row['RegionId']}"
48
+ }
49
+ end
50
+ puts selected.table&.to_s
51
+ elsif options['detail']
39
52
  puts JSON.pretty_generate(selected)
40
53
  else
41
54
  selected = selected.map do |row|
@@ -104,7 +117,8 @@ module Aly
104
117
  Name: lb['LoadBalancerName'],
105
118
  Address: lb['Address'],
106
119
  Eip: lb['Eip'],
107
- Listeners: listeners.size
120
+ Listeners: listeners.size,
121
+ WEB: "https://slb.console.aliyun.com/slb/#{lb['RegionId']}/slbs/#{lb['LoadBalancerId']}/listeners"
108
122
  }].table.to_s.gsub(/^/, ' '))
109
123
  puts
110
124
 
data/lib/aly/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Aly
4
- VERSION = "0.3.2"
4
+ VERSION = "0.3.3"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Liu Xiang