Skip to content

Commit 9ed6719

Browse files
committed
Merge branch 'develop' of github.com:devtron-labs/devtron-fe-common-lib into refactor/rb-tabs
2 parents 2d331fc + 8e59ff2 commit 9ed6719

File tree

6 files changed

+25
-16
lines changed

6 files changed

+25
-16
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devtron-labs/devtron-fe-common-lib",
3-
"version": "1.0.4-beta-5",
3+
"version": "1.0.6",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",

src/Common/Hooks/useUrlFilters/useUrlFilters.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ const useUrlFilters = <T = string, K = unknown>({
163163
useEffect(() => {
164164
// if we have search string, set secondary params in local storage accordingly
165165
if (location.search) {
166-
localStorage.setItem(localStorageKey, JSON.stringify(parsedParams))
166+
setItemInLocalStorageIfKeyExists(localStorageKey, JSON.stringify(parsedParams))
167167
return
168168
}
169169
const localStorageValue = localStorage.getItem(localStorageKey)

src/Common/Policy.Types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export type ProcessPluginDataParamsType = {
9595
/**
9696
* Would be sent in case we have to get data for steps
9797
*/
98-
requiredPluginIds?: PluginDetailPayloadType['pluginId']
98+
requiredPluginIds?: PluginDetailPayloadType['pluginIds']
9999
} & (ProcessPluginDataCIParamsType | ProcessPluginDataCDParamsType)
100100

101101
export enum ConsequenceAction {

src/Shared/Components/Plugin/service.tsx

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,15 @@
1414
* limitations under the License.
1515
*/
1616

17-
import { get, getIsRequestAborted, getUrlWithSearchParams, ResponseType, ROUTES, showError } from '../../../Common'
17+
import {
18+
get,
19+
getIsRequestAborted,
20+
getUrlWithSearchParams,
21+
post,
22+
ResponseType,
23+
ROUTES,
24+
showError,
25+
} from '../../../Common'
1826
import { stringComparatorBySortOrder } from '../../Helpers'
1927
import {
2028
GetParentPluginListPayloadType,
@@ -41,13 +49,14 @@ export const getPluginsDetail = async ({
4149
try {
4250
const payload: PluginDetailPayloadType = {
4351
appId,
44-
parentPluginId: parentPluginIds,
45-
pluginId: pluginIds,
46-
parentPluginIdentifier: parentPluginIdentifiers ? `${parentPluginIdentifiers}` : null,
52+
parentPluginIds,
53+
pluginIds,
54+
parentPluginIdentifiers,
4755
}
4856

49-
const { result } = await get<PluginDetailDTO>(
50-
getUrlWithSearchParams(ROUTES.PLUGIN_GLOBAL_LIST_DETAIL_V2, payload),
57+
const { result } = await post<PluginDetailDTO, PluginDetailPayloadType>(
58+
ROUTES.PLUGIN_GLOBAL_LIST_DETAIL_V2,
59+
payload,
5160
{ signal },
5261
)
5362

src/Shared/Components/Plugin/types.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,11 @@ export interface PluginDetailServiceParamsType {
9494
signal?: AbortSignal
9595
}
9696

97-
export interface PluginDetailPayloadType extends Pick<PluginDetailServiceParamsType, 'appId'> {
98-
pluginId?: PluginDetailServiceParamsType['pluginIds']
99-
parentPluginId?: PluginDetailServiceParamsType['parentPluginIds']
100-
parentPluginIdentifier?: PluginDetailServiceParamsType['parentPluginIdentifiers'][number]
101-
}
97+
export interface PluginDetailPayloadType
98+
extends Pick<
99+
PluginDetailServiceParamsType,
100+
'appId' | 'parentPluginIds' | 'pluginIds' | 'parentPluginIdentifiers'
101+
> {}
102102

103103
export interface PluginListFiltersType extends Pick<BaseFilterQueryParams<unknown>, 'searchKey'> {
104104
selectedTags: string[]

0 commit comments

Comments
 (0)