omni.OmniDashboardEmbedder
Factory class for building and signing dashboard embedding URLs.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
organization_name |
str | None
|
organization_name: Omni organization name. OMNI_ORGANIZATION_NAME environment variable will be used as a fallback. |
None
|
embed_secret |
str | None
|
Omni embed secret. OMNI_EMBED_SECRET environment variable will be used as a fallback. |
None
|
vanity_domain |
str | None
|
Vanity domain configured with Omni. Should not be fully qualified. OMNI_VANITY_DOMAIN environment variable will be used as a fallback. |
None
|
Attributes:
Name | Type | Description |
---|---|---|
embed_login_url |
Base url of embedded dashboard urls. |
|
embed_secret |
Omni embed secret. |
Source code in src/omni/embed.py
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 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 |
|
PrefersDark
Bases: Enum
PrefersDark options
Attributes:
Name | Type | Description |
---|---|---|
yes |
true |
|
no |
false |
|
system |
system |
Source code in src/omni/embed.py
57 58 59 60 61 62 63 64 65 66 67 68 |
|
Theme
Bases: Enum
Theme options
Attributes:
Name | Type | Description |
---|---|---|
dawn |
dawn |
|
vibes |
vibes |
|
breeze |
breeze |
|
blank |
blank |
Source code in src/omni/embed.py
70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
|
build_url(content_path, external_id, name, custom_theme=None, entity=None, filter_search_params=None, link_access=None, prefers_dark=None, theme=None, user_attributes=None)
Builds a signed dashboard embedding URL. For more information on the options see the Omni Docs
Parameters:
Name | Type | Description | Default |
---|---|---|---|
content_path |
str
|
Path pointing to the dashboard you wish to build a URL to embed. |
required |
external_id |
str
|
Required parameter creating a unique ID. This can be any alphanumeric value. |
required |
name |
str
|
Required parameter and can contain a non-unique name for the embed user's name property. |
required |
custom_theme |
dict | None
|
Allows you to stylize your embedded dashboard to your preferred colors. |
None
|
entity |
str | None
|
An id to reference the entity the user belongs to. Commonly is the customer name or other identifying organization for this user. |
None
|
filter_search_params |
str | dict | None
|
Encoded string or a dict representing dashboard filter values . This can be derived
by copying the substring after the "?" from a dashboard URL with non-empty filter values or using the
|
None
|
link_access |
bool | list[str] | None
|
Allows you to customize which other Omni dashboards can be linked to from the embedded dashboard. If set to True, all links on the embedded dashboard are permissed and shown. Alternatively, a list of dashboard IDs can be passed (i.e. ["abcd1234", "efgh5678", "ijkl9999"]) to only permiss to specific dashboard IDs. Finally, if the parameter is None, all links to other Omni dashboards are restricted. Note that link URLs to anything other than an Omni Dashboard will be shown and permissed regardless of the linkAccess parameter. |
None
|
prefers_dark |
PrefersDark | None
|
Dark mode setting. |
None
|
theme |
Theme | None
|
Visual theming options. |
None
|
user_attributes |
dict | None
|
Dictionary of attributes matching defined user attributes in your Omni account. |
None
|
Returns:
Type | Description |
---|---|
str
|
Signed dashboard embedding URL. |
Source code in src/omni/embed.py
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 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 |
|