Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
S
status-site
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
25
Issues
25
List
Boards
Labels
Service Desk
Milestones
Iterations
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmytro Bogatov
status-site
Commits
6637f741
Commit
6637f741
authored
Aug 11, 2017
by
Dmytro Bogatov
💕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix.
parent
0f8d35bf
Pipeline
#604
passed with stages
in 3 minutes and 45 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
27 additions
and
11 deletions
+27
-11
client/ts/modules/metric-page/abstract.ts
client/ts/modules/metric-page/abstract.ts
+20
-6
client/ts/modules/metric-page/cpu-load.ts
client/ts/modules/metric-page/cpu-load.ts
+1
-1
client/ts/modules/metric-page/health.ts
client/ts/modules/metric-page/health.ts
+2
-2
client/ts/modules/metric-page/ping.ts
client/ts/modules/metric-page/ping.ts
+1
-1
client/ts/modules/metric-page/user-action.ts
client/ts/modules/metric-page/user-action.ts
+1
-1
debian/status-ctl.sh
debian/status-ctl.sh
+2
-0
No files found.
client/ts/modules/metric-page/abstract.ts
View file @
6637f741
...
...
@@ -190,12 +190,26 @@ export abstract class MetricPage<T extends Metric<DataPoint>> {
this
.
minData
)
;
console
.
log
(
"
from:
"
+
from
);
console
.
log
(
"
to:
"
+
to
);
console
.
log
(
"
maxData:
"
+
this
.
maxData
);
console
.
log
(
"
minData:
"
+
this
.
minData
);
console
.
log
(
"
start:
"
+
this
.
start
);
console
.
log
(
"
end:
"
+
this
.
end
);
// fix low time range
// if the difference in time is less than 10 minutes, we should extend the range
const
tenMinutes
=
10
*
60
*
1000
if
(
to
-
from
<
tenMinutes
)
{
if
(
this
.
maxData
-
to
>=
tenMinutes
)
{
to
+=
tenMinutes
;
}
else
if
(
from
-
this
.
minData
>=
tenMinutes
)
{
from
-=
tenMinutes
;
}
else
{
from
=
this
.
minData
;
to
=
this
.
maxData
;
}
}
// console.log("from: " + from);
// console.log("to: " + to);
// console.log("maxData: " + this.maxData);
// console.log("minData: " + this.minData);
// console.log("start: " + this.start);
// console.log("end: " + this.end);
plot
.
setSelection
({
xaxis
:
{
from
:
from
,
to
:
to
},
yaxis
:
{
from
:
0
,
to
:
0
}
});
}
else
{
...
...
client/ts/modules/metric-page/cpu-load.ts
View file @
6637f741
...
...
@@ -146,7 +146,7 @@ export class CpuLoadMetricPage extends MetricPage<Metric<CpuLoadDataPoint>> {
<td>
${
dp
.
timestamp
}
</td>
<td>
${
dp
.
value
}
%</td>
<td>
<a href="/home/metric/
${
MetricType
[
this
.
metric
.
metricType
]}
/
${
this
.
metric
.
source
}
/
${
new
Date
(
dp
.
timestamp
.
getTime
()
-
2
*
60
*
1000
).
getTime
()}
/
${
new
Date
(
dp
.
timestamp
.
getTime
()
+
2
*
60
*
1000
).
getTime
()}
">
<a href="/home/metric/
${
MetricType
[
this
.
metric
.
metricType
]}
/
${
this
.
metric
.
source
}
/
${
new
Date
(
dp
.
timestamp
.
getTime
()
-
10
*
60
*
1000
).
getTime
()}
/
${
new
Date
(
dp
.
timestamp
.
getTime
()
+
10
*
60
*
1000
).
getTime
()}
">
Zoom plot
</a>
</td>
...
...
client/ts/modules/metric-page/health.ts
View file @
6637f741
...
...
@@ -208,7 +208,7 @@ export class HealthMetricPage extends MetricPage<Metric<HealthDataPoint>> {
Health report details | Health
${
e
.
detail
.
health
}
% |
${
timestamp
}
<small>
Inspect metric labels at the moment report was generated.
<a href="/home/metric/
${
MetricType
[
this
.
metric
.
metricType
]}
/
${
this
.
metric
.
source
}
/
${
new
Date
(
timestamp
.
getTime
()
-
2
*
60
*
1000
).
getTime
()}
/
${
new
Date
(
timestamp
.
getTime
()
+
2
*
60
*
1000
).
getTime
()}
">
<a href="/home/metric/
${
MetricType
[
this
.
metric
.
metricType
]}
/
${
this
.
metric
.
source
}
/
${
new
Date
(
timestamp
.
getTime
()
-
10
*
60
*
1000
).
getTime
()}
/
${
new
Date
(
timestamp
.
getTime
()
+
10
*
60
*
1000
).
getTime
()}
">
View data at that moment.
</a>
</small>
...
...
@@ -238,7 +238,7 @@ export class HealthMetricPage extends MetricPage<Metric<HealthDataPoint>> {
<td>
${
el
.
Source
}
</td>
<td>
${
el
.
Label
}
</td>
<td>
<a href="/home/metric/
${
el
.
Type
}
/
${
el
.
Source
}
/
${
new
Date
(
timestamp
.
getTime
()
-
2
*
60
*
1000
).
getTime
()}
/
${
new
Date
(
timestamp
.
getTime
()
+
2
*
60
*
1000
).
getTime
()}
">
<a href="/home/metric/
${
el
.
Type
}
/
${
el
.
Source
}
/
${
new
Date
(
timestamp
.
getTime
()
-
10
*
60
*
1000
).
getTime
()}
/
${
new
Date
(
timestamp
.
getTime
()
+
10
*
60
*
1000
).
getTime
()}
">
View data
</a>
</td>
...
...
client/ts/modules/metric-page/ping.ts
View file @
6637f741
...
...
@@ -191,7 +191,7 @@ export class PingMetricPage extends MetricPage<Metric<PingDataPoint>> {
<td>
${
dp
.
responseTime
}
ms</td>
<td>
${
dp
.
success
?
"
Success
"
:
dp
.
message
}
</td>
<td>
<a href="/home/metric/
${
MetricType
[
this
.
metric
.
metricType
]}
/
${
this
.
metric
.
source
}
/
${
new
Date
(
dp
.
timestamp
.
getTime
()
-
2
*
60
*
1000
).
getTime
()}
/
${
new
Date
(
dp
.
timestamp
.
getTime
()
+
2
*
60
*
1000
).
getTime
()}
">
<a href="/home/metric/
${
MetricType
[
this
.
metric
.
metricType
]}
/
${
this
.
metric
.
source
}
/
${
new
Date
(
dp
.
timestamp
.
getTime
()
-
10
*
60
*
1000
).
getTime
()}
/
${
new
Date
(
dp
.
timestamp
.
getTime
()
+
10
*
60
*
1000
).
getTime
()}
">
Zoom plot
</a>
</td>
...
...
client/ts/modules/metric-page/user-action.ts
View file @
6637f741
...
...
@@ -196,7 +196,7 @@ export class UserActionMetricPage extends MetricPage<Metric<UserActionDataPoint>
<td>
${
dp
.
action
}
</td>
<td>#
${
dp
.
count
}
</td>
<td>
<a href="/home/metric/
${
MetricType
[
this
.
metric
.
metricType
]}
/
${
this
.
metric
.
source
}
/
${
new
Date
(
dp
.
timestamp
.
getTime
()
-
2
*
60
*
1000
).
getTime
()}
/
${
new
Date
(
dp
.
timestamp
.
getTime
()
+
2
*
60
*
1000
).
getTime
()}
">
<a href="/home/metric/
${
MetricType
[
this
.
metric
.
metricType
]}
/
${
this
.
metric
.
source
}
/
${
new
Date
(
dp
.
timestamp
.
getTime
()
-
10
*
60
*
1000
).
getTime
()}
/
${
new
Date
(
dp
.
timestamp
.
getTime
()
+
10
*
60
*
1000
).
getTime
()}
">
Zoom plot
</a>
</td>
...
...
debian/status-ctl.sh
View file @
6637f741
#!/bin/bash
set
-e
# EXIT CODES
SUCCESS
=
0
GENERIC_ERROR
=
1
...
...
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