Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pulling refs/heads/main into main #918

Merged
merged 32 commits into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
a7426d9
update conf.py
bhillmer Jul 28, 2023
d72ab1e
add images.py
bhillmer Jul 28, 2023
c4a30a9
update conf.py
bhillmer Jul 28, 2023
b06aed6
update extension
bhillmer Jul 28, 2023
6b74942
update docker
bhillmer Jul 28, 2023
73e84e4
remove pip install from dockerfile
bhillmer Jul 31, 2023
954914b
add extension to requirements.txt
bhillmer Jul 31, 2023
27f0eb4
override default image directive
bhillmer Jul 31, 2023
ac1dae0
fix override
bhillmer Jul 31, 2023
fac7459
style changes in logs topic
bhillmer Jul 31, 2023
5f4f27a
remove Settings image
bhillmer Jul 31, 2023
1fcd330
try new directive
bhillmer Aug 1, 2023
f3bed7a
update directive name
bhillmer Aug 1, 2023
27463fb
update directive name
bhillmer Aug 1, 2023
14a3728
update directive name
bhillmer Aug 1, 2023
644e3a4
Fix Python module and add setup function
theletterf Sep 12, 2023
2b78c8d
Merge from main and solve conflicts
theletterf Sep 12, 2023
e55c37f
Fix comma
theletterf Sep 12, 2023
be7e281
update inline images
bhillmer Sep 12, 2023
e7585b8
resize large image found when testing
bhillmer Sep 12, 2023
dd22bce
Add Linux options
theletterf Sep 13, 2023
731f01c
Windows script docs
theletterf Sep 13, 2023
4c69289
Add default column
theletterf Sep 13, 2023
4b20df6
Typos
theletterf Sep 13, 2023
049f68e
remove opacity overlay from images
bhillmer Sep 13, 2023
349720e
Typo
theletterf Sep 13, 2023
d572b7e
Peer edits
theletterf Sep 13, 2023
47cdd94
Last edits
theletterf Sep 13, 2023
d432fcd
Merge pull request #1297 from splunk/theletterf-o11ydocs-5673-collect…
theletterf Sep 13, 2023
ee183e9
Merge branch 'main' into repo-sync
theletterf Sep 13, 2023
e15b43a
Merge pull request #1298 from splunk/repo-sync
theletterf Sep 13, 2023
c2276d1
Merge pull request #1162 from splunk/bhillmer-DOCS-1427-image-lightbox
bhillmer Sep 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 96 additions & 0 deletions _ext/imagetarget.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# $Id$
# Author: David Goodger <[email protected]>
# Copyright: This module has been placed in the public domain.

"""
Directives for figures and simple images.
"""

__docformat__ = 'reStructuredText'


import sys
from docutils import nodes, utils
from docutils.parsers.rst import Directive
from docutils.parsers.rst import directives, states
from docutils.nodes import fully_normalize_name, whitespace_normalize_name
from docutils.parsers.rst.roles import set_classes


class imagetarget(Directive):

align_h_values = ('left', 'center', 'right')
align_v_values = ('top', 'middle', 'bottom')
align_values = align_v_values + align_h_values

def align(argument):
# This is not callable as self.align. We cannot make it a
# staticmethod because we're saving an unbound method in
# option_spec below.
return directives.choice(argument, imagetarget.align_values)

required_arguments = 1
optional_arguments = 0
final_argument_whitespace = True
option_spec = {'alt': directives.unchanged,
'height': directives.length_or_unitless,
'width': directives.length_or_percentage_or_unitless,
'scale': directives.percentage,
'align': align,
'target': directives.unchanged_required,
'class': directives.class_option}

def run(self):
if 'align' in self.options:
if isinstance(self.state, states.SubstitutionDef):
# Check for align_v_values.
if self.options['align'] not in self.align_v_values:
raise self.error(
'Error in "%s" directive: "%s" is not a valid value '
'for the "align" option within a substitution '
'definition. Valid values for "align" are: "%s".'
% (self.name, self.options['align'],
'", "'.join(self.align_v_values)))
elif self.options['align'] not in self.align_h_values:
raise self.error(
'Error in "%s" directive: "%s" is not a valid value for '
'the "align" option. Valid values for "align" are: "%s".'
% (self.name, self.options['align'],
'", "'.join(self.align_h_values)))
messages = []
reference = directives.uri(self.arguments[0])
self.options['uri'] = reference
reference_node = None
if 'target' in self.options:
block = states.escape2null(
self.options['target']).splitlines()
block = [line for line in block]
target_type, data = self.state.parse_target(
block, self.block_text, self.lineno)
if target_type == 'refuri':
reference_node = nodes.reference(refuri=data)
elif target_type == 'refname':
reference_node = nodes.reference(
refname=fully_normalize_name(data),
name=whitespace_normalize_name(data))
reference_node.indirect_reference_name = data
self.state.document.note_refname(reference_node)
else: # malformed target
messages.append(data) # data is a system message
del self.options['target']
set_classes(self.options)
imagetarget_node = nodes.image(self.block_text, **self.options)
if reference_node:
reference_node += imagetarget_node
return messages + [reference_node]
else:
return messages + [imagetarget_node]

def setup(app):
app.add_directive("imagetarget", imagetarget)

return {
'version': '1.0',
'parallel_read_safe': True,
'parallel_write_safe': True,
}
6 changes: 3 additions & 3 deletions _static/signalfx-includes.css
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,9 @@ color:#0B599D !important;
text-decoration:none;
}

a:hover {
opacity:0.5;
text-decoration:none;
a.reference:hover {
opacity: .5;
text-decoration: none;
}

a:active {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ The following tables describe the variables and helper functions you can use whe
.. Note:: :ref:`Different additional variables may be available<condition-variables>` depending on the alert condition you specify. If you change the alert condition after customizing the message, an icon on the Message preview tab appears.

.. image:: /_images/images-detectors-alerts/message-tab-icon.png
:width: 20%
:alt: This image shows the message tab icon.

This is to remind you to review the message, since some variables you used might no longer apply to the new condition you selected. The icon is removed when you navigate away from the Message preview tab.
Expand Down
14 changes: 11 additions & 3 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@
'optimizer',
'myst_parser',
'sphinx_tabs.tabs',
'sphinxcontrib.mermaid',
'olly_on_git_hub'
'olly_on_git_hub',
'sphinxcontrib.images',
'imagetarget',
'sphinxcontrib.mermaid'
]

html_context = {
Expand Down Expand Up @@ -104,6 +106,12 @@
linkcheck_exclude_documents = [r'_.*', r'\.github', r'myst_parser', r'tests']
linkcheck_ignore = [r'https://ingest.*',r'https://app.*',r'https://login.*',r'.*\<.*',r'https://api.*',r'https://rum-ingest.*',r'https://proxy.*',r'https://example.*', r'https://domain.com.*', r'.*domain/path.*', r'.*signalfx.com.*', r'.*your_realm.*', r'.*your_domain.*']

# Image settings

images_config = {
'override_image_directive': True
}

# ROLES AND MACROS
#######################

Expand All @@ -124,7 +132,7 @@


.. |takeshift| image:: /_images/incident-intelligence/Incident-intelligence-take-shift-icon.png
.. |takeshift| imagetarget:: /_images/incident-intelligence/Incident-intelligence-take-shift-icon.png
:alt: Take shift
:class: inline-image

Expand Down
Loading