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
ef23b6f2
Kaydet (Commit)
ef23b6f2
authored
Haz 29, 2020
tarafından
mertcelen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fake Vue Support added
Multiple visual fixes. Market auto download extension support added.
üst
13ded6ff
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
41 changed files
with
405 additions
and
297 deletions
+405
-297
MarketController.php
app/Http/Controllers/MarketController.php
+16
-2
OneController.php
app/Http/Controllers/Server/OneController.php
+2
-2
ExtensionUpdaterJob.php
app/Jobs/ExtensionUpdaterJob.php
+66
-0
postinst
build_tools/DEBIAN/postinst
+22
-2
liman.js
public/js/liman.js
+0
-0
mix-manifest.json
public/mix-manifest.json
+1
-1
liman.js
resources/assets/js/liman.js
+33
-33
city.blade.php
resources/views/extension_pages/city.blade.php
+2
-2
manager.blade.php
resources/views/extension_pages/manager.blade.php
+8
-37
one.blade.php
resources/views/extension_pages/one.blade.php
+14
-12
server.blade.php
resources/views/extension_pages/server.blade.php
+8
-8
harita.blade.php
resources/views/general/harita.blade.php
+3
-3
index.blade.php
resources/views/index.blade.php
+17
-17
index.blade.php
resources/views/keys/index.blade.php
+1
-1
editor.blade.php
resources/views/l/editor.blade.php
+3
-3
file-input.blade.php
resources/views/l/file-input.blade.php
+2
-2
table.blade.php
resources/views/l/table.blade.php
+4
-4
tree.blade.php
resources/views/l/tree.blade.php
+1
-1
app.blade.php
resources/views/layouts/app.blade.php
+33
-11
content.blade.php
resources/views/layouts/content.blade.php
+5
-0
header.blade.php
resources/views/layouts/header.blade.php
+26
-20
master.blade.php
resources/views/layouts/master.blade.php
+21
-17
navbar.blade.php
resources/views/layouts/navbar.blade.php
+2
-12
index.blade.php
resources/views/notification/index.blade.php
+8
-8
one.blade.php
resources/views/notification/one.blade.php
+5
-5
system.blade.php
resources/views/notification/system.blade.php
+13
-5
list.blade.php
resources/views/permission/list.blade.php
+4
-4
index.blade.php
resources/views/server/index.blade.php
+18
-18
one.blade.php
resources/views/server/one.blade.php
+0
-0
certificate.blade.php
resources/views/settings/certificate.blade.php
+9
-9
extension.blade.php
resources/views/settings/extension.blade.php
+0
-0
health.blade.php
resources/views/settings/health.blade.php
+1
-1
index.blade.php
resources/views/settings/index.blade.php
+0
-0
one.blade.php
resources/views/settings/one.blade.php
+0
-0
role.blade.php
resources/views/settings/role.blade.php
+35
-35
keys.blade.php
resources/views/user/keys.blade.php
+2
-2
self.blade.php
resources/views/user/self.blade.php
+5
-5
add.blade.php
resources/views/widgets/add.blade.php
+10
-10
settings.blade.php
resources/views/widgets/settings.blade.php
+1
-1
VERSION
storage/VERSION
+2
-2
VERSION_CODE
storage/VERSION_CODE
+2
-2
No files found.
app/Http/Controllers/MarketController.php
Dosyayı görüntüle @
ef23b6f2
...
...
@@ -4,7 +4,9 @@ namespace App\Http\Controllers;
use
Illuminate\Http\Request
;
use
GuzzleHttp\Client
;
use
App\Jobs\ExtensionUpdaterJob
;
use
GuzzleHttp\Exception\BadResponseException
;
use
Illuminate\Contracts\Bus\Dispatcher
;
class
MarketController
extends
Controller
{
...
...
@@ -63,7 +65,8 @@ class MarketController extends Controller
array_push
(
$params
,[
"packageName"
=>
"Liman."
.
$obj
[
"name"
],
"versionCode"
=>
array_key_exists
(
"version_code"
,
$obj
)
?
$obj
[
"version_code"
]
:
0
,
"currentVersion"
=>
$obj
[
"version"
]
"currentVersion"
=>
$obj
[
"version"
],
"extension_id"
=>
$extension
->
id
]);
}
...
...
@@ -81,7 +84,18 @@ class MarketController extends Controller
if
(
!
$obj
){
$params
[
$i
][
"status"
]
=
"Güncel"
;
}
else
{
$params
[
$i
][
"status"
]
=
$obj
->
version
->
versionName
.
" sürümü mevcut"
;
$obj
=
json_decode
(
json_encode
(
$obj
),
true
);
$params
[
$i
][
"status"
]
=
$obj
[
"version"
][
"versionName"
]
.
" sürümü mevcut"
;
if
(
count
(
$obj
[
"platforms"
])){
$job
=
(
new
ExtensionUpdaterJob
(
$params
[
$i
][
"extension_id"
],
$obj
[
"version"
][
"versionCode"
],
$obj
[
"platforms"
][
0
][
"downloadLink"
]
))
->
onQueue
(
'system_updater'
);
// Dispatch job right away.
$job_id
=
app
(
Dispatcher
::
class
)
->
dispatch
(
$job
);
}
}
}
return
respond
(
$params
);
...
...
app/Http/Controllers/Server/OneController.php
Dosyayı görüntüle @
ef23b6f2
...
...
@@ -1183,8 +1183,8 @@ class OneController extends Controller
$output
=
trim
(
server
()
->
run
(
sudo
()
.
"lsof -i -P -n | grep
LISTEN | awk -F' ' '{print $1,$3,$5,$8,$9}'
"
)
"lsof -i -P -n | grep
-v '\-'| awk -F' ' '{print $1,$3,$5,$8,$9}' | sed 1,1d
"
)
);
$arr
=
[];
foreach
(
explode
(
"
\n
"
,
$output
)
as
$line
)
{
...
...
app/Jobs/ExtensionUpdaterJob.php
0 → 100644
Dosyayı görüntüle @
ef23b6f2
<?php
namespace
App\Jobs
;
use
Illuminate\Bus\Queueable
;
use
Illuminate\Contracts\Queue\ShouldQueue
;
use
Illuminate\Foundation\Bus\Dispatchable
;
use
Illuminate\Queue\InteractsWithQueue
;
use
App\Extension
;
use
App\AdminNotification
;
use
Illuminate\Queue\SerializesModels
;
use
GuzzleHttp\Client
;
use
GuzzleHttp\Exception\BadResponseException
;
class
ExtensionUpdaterJob
implements
ShouldQueue
{
use
Dispatchable
,
InteractsWithQueue
,
Queueable
,
SerializesModels
;
private
$extension
;
private
$download
;
private
$version_code
;
/**
* Create a new job instance.
*
* @return void
*/
public
function
__construct
(
$extension_id
,
$version_code
,
$download
)
{
$this
->
extension
=
Extension
::
find
(
$extension_id
);
$this
->
version_code
=
$version_code
;
$this
->
download
=
$download
;
}
/**
* Execute the job.
*
* @return void
*/
public
function
handle
()
{
$downloadPath
=
"/tmp/"
.
$this
->
extension
->
id
.
"-"
.
$this
->
version_code
;
if
(
is_file
(
$downloadPath
)){
return
true
;
}
$client
=
new
Client
([
"headers"
=>
[
"Authorization"
=>
"Bearer "
.
env
(
"MARKET_ACCESS_TOKEN"
)
],
"verify"
=>
false
]);
$resource
=
fopen
(
$downloadPath
,
'w'
);
$client
->
request
(
'GET'
,
$this
->
download
,
[
'sink'
=>
$resource
]);
if
(
is_file
(
$downloadPath
)){
AdminNotification
::
create
([
"title"
=>
$this
->
extension
->
display_name
.
" Güncellemesi İndirildi!"
,
"type"
=>
"extension_update"
,
"message"
=>
$this
->
extension
->
display_name
.
" eklentisinin yeni bir sürümü indirildi, yüklemek için <a href='"
.
route
(
'extensions_settings'
)
.
"?showUpdates"
.
"'>tıklayınız.</a>"
,
"level"
=>
3
,
]);
return
true
;
}
else
{
return
false
;
}
}
}
build_tools/DEBIAN/postinst
Dosyayı görüntüle @
ef23b6f2
...
...
@@ -85,7 +85,7 @@ fi
#Supervisor Configuration
if
[
-f
"/etc/supervisor/conf.d/liman-extension-worker.conf"
]
;
then
echo
"Supervisor already created."
;
echo
"Supervisor already created
for extension workers
."
;
else
echo
"""
#LIMAN_OPTIMIZATIONS
...
...
@@ -102,7 +102,27 @@ stdout_logfile=/liman/logs/extension_queue.log
supervisorctl reread
supervisorctl update
fi
supervisorctl start liman-extension-worker
#Supervisor Configuration for System Updates
if
[
-f
"/etc/supervisor/conf.d/liman-system-worker.conf"
]
;
then
echo
"Supervisor already created for system updates."
;
else
echo
"""
#LIMAN_OPTIMIZATIONS
[program:liman-system-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /liman/server/artisan queue:work --sleep=1 --tries=3 --queue=system_updater
autostart=true
autorestart=true
user=liman
numprocs=2
redirect_stderr=true
stdout_logfile=/liman/logs/system_update.log
"""
>
/etc/supervisor/conf.d/liman-system-worker.conf
supervisorctl reread
supervisorctl update
fi
supervisorctl start all
#Increase Php-Fpm Memory
sed
-i
"s/memory_limit = 128M/memory_limit = 1024M/g"
/etc/php/7.3/fpm/php.ini
...
...
public/js/liman.js
Dosyayı görüntüle @
ef23b6f2
This diff is collapsed.
Click to expand it.
public/mix-manifest.json
Dosyayı görüntüle @
ef23b6f2
{
"/css/liman.css"
:
"/css/liman.css?id=defedb66f8a8b13bdeb3"
,
"/js/liman.js"
:
"/js/liman.js?id=
40fa9defbe4a3f88c393
"
"/js/liman.js"
:
"/js/liman.js?id=
e4c51f5a8e9e04c6b4f6
"
}
resources/assets/js/liman.js
Dosyayı görüntüle @
ef23b6f2
let
csrf
=
document
.
getElementsByName
(
"csrf-token"
)[
0
].
getAttribute
(
"content"
);
let
customRequestData
=
[];
let
limanRecordRequests
=
false
;
let
limanRequestList
=
[];
var
csrf
=
document
.
getElementsByName
(
"csrf-token"
)[
0
].
getAttribute
(
"content"
);
var
customRequestData
=
[];
var
limanRecordRequests
=
false
;
var
limanRequestList
=
[];
function
showSwal
(
message
,
type
,
timer
=
false
)
{
let
config
=
{
var
config
=
{
position
:
"bottom-start"
,
type
:
type
,
title
:
message
,
...
...
@@ -17,8 +17,8 @@ function showSwal(message, type, timer = false) {
Swal
.
fire
(
config
);
}
function
request
(
url
,
data
,
next
,
error
)
{
let
id
=
null
;
function
request
(
url
,
data
,
next
,
error
,
requestType
=
"POST"
)
{
var
id
=
null
;
if
(
data
instanceof
FormData
===
false
)
{
id
=
...
...
@@ -34,8 +34,8 @@ function request(url, data, next, error) {
modalData
=
data
;
let
server_id
=
$
(
"meta[name=server_id]"
).
attr
(
"content"
);
let
extension_id
=
$
(
"meta[name=extension_id]"
).
attr
(
"content"
);
var
server_id
=
$
(
"meta[name=server_id]"
).
attr
(
"content"
);
var
extension_id
=
$
(
"meta[name=extension_id]"
).
attr
(
"content"
);
server_id
!=
""
&&
data
.
append
(
"server_id"
,
server_id
);
extension_id
!=
""
&&
data
.
append
(
"extension_id"
,
extension_id
);
...
...
@@ -45,7 +45,7 @@ function request(url, data, next, error) {
}
if
(
limanRecordRequests
)
{
let
parsed
=
{};
var
parsed
=
{};
for
(
var
pair
of
data
.
entries
())
{
parsed
[
pair
[
0
]]
=
pair
[
1
];
}
...
...
@@ -56,8 +56,8 @@ function request(url, data, next, error) {
});
}
let
r
=
new
XMLHttpRequest
();
r
.
open
(
"POST"
,
url
);
var
r
=
new
XMLHttpRequest
();
r
.
open
(
requestType
,
url
);
r
.
setRequestHeader
(
"X-CSRF-TOKEN"
,
csrf
);
r
.
setRequestHeader
(
"Accept"
,
"text/json"
);
setTimeout
(
function
()
{
...
...
@@ -84,7 +84,7 @@ function request(url, data, next, error) {
if
(
r
.
getResponseHeader
(
"content-type"
)
!==
"application/json"
)
{
return
next
(
r
.
responseText
);
}
let
response
=
JSON
.
parse
(
r
.
responseText
);
var
response
=
JSON
.
parse
(
r
.
responseText
);
switch
(
r
.
status
)
{
case
200
:
return
next
(
r
.
responseText
);
...
...
@@ -108,7 +108,7 @@ function request(url, data, next, error) {
}
function
limanRequestBuilder
(
index
,
token
)
{
let
str
=
JSON
.
stringify
(
limanRequestList
[
index
][
"form"
]);
var
str
=
JSON
.
stringify
(
limanRequestList
[
index
][
"form"
]);
return
(
"curl -d '"
+
str
+
...
...
@@ -174,11 +174,11 @@ function back() {
}
function
search
()
{
let
search_input
=
document
.
getElementById
(
"search_input"
);
var
search_input
=
document
.
getElementById
(
"search_input"
);
if
(
search_input
.
value
===
""
)
{
return
;
}
let
data
=
new
FormData
();
var
data
=
new
FormData
();
data
.
append
(
"text"
,
search_input
.
value
);
request
(
"arama"
,
data
,
function
(
response
)
{
console
.
log
(
response
);
...
...
@@ -187,7 +187,7 @@ function search() {
function
checkNotifications
(
exclude
=
null
)
{
request
(
"/bildirimler"
,
new
FormData
(),
function
(
response
)
{
let
json
=
JSON
.
parse
(
response
);
var
json
=
JSON
.
parse
(
response
);
if
(
response
[
"admin"
]
!==
""
)
{
renderNotifications
(
json
[
"message"
][
"admin"
],
...
...
@@ -214,14 +214,14 @@ window.onbeforeunload = function () {
};
function
message
(
data
)
{
let
json
=
JSON
.
parse
(
data
);
let
modal
=
document
.
getElementsByClassName
(
"modal fade show"
)[
0
];
var
json
=
JSON
.
parse
(
data
);
var
modal
=
document
.
getElementsByClassName
(
"modal fade show"
)[
0
];
if
(
!
modal
)
{
return
;
}
let
modal_id
=
modal
.
getAttribute
(
"id"
);
let
selector
=
$
(
"#"
+
modal_id
+
"_alert"
);
let
color
=
"alert-info"
;
var
modal_id
=
modal
.
getAttribute
(
"id"
);
var
selector
=
$
(
"#"
+
modal_id
+
"_alert"
);
var
color
=
"alert-info"
;
switch
(
json
[
"status"
])
{
case
200
:
color
=
"alert-success"
;
...
...
@@ -245,23 +245,23 @@ function message(data) {
}
function
readNotifications
(
id
)
{
let
data
=
new
FormData
();
var
data
=
new
FormData
();
request
(
"/bildirimler/oku"
,
data
,
function
()
{
checkNotifications
();
});
}
function
readSystemNotifications
(
id
)
{
let
data
=
new
FormData
();
var
data
=
new
FormData
();
request
(
"/bildirim/adminOku"
,
data
,
function
()
{
checkNotifications
();
});
}
let
inputs
=
[];
let
modalData
=
[];
var
inputs
=
[];
var
modalData
=
[];
function
updateTable
(
extra
V
ariableName
=
null
)
{
function
updateTable
(
extra
v
ariableName
=
null
)
{
reload
();
}
...
...
@@ -270,13 +270,13 @@ function addToTable() {
}
function
renderNotifications
(
data
,
type
,
target
,
exclude
)
{
let
element
=
$
(
"#"
+
target
+
" .menu"
);
var
element
=
$
(
"#"
+
target
+
" .menu"
);
element
.
html
(
""
);
//Set Count
$
(
"#"
+
target
+
"Count"
).
html
(
data
.
length
);
data
.
forEach
((
notification
)
=>
{
let
errors
=
[
"error"
,
"health_problem"
];
let
color
=
errors
.
includes
(
notification
[
"type"
])
?
"#f56954"
:
"#00a65a"
;
var
errors
=
[
"error"
,
"health_problem"
];
var
color
=
errors
.
includes
(
notification
[
"type"
])
?
"#f56954"
:
"#00a65a"
;
element
.
append
(
"<div class='dropdown-divider'></div><a class='dropdown-item' href='/bildirim/"
+
notification
[
"id"
]
+
...
...
@@ -287,7 +287,7 @@ function renderNotifications(data, type, target, exclude) {
notification
[
"title"
]
+
"</span></a>"
);
let
displayedNots
=
[];
var
displayedNots
=
[];
if
(
localStorage
.
displayedNots
)
{
displayedNots
=
JSON
.
parse
(
localStorage
.
displayedNots
);
}
...
...
@@ -319,7 +319,7 @@ function renderNotifications(data, type, target, exclude) {
}
function
activeTab
()
{
let
element
=
$
(
'a[href="'
+
window
.
location
.
hash
+
'"]'
);
var
element
=
$
(
'a[href="'
+
window
.
location
.
hash
+
'"]'
);
if
(
element
)
{
element
.
click
();
}
...
...
@@ -329,7 +329,7 @@ function fixer(val) {
if
(
!
val
)
return
val
;
return
val
.
replace
(
/</g
,
"<"
).
replace
(
/>/g
,
">"
);
}
let
currentlyDark
=
var
currentlyDark
=
window
.
localStorage
.
getItem
(
"dark"
)
==
"true"
?
true
:
false
;
function
toggleDarkMode
()
{
...
...
resources/views/extension_pages/city.blade.php
Dosyayı görüntüle @
ef23b6f2
...
...
@@ -47,8 +47,8 @@
</div>
<script>
function
details
(
element
)
{
let
server_id
=
element
.
querySelector
(
'#server_id'
).
innerHTML
;
window
.
location
.
href
=
window
.
location
.
href
+
"/"
+
server_id
var
server_id
=
element
.
querySelector
(
'#server_id'
).
innerHTML
;
partialPageRequest
(
window
.
location
.
href
+
"/"
+
server_id
);
}
</script>
@endif
...
...
resources/views/extension_pages/manager.blade.php
Dosyayı görüntüle @
ef23b6f2
@
extends
(
'layouts.app'
)
@
section
(
'content'
)
<
nav
class
="
row
">
<div class="
col
-
sm
-
6
">
<ol class="
breadcrumb
">
<li class="
breadcrumb
-
item
"><a href="
{{
route
(
'home'
)}}
">{{__("
Ana
Sayfa
")}}</a></li>
<li class="
breadcrumb
-
item
active
" aria-current="
page
">{{ __('Eklenti Yönetimi') }}</li>
</ol>
</div>
</nav>
<div class="
row
">
<div class="
col
-
md
-
3
">
<div class="
card
card
-
primary
card
-
outline
">
<div class="
card
-
body
box
-
profile
">
<h3 class="
profile
-
username
text
-
center
">
{
{__("Eklentiler")}
}
</h3>
<p class="
text
-
muted
text
-
center
">Bu sayfadan mevcut eklentileri görebilirsiniz. Ayrıca yeni eklenti eklemek için Yükle butonunu kullanabilirsiniz.</p>
</div>
</div>
</div>
<div class="
col
-
md
-
9
">
<div class="
card
">
<div class="
card
-
body
">
@include('modal-button',[
@
include
(
'modal-button'
,[
"class"
=>
"btn-primary"
,
"target_id"
=>
"extensionUpload"
,
"text"
=>
"Yükle"
...
...
@@ -65,13 +42,8 @@
"
icon
" => "
context
-
menu
-
icon
-
delete
"
]
],
"
onclick
" => env('EXTENSION_DEVELOPER_MODE') ? "
d
etails
" : ""
"
onclick
" => env('EXTENSION_DEVELOPER_MODE') ? "
extensionD
etails
" : ""
])
</div>
</div>
</div>
</div>
@include('modal',[
"
id
"=>"
extSettings
",
"
title
" => "
Ayarlar
",
...
...
@@ -166,7 +138,7 @@
}
function
extensionUploadError
(
response
){
let
error
=
JSON
.
parse
(
response
);
var
error
=
JSON
.
parse
(
response
);
if
(
error
.
status
==
203
){
$
(
'#extensionUpload_alert'
)
.
hide
();
Swal
.
fire
({
...
...
@@ -181,13 +153,13 @@
})
.
then
((
result
)
=>
{
if
(
result
.
value
)
{
showSwal
(
'{{__("Yükleniyor...")}}'
,
'info'
);
let
data
=
new
FormData
(
document
.
querySelector
(
'#extensionUpload_form'
))
var
data
=
new
FormData
(
document
.
querySelector
(
'#extensionUpload_form'
))
data
.
append
(
"force"
,
"1"
);
request
(
'{{route('
extension_upload
')}}'
,
data
,
function
(
response
){
Swal
.
close
();
reload
();
},
function
(
response
){
let
error
=
JSON
.
parse
(
response
);
var
error
=
JSON
.
parse
(
response
);
Swal
.
close
();
$
(
'#extensionUpload_alert'
)
.
removeClass
(
'alert-danger'
)
.
removeAttr
(
'hidden'
)
.
removeClass
(
'alert-success'
)
.
addClass
(
'alert-danger'
)
.
html
(
error
.
message
)
.
fadeIn
();
});
...
...
@@ -197,10 +169,9 @@
}
@
if
(
env
(
'EXTENSION_DEVELOPER_MODE'
)
==
true
)
function
d
etails
(
element
){
let
extension_id
=
element
.
querySelector
(
'#extension_id'
)
.
innerHTML
;
window
.
location
.
href
=
"/eklentiler/"
+
extension_id
function
extensionD
etails
(
element
){
var
extension_id
=
element
.
querySelector
(
'#extension_id'
)
.
innerHTML
;
partialPageRequest
(
"/eklentiler/"
+
extension_id
);
}
@
endif
</
script
>
@
endsection
resources/views/extension_pages/one.blade.php
Dosyayı görüntüle @
ef23b6f2
...
...
@@ -7,7 +7,9 @@
<
ol
class
="
breadcrumb
">
<li class="
breadcrumb
-
item
"><a href="
{{
route
(
'home'
)}}
">{{__("
Ana
Sayfa
")}}</a></li>
<li class="
breadcrumb
-
item
" aria-current="
page
"><a
href="
{{
route
(
'extensions_settings'
)}}
">{{__("
Eklenti
Yönetimi
")}}</a></li>
href="
{{
route
(
'settings'
)}}
">{{__("
Sistem
Ayarları
")}}</a></li>
<li class="
breadcrumb
-
item
" aria-current="
page
"><a
href="
{{
route
(
'settings'
)}}
#extensions">{{__("Eklentiler")}}</a></li>
<
li
class
="
breadcrumb
-
item
active
" aria-current="
page
">{{
$extension["name"]
}}</li>
</ol>
</nav>
...
...
@@ -311,13 +313,13 @@
</div>
<script>
function editPage(element){
let
page = $(element).find("
#name").text();
location
.
href
=
location
.
protocol
+
'//'
+
location
.
host
+
location
.
pathname
+
"/"
+
page
;
var
page = $(element).find("
#name").text();
partialPageRequest
(
location
.
protocol
+
'//'
+
location
.
host
+
location
.
pathname
+
"/"
+
page
)
;
}
function
updateExtension
(
type
,
tableId
=
null
){
showSwal
(
'{{__("Kaydediliyor...")}}'
,
'info'
);
let
data
=
new
FormData
();
var
data
=
new
FormData
();
data
.
append
(
'type'
,
type
);
data
.
append
(
'name'
,
$
(
"#extensionName"
)
.
val
());
data
.
append
(
'icon'
,
$
(
"#icon"
)
.
val
());
...
...
@@ -333,7 +335,7 @@
location
.
reload
();
},
1500
);
},
function
(
response
){
let
error
=
JSON
.
parse
(
response
);
var
error
=
JSON
.
parse
(
response
);
showSwal
(
error
.
message
,
'error'
,
2000
);
});
}
...
...
@@ -343,7 +345,7 @@
function
getFunctionParameters
(
function_name
){
showSwal
(
'{{__("Yükleniyor...")}}'
,
'info'
);
let
data
=
new
FormData
();
var
data
=
new
FormData
();
data
.
append
(
'function_name'
,
function_name
);
activeFunction
=
function_name
;
...
...
@@ -355,7 +357,7 @@
.
DataTable
(
dataTablePresets
(
'normal'
));
$
(
'#updateFunctionParametersModal'
)
.
modal
(
'show'
);
},
function
(
response
){
let
error
=
JSON
.
parse
(
response
);
var
error
=
JSON
.
parse
(
response
);
showSwal
(
error
.
message
,
'error'
,
2000
);
});
}
...
...
@@ -366,7 +368,7 @@
}
function
updateFunctionParameters
(
row
){
let
function_name
=
$
(
row
)
.
find
(
"#name"
)
.
text
();
var
function_name
=
$
(
row
)
.
find
(
"#name"
)
.
text
();
getFunctionParameters
(
function_name
);
}
...
...
@@ -388,8 +390,8 @@
})
.
then
((
result
)
=>
{
if
(
result
.
value
)
{
showSwal
(
'{{__("Yükleniyor...")}}'
,
'info'
);
let
parameter_variable
=
$
(
row
)
.
find
(
"#variable"
)
.
text
();
let
data
=
new
FormData
();
var
parameter_variable
=
$
(
row
)
.
find
(
"#variable"
)
.
text
();
var
data
=
new
FormData
();
data
.
append
(
'parameter_variable'
,
parameter_variable
);
data
.
append
(
'function_name'
,
activeFunction
);
...
...
@@ -397,14 +399,14 @@
Swal
.
close
();
getFunctionParameters
(
activeFunction
);
},
function
(
response
){
let
error
=
JSON
.
parse
(
response
);
var
error
=
JSON
.
parse
(
response
);
showSwal
(
error
.
message
,
'error'
,
2000
);
});
}
});
}
function
updateFunctionModalHandler
(
element
){
let
modal
=
$
(
"#updateFunctionModal"
);
var
modal
=
$
(
"#updateFunctionModal"
);
modal
.
find
(
"input[name='name']"
)
.
val
(
element
.
querySelector
(
'#name'
)
.
innerHTML
);
modal
.
find
(
"input[name='old']"
)
.
val
(
element
.
querySelector
(
'#name'
)
.
innerHTML
);
modal
.
find
(
"input[name='description']"
)
.
val
(
element
.
querySelector
(
'#description'
)
.
innerHTML
);
...
...
resources/views/extension_pages/server.blade.php
Dosyayı görüntüle @
ef23b6f2
...
...
@@ -6,13 +6,13 @@
<li class="
breadcrumb
-
item
active
"><a href="
/
l
/
{{
extension
()
->
id
}}
/
{{
request
(
'city'
)}}
/
{{
server
()
->
id
}}
">{{extension()->display_name . __("
-
Ana
Sayfa
")}}</a></li>
</ol>
<div class="
right
" id="
ext_menu
" style="
float
:
right
;
margin
-
top
:-
55
px
">
<button data-toggle="
tooltip
" title="
Eklenti
Ayarları
" class="
btn
btn
-
primary
" onclick="
location
.
href
=
'{{route('
extension_server_settings_page
',[
<button data-toggle="
tooltip
" title="
Eklenti
Ayarları
" class="
btn
btn
-
primary
" onclick="
partialPageRequest
(
'{{route('
extension_server_settings_page
',[
"server_id" => server()->id,
"extension_id" => extension()->id
])}}'
"><i class="
fa
fa
-
cogs
"></i></button>
<button data-toggle="
tooltip
" title="
Sunucuya
Git
" class="
btn
btn
-
primary
" onclick="
location
.
href
=
'{{route('
server_one
',[
])}}'
)
"><i class="
fa
fa
-
cogs
"></i></button>
<button data-toggle="
tooltip
" title="
Sunucuya
Git
" class="
btn
btn
-
primary
" onclick="
partialPageRequest
(
'{{route('
server_one
',[
"server_id" => server()->id,
])}}'
"><i class="
fa
fa
-
server
"></i></button>
])}}'
)
"><i class="
fa
fa
-
server
"></i></button>
@if(count(
$tokens
) > 0)
<button data-toggle="
tooltip
" title="
Sorgu
Oluştur
" class="
btn
btn
-
primary
" onclick="
showRequestRecords
()
"><i class="
fa
fa
-
book
"></i></button>
@endif
...
...
@@ -129,7 +129,7 @@ pre {
<script>
function toggleRequestRecord(){
let
element = $("#requestRecordButton");
var
element = $("#requestRecordButton");
limanRecordRequests = !limanRecordRequests;
if(limanRecordRequests == true){
element.css("backgroundColor","red");
...
...
@@ -143,8 +143,8 @@ pre {
showSwal("Lütfen önce bir sorguyu kaydedin.","error",2000);
return;
}
let
listElement = $("#limanRequestsList");
let
modalElement = $("#limanRequestsModal");
var
listElement = $("#limanRequestsList");
var
modalElement = $("#limanRequestsModal");
listElement.html("");
$.each(limanRequestList, function(index, entries) {
listElement.append("<li onclick='
showCurlCommand
(
this
,
" + index + "
)
' class='
list
-
group
-
item
liman
-
request
-
item
'>" + entries["target"] +"</li>")
...
...
@@ -166,7 +166,7 @@ pre {
@endif
<script>
$(function(){
let
list = [];
var
list = [];
$("#quickNavBar li>a").each(function(){
list.push($(this).text());
});
...
...
resources/views/general/harita.blade.php
Dosyayı görüntüle @
ef23b6f2
...
...
@@ -295,19 +295,19 @@ function svgturkiyeharitasi() {
function
(
event
)
{
if
(
event
.
target
.
tagName
===
'path'
)
{
const
parent
=
event
.
target
.
parentNode
;
window
.
location
.
href
=
window
.
location
.
href
+
'/'
+
(
parent
.
getAttribute
(
'data-plakakodu'
));
partialPageRequest
(
window
.
location
.
href
+
'/'
+
(
parent
.
getAttribute
(
'data-plakakodu'
)
));
}
}
);
}
svgturkiyeharitasi
();
let
sehirler
=
"{{$cities}}"
.
split
(
","
);
var
sehirler
=
"{{$cities}}"
.
split
(
","
);
sehirler
.
forEach
(
function
(
sehir
)
{
$
(
'[data-plakakodu="'
+
sehir
+
'"] path'
).
css
(
'fill'
,
'#1094F6'
);
});
$
(
'g[data-plakakodu]'
).
each
(
function
(){
let
vm
=
this
;
var
vm
=
this
;
$
(
this
).
mouseover
(
function
(){
fillCity
(
$
(
vm
).
attr
(
'data-plakakodu'
),
true
);
});
...
...
resources/views/index.blade.php
Dosyayı görüntüle @
ef23b6f2
...
...
@@ -151,7 +151,7 @@
<script>
$("
.
sortable
-
widget
").sortable({
stop: function(event, ui) {
let
data = [];
var
data = [];
$("
.
sortable
-
widget
>
div
").each(function(i, el){
$(el).attr('data-order', $(el).index());
data.push({
...
...
@@ -159,25 +159,25 @@
order: $(el).index()
});
});
let
form = new FormData();
var
form = new FormData();
form.append('widgets', JSON.stringify(data));
request('
{
{route('update_orders')}
}
', form, function(response){});
}
});
$("
.
sortable
-
widget
").disableSelection();
let
intervals = [];
let
widgets = [];
let
currentWidget = 0;
var
intervals = [];
var
widgets = [];
var
currentWidget = 0;
$("
.
limanWidget
").each(function(){
let
element = $(this);
var
element = $(this);
widgets.push({
'element': element,
'type': 'countBox'
});
});
$('.limanCharts').each(function(){
let
element = $(this);
var
element = $(this);
widgets.push({
'element': element,
'type': 'chart'
...
...
@@ -202,7 +202,7 @@
@if(user()->isAdmin())
function retrieveStats(){
request('
{
{route('liman_stats')}
}
', new FormData(), function(response){
let
json = JSON.parse(response);
var
json = JSON.parse(response);
$("
#ramUsage").text(json.ram);
$
(
"#diskUsage"
)
.
text
(
json
.
disk
);
$
(
"#cpuUsage"
)
.
text
(
json
.
cpu
);
...
...
@@ -227,13 +227,13 @@
}
function
retrieveWidgets
(
element
,
next
){
let
info_box
=
element
.
closest
(
'.info-box'
);
let
form
=
new
FormData
();
var
info_box
=
element
.
closest
(
'.info-box'
);
var
form
=
new
FormData
();
form
.
append
(
'widget_id'
,
element
.
attr
(
'id'
));
form
.
append
(
'server_id'
,
element
.
attr
(
'data-server-id'
));
request
(
'{{route('
widget_one
')}}'
,
form
,
function
(
response
){
try
{
let
json
=
JSON
.
parse
(
response
);
var
json
=
JSON
.
parse
(
response
);
element
.
html
(
json
[
"message"
]);
info_box
.
find
(
'.info-box-icon'
)
.
show
();
info_box
.
find
(
'.info-box-content'
)
.
show
();
...
...
@@ -247,7 +247,7 @@
next
();
}
},
function
(
error
)
{
let
json
=
{};
var
json
=
{};
try
{
json
=
JSON
.
parse
(
error
);
}
catch
(
e
){
...
...
@@ -264,14 +264,14 @@
}
function
retrieveCharts
(
element
,
next
){
let
id
=
element
.
attr
(
'id'
);
let
form
=
new
FormData
();
var
id
=
element
.
attr
(
'id'
);
var
form
=
new
FormData
();
form
.
append
(
'widget_id'
,
id
);
form
.
append
(
'server_id'
,
element
.
attr
(
'data-server-id'
));
request
(
'{{route('
widget_one
')}}'
,
form
,
function
(
res
){
try
{
let
response
=
JSON
.
parse
(
res
);
let
data
=
response
.
message
;
var
response
=
JSON
.
parse
(
res
);