mirror of
https://github.com/grafana/grafana.git
synced 2025-01-19 13:03:32 -06:00
InfluxDB: Flux: timestamp-column has to go first (#35036)
This commit is contained in:
parent
73b8afe724
commit
38b030e2a4
@ -167,10 +167,6 @@ func (fb *frameBuilder) Init(metadata *query.FluxTableMetadata) error {
|
||||
dataColumns := getDataColumns(columns)
|
||||
fb.hasUsualStartStop = hasUsualStartStop(dataColumns)
|
||||
|
||||
// first we store the column-info structures as pointers,
|
||||
// because we need to modify some items in the list
|
||||
var columnInfos []*columnInfo
|
||||
|
||||
for _, col := range dataColumns {
|
||||
if col.IsGroup() {
|
||||
fb.labels = append(fb.labels, col.Name())
|
||||
@ -191,8 +187,6 @@ func (fb *frameBuilder) Init(metadata *query.FluxTableMetadata) error {
|
||||
isTheSingleValue: false,
|
||||
}
|
||||
|
||||
columnInfos = append(columnInfos, info)
|
||||
|
||||
if isTimestamp {
|
||||
timestampCols = append(timestampCols, info)
|
||||
} else {
|
||||
@ -216,7 +210,12 @@ func (fb *frameBuilder) Init(metadata *query.FluxTableMetadata) error {
|
||||
nonTimestampCols[0].isTheSingleValue = true
|
||||
}
|
||||
|
||||
for _, colInfo := range columnInfos {
|
||||
// grafana wants the timestamp columns first, so we add them first
|
||||
for _, colInfo := range timestampCols {
|
||||
fb.columns = append(fb.columns, *colInfo)
|
||||
}
|
||||
// then we add the non-timestamp-columns
|
||||
for _, colInfo := range nonTimestampCols {
|
||||
fb.columns = append(fb.columns, *colInfo)
|
||||
}
|
||||
|
||||
|
@ -119,8 +119,8 @@ func TestExecuteGrouping(t *testing.T) {
|
||||
dr := verifyGoldenResponse(t, "grouping")
|
||||
require.Len(t, dr.Frames, 3)
|
||||
require.Contains(t, dr.Frames[0].Name, "system")
|
||||
require.Len(t, dr.Frames[0].Fields[0].Labels, 1)
|
||||
require.Equal(t, "_time", dr.Frames[0].Fields[1].Name)
|
||||
require.Len(t, dr.Frames[0].Fields[1].Labels, 1)
|
||||
require.Equal(t, "_time", dr.Frames[0].Fields[0].Name)
|
||||
|
||||
st, err := dr.Frames[0].StringTable(-1, -1)
|
||||
require.NoError(t, err)
|
||||
@ -304,3 +304,13 @@ func TestMultiTime(t *testing.T) {
|
||||
require.Equal(t, frame.Fields[2].Name, "_value")
|
||||
require.Len(t, frame.Fields[2].Labels, 5)
|
||||
}
|
||||
|
||||
func TestTimestampFirst(t *testing.T) {
|
||||
dr := verifyGoldenResponse(t, "time_first")
|
||||
require.Len(t, dr.Frames, 1)
|
||||
// we make sure the timestamp-column is the first column
|
||||
// in the dataframe, even if it was not the first column
|
||||
// in the csv.
|
||||
require.Equal(t, "_time", dr.Frames[0].Fields[0].Name)
|
||||
require.Equal(t, "_value", dr.Frames[0].Fields[1].Name)
|
||||
}
|
||||
|
@ -3,56 +3,56 @@
|
||||
Frame[0] {}
|
||||
Name: system
|
||||
Dimensions: 2 Fields by 3 Rows
|
||||
+-----------------------+-----------------------------------------+
|
||||
| Name: load1 | Name: _time |
|
||||
| Labels: host=hostname | Labels: |
|
||||
| Type: []*float64 | Type: []*time.Time |
|
||||
+-----------------------+-----------------------------------------+
|
||||
| null | 2020-05-05 18:38:50 +0000 UTC |
|
||||
| 3.56 | 2020-05-05 18:39:00 +0000 UTC |
|
||||
| null | 2020-05-05 19:38:47.207881833 +0000 UTC |
|
||||
+-----------------------+-----------------------------------------+
|
||||
+-----------------------------------------+-----------------------+
|
||||
| Name: _time | Name: load1 |
|
||||
| Labels: | Labels: host=hostname |
|
||||
| Type: []*time.Time | Type: []*float64 |
|
||||
+-----------------------------------------+-----------------------+
|
||||
| 2020-05-05 18:38:50 +0000 UTC | null |
|
||||
| 2020-05-05 18:39:00 +0000 UTC | 3.56 |
|
||||
| 2020-05-05 19:38:47.207881833 +0000 UTC | null |
|
||||
+-----------------------------------------+-----------------------+
|
||||
|
||||
|
||||
|
||||
Frame[1]
|
||||
Name: system
|
||||
Dimensions: 2 Fields by 4 Rows
|
||||
+-----------------------+-----------------------------------------+
|
||||
| Name: load15 | Name: _time |
|
||||
| Labels: host=hostname | Labels: |
|
||||
| Type: []*float64 | Type: []*time.Time |
|
||||
+-----------------------+-----------------------------------------+
|
||||
| null | 2020-05-05 18:38:50 +0000 UTC |
|
||||
| 2.51 | 2020-05-05 18:39:00 +0000 UTC |
|
||||
| 1.74 | 2020-05-05 19:38:40 +0000 UTC |
|
||||
| null | 2020-05-05 19:38:47.207881833 +0000 UTC |
|
||||
+-----------------------+-----------------------------------------+
|
||||
+-----------------------------------------+-----------------------+
|
||||
| Name: _time | Name: load15 |
|
||||
| Labels: | Labels: host=hostname |
|
||||
| Type: []*time.Time | Type: []*float64 |
|
||||
+-----------------------------------------+-----------------------+
|
||||
| 2020-05-05 18:38:50 +0000 UTC | null |
|
||||
| 2020-05-05 18:39:00 +0000 UTC | 2.51 |
|
||||
| 2020-05-05 19:38:40 +0000 UTC | 1.74 |
|
||||
| 2020-05-05 19:38:47.207881833 +0000 UTC | null |
|
||||
+-----------------------------------------+-----------------------+
|
||||
|
||||
|
||||
|
||||
Frame[2]
|
||||
Name: system
|
||||
Dimensions: 2 Fields by 10 Rows
|
||||
+-----------------------+-----------------------------------------+
|
||||
| Name: load5 | Name: _time |
|
||||
| Labels: host=hostname | Labels: |
|
||||
| Type: []*float64 | Type: []*time.Time |
|
||||
+-----------------------+-----------------------------------------+
|
||||
| null | 2020-05-05 18:38:50 +0000 UTC |
|
||||
| 3.14 | 2020-05-05 18:39:00 +0000 UTC |
|
||||
| 3.04 | 2020-05-05 18:39:10 +0000 UTC |
|
||||
| 1.8 | 2020-05-05 19:37:50 +0000 UTC |
|
||||
| 1.76 | 2020-05-05 19:38:00 +0000 UTC |
|
||||
| 1.75 | 2020-05-05 19:38:10 +0000 UTC |
|
||||
| 1.71 | 2020-05-05 19:38:20 +0000 UTC |
|
||||
| 1.77 | 2020-05-05 19:38:30 +0000 UTC |
|
||||
| 1.71 | 2020-05-05 19:38:40 +0000 UTC |
|
||||
| null | 2020-05-05 19:38:47.207881833 +0000 UTC |
|
||||
+-----------------------+-----------------------------------------+
|
||||
+-----------------------------------------+-----------------------+
|
||||
| Name: _time | Name: load5 |
|
||||
| Labels: | Labels: host=hostname |
|
||||
| Type: []*time.Time | Type: []*float64 |
|
||||
+-----------------------------------------+-----------------------+
|
||||
| 2020-05-05 18:38:50 +0000 UTC | null |
|
||||
| 2020-05-05 18:39:00 +0000 UTC | 3.14 |
|
||||
| 2020-05-05 18:39:10 +0000 UTC | 3.04 |
|
||||
| 2020-05-05 19:37:50 +0000 UTC | 1.8 |
|
||||
| 2020-05-05 19:38:00 +0000 UTC | 1.76 |
|
||||
| 2020-05-05 19:38:10 +0000 UTC | 1.75 |
|
||||
| 2020-05-05 19:38:20 +0000 UTC | 1.71 |
|
||||
| 2020-05-05 19:38:30 +0000 UTC | 1.77 |
|
||||
| 2020-05-05 19:38:40 +0000 UTC | 1.71 |
|
||||
| 2020-05-05 19:38:47.207881833 +0000 UTC | null |
|
||||
+-----------------------------------------+-----------------------+
|
||||
|
||||
|
||||
====== TEST DATA RESPONSE (arrow base64) ======
|
||||
FRAME=QVJST1cxAAD/////wAEAABAAAAAAAAoADgAMAAsABAAKAAAAFAAAAAAAAAEDAAoADAAAAAgABAAKAAAACAAAAHgAAAADAAAAUAAAACgAAAAEAAAA3P7//wgAAAAMAAAAAAAAAAAAAAAFAAAAcmVmSWQAAAD8/v//CAAAABAAAAAGAAAAc3lzdGVtAAAEAAAAbmFtZQAAAAAg////CAAAAAwAAAACAAAAe30AAAQAAABtZXRhAAAAAAIAAAB0AAAABAAAAKb///8UAAAAPAAAADwAAAAAAAoBPAAAAAEAAAAEAAAAbP///wgAAAAQAAAABQAAAF90aW1lAAAABAAAAG5hbWUAAAAAAAAAAFb///8AAAMABQAAAF90aW1lABIAGAAUABMAEgAMAAAACAAEABIAAAAUAAAAeAAAAIAAAAAAAAMBgAAAAAIAAAA0AAAABAAAANz///8IAAAAEAAAAAUAAABsb2FkMQAAAAQAAABuYW1lAAAAAAgADAAIAAQACAAAAAgAAAAcAAAAEwA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AAAAAFAAAAcmVmSWQAAAAc////CAAAABAAAAAGAAAAc3lzdGVtAAAEAAAAbmFtZQAAAAACAAAAdAAAAAQAAACm////FAAAADwAAAA8AAAAAAAKATwAAAABAAAABAAAAGz///8IAAAAEAAAAAUAAABfdGltZQAAAAQAAABuYW1lAAAAAAAAAABW////AAADAAUAAABfdGltZQASABgAFAATABIADAAAAAgABAASAAAAFAAAAHgAAACAAAAAAAADAYAAAAACAAAANAAAAAQAAADc////CAAAABAAAAAGAAAAbG9hZDE1AAAEAAAAbmFtZQAAAAAIAAwACAAEAAgAAAAIAAAAHAAAABMAAAB7Imhvc3QiOiJob3N0bmFtZSJ9AAYAAABsYWJlbHMAAAAAAAAAAAYACAAGAAYAAAAAAAIABgAAAGxvYWQxNQAAyAEAAEFSUk9XMQ==
|
||||
FRAME=QVJST1cxAAD/////oAEAABAAAAAAAAoADgAMAAsABAAKAAAAFAAAAAAAAAEDAAoADAAAAAgABAAKAAAACAAAAFQAAAACAAAAKAAAAAQAAAD8/v//CAAAAAwAAAAAAAAAAAAAAAUAAAByZWZJZAAAABz///8IAAAAEAAAAAYAAABzeXN0ZW0AAAQAAABuYW1lAAAAAAIAAAB0AAAABAAAAKb///8UAAAAPAAAADwAAAAAAAoBPAAAAAEAAAAEAAAAbP///wgAAAAQAAAABQAAAF90aW1lAAAABAAAAG5hbWUAAAAAAAAAAFb///8AAAMABQAAAF90aW1lABIAGAAUABMAEgAMAAAACAAEABIAAAAUAAAAeAAAAIAAAAAAAAMBgAAAAAIAAAA0AAAABAAAANz///8IAAAAEAAAAAUAAABsb2FkNQAAAAQAAABuYW1lAAAAAAgADAAIAAQACAAAAAgAAAAcAAAAEwAAAHsiaG9zdCI6Imhvc3RuYW1lIn0ABgAAAGxhYmVscwAAAAAAAAAABgAIAAYABgAAAAAAAgAFAAAAbG9hZDUAAAAAAAAA/////7gAAAAUAAAAAAAAAAwAFgAUABMADAAEAAwAAACoAAAAAAAAABQAAAAAAAADAwAKABgADAAIAAQAC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Ac3lzdGVtAAAEAAAAbmFtZQAAAAAU////CAAAAAwAAAACAAAAe30AAAQAAABtZXRhAAAAAAIAAACoAAAABAAAAHL///8UAAAAcAAAAHAAAAAAAAMBcAAAAAIAAAAsAAAABAAAAGT///8IAAAAEAAAAAUAAABsb2FkMQAAAAQAAABuYW1lAAAAAIj///8IAAAAHAAAABMAAAB7Imhvc3QiOiJob3N0bmFtZSJ9AAYAAABsYWJlbHMAAAAAAACK////AAACAAUAAABsb2FkMQASABgAFAATABIADAAAAAgABAASAAAAFAAAAEQAAABMAAAAAAAKAUwAAAABAAAADAAAAAgADAAIAAQACAAAAAgAAAAQAAAABQAAAF90aW1lAAAABAAAAG5hbWUAAAAAAAAAAAAABgAIAAYABgAAAAAAAwAFAAAAX3RpbWUAAADwAQAAQVJST1cx
|
||||
FRAME=QVJST1cxAAD/////oAEAABAAAAAAAAoADgAMAAsABAAKAAAAFAAAAAAAAAEDAAoADAAAAAgABAAKAAAACAAAAFQAAAACAAAAKAAAAAQAAADs/v//CAAAAAwAAAAAAAAAAAAAAAUAAAByZWZJZAAAAAz///8IAAAAEAAAAAYAAABzeXN0ZW0AAAQAAABuYW1lAAAAAAIAAACsAAAABAAAAG7///8UAAAAcAAAAHAAAAAAAAMBcAAAAAIAAAAsAAAABAAAAGD///8IAAAAEAAAAAYAAABsb2FkMTUAAAQAAABuYW1lAAAAAIT///8IAAAAHAAAABMAAAB7Imhvc3QiOiJob3N0bmFtZSJ9AAYAAABsYWJlbHMAAAAAAACG////AAACAAYAAABsb2FkMTUAAAAAEgAYABQAEwASAAwAAAAIAAQAEgAAABQAAABEAAAATAAAAAAACgFMAAAAAQAAAAwAAAAIAAwACAAEAAgAAAAIAAAAEAAAAAUAAABfdGltZQAAAAQAAABuYW1lAAAAAAAAAAAAAAYACAAGAAYAAAAAAAMABQAAAF90aW1lAAAA/////7gAAAAUAAAAAAAAAAwAFgAUABMADAAEAAwAAABIAAAAAAAAABQAAAAAAAADAwAKABgADAAIAAQACgAA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QAAAAACAAAAqAAAAAQAAABy////FAAAAHAAAABwAAAAAAADAXAAAAACAAAALAAAAAQAAABk////CAAAABAAAAAFAAAAbG9hZDUAAAAEAAAAbmFtZQAAAACI////CAAAABwAAAATAAAAeyJob3N0IjoiaG9zdG5hbWUifQAGAAAAbGFiZWxzAAAAAAAAiv///wAAAgAFAAAAbG9hZDUAEgAYABQAEwASAAwAAAAIAAQAEgAAABQAAABEAAAATAAAAAAACgFMAAAAAQAAAAwAAAAIAAwACAAEAAgAAAAIAAAAEAAAAAUAAABfdGltZQAAAAQAAABuYW1lAAAAAAAAAAAAAAYACAAGAAYAAAAAAAMABQAAAF90aW1lAAAAyAEAAEFSUk9XMQ==
|
||||
|
@ -3,23 +3,23 @@
|
||||
Frame[0] {}
|
||||
Name:
|
||||
Dimensions: 2 Fields by 20 Rows
|
||||
+---------------------+-------------------------------+
|
||||
| Name: MeanAggregate | Name: time |
|
||||
| Labels: | Labels: |
|
||||
| Type: []*float64 | Type: []*time.Time |
|
||||
+---------------------+-------------------------------+
|
||||
| 0 | 2020-07-14 03:26:31 +0000 UTC |
|
||||
| 0 | 2020-07-14 03:26:32 +0000 UTC |
|
||||
| 0 | 2020-07-14 03:26:35 +0000 UTC |
|
||||
| 0 | 2020-07-14 03:29:33 +0000 UTC |
|
||||
| 29.38586956521739 | 2020-07-14 04:59:41 +0000 UTC |
|
||||
| 0 | 2020-07-14 05:04:24 +0000 UTC |
|
||||
| 7.306756756756757 | 2020-07-14 05:04:25 +0000 UTC |
|
||||
| 3.633736559139785 | 2020-07-14 05:04:26 +0000 UTC |
|
||||
| 3.6143048128342246 | 2020-07-14 05:04:27 +0000 UTC |
|
||||
| ... | ... |
|
||||
+---------------------+-------------------------------+
|
||||
+-------------------------------+---------------------+
|
||||
| Name: time | Name: MeanAggregate |
|
||||
| Labels: | Labels: |
|
||||
| Type: []*time.Time | Type: []*float64 |
|
||||
+-------------------------------+---------------------+
|
||||
| 2020-07-14 03:26:31 +0000 UTC | 0 |
|
||||
| 2020-07-14 03:26:32 +0000 UTC | 0 |
|
||||
| 2020-07-14 03:26:35 +0000 UTC | 0 |
|
||||
| 2020-07-14 03:29:33 +0000 UTC | 0 |
|
||||
| 2020-07-14 04:59:41 +0000 UTC | 29.38586956521739 |
|
||||
| 2020-07-14 05:04:24 +0000 UTC | 0 |
|
||||
| 2020-07-14 05:04:25 +0000 UTC | 7.306756756756757 |
|
||||
| 2020-07-14 05:04:26 +0000 UTC | 3.633736559139785 |
|
||||
| 2020-07-14 05:04:27 +0000 UTC | 3.6143048128342246 |
|
||||
| ... | ... |
|
||||
+-------------------------------+---------------------+
|
||||
|
||||
|
||||
====== TEST DATA RESPONSE (arrow base64) ======
|
||||
FRAME=QVJST1cxAAD/////mAEAABAAAAAAAAoADgAMAAsABAAKAAAAFAAAAAAAAAEDAAoADAAAAAgABAAKAAAACAAAAHQAAAADAAAATAAAACgAAAAEAAAACP///wgAAAAMAAAAAAAAAAAAAAAFAAAAcmVmSWQAAAAo////CAAAAAwAAAAAAAAAAAAAAAQAAABuYW1lAAAAAEj///8IAAAADAAAAAIAAAB7fQAABAAAAG1ldGEAAAAAAgAAAHQAAAAEAAAApv///xQAAAA8AAAAPAAAAAAACgE8AAAAAQAAAAQAAACU////CAAAABAAAAAEAAAAdGltZQAAAAAEAAAAbmFtZQAAAAAAAAAAgv///wAAAwAEAAAAdGltZQAAEgAYABQAEwASAAwAAAAIAAQAEgAAABQAAABMAAAAVAAAAAAAAwFUAAAAAQAAAAwAAAAIAAwACAAEAAgAAAAIAAAAGAAAAA0AAABNZWFuQWdncmVnYXRlAAAABAAAAG5hbWUAAAAAAAAAAAAABgAIAAYABgAAAAAAAgANAAAATWVhbkFnZ3JlZ2F0ZQAAAP////+4AAAAFAAAAAAAAAAMABYAFAATAAwABAAMAAAAQAEAAAAAAAAUAAAAAAAAAwMACgAYAAwACAAEAAoAAAAUAAAAWAAAABQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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CYXcL9hSEWANpuH+KWIRYA2H0+ypshFgD2vhj/myEWAMBZVP+bIRYAivSP/5shFgBUj8v/myEWAB4qBwCcIRYA6MRCAJwhFgCyX34AnCEWAHz6uQCcIRYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQhC1nIYj1AAAAAAAAAAACiY3hxHjodQJJHHnnkEQ1A6i9HpBjqDEBicgUxucIMQKOOSNM4HABAxOt85r47IkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA142PiR4V+D9leRmkYy0AQDSBzl29KABAEAAAAAwAFAASAAwACAAEAAwAAAAQAAAALAAAADwAAAAAAAMAAQAAAPABAAAAAAAAwAAAAAAAAABAAQAAAAAAAAAAAAAAAAAAAAAAAAAACgAMAAAACAAEAAoAAAAIAAAAdAAAAAMAAABMAAAAKAAAAAQAAACs/v//CAAAAAwAAAAAAAAAAAAAAAUAAAByZWZJZAAAAMz+//8IAAAADAAAAAAAAAAAAAAABAAAAG5hbWUAAAAA7P7//wgAAAAMAAAAAgAAAHt9AAAEAAAAbWV0YQAAAAACAAAAqAAAAAQAAABy////FAAAAGgAAABoAAAAAAADAWgAAAACAAAANAAAAAQAAAA8////CAAAABgAAAANAAAATWVhbkFnZ3JlZ2F0ZQAAAAQAAABuYW1lAAAAAGj///8IAAAADAAAAAIAAAB7fQAABgAAAGxhYmVscwAAAAAAAF7///8AAAIADQAAAE1lYW5BZ2dyZWdhdGUAEgAYABQAEwASAAwAAAAIAAQAEgAAABQAAABoAAAAcAAAAAAACgFwAAAAAgAAADQAAAAEAAAA3P///wgAAAAQAAAABAAAAHRpbWUAAAAABAAAAG5hbWUAAAAACAAMAAgABAAIAAAACAAAAAwAAAACAAAAe30AAAYAAABsYWJlbHMAAAAAAAAAAAYACAAGAAYAAAAAAAMABAAAAHRpbWUAAAAAEAIAAEFSUk9XMQ==
|
||||
|
8
pkg/tsdb/influxdb/flux/testdata/time_first.csv
vendored
Normal file
8
pkg/tsdb/influxdb/flux/testdata/time_first.csv
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
#group,false,false,false,false
|
||||
#datatype,string,long,double,dateTime:RFC3339
|
||||
#default,_result,,,
|
||||
,result,table,_value,_time
|
||||
,,0,10,2021-06-01T10:34:37Z
|
||||
,,0,20,2021-06-01T10:34:47Z
|
||||
,,0,30,2021-06-01T10:34:57Z
|
||||
,,0,40,2021-06-01T10:35:07Z
|
|
19
pkg/tsdb/influxdb/flux/testdata/time_first.golden.txt
vendored
Normal file
19
pkg/tsdb/influxdb/flux/testdata/time_first.golden.txt
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
🌟 This was machine generated. Do not edit. 🌟
|
||||
|
||||
Frame[0] {}
|
||||
Name:
|
||||
Dimensions: 2 Fields by 4 Rows
|
||||
+-------------------------------+------------------+
|
||||
| Name: _time | Name: _value |
|
||||
| Labels: | Labels: |
|
||||
| Type: []*time.Time | Type: []*float64 |
|
||||
+-------------------------------+------------------+
|
||||
| 2021-06-01 10:34:37 +0000 UTC | 10 |
|
||||
| 2021-06-01 10:34:47 +0000 UTC | 20 |
|
||||
| 2021-06-01 10:34:57 +0000 UTC | 30 |
|
||||
| 2021-06-01 10:35:07 +0000 UTC | 40 |
|
||||
+-------------------------------+------------------+
|
||||
|
||||
|
||||
====== TEST DATA RESPONSE (arrow base64) ======
|
||||
FRAME=QVJST1cxAAD/////sAEAABAAAAAAAAoADgAMAAsABAAKAAAAFAAAAAAAAAEDAAoADAAAAAgABAAKAAAACAAAAHQAAAADAAAATAAAACgAAAAEAAAA4P7//wgAAAAMAAAAAAAAAAAAAAAFAAAAcmVmSWQAAAAA////CAAAAAwAAAAAAAAAAAAAAAQAAABuYW1lAAAAACD///8IAAAADAAAAAIAAAB7fQAABAAAAG1ldGEAAAAAAgAAAJwAAAAEAAAAfv///xQAAABgAAAAYAAAAAAAAwFgAAAAAgAAACwAAAAEAAAAcP///wgAAAAQAAAABgAAAF92YWx1ZQAABAAAAG5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AAEQAAABMAAAAAAAKAUwAAAABAAAADAAAAAgADAAIAAQACAAAAAgAAAAQAAAABQAAAF90aW1lAAAABAAAAG5hbWUAAAAAAAAAAAAABgAIAAYABgAAAAAAAwAFAAAAX3RpbWUAAADgAQAAQVJST1cx
|
Loading…
Reference in New Issue
Block a user