You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@splunk/dashboard-core

Package Overview
Dependencies
Maintainers
2
Versions
128
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@splunk/dashboard-core

Unify Dashboard Framework

20.4.0
npmnpm
Version published
Weekly downloads
358
-44.92%
Maintainers
2
Weekly downloads
 
Created
Source

@splunk/dashboard-core

@splunk/dashboard-core is a core component in Dashboard Framework that manages the state between visualizations, inputs and their datasources.

It renders a dashboard according to a JSON definition.

Install

npm install react react-dom styled-components @splunk/react-ui @splunk/dashboard-core @splunk/dashboard-presets

    --or--

yarn add react react-dom styled-components @splunk/react-ui @splunk/dashboard-core @splunk/dashboard-presets

Usage

import React from 'react';
import DashboardCore from '@splunk/dashboard-core';
import CloudViewOnlyPreset from '@splunk/dashboard-presets/CloudViewOnlyPreset';

const definition = {
    dataSources: {
        search1: {
            options: {
                data: {
                    columns: [['168']],
                    fields: [
                        {
                            name: 'count',
                        },
                    ],
                },
                meta: {},
            },
            type: 'ds.test',
        },
    },
    visualizations: {
        single1: {
            type: 'viz.singlevalue',
            options: {},
            dataSources: {
                primary: 'search1',
            },
        },
        single2: {
            type: 'viz.singlevalue',
            options: {},
            dataSources: {
                primary: 'search1',
            },
        },
        single3: {
            type: 'viz.singlevalue',
            options: {},
            dataSources: {
                primary: 'search1',
            },
        },
    },
    layout: {
        type: 'absolute',
        options: {
            width: 1000,
            height: 400,
        },
        structure: [
            {
                item: 'single1',
                position: {
                    x: 0,
                    y: 100,
                    w: 200,
                    h: 200,
                },
            },
            {
                item: 'single2',
                position: {
                    x: 400,
                    y: 100,
                    w: 200,
                    h: 200,
                },
            },
            {
                item: 'single3',
                position: {
                    x: 800,
                    y: 100,
                    w: 200,
                    h: 200,
                },
            },
        ],
    },
};

export default () => (
    <DashboardCore
        width="100%"
        height={450}
        preset={CloudViewOnlyPreset}
        definition={definition}
    />
);

FAQs

Package last updated on 18 Dec 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts