cloudmunch_sdk 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/cloudmunch/AppAbstract.rb +151 -0
- data/lib/cloudmunch/AppContext.rb +17 -0
- data/lib/cloudmunch/CloudmunchService.rb +57 -0
- data/lib/cloudmunch/README.md +2 -0
- data/lib/cloudmunch/ServiceProvider.rb +17 -0
- data/lib/cloudmunch/Util.rb +162 -0
- data/lib/cloudmunch/UtilJira.rb +58 -0
- data/lib/cloudmunch/templates/costview_meta.json +22 -0
- data/lib/cloudmunch/templates/coverageview_meta.json +34 -0
- data/lib/cloudmunch/templates/defecttrendview_meta.json +67 -0
- data/lib/cloudmunch/templates/ilityview_meta.json +66 -0
- data/lib/cloudmunch/templates/inboundoutboundview_meta.json +67 -0
- data/lib/cloudmunch/templates/riskview_meta.json +19 -0
- data/lib/cloudmunch/templates/scopeview_meta.json +60 -0
- data/lib/cloudmunch/templates/timeview_meta.json +60 -0
- data/lib/cloudmunch/templates/velocityview_meta.json +22 -0
- data/lib/cloudmunch/version.rb +3 -0
- data/lib/cloudmunch.rb +5 -0
- metadata +119 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 31766e1ced5c1eba596f0f7d77c6c3444b25b52c
|
4
|
+
data.tar.gz: 58e3449264145fb950a2b8d0c9c99a728b2a3f48
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a7689c9206f0283a42f5d8506d563f08d5451d17e098ff5f2f38a118319f65ba6c53f8c2b98fcd757e724eb92053196ad4d3beca660de50d728eb4daaab3ca3e
|
7
|
+
data.tar.gz: 7de4cbf451cf9b3f9f8df89e773eea527b35da5b6c599063b6f491d71db8ba555e0c9e4295bf18864409bf809a20215b249c1943e916b8d6533018636032e6fc
|
@@ -0,0 +1,151 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
$LOAD_PATH << '.'
|
3
|
+
|
4
|
+
require_relative "CloudmunchService"
|
5
|
+
require_relative "Util"
|
6
|
+
require_relative "ServiceProvider"
|
7
|
+
require_relative "AppContext"
|
8
|
+
|
9
|
+
class AppAbstract
|
10
|
+
include CloudmunchService
|
11
|
+
include Util
|
12
|
+
|
13
|
+
@@config_path = ENV["SDK_CONFIG_PATH"]+"/sdk_config.json"
|
14
|
+
@@config = nil
|
15
|
+
|
16
|
+
def initialize(param = nil)
|
17
|
+
@domain, @project, @logfile = "", "", ""
|
18
|
+
end
|
19
|
+
|
20
|
+
|
21
|
+
def logInit(log_level = "DEBUG")
|
22
|
+
@logger = @logger ? @logger : Util.logInit()
|
23
|
+
@log_level = log_level
|
24
|
+
end
|
25
|
+
|
26
|
+
def log(level,logString)
|
27
|
+
if !@logger.nil?
|
28
|
+
logInit("DEBUG")
|
29
|
+
end
|
30
|
+
Util.logIt(@logger, @log_level, level, logString)
|
31
|
+
end
|
32
|
+
|
33
|
+
|
34
|
+
def logClose()
|
35
|
+
Util.logClose(@logger)
|
36
|
+
end
|
37
|
+
|
38
|
+
def getJSONArgs()
|
39
|
+
@json_input = Util.getJSONArgs()
|
40
|
+
end
|
41
|
+
|
42
|
+
def openJSONFile(fileNameWithPath)
|
43
|
+
Util.openJSONFile(fileNameWithPath)
|
44
|
+
end
|
45
|
+
|
46
|
+
def generateReport(reportFilename, reportString)
|
47
|
+
Util.generateReport(reportFilename, reportString)
|
48
|
+
end
|
49
|
+
|
50
|
+
def getServiceProvider(param = nil)
|
51
|
+
@json_input = @json_input ? @json_input : getJSONArgs()
|
52
|
+
serviceProvider = ServiceProvider.new(@json_input["providername"])
|
53
|
+
serviceProvider.load_data(@json_input)
|
54
|
+
return serviceProvider
|
55
|
+
end
|
56
|
+
|
57
|
+
def getAppContext(param = nil)
|
58
|
+
@json_input = @json_input ? @json_input : getJSONArgs()
|
59
|
+
appContext = AppContext.new(@json_input)
|
60
|
+
return appContext
|
61
|
+
end
|
62
|
+
|
63
|
+
def getDataContextFromCMDB(param)
|
64
|
+
appContext = getAppContext()
|
65
|
+
params = {
|
66
|
+
"username" => @@config['username'],
|
67
|
+
"customcontext" => param["job"] + "_" + param["context"],
|
68
|
+
"action" => "listcustomcontext"
|
69
|
+
}
|
70
|
+
param.delete("context")
|
71
|
+
params = param.merge(params)
|
72
|
+
|
73
|
+
return CloudmunchService.getDataContext(appContext.get_data('masterurl'), @@config["endpoint"], params)
|
74
|
+
end
|
75
|
+
|
76
|
+
def updateDataContextToCMDB(param)
|
77
|
+
appContext = getAppContext()
|
78
|
+
params = {
|
79
|
+
"username" => @@config['username'],
|
80
|
+
"customcontext" => param["job"] + "_" + param["context"],
|
81
|
+
"action" => "updatecustomcontext"
|
82
|
+
}
|
83
|
+
param.delete("context")
|
84
|
+
params = param.merge(params)
|
85
|
+
return CloudmunchService.updateDataContext(appContext.get_data('masterurl'), @@config['endpoint'], params)
|
86
|
+
end
|
87
|
+
|
88
|
+
|
89
|
+
# def getActiveSprint(param)
|
90
|
+
# params = {
|
91
|
+
# "username" => @@config['username']
|
92
|
+
# }
|
93
|
+
|
94
|
+
# params = param.merge(params)
|
95
|
+
# Util.getActiveSprint(@@config['master_url'], @@config['endpoint'], params)
|
96
|
+
# end
|
97
|
+
#
|
98
|
+
# def getSortedSprints(param)
|
99
|
+
# params = {
|
100
|
+
# "username" => @@config['username']
|
101
|
+
# }
|
102
|
+
#
|
103
|
+
# params = param.merge(params)
|
104
|
+
#
|
105
|
+
# Util.getSortedSprints(@@config['master_url'], @@config['endpoint'], params)
|
106
|
+
# end
|
107
|
+
#
|
108
|
+
# def getUrlForViewCards(param)
|
109
|
+
# params = {
|
110
|
+
# "username" => @@config['username']
|
111
|
+
# }
|
112
|
+
#
|
113
|
+
# params = param.merge(params)
|
114
|
+
#
|
115
|
+
# Util.getUrlForViewCards(@@config['master_url'], @@config['endpoint'], params)
|
116
|
+
# end
|
117
|
+
|
118
|
+
def getCMContext(context)
|
119
|
+
begin
|
120
|
+
return @@config[context+"_context"]
|
121
|
+
rescue
|
122
|
+
return false
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
126
|
+
def load_config()
|
127
|
+
@@config = openJSONFile(@@config_path)
|
128
|
+
end
|
129
|
+
|
130
|
+
def initializeApp()
|
131
|
+
puts "initializeApp from AppAbstract"
|
132
|
+
end
|
133
|
+
|
134
|
+
def process()
|
135
|
+
puts "process func from AppAbstract"
|
136
|
+
end
|
137
|
+
|
138
|
+
def cleanupApp()
|
139
|
+
puts "cleanupApp from AppAbstract"
|
140
|
+
end
|
141
|
+
|
142
|
+
def start()
|
143
|
+
load_config()
|
144
|
+
initializeApp()
|
145
|
+
process()
|
146
|
+
cleanupApp()
|
147
|
+
end
|
148
|
+
|
149
|
+
private :load_config
|
150
|
+
|
151
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
|
3
|
+
require 'net/http'
|
4
|
+
require 'cgi'
|
5
|
+
|
6
|
+
require_relative "Util"
|
7
|
+
|
8
|
+
module CloudmunchService
|
9
|
+
include Util
|
10
|
+
|
11
|
+
|
12
|
+
def self.putCustomDataContext(server, endpoint, param)
|
13
|
+
result = self.http_post(server, endpoint, param)
|
14
|
+
p result.code.to_s
|
15
|
+
if result.code.to_s == "200"
|
16
|
+
return true
|
17
|
+
else
|
18
|
+
return false
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
|
23
|
+
def self.getCustomDataContext(server, endpoint, param)
|
24
|
+
return self.http_get(server, endpoint, param)
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.http_get(server,path,params)
|
28
|
+
if params.nil?
|
29
|
+
return Net::HTTP.get(server, path)
|
30
|
+
else
|
31
|
+
queryStr = "#{path}?".concat(params.collect { |k,v| "#{k}=#{CGI::escape(v.to_s)}" }.join('&'))
|
32
|
+
puts ("SDKDEBUG: Calling URL " + server+queryStr)
|
33
|
+
uri = URI(server + "/" + queryStr)
|
34
|
+
return Net::HTTP.get(uri)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
def self.http_post(server,path,params)
|
39
|
+
queryStr = "#{path}?".concat(params.collect { |k,v| "#{k}=#{CGI::escape(v.to_s)}" }.join('&'))
|
40
|
+
log("SDKDEBUG: Calling URL " + server+queryStr)
|
41
|
+
if params.nil?
|
42
|
+
return Net::HTTP.post(server, path)
|
43
|
+
else
|
44
|
+
uri = URI(server + path)
|
45
|
+
return Net::HTTP.post_form(uri, params)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
def self.getDataContext(server, endpoint, param)
|
50
|
+
getCustomDataContext(server, endpoint, param)
|
51
|
+
end
|
52
|
+
|
53
|
+
|
54
|
+
def self.updateDataContext(server, endpoint, param)
|
55
|
+
putCustomDataContext(server, endpoint, param)
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
class ServiceProvider
|
4
|
+
|
5
|
+
def initialize(providername)
|
6
|
+
@providername = providername
|
7
|
+
end
|
8
|
+
|
9
|
+
def load_data(param)
|
10
|
+
@SP_data = JSON.parse(param["cloudproviders"])[@providername]
|
11
|
+
end
|
12
|
+
|
13
|
+
def get_data(keyname)
|
14
|
+
@SP_data[keyname]
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
@@ -0,0 +1,162 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
require 'logger'
|
3
|
+
require 'json'
|
4
|
+
|
5
|
+
|
6
|
+
|
7
|
+
module Util
|
8
|
+
def Util.logInit()
|
9
|
+
logger = Logger.new(STDOUT)
|
10
|
+
return logger
|
11
|
+
end
|
12
|
+
|
13
|
+
def Util.log(logger, level, logString)
|
14
|
+
case level
|
15
|
+
when "fatal"
|
16
|
+
logger.fatal(logString)
|
17
|
+
when "errror"
|
18
|
+
logger.error(logString)
|
19
|
+
when "warn"
|
20
|
+
logger.warn(logString)
|
21
|
+
when "info"
|
22
|
+
logger.info(logString)
|
23
|
+
when "debug"
|
24
|
+
logger.debug(logString)
|
25
|
+
else
|
26
|
+
logger.unknown(logString)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
def Util.logIt(logger, log_level, log_level_string, messageString)
|
31
|
+
case log_level
|
32
|
+
when "debug"
|
33
|
+
if "warning".eql? log_level_string or "info".eql? log_level_string or "error".eql? log_level_string or "debug".eql? log_level_string
|
34
|
+
log(logger, "debug", messageString)
|
35
|
+
end
|
36
|
+
when "error"
|
37
|
+
if "warning".eql? log_level_string or "info".eql? log_level_string or "error".eql? log_level_string
|
38
|
+
log(logger, "error", messageString)
|
39
|
+
end
|
40
|
+
when "info"
|
41
|
+
if "warning".eql? log_level_string or "info".eql? log_level_string
|
42
|
+
log(logger, "info", messageString)
|
43
|
+
end
|
44
|
+
when "warn"
|
45
|
+
if "warn".eql? log_level_string
|
46
|
+
log(logger, "warn", messageString)
|
47
|
+
end
|
48
|
+
else
|
49
|
+
log(logger, "unknown", messageString)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
def Util.logClose(logger)
|
54
|
+
logger.close
|
55
|
+
end
|
56
|
+
|
57
|
+
|
58
|
+
def Util.getJSONArgsTEMP(jsonString)
|
59
|
+
JSON.parse(jsonString)
|
60
|
+
end
|
61
|
+
|
62
|
+
def Util.getJSONArgs()
|
63
|
+
jsonin = nil
|
64
|
+
loop { case ARGV[0]
|
65
|
+
when '-jsoninput' then ARGV.shift; jsonin = ARGV.shift
|
66
|
+
when /^-/ then usage("Unknown option: #{ARGV[0].inspect}")
|
67
|
+
else break
|
68
|
+
end; }
|
69
|
+
return JSON.load(jsonin);
|
70
|
+
end
|
71
|
+
|
72
|
+
def Util.openJSONFile(fileNameWithPath)
|
73
|
+
begin
|
74
|
+
config = JSON.load(File.open(fileNameWithPath))
|
75
|
+
return config
|
76
|
+
rescue
|
77
|
+
return false
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
def Util.generateReport(reportFileName, reportContent)
|
82
|
+
begin
|
83
|
+
fp=File.new(reportFileName, 'w')
|
84
|
+
fp.write(reportContent)
|
85
|
+
fp.close
|
86
|
+
return true
|
87
|
+
rescue
|
88
|
+
log("DEBUG", "Could not open output file #{input_json['reporthtml']} Check that the files exists and you have permissions to open the file!")
|
89
|
+
# exit 1
|
90
|
+
return false
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
# def Util.getSortedSprints(server, endpoint, params)
|
95
|
+
# sprints = []
|
96
|
+
# sname_by_sequence = {}
|
97
|
+
# tseq = []
|
98
|
+
|
99
|
+
# newParam = {
|
100
|
+
# :action => 'listcustomcontext',
|
101
|
+
# :fields => 'sequence, sprint_id',
|
102
|
+
# :group_by => 'sequence',
|
103
|
+
# :count => '*'
|
104
|
+
# }
|
105
|
+
|
106
|
+
# newParam = params.merge(newParam)
|
107
|
+
# cqlQuery = CloudmunchService.getDataContext(server, endpoint, newParam)
|
108
|
+
# cqlQuery = JSON.parse(cqlQuery)
|
109
|
+
# cqlQuery.each do |v|
|
110
|
+
# # puts v[1]
|
111
|
+
# tseq << v[1]['sequence'].to_i
|
112
|
+
# sname_by_sequence[v[1]['sequence'].to_i] = v[1]['sprint_id']
|
113
|
+
# end
|
114
|
+
|
115
|
+
# tseq.sort!.each do |y|
|
116
|
+
# sprints << sname_by_sequence[y]
|
117
|
+
# end
|
118
|
+
|
119
|
+
# return sprints
|
120
|
+
# end
|
121
|
+
|
122
|
+
# def Util.getActiveSprint(server, endpoint, params)
|
123
|
+
# sprints = []
|
124
|
+
|
125
|
+
# newParam = {
|
126
|
+
# :action => "listcustomcontext",
|
127
|
+
# :fields => "sprint_id,sprint_status",
|
128
|
+
# :sort_by => "sprint_status",
|
129
|
+
# :count => "*",
|
130
|
+
# }
|
131
|
+
|
132
|
+
# newParam = params.merge(newParam)
|
133
|
+
# cqlQuery = CloudmunchService.getDataContext(server, endpoint, newParam)
|
134
|
+
# cqlQuery = JSON.parse(cqlQuery)
|
135
|
+
# sprint = nil
|
136
|
+
# cqlQuery.each do |x|
|
137
|
+
# if(x['sprint_status'] == 'ACTIVE')
|
138
|
+
# sprint = x['sprint_id']
|
139
|
+
# end
|
140
|
+
# end
|
141
|
+
# return sprint
|
142
|
+
# end
|
143
|
+
def Util.getUrlForViewCards(server, endpoint, params)
|
144
|
+
newParam = {
|
145
|
+
:action => "listcustomcontext",
|
146
|
+
:fields => "*",
|
147
|
+
}
|
148
|
+
|
149
|
+
newParam = params.merge(newParam)
|
150
|
+
cqlQuery = CloudmunchService.getDataContext(server, endpoint, newParam)
|
151
|
+
cqlQuery = JSON.parse(cqlQuery)
|
152
|
+
if !cqlQuery[0].nil? && !cqlQuery[0]["url"].nil?
|
153
|
+
url = cqlQuery[0]["url"]
|
154
|
+
else
|
155
|
+
url = ""
|
156
|
+
end
|
157
|
+
|
158
|
+
return url
|
159
|
+
end
|
160
|
+
|
161
|
+
end
|
162
|
+
|
@@ -0,0 +1,58 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
require 'json'
|
3
|
+
require 'CloudmunchService'
|
4
|
+
|
5
|
+
module UtilJira
|
6
|
+
|
7
|
+
def UtilJira.getSortedSprints(server, endpoint, params)
|
8
|
+
sprints = []
|
9
|
+
sname_by_sequence = {}
|
10
|
+
tseq = []
|
11
|
+
|
12
|
+
newParam = {
|
13
|
+
:action => 'listcustomcontext',
|
14
|
+
:fields => 'sequence, sprint_id',
|
15
|
+
:group_by => 'sequence',
|
16
|
+
:count => '*'
|
17
|
+
}
|
18
|
+
|
19
|
+
newParam = params.merge(newParam)
|
20
|
+
cqlQuery = CloudmunchService.getDataContext(server, endpoint, newParam)
|
21
|
+
cqlQuery = JSON.parse(cqlQuery)
|
22
|
+
cqlQuery.each do |v|
|
23
|
+
# puts v[1]
|
24
|
+
tseq << v[1]['sequence'].to_i
|
25
|
+
sname_by_sequence[v[1]['sequence'].to_i] = v[1]['sprint_id']
|
26
|
+
end
|
27
|
+
|
28
|
+
tseq.sort!.each do |y|
|
29
|
+
sprints << sname_by_sequence[y]
|
30
|
+
end
|
31
|
+
|
32
|
+
return sprints
|
33
|
+
end
|
34
|
+
|
35
|
+
def UtilJira.getActiveSprint(server, endpoint, params)
|
36
|
+
sprints = []
|
37
|
+
|
38
|
+
newParam = {
|
39
|
+
:action => "listcustomcontext",
|
40
|
+
:fields => "sprint_id,sprint_status",
|
41
|
+
:sort_by => "sprint_status",
|
42
|
+
:count => "*",
|
43
|
+
}
|
44
|
+
|
45
|
+
newParam = params.merge(newParam)
|
46
|
+
cqlQuery = CloudmunchService.getDataContext(server, endpoint, newParam)
|
47
|
+
cqlQuery = JSON.parse(cqlQuery)
|
48
|
+
sprint = nil
|
49
|
+
cqlQuery.each do |x|
|
50
|
+
if(x['sprint_status'] == 'ACTIVE')
|
51
|
+
sprint = x['sprint_id']
|
52
|
+
end
|
53
|
+
end
|
54
|
+
return sprint
|
55
|
+
end
|
56
|
+
|
57
|
+
|
58
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
{
|
2
|
+
"name":{"label": "Cost Performance", "color":"grey", "x":100, "y":10},
|
3
|
+
"date":"12 April 2015",
|
4
|
+
"source": "JIRA",
|
5
|
+
|
6
|
+
"plots":{
|
7
|
+
"cost_data":{
|
8
|
+
"type":"line",
|
9
|
+
"xaxis":{"label": "Sprints", "color":"black", "placement":"bottom","data":{"domain":{"factor":"1.5"}} } ,
|
10
|
+
"yaxis":{"label": "In Millions (USD)", "color":"black", "placement":"left", "plots":["cost_data"], "data":{"domain":{"data":["100", "1000"]}} },
|
11
|
+
"plots":{
|
12
|
+
"x":["label"],
|
13
|
+
"y":["Budget","Planned","Actual"],
|
14
|
+
"ystart": "0",
|
15
|
+
"Budget":{"color":"blue", "points":{} },
|
16
|
+
"Planned":{"color":"green", "points":{} },
|
17
|
+
"Actual":{"color":"red", "points":{} }
|
18
|
+
}
|
19
|
+
}
|
20
|
+
},
|
21
|
+
"dimensions":{"height":310, "width":400}
|
22
|
+
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
{
|
2
|
+
"name":{"label": "Code Coverage", "color":"black", "x":120, "y":10},
|
3
|
+
"date":"12 April 2015",
|
4
|
+
"source": "JIRA",
|
5
|
+
"plots":{
|
6
|
+
"coverage_data":{
|
7
|
+
"type":"line",
|
8
|
+
"xaxis": {
|
9
|
+
"label": "",
|
10
|
+
"color": "black",
|
11
|
+
"placement": "bottom",
|
12
|
+
"data": {
|
13
|
+
"domain": {
|
14
|
+
"factor": "1.5"
|
15
|
+
}
|
16
|
+
}
|
17
|
+
},
|
18
|
+
"yaxis": {
|
19
|
+
"label": "% Coverage",
|
20
|
+
"color": "black",
|
21
|
+
"placement": "left"
|
22
|
+
},
|
23
|
+
"plots": {
|
24
|
+
"x": [
|
25
|
+
],
|
26
|
+
"y": [
|
27
|
+
],
|
28
|
+
"ystart": "0"
|
29
|
+
}
|
30
|
+
}
|
31
|
+
|
32
|
+
},
|
33
|
+
"dimensions":{"width":400, "height":310}
|
34
|
+
}
|
@@ -0,0 +1,67 @@
|
|
1
|
+
{
|
2
|
+
"name": {
|
3
|
+
"label": "Defect",
|
4
|
+
"color": "grey",
|
5
|
+
"x": 40,
|
6
|
+
"y": 10
|
7
|
+
},
|
8
|
+
"date": "12 April 2015",
|
9
|
+
"source": "JIRA",
|
10
|
+
"plots": {
|
11
|
+
"io_data": {
|
12
|
+
"type": "line",
|
13
|
+
"xaxis": {
|
14
|
+
"label": "Days",
|
15
|
+
"color": "black",
|
16
|
+
"placement": "bottom",
|
17
|
+
"data": {
|
18
|
+
"domain": {
|
19
|
+
"factor": "1.5"
|
20
|
+
}
|
21
|
+
}
|
22
|
+
},
|
23
|
+
"yaxis": {
|
24
|
+
"label": "Number of Defects",
|
25
|
+
"color": "black",
|
26
|
+
"placement": "left",
|
27
|
+
"plots": [
|
28
|
+
"io_data"
|
29
|
+
],
|
30
|
+
"data": {
|
31
|
+
"domain": {
|
32
|
+
"data": [
|
33
|
+
"100",
|
34
|
+
"1000"
|
35
|
+
]
|
36
|
+
}
|
37
|
+
}
|
38
|
+
},
|
39
|
+
"plots": {
|
40
|
+
"x": [
|
41
|
+
"label"
|
42
|
+
],
|
43
|
+
"y": [
|
44
|
+
"Inbound",
|
45
|
+
"Outbound"
|
46
|
+
],
|
47
|
+
"ystart": "0",
|
48
|
+
"Budget": {
|
49
|
+
"color": "blue",
|
50
|
+
"points": {}
|
51
|
+
},
|
52
|
+
"Planned": {
|
53
|
+
"color": "green",
|
54
|
+
"points": {}
|
55
|
+
},
|
56
|
+
"Actual": {
|
57
|
+
"color": "red",
|
58
|
+
"points": {}
|
59
|
+
}
|
60
|
+
}
|
61
|
+
}
|
62
|
+
},
|
63
|
+
"dimensions": {
|
64
|
+
"height": 310,
|
65
|
+
"width": 400
|
66
|
+
}
|
67
|
+
}
|
@@ -0,0 +1,66 @@
|
|
1
|
+
{
|
2
|
+
"name": {
|
3
|
+
"label": "Ility Score Card1",
|
4
|
+
"color": "grey",
|
5
|
+
"x": 100,
|
6
|
+
"y": 10
|
7
|
+
},
|
8
|
+
"date": "30 April 2015",
|
9
|
+
"source": "XLS",
|
10
|
+
"plots": {
|
11
|
+
"ility_data": {
|
12
|
+
"type": "line",
|
13
|
+
"xaxis": {
|
14
|
+
"label": "Days",
|
15
|
+
"color": "black",
|
16
|
+
"placement": "bottom",
|
17
|
+
"data": {
|
18
|
+
"domain": {
|
19
|
+
"factor": "1.5"
|
20
|
+
}
|
21
|
+
}
|
22
|
+
},
|
23
|
+
"yaxis": {
|
24
|
+
"label": "PI-Score",
|
25
|
+
"color": "black",
|
26
|
+
"placement": "left",
|
27
|
+
"plots": [
|
28
|
+
"ility_data"
|
29
|
+
],
|
30
|
+
"data": {
|
31
|
+
"domain": {
|
32
|
+
"data": [
|
33
|
+
"100",
|
34
|
+
"1000"
|
35
|
+
]
|
36
|
+
}
|
37
|
+
}
|
38
|
+
},
|
39
|
+
"plots": {
|
40
|
+
"x": [
|
41
|
+
"label"
|
42
|
+
],
|
43
|
+
"y": [
|
44
|
+
"PI-Score"
|
45
|
+
],
|
46
|
+
"ystart": "0",
|
47
|
+
"Budget": {
|
48
|
+
"color": "blue",
|
49
|
+
"points": {}
|
50
|
+
},
|
51
|
+
"Planned": {
|
52
|
+
"color": "green",
|
53
|
+
"points": {}
|
54
|
+
},
|
55
|
+
"Actual": {
|
56
|
+
"color": "red",
|
57
|
+
"points": {}
|
58
|
+
}
|
59
|
+
}
|
60
|
+
}
|
61
|
+
},
|
62
|
+
"dimensions": {
|
63
|
+
"height": 310,
|
64
|
+
"width": 400
|
65
|
+
}
|
66
|
+
}
|
@@ -0,0 +1,67 @@
|
|
1
|
+
{
|
2
|
+
"name": {
|
3
|
+
"label": "Defect Inflow/Burn",
|
4
|
+
"color": "grey",
|
5
|
+
"x": 90,
|
6
|
+
"y": 10
|
7
|
+
},
|
8
|
+
"date": "12 April 2015",
|
9
|
+
"source": "JIRA",
|
10
|
+
"plots": {
|
11
|
+
"io_data": {
|
12
|
+
"type": "line",
|
13
|
+
"xaxis": {
|
14
|
+
"label": "Days",
|
15
|
+
"color": "black",
|
16
|
+
"placement": "bottom",
|
17
|
+
"data": {
|
18
|
+
"domain": {
|
19
|
+
"factor": "1.5"
|
20
|
+
}
|
21
|
+
}
|
22
|
+
},
|
23
|
+
"yaxis": {
|
24
|
+
"label": "Number of Defects",
|
25
|
+
"color": "black",
|
26
|
+
"placement": "left",
|
27
|
+
"plots": [
|
28
|
+
"io_data"
|
29
|
+
],
|
30
|
+
"data": {
|
31
|
+
"domain": {
|
32
|
+
"data": [
|
33
|
+
"100",
|
34
|
+
"1000"
|
35
|
+
]
|
36
|
+
}
|
37
|
+
}
|
38
|
+
},
|
39
|
+
"plots": {
|
40
|
+
"x": [
|
41
|
+
"label"
|
42
|
+
],
|
43
|
+
"y": [
|
44
|
+
"Inbound",
|
45
|
+
"Outbound"
|
46
|
+
],
|
47
|
+
"ystart": "0",
|
48
|
+
"Budget": {
|
49
|
+
"color": "blue",
|
50
|
+
"points": {}
|
51
|
+
},
|
52
|
+
"Planned": {
|
53
|
+
"color": "green",
|
54
|
+
"points": {}
|
55
|
+
},
|
56
|
+
"Actual": {
|
57
|
+
"color": "red",
|
58
|
+
"points": {}
|
59
|
+
}
|
60
|
+
}
|
61
|
+
}
|
62
|
+
},
|
63
|
+
"dimensions": {
|
64
|
+
"height": 310,
|
65
|
+
"width": 400
|
66
|
+
}
|
67
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
{
|
2
|
+
"name":{"label": "Risk", "color":"grey", "x":120, "y":10},
|
3
|
+
"date":"12 April 2015",
|
4
|
+
"source": "JIRA",
|
5
|
+
"plots":{
|
6
|
+
"risk_data":{
|
7
|
+
"type":"doughnut",
|
8
|
+
"plots":{
|
9
|
+
"sections":["Critical", "Warning", "Trivial"],
|
10
|
+
"Critical":{"color":"green"},
|
11
|
+
"Warning":{"color":"blue"},
|
12
|
+
"Trivial":{"color":"yellow"},
|
13
|
+
"x":"140",
|
14
|
+
"y":"120"
|
15
|
+
}
|
16
|
+
}
|
17
|
+
},
|
18
|
+
"dimensions":{"height":310, "width":400}
|
19
|
+
}
|
@@ -0,0 +1,60 @@
|
|
1
|
+
{
|
2
|
+
"name": {
|
3
|
+
"label": "Scope",
|
4
|
+
"color": "grey",
|
5
|
+
"x": 120,
|
6
|
+
"y": 10
|
7
|
+
},
|
8
|
+
"date": "12 April 2015",
|
9
|
+
"source": "JIRA",
|
10
|
+
"plots": {
|
11
|
+
"scope_data": {
|
12
|
+
"type": "area_y",
|
13
|
+
"xaxis": {
|
14
|
+
"label": "Sprints",
|
15
|
+
"color": "black",
|
16
|
+
"placement": "bottom",
|
17
|
+
"data": {"domain": {"factor": "1.5"}}
|
18
|
+
},
|
19
|
+
"yaxis": {
|
20
|
+
"label": "Story Type",
|
21
|
+
"color": "black",
|
22
|
+
"placement": "left",
|
23
|
+
"plots": ["scope_data"],
|
24
|
+
"data": {
|
25
|
+
"domain": {
|
26
|
+
"data": [
|
27
|
+
"100",
|
28
|
+
"1000"
|
29
|
+
]
|
30
|
+
}
|
31
|
+
}
|
32
|
+
},
|
33
|
+
"plots": {
|
34
|
+
"x": ["label"],
|
35
|
+
"y": [
|
36
|
+
"Budget",
|
37
|
+
"Planned",
|
38
|
+
"Actual"
|
39
|
+
],
|
40
|
+
"ystart": "0",
|
41
|
+
"Budget": {
|
42
|
+
"color": "blue",
|
43
|
+
"points": {}
|
44
|
+
},
|
45
|
+
"Planned": {
|
46
|
+
"color": "green",
|
47
|
+
"points": {}
|
48
|
+
},
|
49
|
+
"Actual": {
|
50
|
+
"color": "red",
|
51
|
+
"points": {}
|
52
|
+
}
|
53
|
+
}
|
54
|
+
}
|
55
|
+
},
|
56
|
+
"dimensions": {
|
57
|
+
"height": 310,
|
58
|
+
"width": 400
|
59
|
+
}
|
60
|
+
}
|
@@ -0,0 +1,60 @@
|
|
1
|
+
{
|
2
|
+
"name": {
|
3
|
+
"label": "Sprint Burn-Up",
|
4
|
+
"color": "#d3d3d3",
|
5
|
+
"x": 120,
|
6
|
+
"y": 10
|
7
|
+
},
|
8
|
+
"date": "12 April 2015",
|
9
|
+
"source": "JIRA",
|
10
|
+
"plots": {
|
11
|
+
"time_data": {
|
12
|
+
"type": "line",
|
13
|
+
"xaxis": {
|
14
|
+
"label": "Sprints",
|
15
|
+
"color": "black",
|
16
|
+
"placement": "bottom",
|
17
|
+
"data": {"domain": {"factor": "1.5"}}
|
18
|
+
},
|
19
|
+
"yaxis": {
|
20
|
+
"label": "Story Points",
|
21
|
+
"color": "black",
|
22
|
+
"placement": "left",
|
23
|
+
"plots": ["time_data"],
|
24
|
+
"data": {
|
25
|
+
"domain": {
|
26
|
+
"data": [
|
27
|
+
"100",
|
28
|
+
"1000"
|
29
|
+
]
|
30
|
+
}
|
31
|
+
}
|
32
|
+
},
|
33
|
+
"plots": {
|
34
|
+
"x": ["label"],
|
35
|
+
"y": [
|
36
|
+
"Budget",
|
37
|
+
"Planned",
|
38
|
+
"Actual"
|
39
|
+
],
|
40
|
+
"ystart": "0",
|
41
|
+
"Budget": {
|
42
|
+
"color": "blue",
|
43
|
+
"points": {}
|
44
|
+
},
|
45
|
+
"Planned": {
|
46
|
+
"color": "green",
|
47
|
+
"points": {}
|
48
|
+
},
|
49
|
+
"Actual": {
|
50
|
+
"color": "red",
|
51
|
+
"points": {}
|
52
|
+
}
|
53
|
+
}
|
54
|
+
}
|
55
|
+
},
|
56
|
+
"dimensions": {
|
57
|
+
"height": 310,
|
58
|
+
"width": 400
|
59
|
+
}
|
60
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
{
|
2
|
+
"name":{"label": "Velocity", "color":"grey", "x":120, "y":10},
|
3
|
+
"date":"12 April 2015",
|
4
|
+
"source": "JIRA",
|
5
|
+
|
6
|
+
"plots":{
|
7
|
+
"velocity_data":{
|
8
|
+
"type":"line",
|
9
|
+
"xaxis":{"label": "Sprints", "color":"black", "placement":"bottom","data":{"domain":{"factor":"1.5"}} } ,
|
10
|
+
"yaxis":{"label": "Story Points", "color":"black", "placement":"left", "plots":["velocity_data"], "data":{"domain":{"data":["100", "1000"]}} },
|
11
|
+
"plots":{
|
12
|
+
"x":["label"],
|
13
|
+
"y":["Budget","Planned","Actual"],
|
14
|
+
"ystart": "0",
|
15
|
+
"Budget":{"color":"blue", "points":{} },
|
16
|
+
"Planned":{"color":"green", "points":{} },
|
17
|
+
"Actual":{"color":"red", "points":{} }
|
18
|
+
}
|
19
|
+
}
|
20
|
+
},
|
21
|
+
"dimensions":{"height":310, "width":400}
|
22
|
+
}
|
data/lib/cloudmunch.rb
ADDED
metadata
ADDED
@@ -0,0 +1,119 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: cloudmunch_sdk
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.3.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- syamk
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-09-03 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: json
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: logger
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.10'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.10'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '10.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ~>
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '10.0'
|
69
|
+
description: Cloudmunch Ruby SDK to build plugins for cloudmunch platform.
|
70
|
+
email:
|
71
|
+
- syamk@cloudmunch.com
|
72
|
+
executables: []
|
73
|
+
extensions: []
|
74
|
+
extra_rdoc_files: []
|
75
|
+
files:
|
76
|
+
- lib/cloudmunch/AppAbstract.rb
|
77
|
+
- lib/cloudmunch/AppContext.rb
|
78
|
+
- lib/cloudmunch/CloudmunchService.rb
|
79
|
+
- lib/cloudmunch/README.md
|
80
|
+
- lib/cloudmunch/ServiceProvider.rb
|
81
|
+
- lib/cloudmunch/templates/costview_meta.json
|
82
|
+
- lib/cloudmunch/templates/coverageview_meta.json
|
83
|
+
- lib/cloudmunch/templates/defecttrendview_meta.json
|
84
|
+
- lib/cloudmunch/templates/ilityview_meta.json
|
85
|
+
- lib/cloudmunch/templates/inboundoutboundview_meta.json
|
86
|
+
- lib/cloudmunch/templates/riskview_meta.json
|
87
|
+
- lib/cloudmunch/templates/scopeview_meta.json
|
88
|
+
- lib/cloudmunch/templates/timeview_meta.json
|
89
|
+
- lib/cloudmunch/templates/velocityview_meta.json
|
90
|
+
- lib/cloudmunch/Util.rb
|
91
|
+
- lib/cloudmunch/UtilJira.rb
|
92
|
+
- lib/cloudmunch/version.rb
|
93
|
+
- lib/cloudmunch.rb
|
94
|
+
homepage: https://rubygems.org/gems/cloudmunch
|
95
|
+
licenses:
|
96
|
+
- MIT
|
97
|
+
metadata:
|
98
|
+
allowed_push_host: https://rubygems.org
|
99
|
+
post_install_message:
|
100
|
+
rdoc_options: []
|
101
|
+
require_paths:
|
102
|
+
- lib
|
103
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
104
|
+
requirements:
|
105
|
+
- - '>='
|
106
|
+
- !ruby/object:Gem::Version
|
107
|
+
version: '0'
|
108
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
109
|
+
requirements:
|
110
|
+
- - '>='
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: '0'
|
113
|
+
requirements: []
|
114
|
+
rubyforge_project:
|
115
|
+
rubygems_version: 2.0.14
|
116
|
+
signing_key:
|
117
|
+
specification_version: 4
|
118
|
+
summary: Cloudmunch Ruby SDK.
|
119
|
+
test_files: []
|