Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
monitoring
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
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cylab
monitoring
Commits
c23fd7ba
Commit
c23fd7ba
authored
5 years ago
by
Tibo
Browse files
Options
Downloads
Patches
Plain Diff
download client from cylab artifact repository
parent
cc7a8b92
No related branches found
No related tags found
No related merge requests found
Pipeline
#1869
failed
5 years ago
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
web/app/Sensor/ClientVersion.php
+15
-4
15 additions, 4 deletions
web/app/Sensor/ClientVersion.php
web/app/Server.php
+6
-0
6 additions, 0 deletions
web/app/Server.php
web/resources/views/server/show.blade.php
+3
-3
3 additions, 3 deletions
web/resources/views/server/show.blade.php
with
24 additions
and
7 deletions
web/app/Sensor/ClientVersion.php
+
15
−
4
View file @
c23fd7ba
...
...
@@ -13,10 +13,10 @@ class ClientVersion extends \App\AbstractSensor
{
const
MANIFEST
=
"https://download.cylab.be/monitor-php-client/manifest.json"
;
public
function
latestVersion
()
public
function
manifest
()
{
$client
=
new
Client
([
$client
=
new
Client
([
'timeout'
=>
5.0
,
]);
...
...
@@ -26,8 +26,19 @@ class ClientVersion extends \App\AbstractSensor
return
""
;
}
return
json_decode
(
$json
)[
0
]
->
version
;
return
json_decode
(
$json
)[
0
];
}
public
function
latestVersion
()
{
return
$this
->
manifest
()
->
version
;
}
public
function
latestUrl
()
{
return
$this
->
manifest
()
->
url
;
}
//put your code here
public
function
report
()
...
...
This diff is collapsed.
Click to expand it.
web/app/Server.php
+
6
−
0
View file @
c23fd7ba
...
...
@@ -91,6 +91,12 @@ class Server extends Model
return
$last_record
->
version
;
}
public
function
lastClientUrl
()
{
$client_sensor
=
new
\App\Sensor\ClientVersion
(
$this
);
return
$client_sensor
->
latestUrl
();
}
/**
* Get integer status of server.
...
...
This diff is collapsed.
Click to expand it.
web/resources/views/server/show.blade.php
+
3
−
3
View file @
c23fd7ba
...
...
@@ -120,11 +120,11 @@ window.monitorServerToken = "{{ $server->read_token }}";
</
div
>
<
div
class
=
"card-body"
>
<
p
>
Download
client
application
:</
p
>
<
pre
style
=
"font-size: 75%; overflow: hidden"
><
code
>
wget
https
://
gitlab
.
cylab
.
be
/
cylab
/
monitoring
/
raw
/
master
/
php
-
client
/
bin
/
monitor
.
phar
chmod
+
x
monitor
.
phar
<
pre
style
=
"font-size: 75%; overflow: hidden"
><
code
>
wget
{{
$server
->
lastClientUrl
()
}}
unzip
monitor
-*.
zip
</
code
></
pre
>
<
p
>
Move
it
to
/
usr
/
bin
:</
p
>
<
pre
style
=
"font-size: 75%; overflow: hidden"
><
code
>
sudo
mv
monitor
.
phar
/
usr
/
bin
/
monitor
<
pre
style
=
"font-size: 75%; overflow: hidden"
><
code
>
sudo
mv
monitor
/
usr
/
bin
/
monitor
</
code
></
pre
>
<
p
>
Test
it
:</
p
>
...
...
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