Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
e6fea60b
Commit
e6fea60b
authored
Jan 09, 2017
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
typo + comment
parent
574cf958
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
14 deletions
+15
-14
util.js
src/helpers/util.js
+11
-10
traceManager.js
src/trace/traceManager.js
+2
-2
ButtonNavigator.js
src/ui/ButtonNavigator.js
+2
-2
No files found.
src/helpers/util.js
View file @
e6fea60b
...
@@ -85,8 +85,16 @@ module.exports = {
...
@@ -85,8 +85,16 @@ module.exports = {
return
index
>=
0
?
array
[
index
]
:
null
return
index
>=
0
?
array
[
index
]
:
null
},
},
/**
* Find the call from @args rootCall which contains @args index (recursive)
*
* @param {Int} index - index of the vmtrace
* @param {Object} rootCall - call tree, built by the trace analyser
* @return {Object} - return the call which include the @args index
*/
findCall
:
findCall
,
findCall
:
findCall
,
buildCallsPath
:
buildCallsPath
buildCallPath
:
buildCallPath
}
}
/**
/**
...
@@ -96,21 +104,14 @@ module.exports = {
...
@@ -96,21 +104,14 @@ module.exports = {
* @param {Object} rootCall - call tree, built by the trace analyser
* @param {Object} rootCall - call tree, built by the trace analyser
* @return {Array} - return the calls path to @args index
* @return {Array} - return the calls path to @args index
*/
*/
function
buildCall
s
Path
(
index
,
rootCall
)
{
function
buildCallPath
(
index
,
rootCall
)
{
var
ret
=
[]
var
ret
=
[]
findCallInternal
(
index
,
rootCall
,
ret
)
findCallInternal
(
index
,
rootCall
,
ret
)
return
ret
return
ret
}
}
/**
* Find the call from @args rootCall which contains @args index (recursive)
*
* @param {Int} index - index of the vmtrace
* @param {Object} rootCall - call tree, built by the trace analyser
* @return {Object} - return the call which include the @args index
*/
function
findCall
(
index
,
rootCall
)
{
function
findCall
(
index
,
rootCall
)
{
var
ret
=
buildCall
s
Path
(
index
,
rootCall
)
var
ret
=
buildCallPath
(
index
,
rootCall
)
return
ret
[
ret
.
length
-
1
]
return
ret
[
ret
.
length
-
1
]
}
}
...
...
src/trace/traceManager.js
View file @
e6fea60b
...
@@ -114,12 +114,12 @@ TraceManager.prototype.getCallDataAt = function (stepIndex, callback) {
...
@@ -114,12 +114,12 @@ TraceManager.prototype.getCallDataAt = function (stepIndex, callback) {
callback
(
null
,
[
this
.
traceCache
.
callsData
[
callDataChange
]])
callback
(
null
,
[
this
.
traceCache
.
callsData
[
callDataChange
]])
}
}
TraceManager
.
prototype
.
buildCall
s
Path
=
function
(
stepIndex
,
callback
)
{
TraceManager
.
prototype
.
buildCallPath
=
function
(
stepIndex
,
callback
)
{
var
check
=
this
.
checkRequestedStep
(
stepIndex
)
var
check
=
this
.
checkRequestedStep
(
stepIndex
)
if
(
check
)
{
if
(
check
)
{
return
callback
(
check
,
null
)
return
callback
(
check
,
null
)
}
}
var
callsPath
=
util
.
buildCall
s
Path
(
stepIndex
,
this
.
traceCache
.
callsTree
.
call
)
var
callsPath
=
util
.
buildCallPath
(
stepIndex
,
this
.
traceCache
.
callsTree
.
call
)
if
(
callsPath
===
null
)
return
callback
(
'no call path built'
,
null
)
if
(
callsPath
===
null
)
return
callback
(
'no call path built'
,
null
)
callback
(
null
,
callsPath
)
callback
(
null
,
callsPath
)
}
}
...
...
src/ui/ButtonNavigator.js
View file @
e6fea60b
...
@@ -21,7 +21,7 @@ function ButtonNavigator (_parent, _traceManager) {
...
@@ -21,7 +21,7 @@ function ButtonNavigator (_parent, _traceManager) {
if
(
index
<
0
)
return
if
(
index
<
0
)
return
if
(
_parent
.
currentStepIndex
!==
index
)
return
if
(
_parent
.
currentStepIndex
!==
index
)
return
this
.
traceManager
.
buildCall
s
Path
(
index
,
(
error
,
callsPath
)
=>
{
this
.
traceManager
.
buildCallPath
(
index
,
(
error
,
callsPath
)
=>
{
if
(
error
)
{
if
(
error
)
{
console
.
log
(
error
)
console
.
log
(
error
)
resetWarning
(
this
)
resetWarning
(
this
)
...
@@ -66,7 +66,7 @@ ButtonNavigator.prototype.render = function () {
...
@@ -66,7 +66,7 @@ ButtonNavigator.prototype.render = function () {
<button id='intoforward' title='step into forward' class='fa fa-angle-right' style=
${
ui
.
formatCss
(
style
.
button
)}
onclick=
${
function
()
{
self
.
event
.
trigger
(
'stepIntoForward'
)
}
} disabled=
${
this
.
intoForwardDisabled
}
>
<button id='intoforward' title='step into forward' class='fa fa-angle-right' style=
${
ui
.
formatCss
(
style
.
button
)}
onclick=
${
function
()
{
self
.
event
.
trigger
(
'stepIntoForward'
)
}
} disabled=
${
this
.
intoForwardDisabled
}
>
</button>
</button>
<button id='overforward' title='step over forward' class='fa fa-angle-double-right' style=
${
ui
.
formatCss
(
style
.
button
)}
onclick=
${
function
()
{
self
.
event
.
trigger
(
'stepOverForward'
)
}
} disabled=
${
this
.
overForwardDisabled
}
>
<button id='overforward' title='step over forward' class='fa fa-angle-double-right' style=
${
ui
.
formatCss
(
style
.
button
)}
onclick=
${
function
()
{
self
.
event
.
trigger
(
'stepOverForward'
)
}
} disabled=
${
this
.
overForwardDisabled
}
>
</button>
</button>
<button id='nextcall' title='step next call' class='fa fa-chevron-right' style=
${
ui
.
formatCss
(
style
.
button
)}
onclick=
${
function
()
{
self
.
event
.
trigger
(
'jumpNextCall'
)
}
} disabled=
${
this
.
nextCallDisabled
}
>
<button id='nextcall' title='step next call' class='fa fa-chevron-right' style=
${
ui
.
formatCss
(
style
.
button
)}
onclick=
${
function
()
{
self
.
event
.
trigger
(
'jumpNextCall'
)
}
} disabled=
${
this
.
nextCallDisabled
}
>
</button>
</button>
<button id='jumpout' title='jump out' class='fa fa-share' style=
${
ui
.
formatCss
(
style
.
button
)}
onclick=
${
function
()
{
self
.
event
.
trigger
(
'jumpOut'
)
}
} disabled=
${
this
.
jumpOutDisabled
}
>
<button id='jumpout' title='jump out' class='fa fa-share' style=
${
ui
.
formatCss
(
style
.
button
)}
onclick=
${
function
()
{
self
.
event
.
trigger
(
'jumpOut'
)
}
} disabled=
${
this
.
jumpOutDisabled
}
>
...
...
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