Book Image

Learning Splunk Web Framework

By : Vincent Sesto
Book Image

Learning Splunk Web Framework

By: Vincent Sesto

Overview of this book

Building rich applications on the Web using Splunk is now simpler than ever before with the Splunk Web Framework. It empowers developers to build their own web applications with custom dashboards, tables, charts, form searches, and other functionalities in the datasets at their disposal. The book will start with the fundamentals of the Splunk Web Framework, teaching you the secrets of building interesting and user-friendly applications. In the first application, you will learn to analyze and monitor traffic hitting the NASA website and learn to create dashboards for it. You will then learn additional, and more detailed, techniques to enhance the functionalities of the app such as dashboards and forms, editing simple XML, using simple XML extensions, tokens, post-process searches, dynamic drill-downs, the Splunk Web Framework and REST API, and much more. The second app will use historical stock market data and will create custom dashboards using Splunk Web Framework; the book will now cover important topics such as creating HTML dashboards, enhancing the visual appeal of the app using CSS, and moving your app with SplunkJS. The book will provide different and interesting examples instead of the usual “Log, Index, Search, and Graph” so that Splunk will be the first tool readers think of to resolve a problem.
Table of Contents (15 chapters)
Learning Splunk Web Framework
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface

Inline style sheets


We can specify the style of the element that we are working on whenever we want to change the way that a specific element is to look. Using CSS in this way is not very efficient and will only change the styles of the specific element we are working on. For example, if we want all the h1 heading elements in our dashboard to use a specific color, we need to make this same change every time we use the h1 element. It would be a lot easier to set up the CSS as part of the header or as part of an external CSS file, so we can use it for all our HTML code.

Defining styles inline would only be used for one off corrections or changes, and it would be very limited in the instances that you would be using this type of rule definition. In our example, we will make a quick change to the way our heading is currently displayed to give you an idea of how the Splunk HTML code will use an inline style definition. Log back into your development environment and we will get started:

  1. Move into...