Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
KiekPAD-Viz-Provider
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sören Henning
KiekPAD-Viz-Provider
Commits
9ba0c6d0
Commit
9ba0c6d0
authored
8 years ago
by
Sören Henning
Browse files
Options
Downloads
Patches
Plain Diff
some basic code
parent
bfe72fa3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/resources/public/index.html
+54
-7
54 additions, 7 deletions
src/main/resources/public/index.html
with
54 additions
and
7 deletions
src/main/resources/public/index.html
+
54
−
7
View file @
9ba0c6d0
...
...
@@ -7,13 +7,60 @@
<link
media=
"all"
type=
"text/css"
rel=
"stylesheet"
href=
"vendor/bootstrap/css/bootstrap.min.css"
>
<link
media=
"all"
type=
"text/css"
rel=
"stylesheet"
href=
"vendor/canvasplot/canvasplot.css"
>
<script
src=
"vendor/jquery/jquery-3.1.0.slim.min"
></script>
<script
src=
"vendor/jquery/jquery-3.1.0.slim.min
.js
"
></script>
<script
src=
"vendor/bootstrap/js/bootstrap.min.js"
></script>
<script
src=
"vendor/d3/d3.min.js"
charset=
"utf-8"
></script>
<script
src=
"vendor/canvasplot/canvasplot.js"
charset=
"utf-8"
></script>
<script
src=
"vendor/canvasplot-indicator-ts/canvasplot-indicator-ts.js"
charset=
"utf-8"
></script>
<title>
Fixed Top Navbar Example for Bootstrap
</title>
<title>
KiekPAD
</title>
<script
type=
"text/javascript"
>
var
MeasurementsCreator
=
{
lastMeasurements
:
[
2500
,
2500
,
2500
,
2500
,
2500
],
createNewMeasurement
:
function
(
time
)
{
this
.
lastMeasurements
.
shift
();
var
lastMeasurement
=
this
.
lastMeasurements
[
this
.
lastMeasurements
.
length
-
1
];
var
measurement
=
Math
.
max
(
0
,
lastMeasurement
+
100
*
2
*
(
Math
.
random
()
-
0.5
));
this
.
lastMeasurements
.
push
(
measurement
);
if
(
Math
.
random
()
>=
0.9
)
{
measurement
=
Math
.
max
(
0
,
lastMeasurement
+
1000
*
2
*
(
Math
.
random
()
-
0.5
));
}
var
prediction
=
this
.
lastMeasurements
.
reduce
(
function
(
a
,
b
)
{
return
a
+
b
;
})
/
this
.
lastMeasurements
.
length
;
var
anomalyscore
=
(
measurement
-
prediction
)
/
prediction
;
return
{
"
time
"
:
time
,
"
measurement
"
:
measurement
,
"
prediction
"
:
prediction
,
"
anomalyscore
"
:
anomalyscore
}
}
}
$
(
document
).
ready
(
function
()
{
var
visualization
=
new
TeeAdViz
(
d3
.
select
(
"
#plotcontainer
"
),
{
width
:
window
.
innerWidth
-
100
,
measurementsHeight
:
Math
.
round
(
0.35
*
(
window
.
innerWidth
-
100
)),
predictionVisibility
:
true
,
anomalyscoresVisibility
:
true
,
thresholds
:
[
-
0.2
,
0.2
]
});
visualization
.
setMeasurements
([]);
function
addNewData
()
{
visualization
.
addMeasurements
([
MeasurementsCreator
.
createNewMeasurement
(
new
Date
().
getTime
())]);
setTimeout
(
addNewData
,
Math
.
random
()
*
(
500
-
100
)
+
100
);
}
addNewData
();
$
(
'
#file
'
).
change
(
function
(
evt
)
{
var
file
=
evt
.
target
.
files
[
0
];
var
reader
=
new
FileReader
();
reader
.
onload
=
function
(
e
)
{
var
dataSets
=
$
.
parseJSON
(
e
.
target
.
result
);
visualization
.
setMeasurements
(
dataSets
);
};
reader
.
readAsText
(
file
);
});
});
</script>
</head>
...
...
@@ -30,13 +77,11 @@
<span
class=
"icon-bar"
></span>
<span
class=
"icon-bar"
></span>
</button>
<a
class=
"navbar-brand"
href=
"#"
>
Project name
</a>
<a
class=
"navbar-brand"
href=
"#"
>
KiekPAD
</a>
</div>
<div
id=
"navbar"
class=
"navbar-collapse collapse"
>
<ul
class=
"nav navbar-nav"
>
<li
class=
"active"
><a
href=
"#"
>
Home
</a></li>
<li><a
href=
"#about"
>
About
</a></li>
<li><a
href=
"#contact"
>
Contact
</a></li>
<li
class=
"active"
><a
href=
"#"
>
KiekPAD
</a></li>
</ul>
</div>
<!--/.nav-collapse -->
</div>
...
...
@@ -47,7 +92,9 @@
<div
class=
"row"
>
<div
class=
"col-sm-12 "
>
#CONTENT#
<div
id=
"plotcontainer"
></div>
</div>
</div>
<!-- /container -->
...
...
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