-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathworkspace-detail.sp
78 lines (62 loc) · 1.29 KB
/
workspace-detail.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
dashboard "steampipecloud_workspace_detail" {
table {
//width = 6
title = "Current search path"
sql = <<-EOQ
show search_path
EOQ
}
table {
title = "User Settings"
//width = 6
sql = <<-EOQ
select
r.rolname,
d.datname,
rs.setconfig
from
pg_db_role_setting as rs
left join pg_roles as r on r.oid = rs.setrole
left join pg_database as d on d.oid = rs.setdatabase
EOQ
}
# these dont woerk - gott be root?
# container {
# chart {
# title = "Table count by Schema"
# width = 6
# query = query.table_count_by_schema
# }
# table {
# width = 6
# query = query.table_count_by_schema
# }
# }
}
# // these dont work - gotta be root?
# query "table_count_by_schema" {
# sql = <<-EOQ
# select
# table_schema,
# count(*) as count
# from
# information_schema.tables
# group by
# table_schema
# order by
# count desc
# EOQ
# }
# query "size_by_schema" {
# sql = <<-EOQ
# select
# table_schema,
# count(*) as count
# from
# information_schema.tables
# group by
# table_schema
# order by
# count desc
# EOQ
# }