birt-api 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/helpers/birt/api_helper.rb +16 -2
- data/app/views/birt/api/index.json.jbuilder +1 -0
- data/lib/birt/api/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e95982cca8b7f46679a7bc3ee8fc56a406670b76
|
4
|
+
data.tar.gz: 3ca06d99432296bc2102ee4967149d8579bed9b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 038a5ac628696a277d67cc0be45c8ae2f2da7064700138737a4b547a2f5b8cfa8a567906d91e2c37521a64c08ba96b5d8d57843c4bb7d10bb6330107f7610628
|
7
|
+
data.tar.gz: 96d5ba1e6c148aded4d34f4c24914c711b11edbe424d19fa52d2335997778d602fec931644198637941bf0e6bee0a661e0326ed42af963892f827122b11c8c28
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Birt::ApiHelper
|
2
2
|
|
3
|
-
def parse_table_header(table_header)
|
3
|
+
def parse_table_header(table_header, table=nil)
|
4
4
|
header = []
|
5
5
|
table_header.rows.each_with_index { |row, index|
|
6
6
|
header << []
|
@@ -8,7 +8,21 @@ module Birt::ApiHelper
|
|
8
8
|
header[index] << row_cell.cell_labels[0].text_properties[0].text
|
9
9
|
}
|
10
10
|
}
|
11
|
-
|
12
11
|
header
|
13
12
|
end
|
13
|
+
|
14
|
+
def parse_table_detail(table_detail, table)
|
15
|
+
detail = []
|
16
|
+
table_detail.rows.each_with_index { |row|
|
17
|
+
row.row_cells.each { |row_cell|
|
18
|
+
data = row_cell.cell_datas[0].properties[0]
|
19
|
+
data_set_result = table.data_set.data_set_result
|
20
|
+
data_set_result.columns[data_set_result.column_headers.index(data.text)].each_with_index { |d, row_i|
|
21
|
+
detail << [] unless detail[row_i]
|
22
|
+
detail[row_i] << d
|
23
|
+
}
|
24
|
+
}
|
25
|
+
}
|
26
|
+
detail
|
27
|
+
end
|
14
28
|
end
|
data/lib/birt/api/version.rb
CHANGED