diff --git a/frontend/src/api/API.ts b/frontend/src/api/API.ts index 02fee216a..3195b4f7d 100644 --- a/frontend/src/api/API.ts +++ b/frontend/src/api/API.ts @@ -195,12 +195,19 @@ export default class API { static getInstances( applicationID: string, groupID: string, - queryOptions = {} + queryOptions: { + [key: string]: any; + } = {} ): Promise { let url = BASE_URL + '/apps/' + applicationID + '/groups/' + groupID + '/instances'; if (!_.isEmpty(queryOptions)) { - url += '?' + queryString.stringify(queryOptions); + let sanitizedOptions = queryOptions; + const { version, ...otherOptions } = queryOptions; + if (!version) { + sanitizedOptions = otherOptions; + } + url += '?' + queryString.stringify(sanitizedOptions); } return API.getJSON(url); diff --git a/frontend/src/components/Footer.stories.tsx b/frontend/src/components/Footer.stories.tsx new file mode 100644 index 000000000..613ceb684 --- /dev/null +++ b/frontend/src/components/Footer.stories.tsx @@ -0,0 +1,46 @@ +import { createStore } from '@reduxjs/toolkit'; +import { Meta, Story } from '@storybook/react/types-6-0'; +import { Provider } from 'react-redux'; +import { MemoryRouter } from 'react-router-dom'; +import FooterComponent from './Footer'; + +export default { + title: 'Footer', + component: FooterComponent, + argTypes: {}, + decorators: [ + Story => { + return ( + + + + ); + }, + ], +} as Meta; + +const Template: Story = args => { + // eslint-disable-next-line no-unused-vars + const store = createStore((state = { config: {} }, action) => state, { + config: { + ...args, + }, + }); + return ( + + + + ); +}; + +export const FooterNoOverride = Template.bind({}); +FooterNoOverride.args = { + title: '', + nebraska_version: '', +}; + +export const FooterOverride = Template.bind({}); +FooterOverride.args = { + title: 'Some Pro Update Service', + nebraska_version: '1.2.3', +}; diff --git a/frontend/src/components/__snapshots__/Footer.stories.storyshot b/frontend/src/components/__snapshots__/Footer.stories.storyshot new file mode 100644 index 000000000..b92938b3a --- /dev/null +++ b/frontend/src/components/__snapshots__/Footer.stories.storyshot @@ -0,0 +1,25 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Storyshots Footer Footer No Override 1`] = ` +
+
+ Nebraska +
+
+`; + +exports[`Storyshots Footer Footer Override 1`] = ` +
+
+ Some Pro Update Service 1.2.3 +
+
+`;