Просмотр исходного кода

Rename editSession -> editingSession

Alberto Fernández Capel 8 лет назад
Родитель
Сommit
0bef5531bb

+ 2 - 2
services/web/app/coffee/Features/Analytics/AnalyticsController.coffee

@@ -3,11 +3,11 @@ Errors = require "../Errors/Errors"
 AuthenticationController = require("../Authentication/AuthenticationController")
 AuthenticationController = require("../Authentication/AuthenticationController")
 
 
 module.exports = AnalyticsController =
 module.exports = AnalyticsController =
-	updateEditSession: (req, res, next) ->
+	updateEditingSession: (req, res, next) ->
 		userId    = AuthenticationController.getLoggedInUserId(req) or req.sessionID
 		userId    = AuthenticationController.getLoggedInUserId(req) or req.sessionID
 		projectId = req.params.projectId
 		projectId = req.params.projectId
 
 
-		AnalyticsManager.updateEditSession userId, projectId, {}, (error) ->
+		AnalyticsManager.updateEditingSession userId, projectId, {}, (error) ->
 			if error instanceof Errors.ServiceNotConfiguredError
 			if error instanceof Errors.ServiceNotConfiguredError
 				# ignore, no-op
 				# ignore, no-op
 				return res.send(204)
 				return res.send(204)

+ 2 - 2
services/web/app/coffee/Features/Analytics/AnalyticsManager.coffee

@@ -39,7 +39,7 @@ module.exports =
 			url: "/user/#{user_id}/event"
 			url: "/user/#{user_id}/event"
 		makeRequest opts, callback
 		makeRequest opts, callback
 
 
-	updateEditSession: (userId, projectId, segmentation = {}, callback = (error) ->) ->
+	updateEditingSession: (userId, projectId, segmentation = {}, callback = (error) ->) ->
 		if userId+"" == settings.smokeTest?.userId+""
 		if userId+"" == settings.smokeTest?.userId+""
 			return callback()
 			return callback()
 		opts =
 		opts =
@@ -48,7 +48,7 @@ module.exports =
 			json: true
 			json: true
 			method: "PUT"
 			method: "PUT"
 			timeout: 1000
 			timeout: 1000
-			url: "/editSession?userId=#{userId}&projectId=#{projectId}"
+			url: "/editingSession?userId=#{userId}&projectId=#{projectId}"
 		makeRequest opts, callback
 		makeRequest opts, callback
 
 
 
 

+ 4 - 1
services/web/app/coffee/Features/Analytics/AnalyticsRouter.coffee

@@ -5,7 +5,10 @@ AnalyticsProxy = require('./AnalyticsProxy')
 module.exports =
 module.exports =
 	apply: (webRouter, privateApiRouter, publicApiRouter) ->
 	apply: (webRouter, privateApiRouter, publicApiRouter) ->
 		webRouter.post '/event/:event', AnalyticsController.recordEvent
 		webRouter.post '/event/:event', AnalyticsController.recordEvent
-		webRouter.put  '/editSession/:projectId', AnalyticsController.updateEditSession
+
+		webRouter.put  '/editingSession/:projectId',
+			AnalyticsController.updateEditingSession
+
 		publicApiRouter.use '/analytics/graphs',
 		publicApiRouter.use '/analytics/graphs',
 			AuthenticationController.httpAuth,
 			AuthenticationController.httpAuth,
 			AnalyticsProxy.call('/graphs')
 			AnalyticsProxy.call('/graphs')

+ 2 - 2
services/web/public/coffee/ide/editor/directives/aceEditor.coffee

@@ -301,8 +301,8 @@ define [
 				onChange = () ->
 				onChange = () ->
 					updateCount++
 					updateCount++
 
 
-					projectId = _.last( location.pathname.split("/"))
-					event_tracking.editSessionHeartbeat(projectId)
+					projectId = _.last(location.pathname.split("/"))
+					event_tracking.editingSessionHeartbeat(projectId)
 
 
 					if updateCount == 100
 					if updateCount == 100
 						event_tracking.send 'editor-interaction', 'multi-doc-update'
 						event_tracking.send 'editor-interaction', 'multi-doc-update'

+ 2 - 2
services/web/public/coffee/main/event.coffee

@@ -35,9 +35,9 @@ define [
 			send: (category, action, label, value)->
 			send: (category, action, label, value)->
 				ga('send', 'event', category, action, label, value)
 				ga('send', 'event', category, action, label, value)
 
 
-			editSessionHeartbeat: _.throttle( (projectId, segmentation = {}) ->
+			editingSessionHeartbeat: _.throttle( (projectId, segmentation = {}) ->
 				$http({
 				$http({
-					url: "/editSession/#{projectId}",
+					url: "/editingSession/#{projectId}",
 					method: "PUT",
 					method: "PUT",
 					data: segmentation,
 					data: segmentation,
 					headers: {
 					headers: {