Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
debomatic-webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
debomatic-webui-admins
debomatic-webui
Commits
4e887c41
Commit
4e887c41
authored
Jul 23, 2014
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
again back on JS for tail patch
parent
53054ab6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
11 deletions
+19
-11
debomatic-webui/lib/utils.coffee
debomatic-webui/lib/utils.coffee
+19
-11
No files found.
debomatic-webui/lib/utils.coffee
View file @
4e887c41
...
@@ -105,17 +105,25 @@ errors_handler = (from, err, socket) ->
...
@@ -105,17 +105,25 @@ errors_handler = (from, err, socket) ->
return
return
Tail
::
watchEvent
=
(
e
)
->
Tail
::
watchEvent
=
(
e
)
->
if
e
is
'change'
_this
=
this
fs
.
stat
@
filename
,
(
err
,
stats
)
=>
if
e
is
"change"
@
emit
'error'
,
err
if
err
fs
.
stat
@
filename
,
(
err
,
stats
)
->
@
pos
=
stats
.
size
if
stats
.
size
<
@
pos
#scenario where texts is not appended but it's actually a w+
if
err
if
stats
.
size
>
@
pos
_this
.
emit
"error"
,
err
@
queue
.
push
({
start
:
@
pos
,
end
:
stats
.
size
})
return
@
pos
=
stats
.
size
_this
.
pos
=
stats
.
size
if
stats
.
size
<
_this
.
pos
@
internalDispatcher
.
emit
(
"next"
)
if
@
queue
.
length
is
1
if
stats
.
size
>
_this
.
pos
else
if
e
is
'rename'
_this
.
queue
.
push
@
unwatch
()
start
:
_this
.
pos
@
emit
"error"
,
"File
#{
@
filename
}
deleted"
end
:
stats
.
size
_this
.
pos
=
stats
.
size
_this
.
internalDispatcher
.
emit
"next"
if
_this
.
queue
.
length
is
1
else
if
e
is
"rename"
@
unwatch
()
_this
.
emit
"error"
,
"File "
+
@
filename
+
" deleted."
return
Tail
::
close
=
->
Tail
::
close
=
->
@
unwatch
()
@
unwatch
()
...
...
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