Anonymous
2 years agoPlain text option in code widget or monospace font style option
Sometimes we need to paste in code output or text that shouldn’t be formatted the way normal text is formatted. We need either an “unformatted” language to choose from in the code widget, or we need a text option that is monospace (where every character takes up the same width so that indentation is rendered properly). For example, this log output looks like this in a code widget:
This is not what it should look like. Interestingly, if I paste the same block of text here, it’s not color coded like it is in that post. This leads me to believe that all code blocks within the same post use the same language, even if the code widget is set to “not set”.
>>> response = create_group("SDK Test",812,{"prop1":"1","prop2":"2"})
[2023-02-21 16:30:11] API SDK POST: Created resource group Customers/Longhorn Smokers/SDK Test (854)
>>> response = create_group("SDK Test",812,{"prop1":"1","prop2":"2"})
[2023-02-21 16:33:06] SUMMARY: Customers/Longhorn Smokers/SDK Test already exists in LM with all the correct properties, moving on...
>>> response = create_group("SDK Test",812,{"prop1":"1","prop2":"2"})
[2023-02-21 16:33:43] API SDK PATCH: Patched device group SDK Test
>>> debug = True
>>> info = True
>>> response = create_group("SDK Test",812,{"prop1":"1","prop2":"2"})
[2023-02-21 16:35:57] DEBUG: Group SDK Test exists in LM (854), checking if attributes match...
[2023-02-21 16:35:57] DEBUG: Property prop1 matches attribute already in LM
[2023-02-21 16:35:57] DEBUG: ================================================================================
[2023-02-21 16:35:57] DEBUG: prop1: 1
[2023-02-21 16:35:57] DEBUG: prop1: 1
[2023-02-21 16:35:57] DEBUG: ================================================================================
[2023-02-21 16:35:57] DEBUG: Property prop2 matches attribute already in LM
[2023-02-21 16:35:57] DEBUG: ================================================================================
[2023-02-21 16:35:57] DEBUG: prop2: 2
[2023-02-21 16:35:57] DEBUG: prop2: 2
[2023-02-21 16:35:57] DEBUG: ================================================================================
[2023-02-21 16:35:57] DEBUG: There is no AppliesTo that we want to patch in.
[2023-02-21 16:35:57] SUMMARY: Customers/Longhorn Smokers/SDK Test already exists in LM with all the correct properties, moving on...
[2023-02-21 16:35:57] DEBUG: 854: Customers/Longhorn Smokers/SDK Test: [{'name': 'prop2', 'value': '2'}, {'name': 'prop1', 'value': '1'}]
>>>