Splunk Cloud Platform

Is it possible to embed the Angular app I have developed in Splunk enterprise?

nikupiku
Explorer

Hi,

I am very new to Splunk.
I am familiar with angular as we do all our projects in angular.

I would like to know if it is possible to embed the angular app I have developed in Splunk enterprise?

I have followed a similar tutorial for react and it works just fine.
https://github.com/robertsobolczyk/splunk-react-app

I was wondering if similar is possible for Angular 2+?

Any help would be highly appriciated.

Thanks

Labels (2)
Tags (1)
0 Karma

FNFI_Aniruddha
Observer

Found solution for angular 2+, Kindly reply back if you any.

0 Karma

nikupiku
Explorer

Great. Could you please share what you have found. I would like to see it.
Thanks

0 Karma

FNFI_Aniruddha
Observer

I did not found  and i am also looking for the solution.

0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

@nikupiku 

Yes, It is possible.. If you are good with React or Angular you can easily integrate it with splunk. Please check below my POC example .

XML

<dashboard script="a.js">
<label>Angular JS Integration</label>
<row>
  <panel>
    <html>
      <div ng-app="">
 
<p>Name: <input type="text" ng-model="name"/></p>
<p>You wrote: {{ name }}</p>

</div>
    </html>
  </panel>
</row>
</dashboard>

 

a.js

'use strict';

requirejs.config({

    baseUrl: '',

    paths: {
        'angular_kv': 'https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.8.2/angular',
    },

    shim: {
        'angular_kv': {
            deps: ['jquery'],
            exports: 'angular_kv'
        },
    }
});

require([
    'jquery',
    'splunkjs/mvc',
    'angular_kv',
    'splunkjs/mvc/simplexml/ready!'
], function($, mvc, angular) {
    console.log('angular');

});

 

I hope this will help you.

Thanks
KV

If any of my reply helps you to solve the problem Or gain knowledge, an upvote would be appreciated.

0 Karma

nikupiku
Explorer

Hi @kamlesh_vaghela ,

Thank you for your reply, but looks like you are posting solution for angular js not angular 2+.

angular js and angular 2+ are different framework.


 

0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

Attaching screen.

Screenshot 2022-03-07 at 9.40.09 AM.png

 

You can add app and route as per your requirement.

KV

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...