forked from turbot/steampipe-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsubmissions.sp
91 lines (77 loc) · 1.53 KB
/
submissions.sp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
dashboard "Submissions" {
tags = {
service = "Hacker News"
}
container {
text {
width = 6
value = <<EOT
[Home](http://${local.host}:9194/hackernews.dashboard.Home)
🞄
[People](http://${local.host}:9194/hackernews.dashboard.People)
🞄
[Posts](http://${local.host}:9194/hackernews.dashboard.Posts)
🞄
[Repos](http://${local.host}:9194/hackernews.dashboard.Repos)
🞄
[Search](http://${local.host}:9194/hackernews.dashboard.Search)
🞄
[Sources](http://${local.host}:9194/hackernews.dashboard.Sources)
🞄
Submissions
🞄
[Urls](http://${local.host}:9194/hackernews.dashboard.Urls)
EOT
}
}
container {
width = 8
input "hn_user" {
width = 6
placeholder = "search or choose user"
title = "hn user"
type = "select"
sql = <<EOQ
select distinct
h.by as label,
h.by as value
from
hn_items_all h
order by
by
EOQ
}
}
container {
table {
width = 8
args = [
self.input.hn_user.value
]
query = query.submission_times
column "id" {
href = "https://news.ycombinator.com/item?id={{.'id'}}"
}
}
chart {
width = 4
type = "bar"
args = [
self.input.hn_user.value
]
axes {
x {
title {
value = "submissions"
}
}
y {
title {
value = "day"
}
}
}
query = query.submission_days
}
}
}