Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
beat.web
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
beat
beat.web
Commits
9fd261b7
Commit
9fd261b7
authored
7 years ago
by
Jaden Diefenbaugh
Browse files
Options
Downloads
Patches
Plain Diff
plots update when aliases change, fixed table alias update,
#20
parent
3d81e30e
No related branches found
No related tags found
1 merge request
!223
Reports overhaul
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
beat/web/reports/static/reports/app/directives/edit/plotItem.js
+26
-9
26 additions, 9 deletions
...eb/reports/static/reports/app/directives/edit/plotItem.js
beat/web/reports/static/reports/app/directives/tableItem.js
+11
-3
11 additions, 3 deletions
beat/web/reports/static/reports/app/directives/tableItem.js
with
37 additions
and
12 deletions
beat/web/reports/static/reports/app/directives/edit/plotItem.js
+
26
−
9
View file @
9fd261b7
...
@@ -47,6 +47,25 @@ angular.module('reportApp')
...
@@ -47,6 +47,25 @@ angular.module('reportApp')
PlotService
.
addPlot
(
scope
.
group
,
scope
.
id
,
scope
.
renderDivId
);
PlotService
.
addPlot
(
scope
.
group
,
scope
.
id
,
scope
.
renderDivId
);
});
});
let
plotTimer
;
const
updatePlot
=
()
=>
{
clearTimeout
(
plotTimer
);
const
queueUpdate
=
()
=>
{
let
el
=
document
.
querySelector
(
`#
${
scope
.
renderDivId
}
`
);
// if the container is rendered and it already has had a render,
// redo the render
if
(
el
&&
el
.
childNodes
.
length
>
0
){
el
.
innerHTML
=
''
;
PlotService
.
addPlot
(
scope
.
group
,
scope
.
id
,
scope
.
renderDivId
);
}
};
plotTimer
=
setTimeout
(
queueUpdate
,
1000
);
};
// if the group has exps added/removed, rerender the plot
// if the group has exps added/removed, rerender the plot
scope
.
$watch
(
scope
.
$watch
(
// angular doesnt watch arrays properly (i.e. watching scope.group._experimentNames),
// angular doesnt watch arrays properly (i.e. watching scope.group._experimentNames),
...
@@ -55,15 +74,13 @@ angular.module('reportApp')
...
@@ -55,15 +74,13 @@ angular.module('reportApp')
// because it compares shallowly and getters commonly return a new obj each time.
// because it compares shallowly and getters commonly return a new obj each time.
// so, watch the getters length instead
// so, watch the getters length instead
()
=>
scope
.
group
.
experiments
.
length
,
()
=>
scope
.
group
.
experiments
.
length
,
(
newExps
,
oldExps
)
=>
{
updatePlot
let
el
=
document
.
querySelector
(
`#
${
scope
.
renderDivId
}
`
);
);
// if the container is rendered and it already has had a render,
// redo the render
// if the group has aliases changed, rerender the plot
if
(
el
&&
el
.
childNodes
.
length
>
0
){
scope
.
$watch
(
el
.
innerHTML
=
''
;
()
=>
JSON
.
stringify
(
scope
.
group
.
_aliases
),
PlotService
.
addPlot
(
scope
.
group
,
scope
.
id
,
scope
.
renderDivId
);
updatePlot
}
}
);
);
scope
.
exportSrcFunc
=
()
=>
()
=>
{
scope
.
exportSrcFunc
=
()
=>
()
=>
{
...
...
This diff is collapsed.
Click to expand it.
beat/web/reports/static/reports/app/directives/tableItem.js
+
11
−
3
View file @
9fd261b7
...
@@ -72,12 +72,20 @@ angular.module('reportApp')
...
@@ -72,12 +72,20 @@ angular.module('reportApp')
};
};
// gets the field val for the given exp
// gets the field val for the given exp
scope
.
getFieldVal
=
(
expName
,
field
)
=>
{
scope
.
getFieldVal
=
(
expName
,
field
)
=>
{
const
alias
=
scope
.
group
.
aliases
[
expName
].
length
>
0
?
scope
.
group
.
aliases
[
expName
]
:
expName
;
const
alias
=
scope
.
group
.
aliases
[
expName
].
length
>
0
?
scope
.
group
.
aliases
[
expName
]
:
expName
;
let
fVal
=
scope
.
tableables
[
alias
]
?
const
name
=
scope
.
tableables
[
alias
]
?
scope
.
tableables
[
alias
][
field
]
:
undefined
;
alias
:
expName
;
let
fVal
=
scope
.
tableables
[
name
]
?
scope
.
tableables
[
name
][
field
]
:
undefined
;
let
val
;
let
val
;
console
.
log
(
expName
);
console
.
log
(
alias
);
console
.
log
(
scope
.
tableables
);
console
.
log
(
fVal
);
if
(
field
===
scope
.
fields
[
0
]){
if
(
field
===
scope
.
fields
[
0
]){
val
=
alias
;
val
=
alias
;
}
else
if
(
!
fVal
){
}
else
if
(
!
fVal
){
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment