File tree Expand file tree Collapse file tree 3 files changed +17
-20
lines changed Expand file tree Collapse file tree 3 files changed +17
-20
lines changed Original file line number Diff line number Diff line change @@ -179,19 +179,6 @@ export default defineComponent({
179179 this .query = querystring .parse (search)
180180 },
181181
182- setSessionUuid () {
183- if (window .sessionStorage .getItem (' session_uuid' ) == null ) {
184- window .sessionStorage .setItem (' session_uuid' , uuidv4 ())
185- }
186- if (this .query [` stsApplicationId` ]) {
187- let currentSessionUuid =
188- window .sessionStorage .getItem (' session_uuid' ) || ' '
189- let updatedSessionUuid =
190- this .query [` stsApplicationId` ] + currentSessionUuid
191- window .sessionStorage .setItem (' session_uuid' , updatedSessionUuid)
192- }
193- },
194-
195182 setTheme () {
196183 window [rendApi .GLOBAL_SYMBOL_EXECUTE ](
197184 rendApi .id .setDarkTheme ,
@@ -339,8 +326,8 @@ export default defineComponent({
339326 }
340327 )
341328
342- this .$onWebSocket (dbEnum .wsCategory .dirtyFlag , () => {
343- this .$store .dispatch (' zap/setDirtyState' )
329+ this .$onWebSocket (dbEnum .wsCategory .dirtyFlag , (resp ) => {
330+ this .$store .dispatch (' zap/setDirtyState' , resp )
344331 })
345332 },
346333 addClassToBody () {
@@ -350,7 +337,6 @@ export default defineComponent({
350337 },
351338 created () {
352339 this .parseQueryString ()
353- this .setSessionUuid ()
354340 this .setTheme ()
355341 this .routePage ()
356342 },
Original file line number Diff line number Diff line change @@ -19,15 +19,27 @@ import axios from 'axios'
1919import { v4 as uuidv4 } from 'uuid'
2020import restApi from '../../src-shared/rest-api.js'
2121import * as Util from '../util/util.js'
22+ const querystring = require ( 'querystring' )
2223
2324let zapUpdateExceptions = ( payload , statusCode , message ) => { }
2425
2526// You can set this to false to not log all the roundtrips
2627const log = false
2728
29+ let search = window . location . search
30+
31+ if ( search [ 0 ] === '?' ) {
32+ search = search . substring ( 1 )
33+ }
34+ let query = querystring . parse ( search )
2835if ( window . sessionStorage . getItem ( 'session_uuid' ) == null ) {
2936 window . sessionStorage . setItem ( 'session_uuid' , uuidv4 ( ) )
3037}
38+ if ( query [ `stsApplicationId` ] ) {
39+ let currentSessionUuid = window . sessionStorage . getItem ( 'session_uuid' ) || ''
40+ let updatedSessionUuid = query [ `stsApplicationId` ] + currentSessionUuid
41+ window . sessionStorage . setItem ( 'session_uuid' , updatedSessionUuid )
42+ }
3143
3244/**
3345 * URL rewriter that can come handy in development mode.
Original file line number Diff line number Diff line change @@ -1281,11 +1281,10 @@ export function updateSelectedUcComponentState(context, projectInfo) {
12811281/**
12821282 * Set the dirty state for ZAP config when there are unsaved changes.
12831283 * @param {* } context
1284+ * @param {* } isDirty
12841285 */
1285- export function setDirtyState ( context ) {
1286- axiosRequests . $serverGet ( restApi . ide . isDirty ) . then ( ( resp ) => {
1287- context . commit ( 'setDirtyState' , resp . data . DIRTY )
1288- } )
1286+ export function setDirtyState ( context , isDirty ) {
1287+ context . commit ( 'setDirtyState' , isDirty )
12891288}
12901289
12911290/**
You can’t perform that action at this time.
0 commit comments