File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ export default {
109109 (state , getters ) => getters .headerNotices ,
110110 (newValue , oldValue ) => {
111111 if (oldValue !== newValue && newValue !== undefined ) {
112- this .notices = newValue . reverse ()
112+ this .notices = newValue
113113 }
114114 }
115115 )
Original file line number Diff line number Diff line change @@ -348,9 +348,13 @@ const user = {
348348 if ( noticeIdx === - 1 ) {
349349 noticeArray . push ( noticeJson )
350350 } else {
351+ const existingNotice = noticeArray [ noticeIdx ]
352+ noticeJson . timestamp = existingNotice . timestamp
351353 noticeArray [ noticeIdx ] = noticeJson
352354 }
353-
355+ noticeArray . sort ( function ( a , b ) {
356+ return new Date ( b . timestamp ) - new Date ( a . timestamp )
357+ } )
354358 commit ( 'SET_HEADER_NOTICES' , noticeArray )
355359 } ,
356360 ProjectView ( { commit } , projectid ) {
Original file line number Diff line number Diff line change @@ -65,7 +65,8 @@ export const pollJobPlugin = {
6565 key : jobId ,
6666 title,
6767 description,
68- status : 'progress'
68+ status : 'progress' ,
69+ timestamp : new Date ( )
6970 } )
7071
7172 eventBus . on ( 'update-job-details' , ( args ) => {
@@ -107,7 +108,8 @@ export const pollJobPlugin = {
107108 title,
108109 description,
109110 status : 'done' ,
110- duration : 2
111+ duration : 2 ,
112+ timestamp : new Date ( )
111113 } )
112114 eventBus . emit ( 'update-job-details' , { jobId, resourceId } )
113115 // Ensure we refresh on the same / parent page
@@ -157,7 +159,8 @@ export const pollJobPlugin = {
157159 title,
158160 description : desc ,
159161 status : 'failed' ,
160- duration : 2
162+ duration : 2 ,
163+ timestamp : new Date ( )
161164 } )
162165 eventBus . emit ( 'update-job-details' , { jobId, resourceId } )
163166 // Ensure we refresh on the same / parent page
You can’t perform that action at this time.
0 commit comments