Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
ulakbus-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ulakbus
ulakbus-ui
Commits
ef55b1ae
Commit
ef55b1ae
authored
Apr 05, 2016
by
Evren Kutar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
socket retry connection
auth data.cmd retry call /login again
parent
a6dc0129
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
auth_service.js
app/components/auth/auth_service.js
+3
-0
socket.js
app/zetalib/socket.js
+4
-4
No files found.
app/components/auth/auth_service.js
View file @
ef55b1ae
...
@@ -28,6 +28,9 @@ angular.module('ulakbus.auth')
...
@@ -28,6 +28,9 @@ angular.module('ulakbus.auth')
$rootScope
.
$broadcast
(
"user_ready"
);
$rootScope
.
$broadcast
(
"user_ready"
);
$rootScope
.
$broadcast
(
"ws_turn_on"
);
$rootScope
.
$broadcast
(
"ws_turn_on"
);
return
$location
.
path
(
'/dashboard'
);
return
$location
.
path
(
'/dashboard'
);
}
if
(
data
.
cmd
===
'retry'
)
{
$location
.
path
(
'/login'
);
}
else
{
}
else
{
if
(
angular
.
isDefined
(
data
.
forms
)
&&
$location
.
path
()
!==
'/login'
){
if
(
angular
.
isDefined
(
data
.
forms
)
&&
$location
.
path
()
!==
'/login'
){
$location
.
path
(
'/login'
);
$location
.
path
(
'/login'
);
...
...
app/zetalib/socket.js
View file @
ef55b1ae
...
@@ -47,10 +47,10 @@ angular.module('ulakbus')
...
@@ -47,10 +47,10 @@ angular.module('ulakbus')
websocket
.
onclose
=
function
(
evt
)
{
websocket
.
onclose
=
function
(
evt
)
{
wsOps
.
onClose
(
evt
);
wsOps
.
onClose
(
evt
);
if
(
wsOps
.
loggedOut
===
true
)
{
return
;}
if
(
wsOps
.
loggedOut
===
true
)
{
return
;}
//
$timeout(function () {
$timeout
(
function
()
{
//
generate_ws();
generate_ws
();
//
refresh_count += 1;
refresh_count
+=
1
;
//
}, refresh_websocket);
},
refresh_websocket
);
};
};
websocket
.
onmessage
=
function
(
evt
)
{
websocket
.
onmessage
=
function
(
evt
)
{
wsOps
.
onMessage
(
evt
)
wsOps
.
onMessage
(
evt
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment