From 2347dfb4183ec7ee55fc3186cd15b2c779cecc3a Mon Sep 17 00:00:00 2001 From: Viktor Tsvetkov <142901247+vtsvetkov-splunk@users.noreply.github.com> Date: Wed, 10 Jul 2024 15:47:50 +0200 Subject: [PATCH 1/3] docs(storybook): fix storybook build (#1279) --- ui/.storybook/withSplunkTheme.tsx | 5 ++--- ui/src/pages/EntryPageStyle.js | 8 +++++++- ui/src/pages/entry_page.jsx | 12 ++---------- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/ui/.storybook/withSplunkTheme.tsx b/ui/.storybook/withSplunkTheme.tsx index b70973317..e76845284 100644 --- a/ui/.storybook/withSplunkTheme.tsx +++ b/ui/.storybook/withSplunkTheme.tsx @@ -4,9 +4,8 @@ import { AnimationToggleProvider } from '@splunk/react-ui/AnimationToggle'; import { SplunkThemeProvider } from '@splunk/themes'; import { BrowserRouter as Router } from 'react-router-dom'; import React, { Suspense } from 'react'; -import { StyledContainer } from '../src/pages/EntryPageStyle'; +import { GlobalBodyStyle, StyledContainer } from '../src/pages/EntryPageStyle'; import { WaitSpinnerWrapper } from '../src/components/table/CustomTableStyle'; -import { GlobalStyle } from '../src/pages/entry_page'; import fontDefinitions from './fontDefinitions'; const TestStylesForConsistentScreenshots = createGlobalStyle` @@ -34,7 +33,7 @@ export const withSplunkThemeToolbar = ( - + }> diff --git a/ui/src/pages/EntryPageStyle.js b/ui/src/pages/EntryPageStyle.js index 57446cc8b..d4c3830fc 100644 --- a/ui/src/pages/EntryPageStyle.js +++ b/ui/src/pages/EntryPageStyle.js @@ -1,4 +1,4 @@ -import styled from 'styled-components'; +import styled, { createGlobalStyle } from 'styled-components'; import { variables, mixins } from '@splunk/themes'; import Button from '@splunk/react-ui/Button'; @@ -20,4 +20,10 @@ const StyledButton = styled(Button)` min-width: 80px; `; +export const GlobalBodyStyle = createGlobalStyle` + body { + background-color: ${variables.backgroundColorPage}; + } +`; + export { StyledContainer, StyledGreeting, StyledButton }; diff --git a/ui/src/pages/entry_page.jsx b/ui/src/pages/entry_page.jsx index fcfe98a6e..f8eadf014 100644 --- a/ui/src/pages/entry_page.jsx +++ b/ui/src/pages/entry_page.jsx @@ -3,11 +3,9 @@ import layout from '@splunk/react-page'; import { BrowserRouter as Router } from 'react-router-dom'; import { SplunkThemeProvider } from '@splunk/themes'; import { getUserTheme } from '@splunk/splunk-utils/themes'; -import { createGlobalStyle } from 'styled-components'; -import colors from '@splunk/themes/variables'; import { WaitSpinnerWrapper } from '../components/table/CustomTableStyle'; -import { StyledContainer } from './EntryPageStyle'; +import { GlobalBodyStyle, StyledContainer } from './EntryPageStyle'; import { PAGE_CONF, PAGE_DASHBOARD, PAGE_INPUT } from '../constants/pages'; import ConfigManager from '../util/configManager'; import messageDict from '../constants/messageDict'; @@ -25,12 +23,6 @@ const DashboardPage = React.lazy(() => import(/* webpackPrefetch: true */ './Dashboard/DashboardPage') ); -export const GlobalStyle = createGlobalStyle` - body { - background-color: ${colors.backgroundColorPage}; - } -`; - // Take in a component as argument WrappedComponent function higherOrderComponent(WrappedComponent) { // And return another component @@ -39,7 +31,7 @@ function higherOrderComponent(WrappedComponent) { render() { return ( - + From efaa02542324befe325d6129a889f27e1be13975 Mon Sep 17 00:00:00 2001 From: Viktor Tsvetkov <142901247+vtsvetkov-splunk@users.noreply.github.com> Date: Thu, 11 Jul 2024 11:15:37 +0200 Subject: [PATCH 2/3] docs(CHANGELOG): fix title level for 5.47.0 (#1283) --- docs/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 401504aa3..7ff6d5416 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -15,7 +15,7 @@ * **select entity:** allow custom mapping for values ([#1265](https://github.com/splunk/addonfactory-ucc-generator/issues/1265)) ([202f046](https://github.com/splunk/addonfactory-ucc-generator/commit/202f046c662427b7123825d42b5baecba9355071)) -[5.47.0](https://github.com/splunk/addonfactory-ucc-generator/compare/v5.46.0...v5.47.0) (2024-06-25) +# [5.47.0](https://github.com/splunk/addonfactory-ucc-generator/compare/v5.46.0...v5.47.0) (2024-06-25) ### Bug Fixes From 571bef7450e994bac4fecf98376f58525cceec85 Mon Sep 17 00:00:00 2001 From: soleksy-splunk <143183665+soleksy-splunk@users.noreply.github.com> Date: Thu, 11 Jul 2024 12:03:58 +0200 Subject: [PATCH 3/3] fix: schema for mapping custom api value (#1281) **Issue number:**[ADDON-72535](https://splunk.atlassian.net/browse/ADDON-72535) ## Summary Schema changes that allow valueField inside globalConfig file ### Changes Allow optional string property valueField inside globalConfig file ### User experience User can build with valueField in globalConfig ## Checklist If your change doesn't seem to apply, please leave them unchecked. * [x] I have performed a self-review of this change * [ ] Changes have been tested * [ ] Changes are documented * [x] PR title follows [conventional commit semantics](https://www.conventionalcommits.org/en/v1.0.0/) --- splunk_add_on_ucc_framework/schema/schema.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/splunk_add_on_ucc_framework/schema/schema.json b/splunk_add_on_ucc_framework/schema/schema.json index 7d6dfb74f..5175ffdd7 100644 --- a/splunk_add_on_ucc_framework/schema/schema.json +++ b/splunk_add_on_ucc_framework/schema/schema.json @@ -785,6 +785,10 @@ "type": "string", "description": "If you use endpointUrl and your data are not simple text data, you can specify here which property of retrieved object should be used.```item.content?.[labelField]``` " }, + "valueField": { + "type": "string", + "description": "If you use endpointUrl and your data are not simple text data, you can specify here which property of retrieved object should be used as value for each item.```item.content?.[valueField]```" + }, "autoCompleteFields": { "$ref": "#/definitions/AutoCompleteFields" }, @@ -914,6 +918,10 @@ "type": "string", "description": "If you use endpointUrl and your data are not simple text data, you can specify here which property of retrieved object should be used.```item.content?.[labelField]``` " }, + "valueField": { + "type": "string", + "description": "If you use endpointUrl and your data are not simple text data, you can specify here which property of retrieved object should be used as value for each item.```item.content?.[valueField]```" + }, "autoCompleteFields": { "$ref": "#/definitions/AutoCompleteFields" },