big_query_log_viewer 0.0.5 → 0.0.6

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
  SHA1:
3
- metadata.gz: e42bc422e7fba9dd2055eea53a7bb65cb8c9b2dd
4
- data.tar.gz: 97d13ee5429bb65db9f9cc4710815721e363c239
3
+ metadata.gz: 17a29b46f3220758313a6bf0cb6fe524c3fe0168
4
+ data.tar.gz: dedd7319c2c1e726602233671e2d135a8375ce1f
5
5
  SHA512:
6
- metadata.gz: 77e42d25c0bdfc9bd27e9827e5345464e079ba599b574859dd56b9931c5a08e319c3cdd54d36e1c24390e601ee47c71394ccf00566cb942506f6808fb320b851
7
- data.tar.gz: 240f17dd30d1f6a06ce4e1d314591da78dad7fc80f43e49a49c1df33b256545f9273e8d35d9bb77755078923e906b18cd2a747626b2c268e6420e2baad22286f
6
+ metadata.gz: c42a7c2835fec5461285f021facac417b1549c0847544e81bda46ef16a70def34e4eac5233c1ed563ebd2e32d6bbb0cc3b5b2cf2cfc6442e2b6d30165f647e21
7
+ data.tar.gz: 29566331fb708b406c24fc4a3bfbebc309f211289c530bc615d30529715b682a457fc548cec9397b0e585f6bead7395e3cfc05515628f4bb17692780f51a8f64
@@ -3,6 +3,9 @@
3
3
 
4
4
  #= require ./components/tab_manager
5
5
 
6
+ window.randomId = ->
7
+ Math.floor(Date.now() / 1000).toString(16) + Math.random().toString(16).slice(2,10)
8
+
6
9
  window.BigQueryLogViewer ||= {}
7
10
 
8
11
  TabManager = BigQueryLogViewer.TabManager
@@ -6,7 +6,7 @@ BigQueryLogViewer.Row = React.createClass
6
6
  getInitialState: ->
7
7
  s = "000#{@props.row.timestamp.getMilliseconds()}"
8
8
  y = @props.row.timestamp.getFullYear()
9
- mo = ('0' + @props.row.timestamp.getMonth()).slice(-2)
9
+ mo = ('0' + (@props.row.timestamp.getMonth() + 1)).slice(-2)
10
10
  d = ('0' + @props.row.timestamp.getDate()).slice(-2)
11
11
  h = ('0' + @props.row.timestamp.getHours()).slice(-2)
12
12
  mi = ('0' + @props.row.timestamp.getMinutes()).slice(-2)
@@ -79,6 +79,7 @@ BigQueryLogViewer.TabManager = React.createClass
79
79
  }
80
80
 
81
81
  tab =
82
+ id: randomId()
82
83
  type: 'results'
83
84
  rowData: rows
84
85
  pageToken: response.pageToken
@@ -147,6 +148,7 @@ BigQueryLogViewer.TabManager = React.createClass
147
148
  msg: r.f[5].v
148
149
  }
149
150
  tab =
151
+ id: randomId()
150
152
  type: 'expansion'
151
153
  rowData: rows
152
154
  row: row
@@ -154,10 +156,10 @@ BigQueryLogViewer.TabManager = React.createClass
154
156
  term: @activeTab().term
155
157
  position = if @state.activeTabIndex != null then @state.activeTabIndex + 1 else 0
156
158
  @state.tabs.splice(position, 0, tab)
157
- @setState(activeTabIndex: position)
158
159
 
159
160
  # Update the view component.
160
161
  @setState
162
+ activeTabIndex: position
161
163
  queryInProgress: false
162
164
  numReturnedResults: response.totalRows
163
165
  errorMessage: null
@@ -200,7 +202,7 @@ BigQueryLogViewer.TabManager = React.createClass
200
202
 
201
203
  tabs =
202
204
  for tab, index in @state.tabs
203
- <Tab key={"tab-#{index}"} tab={tab} query={@query} visible={index == @state.activeTabIndex} handleShowProximity={@handleShowProximity} rowsPerPage={@props.rowsPerPage} />
205
+ <Tab key={"tab-#{tab.id}"} tab={tab} query={@query} visible={index == @state.activeTabIndex} handleShowProximity={@handleShowProximity} rowsPerPage={@props.rowsPerPage} />
204
206
 
205
207
  return (
206
208
  <div>
@@ -1,3 +1,3 @@
1
1
  module BigQueryLogViewer
2
- VERSION = '0.0.5'
2
+ VERSION = '0.0.6'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: big_query_log_viewer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zach Schneider
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-03 00:00:00.000000000 Z
11
+ date: 2015-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails