-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmanifest.yaml
More file actions
143 lines (126 loc) · 3.93 KB
/
manifest.yaml
File metadata and controls
143 lines (126 loc) · 3.93 KB
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
id: serverboards.google.analytics
name: Google Analytics
description: |
Connection to Google Analytics
version: "18.01"
author: David Moreno <dmoreno@serverboards.io>
postinst: postinst.sh
components:
- id: daemon
name: Google Analytics Proxy
type: cmd
command: serverboards-google-analytics.py
strategy: singleton
timeout: 5m
perms:
- settings.view[serverboards.google.analytics/settings]
- settings.view[serverboards.core.settings/base]
- rules.view
- rules.trigger
- service.update
- service.get
- id: service
type: service
name: Google Analytics
icon: red google
description: |
Connection to Google Analytics.
traits: google.analytics cloud
fields:
- name: access_description
type: description
description: |
{{#authorization_url}}
Please click on the following URL to start the authorization process.
[Authorize Serverboards to access Analytics Data]({{authorization_url}})
If already authorized, clicking on the URL will renew/refresh the
authorization, discarding the old one.
{{/authorization_url}}
{{^authorization_url}}
Please save the service to start the authorization process.
{{/authorization_url}}
vars:
- id: authorization_url
command: serverboards.google.analytics/daemon
call: authorize_url
status:
command: serverboards.google.analytics/daemon
call: analytics_is_up
frequency: 6h
- id: auth
type: screen
traits: hidden
name: Authorized
description: Screen to show at Oauth2 authorization phase.
- id: settings
type: settings
perms: settings
name: Google Analytics Integration
description: |
To be able to use Google integration, you require an authorization Token.
Serverboards can not provide one in the Community Edition as there are
quotas involved.
Get the API token credentials at [Google API Console](https://console.developers.google.com/)
at *Credentials / Create / Oauth API / Client Id / Web*
The redirect URI must be the servername including protocol
`https://example.com/static/serverboards.google.analytics/auth.html`
fields:
- name: client_id
label: Client Id
- name: client_secret
label: Client Secret
- id: trigger
type: trigger
name: Google Analytics
description: Watches on some Google Analytics view today statistics every 30m.
icon: google red
traits: google.analytics cloud
start:
params:
- name: service_id
label: Service
type: service
traits: google.analytics
- name: viewid
label: Property
type: select call
dynamic: true
card: true
options:
command: serverboards.google.analytics/daemon
call: get_views
params:
- name: service_id
result:
value: Latest value of the metric
- id: rules_cron
name: Trigger Cron
description: Checks every 30m for the Google Analytics rules.
cron: 00,30 * * * *
action: serverboards.google.analytics/check_rules
params: {}
- id: check_rules
type: action
name: Check Google Analytics Rules
command: daemon
call:
method: check_rules
traits: google.analytics hidden
- id: extractor_basic
name: Google Analytics
type: extractor
service: serverboards.google.analytics/service
icon: red google
command: serverboards.google.analytics/daemon
extractor: basic_extractor
schema: basic_schema
params:
- name: viewid
label: Property
description: Left empty to select at the SQL query `profile_id`.
type: select call
options:
command: serverboards.google.analytics/daemon
call: get_views
params:
- name: service_id