Skip to content

Commit 722cc8e

Browse files
author
Davide Schiera
committed
Sorted functions alphabetically
1 parent c6bcfc4 commit 722cc8e

File tree

1 file changed

+46
-46
lines changed

1 file changed

+46
-46
lines changed

README.md

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,26 @@ For an example on how to parse this output, take a look at a simple example like
5252

5353
Methods
5454
-------
55+
#### `add_dashboard_panel(self, dashboard, name, type, metrics, scope=None, layout=None, sort_by=None, paging=None)`
56+
**Description**
57+
Adds a panel to the dashboard. A panel can be a time series, or a top chart (i.e. bar chart), or a number panel.
58+
59+
**Arguments**
60+
- **dashboard**: dashboard to edit
61+
- **name**: name of the new panel
62+
- **type**: type of the new panel. Valid values are: `timeSeries`, `top`, `number`
63+
- **metrics**: list of metrics; Each metric must specified an `id` (e.g. `cpu.used.percent`) and if it's a value an `aggregation` dictionary with `time` and `group` to specify time aggregation and group aggregation respectively
64+
- **scope**: filter to apply to the panel; Example: _kubernetes.namespace.name='production' and container.image='nginx'_.
65+
- **sort_by**: Data sorting; The parameter is optional and it's a dictionary of `metric` and `mode` (it can be `desc` or `asc`)
66+
- **paging**: Data pagination; The parameter is optional and limits the data points returned. The parameter is a dictionary of `from` and `to` with the index of the first and last point respectively
67+
- **layout**: Size and position of the panel
68+
69+
**Success Return Value**
70+
A dictionary showing the details of the edited dashboard.
71+
72+
**Example**
73+
[examples/dashboard.py](examples/dashboard.py).
74+
5575
#### `add_email_notification_recipient(self, email)`
5676
**Description**
5777
Add a new recipient for email alert notifications.
@@ -97,52 +117,6 @@ A dictionary showing the details of the new dashboard.
97117
**Example**
98118
[examples/dashboard.py](examples/dashboard.py).
99119

100-
#### `find_dashboard_by(self, name)`
101-
**Description**
102-
Finds dashboards with the specified name. You can then delete the dashboard (with `delete_dashboard`) or edit panels (with `add_dashboard_panel` and `remove_dashboard_panel`)
103-
104-
**Arguments**
105-
- **name**: the name of the dashboards to find.
106-
107-
**Success Return Value**
108-
A list of dictionaries of dashboards matching the specified name.
109-
110-
**Example**
111-
[examples/dashboard.py](examples/dashboard.py).
112-
113-
#### `add_dashboard_panel(self, dashboard, name, type, metrics, scope=None, layout=None, sort_by=None, paging=None)`
114-
**Description**
115-
Adds a panel to the dashboard. A panel can be a time series, or a top chart (i.e. bar chart), or a number panel.
116-
117-
**Arguments**
118-
- **dashboard**: dashboard to edit
119-
- **name**: name of the new panel
120-
- **type**: type of the new panel. Valid values are: `timeSeries`, `top`, `number`
121-
- **metrics**: list of metrics; Each metric must specified an `id` (e.g. `cpu.used.percent`) and if it's a value an `aggregation` dictionary with `time` and `group` to specify time aggregation and group aggregation respectively
122-
- **scope**: filter to apply to the panel; Example: _kubernetes.namespace.name='production' and container.image='nginx'_.
123-
- **sort_by**: Data sorting; The parameter is optional and it's a dictionary of `metric` and `mode` (it can be `desc` or `asc`)
124-
- **paging**: Data pagination; The parameter is optional and limits the data points returned. The parameter is a dictionary of `from` and `to` with the index of the first and last point respectively
125-
- **layout**: Size and position of the panel
126-
127-
**Success Return Value**
128-
A dictionary showing the details of the edited dashboard.
129-
130-
**Example**
131-
[examples/dashboard.py](examples/dashboard.py).
132-
133-
#### `remove_dashboard_panel(self, dashboard, panel_name)`
134-
**Description**
135-
Removes a panel from the dashboard. The panel to remove is identified by the specified `name`.
136-
137-
**Arguments**
138-
- **name**: name of the panel to find and remove
139-
140-
**Success Return Value**
141-
A dictionary showing the details of the edited dashboard.
142-
143-
**Example**
144-
[examples/dashboard.py](examples/dashboard.py).
145-
146120
#### `create_dashboard_from_dashboard(self, newdashname, templatename, filter)`
147121
**Description**
148122
Create a new dasboard using one of the existing dashboards as a template. You will be able to define the scope of the new dasboard.
@@ -329,6 +303,19 @@ A dictionary containing information about the user, for example its email and th
329303
**Example**
330304
[examples/print_user_info.py](examples/print_user_info.py).
331305

306+
#### `find_dashboard_by(self, name)`
307+
**Description**
308+
Finds dashboards with the specified name. You can then delete the dashboard (with `delete_dashboard`) or edit panels (with `add_dashboard_panel` and `remove_dashboard_panel`)
309+
310+
**Arguments**
311+
- **name**: the name of the dashboards to find.
312+
313+
**Success Return Value**
314+
A list of dictionaries of dashboards matching the specified name.
315+
316+
**Example**
317+
[examples/dashboard.py](examples/dashboard.py).
318+
332319
#### `poll_sysdig_capture(self, capture)`
333320
**Description**
334321
Fetch the updated state of a sysdig capture. Can be used to poll the status of a capture that has been previously created and started with `create_sysdig_capture`.
@@ -356,6 +343,19 @@ A dictionary describing the new event.
356343
[examples/post_event_simple.py](examples/post_event_simple.py)
357344
[examples/post_event.py](examples/post_event.py).
358345

346+
#### `remove_dashboard_panel(self, dashboard, panel_name)`
347+
**Description**
348+
Removes a panel from the dashboard. The panel to remove is identified by the specified `name`.
349+
350+
**Arguments**
351+
- **name**: name of the panel to find and remove
352+
353+
**Success Return Value**
354+
A dictionary showing the details of the edited dashboard.
355+
356+
**Example**
357+
[examples/dashboard.py](examples/dashboard.py).
358+
359359
#### `update_notification_resolution(self, notification, resolved)`
360360
**Description**
361361
Updates the resolution status of an alert notification.

0 commit comments

Comments
 (0)