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
Show 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) ->
return
Tail
::
watchEvent
=
(
e
)
->
if
e
is
'change'
fs
.
stat
@
filename
,
(
err
,
stats
)
=>
@
emit
'error'
,
err
if
err
@
pos
=
stats
.
size
if
stats
.
size
<
@
pos
#scenario where texts is not appended but it's actually a w+
if
stats
.
size
>
@
pos
@
queue
.
push
({
start
:
@
pos
,
end
:
stats
.
size
})
@
pos
=
stats
.
size
@
internalDispatcher
.
emit
(
"next"
)
if
@
queue
.
length
is
1
else
if
e
is
'rename'
_this
=
this
if
e
is
"change"
fs
.
stat
@
filename
,
(
err
,
stats
)
->
if
err
_this
.
emit
"error"
,
err
return
_this
.
pos
=
stats
.
size
if
stats
.
size
<
_this
.
pos
if
stats
.
size
>
_this
.
pos
_this
.
queue
.
push
start
:
_this
.
pos
end
:
stats
.
size
_this
.
pos
=
stats
.
size
_this
.
internalDispatcher
.
emit
"next"
if
_this
.
queue
.
length
is
1
else
if
e
is
"rename"
@
unwatch
()
@
emit
"error"
,
"File
#{
@
filename
}
deleted"
_this
.
emit
"error"
,
"File "
+
@
filename
+
" deleted."
return
Tail
::
close
=
->
@
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