Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
L
Liman MYS - Çekirdek
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
liman
Liman MYS - Çekirdek
Commits
a4271df4
Kaydet (Commit)
a4271df4
authored
Şub 02, 2021
tarafından
mertcelen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge branch 'master' into 1.5-dev
üst
e517a546
013af013
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
111 additions
and
41 deletions
+111
-41
OneController.php
app/Http/Controllers/Server/OneController.php
+3
-0
Server.php
app/Models/Server.php
+45
-0
composer.lock
composer.lock
+0
-0
2020_11_30_184347_create_system_settings_table.php
...ations/2020_11_30_184347_create_system_settings_table.php
+9
-6
2020_11_30_184609_create_limans_table.php
...base/migrations/2020_11_30_184609_create_limans_table.php
+9
-6
2020_11_30_184635_create_replications_table.php
...igrations/2020_11_30_184635_create_replications_table.php
+11
-8
2020_12_03_112312_create_monitor_servers_table.php
...ations/2020_12_03_112312_create_monitor_servers_table.php
+11
-8
2020_12_03_113317_create_user_monitors_table.php
...grations/2020_12_03_113317_create_user_monitors_table.php
+10
-7
package.json
package.json
+0
-4
details.blade.php
resources/views/server/one/general/details.blade.php
+12
-0
VERSION
storage/VERSION
+1
-2
No files found.
app/Http/Controllers/Server/OneController.php
Dosyayı görüntüle @
a4271df4
...
...
@@ -29,6 +29,9 @@ class OneController extends Controller
$outputs
=
[
"hostname"
=>
$server
->
getHostname
(),
"version"
=>
$server
->
getVersion
(),
"nofservices"
=>
$server
->
getNoOfServices
(),
"nofprocesses"
=>
$server
->
getNoOfProcesses
(),
"uptime"
=>
$server
->
getUptime
(),
];
$input_extensions
=
[];
...
...
app/Models/Server.php
Dosyayı görüntüle @
a4271df4
...
...
@@ -218,6 +218,51 @@ class Server extends Model
)[
0
];
}
public
function
getUptime
()
{
if
(
!
$this
->
canRunCommand
())
{
return
""
;
}
if
(
$this
->
isLinux
())
{
return
$this
->
run
(
"uptime -s"
);
}
return
explode
(
"|"
,
$this
->
run
(
"wmic path Win32_OperatingSystem get LastBootUpTime"
)
)[
0
];
}
public
function
getNoOfServices
()
{
if
(
!
$this
->
canRunCommand
())
{
return
""
;
}
if
(
$this
->
isLinux
())
{
return
$this
->
run
(
"systemctl list-units --type=service --state=active | wc -l"
);
}
return
explode
(
"|"
,
$this
->
run
(
"wmic service get name | find
\"\"
/v /c"
)
)[
0
];
}
public
function
getNoOfProcesses
()
{
if
(
!
$this
->
canRunCommand
())
{
return
""
;
}
if
(
$this
->
isLinux
())
{
return
$this
->
run
(
"ps -aux | wc -l"
);
}
return
explode
(
"|"
,
$this
->
run
(
"(Get-Process).Count"
)
)[
0
];
}
public
function
getHostname
()
{
if
(
!
$this
->
canRunCommand
())
{
...
...
composer.lock
Dosyayı görüntüle @
a4271df4
This diff is collapsed.
Click to expand it.
database/migrations/2020_11_30_184347_create_system_settings_table.php
Dosyayı görüntüle @
a4271df4
...
...
@@ -13,12 +13,15 @@ class CreateSystemSettingsTable extends Migration
*/
public
function
up
()
{
Schema
::
create
(
'system_settings'
,
function
(
Blueprint
$table
)
{
$table
->
uuid
(
'id'
);
$table
->
string
(
'key'
);
$table
->
string
(
'data'
,
10485760
);
$table
->
timestamps
();
});
if
(
!
Schema
::
hasTable
(
'system_settings'
))
{
Schema
::
create
(
'system_settings'
,
function
(
Blueprint
$table
)
{
$table
->
uuid
(
'id'
);
$table
->
string
(
'key'
);
$table
->
string
(
'data'
,
10485760
);
$table
->
timestamps
();
});
}
}
/**
...
...
database/migrations/2020_11_30_184609_create_limans_table.php
Dosyayı görüntüle @
a4271df4
...
...
@@ -13,12 +13,15 @@ class CreateLimansTable extends Migration
*/
public
function
up
()
{
Schema
::
create
(
'limans'
,
function
(
Blueprint
$table
)
{
$table
->
uuid
(
'id'
);
$table
->
string
(
'machine_id'
);
$table
->
string
(
'last_ip'
);
$table
->
timestamps
();
});
if
(
!
Schema
::
hasTable
(
'limans'
))
{
Schema
::
create
(
'limans'
,
function
(
Blueprint
$table
)
{
$table
->
uuid
(
'id'
);
$table
->
string
(
'machine_id'
);
$table
->
string
(
'last_ip'
);
$table
->
timestamps
();
});
}
}
/**
...
...
database/migrations/2020_11_30_184635_create_replications_table.php
Dosyayı görüntüle @
a4271df4
...
...
@@ -13,14 +13,17 @@ class CreateReplicationsTable extends Migration
*/
public
function
up
()
{
Schema
::
create
(
'replications'
,
function
(
Blueprint
$table
)
{
$table
->
uuid
(
'id'
);
$table
->
uuid
(
'liman_id'
);
$table
->
string
(
'key'
);
$table
->
integer
(
'status'
)
->
default
(
0
);
$table
->
string
(
'output'
,
9999
);
$table
->
timestamps
();
});
if
(
!
Schema
::
hasTable
(
'replications'
))
{
Schema
::
create
(
'replications'
,
function
(
Blueprint
$table
)
{
$table
->
uuid
(
'id'
);
$table
->
uuid
(
'liman_id'
);
$table
->
string
(
'key'
);
$table
->
integer
(
'status'
)
->
default
(
0
);
$table
->
string
(
'output'
,
9999
);
$table
->
timestamps
();
});
}
}
/**
...
...
database/migrations/2020_12_03_112312_create_monitor_servers_table.php
Dosyayı görüntüle @
a4271df4
...
...
@@ -13,14 +13,17 @@ class CreateMonitorServersTable extends Migration
*/
public
function
up
()
{
Schema
::
create
(
'monitor_servers'
,
function
(
Blueprint
$table
)
{
$table
->
uuid
(
'id'
)
->
primary
();
$table
->
string
(
'ip_address'
);
$table
->
integer
(
'port'
);
$table
->
boolean
(
'online'
);
$table
->
timestamp
(
'last_checked'
);
$table
->
timestamps
();
});
if
(
!
Schema
::
hasTable
(
'monitor_servers'
))
{
Schema
::
create
(
'monitor_servers'
,
function
(
Blueprint
$table
)
{
$table
->
uuid
(
'id'
)
->
primary
();
$table
->
string
(
'ip_address'
);
$table
->
integer
(
'port'
);
$table
->
boolean
(
'online'
);
$table
->
timestamp
(
'last_checked'
);
$table
->
timestamps
();
});
}
}
/**
...
...
database/migrations/2020_12_03_113317_create_user_monitors_table.php
Dosyayı görüntüle @
a4271df4
...
...
@@ -13,13 +13,16 @@ class CreateUserMonitorsTable extends Migration
*/
public
function
up
()
{
Schema
::
create
(
'user_monitors'
,
function
(
Blueprint
$table
)
{
$table
->
uuid
(
'id'
)
->
primary
();
$table
->
string
(
'name'
);
$table
->
uuid
(
'server_monitor_id'
);
$table
->
string
(
"user_id"
);
$table
->
timestamps
();
});
if
(
!
Schema
::
hasTable
(
'user_monitors'
))
{
Schema
::
create
(
'user_monitors'
,
function
(
Blueprint
$table
)
{
$table
->
uuid
(
'id'
)
->
primary
();
$table
->
string
(
'name'
);
$table
->
uuid
(
'server_monitor_id'
);
$table
->
string
(
"user_id"
);
$table
->
timestamps
();
});
}
}
/**
...
...
package.json
Dosyayı görüntüle @
a4271df4
{
"private"
:
true
,
"scripts"
:
{
"pre-commit"
:
"lint-staged"
,
"check"
:
"prettier --check ./{config,database,app,routes,resources/views,resources/assets/js/tus.js,resources/assets/css/liman.css}"
,
"dev"
:
"npm run development"
,
"development"
:
"cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
,
...
...
@@ -12,9 +11,6 @@
"production"
:
"cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
,
"docs"
:
"node_modules/apidoc/bin/apidoc -o storage/docs -e vendor -e node_modules -e resources/ -e public/"
},
"pre-commit"
:
[
"pre-commit"
],
"lint-staged"
:
{
"{*liman.js,*tus.js,*liman.css,*.php}"
:
[
"prettier --write"
,
...
...
resources/views/server/one/general/details.blade.php
Dosyayı görüntüle @
a4271df4
...
...
@@ -38,6 +38,17 @@
@endif
</p>
<hr>
@if(server()->canRunCommand())
<strong>
{{ __('Açık Kalma') }}
</strong>
<p
class=
"text-muted"
>
{{$outputs["uptime"]}}
</p>
<hr>
<strong>
{{ __('Servis Sayısı') }}
</strong>
<p
class=
"text-muted"
>
{{$outputs["nofservices"]}}
</p>
<hr>
<strong>
{{ __('İşlem Sayısı') }}
</strong>
<p
class=
"text-muted"
>
{{$outputs["nofprocesses"]}}
</p>
<hr>
@endif
</div>
</div>
</div>
\ No newline at end of file
storage/VERSION
Dosyayı görüntüle @
a4271df4
1.5.5
\ No newline at end of file
1.5.5
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