@@ -140,7 +140,7 @@ export const useSharedAffectedApplicationFilterCategories = <
140
140
] ;
141
141
} ;
142
142
143
- const FROM_ISSUES_PARAMS_KEY = "~fromIssuesParams " ; // ~ prefix sorts it at the end of the URL for readability
143
+ const FROM_INSIGHTS_PARAMS_KEY = "~fromInsightsParams " ; // ~ prefix sorts it at the end of the URL for readability
144
144
145
145
// URL for Affected Apps page that includes carried filters and a snapshot of original URL params from the Insights page
146
146
export const getAffectedAppsUrl = ( {
@@ -158,16 +158,16 @@ export const getAffectedAppsUrl = ({
158
158
filterKeysToCarry . forEach ( ( key ) => {
159
159
if ( fromFilterValues [ key ] ) toFilterValues [ key ] = fromFilterValues [ key ] ;
160
160
} ) ;
161
- const baseUrl = Paths . issuesAllAffectedApplications
161
+ const baseUrl = Paths . insightsAllAffectedApplications
162
162
. replace ( "/:ruleset/" , `/${ encodeURIComponent ( ruleReport . ruleset ) } /` )
163
163
. replace ( "/:rule/" , `/${ encodeURIComponent ( ruleReport . rule ) } /` ) ;
164
164
const prefix = ( key : string ) =>
165
- `${ TablePersistenceKeyPrefix . issuesAffectedApps } :${ key } ` ;
165
+ `${ TablePersistenceKeyPrefix . insightsAffectedApps } :${ key } ` ;
166
166
167
167
return `${ baseUrl } ?${ trimAndStringifyUrlParams ( {
168
168
newPrefixedSerializedParams : {
169
169
[ prefix ( "filters" ) ] : serializeFilterUrlParams ( toFilterValues ) . filters ,
170
- [ FROM_ISSUES_PARAMS_KEY ] : fromInsightsParams ,
170
+ [ FROM_INSIGHTS_PARAMS_KEY ] : fromInsightsParams ,
171
171
insightTitle : getInsightTitle ( ruleReport ) ,
172
172
} ,
173
173
} ) } `;
@@ -183,13 +183,15 @@ export const getBackToAllInsightsUrl = ({
183
183
} ) => {
184
184
// Pull the fromInsightsParams param out of the current location's URLSearchParams
185
185
const fromInsightsParams =
186
- new URLSearchParams ( fromLocation . search ) . get ( FROM_ISSUES_PARAMS_KEY ) || "" ;
186
+ new URLSearchParams ( fromLocation . search ) . get ( FROM_INSIGHTS_PARAMS_KEY ) ||
187
+ "" ;
187
188
// Pull the params themselves out of fromInsightsParams
188
189
const prefixedParamsToRestore = Object . fromEntries (
189
190
new URLSearchParams ( fromInsightsParams )
190
191
) ;
191
192
// Pull the filters param out of that
192
- const prefix = ( key : string ) => `${ TablePersistenceKeyPrefix . issues } :${ key } ` ;
193
+ const prefix = ( key : string ) =>
194
+ `${ TablePersistenceKeyPrefix . insights } :${ key } ` ;
193
195
const filterValuesToRestore = deserializeFilterUrlParams ( {
194
196
filters : prefixedParamsToRestore [ prefix ( "filters" ) ] ,
195
197
} ) ;
@@ -199,7 +201,7 @@ export const getBackToAllInsightsUrl = ({
199
201
filterValuesToRestore [ key ] = fromFilterValues [ key ] || null ;
200
202
} ) ;
201
203
// Put it all back together
202
- return `${ Paths . issuesAllTab } ?${ trimAndStringifyUrlParams ( {
204
+ return `${ Paths . insightsAllTab } ?${ trimAndStringifyUrlParams ( {
203
205
newPrefixedSerializedParams : {
204
206
...prefixedParamsToRestore ,
205
207
[ prefix ( "filters" ) ] : serializeFilterUrlParams ( filterValuesToRestore )
@@ -229,10 +231,10 @@ export const getInsightsSingleAppSelectedLocation = (
229
231
const existingFiltersParam =
230
232
fromLocation &&
231
233
new URLSearchParams ( fromLocation . search ) . get (
232
- `${ TablePersistenceKeyPrefix . issues } :filters`
234
+ `${ TablePersistenceKeyPrefix . insights } :filters`
233
235
) ;
234
236
return {
235
- pathname : Paths . issuesSingleAppSelected . replace (
237
+ pathname : Paths . insightsSingleAppSelected . replace (
236
238
":applicationId" ,
237
239
String ( applicationId )
238
240
) ,
0 commit comments