All Apps and Add-ons

Can't find sample code for sideview utils

tsmithsplunk
Path Finder

My site site admin recently installed Sideview utils 2.2.2 on top of Splunk 4.2. Unfortunately none of the sample code is there. All the links that say "View the XML source for this view in a new window." are broken.

How can I get ahold of the sample code? Is that in a separate install? Thanks!!

1 Solution

sideview
SplunkTrust
SplunkTrust

The links that say "view the XML source for this view" actually all just send you to the XML source of the current page. In other words the sample code is always the current page itself. However to make it clearer, in the XML source you'll see that on each page the actual working example(s) for that page is always enclosed by comments that look like:

<!-- EXAMPLE BEGIN -->
...
<!-- EXAMPLE END -->

That's not great news that the links are broken of course! Can you email me any details? I had one report of the URL being incomplete -- that the view name itself was missing from the URL. Does that sound like the same problem?

If you could let me know the browser, splunk platform, splunk version, and any javascript that might be in the error console, that would be great. I'll make sure to get it fixed and I'll update this answer when I have a maintenance release out with the fix.

In the meantime though, you can just manually go to Manager >User Interface > Views, click on the given view name there, and then copy the XML you see out into a text editor.

By the way don't use the showsource=1 trick, because that method actually does some odd things like strip out comments from the XML, and that'll take away the "EXAMPLE BEGIN" comments as well as some other supplemental comments I have in there. Instead go to Manager to view the actual XML source, or for that matter go on disk to $SPLUNKHOME/etc/apps/sideview_utils/default/data/ui/views and open the relevant XML file in that directory.

View solution in original post

0 Karma

sideview
SplunkTrust
SplunkTrust

The links that say "view the XML source for this view" actually all just send you to the XML source of the current page. In other words the sample code is always the current page itself. However to make it clearer, in the XML source you'll see that on each page the actual working example(s) for that page is always enclosed by comments that look like:

<!-- EXAMPLE BEGIN -->
...
<!-- EXAMPLE END -->

That's not great news that the links are broken of course! Can you email me any details? I had one report of the URL being incomplete -- that the view name itself was missing from the URL. Does that sound like the same problem?

If you could let me know the browser, splunk platform, splunk version, and any javascript that might be in the error console, that would be great. I'll make sure to get it fixed and I'll update this answer when I have a maintenance release out with the fix.

In the meantime though, you can just manually go to Manager >User Interface > Views, click on the given view name there, and then copy the XML you see out into a text editor.

By the way don't use the showsource=1 trick, because that method actually does some odd things like strip out comments from the XML, and that'll take away the "EXAMPLE BEGIN" comments as well as some other supplemental comments I have in there. Instead go to Manager to view the actual XML source, or for that matter go on disk to $SPLUNKHOME/etc/apps/sideview_utils/default/data/ui/views and open the relevant XML file in that directory.

View solution in original post

0 Karma

sideview
SplunkTrust
SplunkTrust

OK. My apologies. I still don't know why some users are seeing it and some not, but I simplified the code and whatever the cause it'll almost certainly be fixed in the next release. In the meantime, the viewname that it wants to put on there is just the last segment of the current URL, so if the URL of the docs page is "pulldown1_static", then just put that after the "view=" part. Sorry for the inconvenience. 2.2.9 just released so the next Sideview Utils release probably wont be for a week or so.

0 Karma

tsmithsplunk
Path Finder

Yes, the view name is missing. Here's the link href: href="/en-US/custom/sideview_utils/view/show?app=sideview_utils&view="

That also makes it more difficult to page through the Views in the Manager and find the right one.

This is Splunk 4.2 on Linux. There is no javascript error. Let me know if any of the debugging info from the error page would be useful.

0 Karma
Register for .conf21 Now! Go Vegas or Go Virtual!

How will you .conf21? You decide! Go in-person in Las Vegas, 10/18-10/21, or go online with .conf21 Virtual, 10/19-10/20.