Plain 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:
Using the code widget and choosing “not set”, which I expected to have no color coding.
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"})<br/>[2023-02-21 16:30:11] API SDK POST: Created resource group Customers/Longhorn Smokers/SDK Test (854)<br/>>>> response = create_group("SDK Test",812,{"prop1":"1","prop2":"2"})<br/>[2023-02-21 16:33:06] SUMMARY: Customers/Longhorn Smokers/SDK Test already exists in LM with all the correct properties, moving on...<br/>>>> response = create_group("SDK Test",812,{"prop1":"1","prop2":"2"})<br/>[2023-02-21 16:33:43] API SDK PATCH: Patched device group SDK Test<br/>>>> debug = True<br/>>>> info = True<br/>>>> response = create_group("SDK Test",812,{"prop1":"1","prop2":"2"})<br/>[2023-02-21 16:35:57] DEBUG: Group SDK Test exists in LM (854), checking if attributes match...<br/>[2023-02-21 16:35:57] DEBUG: Property prop1 matches attribute already in LM<br/>[2023-02-21 16:35:57] DEBUG: ================================================================================<br/>[2023-02-21 16:35:57] DEBUG: prop1: 1<br/>[2023-02-21 16:35:57] DEBUG: prop1: 1<br/>[2023-02-21 16:35:57] DEBUG: ================================================================================<br/>[2023-02-21 16:35:57] DEBUG: Property prop2 matches attribute already in LM<br/>[2023-02-21 16:35:57] DEBUG: ================================================================================<br/>[2023-02-21 16:35:57] DEBUG: prop2: 2<br/>[2023-02-21 16:35:57] DEBUG: prop2: 2<br/>[2023-02-21 16:35:57] DEBUG: ================================================================================<br/>[2023-02-21 16:35:57] DEBUG: There is no AppliesTo that we want to patch in.<br/>[2023-02-21 16:35:57] SUMMARY: Customers/Longhorn Smokers/SDK Test already exists in LM with all the correct properties, moving on...<br/>[2023-02-21 16:35:57] DEBUG: 854: Customers/Longhorn Smokers/SDK Test: [{'name': 'prop2', 'value': '2'}, {'name': 'prop1', 'value': '1'}]<br/>>>>
LM User
Posted 3 years ago·Last reply 3 years ago
8 comments
Unavailable member
·3 years ago
Their profile isn't available.
Sorry for the delay! Ticket has been logged for this, if there is no solution I’ll submit an idea!
Mark_Hensler
·3 years ago
I hadn’t noticed that powershell was not supported. That’s concerning.
Oooh, I hadn’t noticed that, either. Yikes!
LM User
OP3 years ago
Because LM didn’t write this community software. A11ey’s probably requested it, but unless it was built with extensibility in mind, I doubt we’ll see anything change there any time soon..
I hadn’t noticed that powershell was not supported. That’s concerning.
Mark_Hensler
·3 years ago
I did pick Java.
But LogicModules can only be written in two languages. How is it that they are not both supported by this code widget?
LM User
OP3 years ago
I’m not surprised, Groovy just isn’t that common outside certain circles. Just use Java, they’re basically the same, syntactically.
Mark_Hensler
·3 years ago
I just posted an excerpt from a LogicModule that I wrote, and I was surprised to see that Groovy is not an option for the language.
Mark_Hensler
·3 years ago
+1 vote
Cole McDonald
·3 years ago
Seconded, Most of the solutions I end up posting contain code blocks and non-monospaced fonts make it very difficult to read.
Unavailable member
·3 years agoSorry for the delay! Ticket has been logged for this, if there is no solution I’ll submit an idea!
Mark_Hensler
·3 years agoI hadn’t noticed that powershell was not supported. That’s concerning.
Oooh, I hadn’t noticed that, either. Yikes!
LM User
OP3 years agoBecause LM didn’t write this community software. A11ey’s probably requested it, but unless it was built with extensibility in mind, I doubt we’ll see anything change there any time soon..
I hadn’t noticed that powershell was not supported. That’s concerning.
Mark_Hensler
·3 years agoI did pick Java.
But LogicModules can only be written in two languages. How is it that they are not both supported by this code widget?
LM User
OP3 years agoI’m not surprised, Groovy just isn’t that common outside certain circles. Just use Java, they’re basically the same, syntactically.
Mark_Hensler
·3 years agoI just posted an excerpt from a LogicModule that I wrote, and I was surprised to see that Groovy is not an option for the language.
Mark_Hensler
·3 years ago+1 vote
Cole McDonald
·3 years agoSeconded, Most of the solutions I end up posting contain code blocks and non-monospaced fonts make it very difficult to read.