mirror of https://github.com/jumpserver/jumpserver
				
				
				
			
						commit
						0910236f12
					
				| 
						 | 
					@ -141,7 +141,7 @@ class SessionJoinValidateAPI(views.APIView):
 | 
				
			||||||
        if not session:
 | 
					        if not session:
 | 
				
			||||||
            msg = _('Session does not exist: {}'.format(session_id))
 | 
					            msg = _('Session does not exist: {}'.format(session_id))
 | 
				
			||||||
            return Response({'ok': False, 'msg': msg}, status=401)
 | 
					            return Response({'ok': False, 'msg': msg}, status=401)
 | 
				
			||||||
        if not session.can_join():
 | 
					        if not session.can_join:
 | 
				
			||||||
            msg = _('Session is finished or the protocol not supported')
 | 
					            msg = _('Session is finished or the protocol not supported')
 | 
				
			||||||
            return Response({'ok': False, 'msg': msg}, status=401)
 | 
					            return Response({'ok': False, 'msg': msg}, status=401)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -243,6 +243,7 @@ class Session(OrgModelMixin):
 | 
				
			||||||
            return True
 | 
					            return True
 | 
				
			||||||
        return False
 | 
					        return False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @property
 | 
				
			||||||
    def can_join(self):
 | 
					    def can_join(self):
 | 
				
			||||||
        if self.is_finished:
 | 
					        if self.is_finished:
 | 
				
			||||||
            return False
 | 
					            return False
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -236,7 +236,7 @@ $(document).ready(function() {
 | 
				
			||||||
}).on('click', '.btn-replay', function () {
 | 
					}).on('click', '.btn-replay', function () {
 | 
				
			||||||
    var sessionID = $(this).data("session");
 | 
					    var sessionID = $(this).data("session");
 | 
				
			||||||
    var replayUrl = "/luna/replay/" + sessionID;
 | 
					    var replayUrl = "/luna/replay/" + sessionID;
 | 
				
			||||||
    window.open(replayUrl, "height=600, width=800, top=400, left=400, toolbar=no, menubar=no, scrollbars=no, location=no, status=no");
 | 
					    window.open(replayUrl, "_blank", "height=600, width=800, top=400, left=400, toolbar=no, menubar=no, scrollbars=no, location=no, status=no");
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
.on('click', '.btn-download', function () {
 | 
					.on('click', '.btn-download', function () {
 | 
				
			||||||
    var sessionID = $(this).data("session");
 | 
					    var sessionID = $(this).data("session");
 | 
				
			||||||
| 
						 | 
					@ -254,7 +254,7 @@ $(document).ready(function() {
 | 
				
			||||||
.on('click', '.btn-join', function () {
 | 
					.on('click', '.btn-join', function () {
 | 
				
			||||||
    var sessionID = $(this).data("session");
 | 
					    var sessionID = $(this).data("session");
 | 
				
			||||||
    var joinUrl = "/luna/join/?shareroom=" + sessionID;
 | 
					    var joinUrl = "/luna/join/?shareroom=" + sessionID;
 | 
				
			||||||
    window.open(joinUrl, "height=600, width=800, top=400, left=400, toolbar=no, menubar=no, scrollbars=no, location=no, status=no");
 | 
					    window.open(joinUrl)
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
.on("click", '#session_table_filter input', function (e) {
 | 
					.on("click", '#session_table_filter input', function (e) {
 | 
				
			||||||
    e.preventDefault();
 | 
					    e.preventDefault();
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue