Войти или зарегистрироваться
  • Вы находитесь в сообществе Rubukkit. Мы - администраторы серверов Minecraft, разрабатываем собственные плагины и переводим на различные языки плагины наших коллег из других стран.
  • Данный раздел создан исключительно для релизов! Вопросы по лаунчеру или обвязке задавайте ТОЛЬКО в соответсвующей теме автора. Любые другие темы будут удалены, а авторы понесут наказание.

Веб JS Мониторинг серверов

server.online = 1 * data.player_online;
server.max_online = 1 * data.player_max;
Что бы вместо undefined было значение. Хотя бы нулевое.
var Monitoring = { Вроде потеряна закрывающая скобка
Все нормально.
Товарищ @MattRh | IP сделал альтернативную версию мониторинга, посмотреть можно здесь.
 
Увы, но я ничего не могу поделать, имея столь малое количество информации о проблеме.
 
Увы, но я ничего не могу поделать, имея столь малое количество информации о проблеме.
в общем так и не разобрались, поставили другой.
вот сегодня заработал, но так тоже не пойдет, эта зависимость от стороннего ресурса - вчера получается полдня не работало, а мы понять не могли
 
в общем так и не разобрались, поставили другой.
вот сегодня заработал, но так тоже не пойдет, эта зависимость от стороннего ресурса - вчера получается полдня не работало, а мы понять не могли
Товарищ @@MattRh | IP сделал альтернативную версию мониторинга, посмотреть можно здесь.
 
как исправить?
при вставке в tpl файл
Код:
<link href="/css/monitoring.css" rel="stylesheet">
<script src="/js/moment.js" type="text/javascript"></script>
<script src="/js/monitoring.js" type="text/javascript"></script>
он рушиться, а так же пишет что сервер выключен, но он включен
8f074393cedb.jpg
 
Посмотрите что выводит консоль. Вероятно, сервер с данными отключен.
 
Можно по подробней? я просто рак в этом
Если вы про консоль сервера то ошибок нет
Комбинация CTRL+SHIFT+I (Chrome) откроет инструменты разработчика.
Посмотрите что выводит в консоль скрипт.
 
Комбинация CTRL+SHIFT+I (Chrome) откроет инструменты разработчика.
Посмотрите что выводит в консоль скрипт.
Вот что в консоли
Код:
XMLHttpRequest cannot load http://jmc.mymine.su/94.23.12.93:25706. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://libirty-world.tk' is therefore not allowed access. The response had HTTP status code 404. (index):1
Failed to load resource: the server responded with a status of 404 (Not Found) http://libirty-world.tk/img/loading.gif
Failed to load resource: the server responded with a status of 404 (Not Found) http://libirty-world.tk/templates/Libirty/images/topline.png
Failed to load resource: the server responded with a status of 404 (Not Found) http://libirty-world.tk/templates/Libirty/images/pagebgfoot.jpg
Failed to load resource: the server responded with a status of 404 (Not Found) http://libirty-world.tk/templates/Libirty/images/fbox.png
Failed to load resource: net::ERR_CACHE_MISS http://libirty-world.tk/
Failed to load resource: net::ERR_CACHE_MISS http://vk.com/widget_community.php?app=0&width=300px&_ver=1&gid=20003922&mo…&color3=5B7FA6&height=400&url=http%3A%2F%2Flibirty-world.tk%2F&149b8a0d954
2XMLHttpRequest cannot load http://jmc.mymine.su/94.23.12.93:25706. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://libirty-world.tk' is therefore not allowed access. The response had HTTP status code 404. (index):1
Failed to load resource: net::ERR_CACHE_MISS http://libirty-world.tk/
Failed to load resource: net::ERR_CACHE_MISS http://vk.com/widget_community.php?app=0&width=300px&_ver=1&gid=20003922&mo…&color3=5B7FA6&height=400&url=http%3A%2F%2Flibirty-world.tk%2F&149b8a0d954
 
Попробуйте заменить используемый сервер на
jmc.mymine.su > http://jmc.url.ph/

JavaScript:
  updateServerState: function (serverId) {
        var server = this.servers[serverId];
        $.ajax({
       >  url: "http://jmc.url.ph/" + server.address,
            dataType: "json",
            type: "GET",
            success: function (data) {

(И скрипт стоит брать с http://jsfiddle.net/cyberowl/37Rr5/)
 
Последнее редактирование:
Попробуйте заменить используемый сервер на
jmc.mymine.su > http://jmc.url.ph/

JavaScript:
  updateServerState: function (serverId) {
        var server = this.servers[serverId];
        $.ajax({
       >  url: "http://jmc.url.ph/" + server.address,
            dataType: "json",
            type: "GET",
            success: function (data) {

(И скрипт стоит брать с http://jsfiddle.net/cyberowl/37Rr5/)
новая ошибка
Код:
MLHttpRequest cannot load http://jmc.url.ph/94.23.12.93:25706. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://libirty-world.tk' is therefore not allowed access. The response had HTTP status code 403. (index):1
Error in event handler for runtime.onMessage: Cannot set property 'regions' of null
Stack trace: TypeError: Cannot set property 'regions' of null
    at receive (chrome-extension://molncoemjfmpgdkbdlbjmhlcgniigdnf/naptha-wick.js:852:17)
    at chrome-extension://molncoemjfmpgdkbdlbjmhlcgniigdnf/naptha-wick.js:643:2
    at EventImpl.dispatchToListener (extensions::event_bindings:397:22)
    at Event.publicClass.(anonymous function) [as dispatchToListener] (extensions::utils:93:26)
    at EventImpl.dispatch_ (extensions::event_bindings:379:35)
    at EventImpl.dispatch (extensions::event_bindings:403:17)
    at Event.publicClass.(anonymous function) [as dispatch] (extensions::utils:93:26)
    at messageListener (extensions::messaging:188:29)
    at EventImpl.dispatchToListener (extensions::event_bindings:397:22)
    at Event.publicClass.(anonymous function) [as dispatchToListener] (extensions::utils:93:26) (index):1
Failed to load resource: the server responded with a status of 404 (Not Found) http://libirty-world.tk/img/loading.gif
Failed to load resource: the server responded with a status of 404 (Not Found) http://libirty-world.tk/templates/Libirty/images/topline.png
Failed to load resource: the server responded with a status of 404 (Not Found) http://libirty-world.tk/templates/Libirty/images/pagebgfoot.jpg
Failed to load resource: the server responded with a status of 404 (Not Found) http://libirty-world.tk/templates/Libirty/images/fbox.png
Failed to load resource: net::ERR_CACHE_MISS http://libirty-world.tk/
Failed to load resource: net::ERR_CACHE_MISS http://vk.com/widget_community.php?app=0&width=300px&_ver=1&gid=20003922&mo…&color3=5B7FA6&height=400&url=http%3A%2F%2Flibirty-world.tk%2F&149bc84c50a
XMLHttpRequest cannot load http://jmc.url.ph/94.23.12.93:25706. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://libirty-world.tk' is therefore not allowed access. The response had HTTP status code 403. (index):1
 
новая ошибка
Код:
MLHttpRequest cannot load http://jmc.url.ph/94.23.12.93:25706. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://libirty-world.tk' is therefore not allowed access. The response had HTTP status code 403. (index):1
Error in event handler for runtime.onMessage: Cannot set property 'regions' of null
Stack trace: TypeError: Cannot set property 'regions' of null
    at receive (chrome-extension://molncoemjfmpgdkbdlbjmhlcgniigdnf/naptha-wick.js:852:17)
    at chrome-extension://molncoemjfmpgdkbdlbjmhlcgniigdnf/naptha-wick.js:643:2
    at EventImpl.dispatchToListener (extensions::event_bindings:397:22)
    at Event.publicClass.(anonymous function) [as dispatchToListener] (extensions::utils:93:26)
    at EventImpl.dispatch_ (extensions::event_bindings:379:35)
    at EventImpl.dispatch (extensions::event_bindings:403:17)
    at Event.publicClass.(anonymous function) [as dispatch] (extensions::utils:93:26)
    at messageListener (extensions::messaging:188:29)
    at EventImpl.dispatchToListener (extensions::event_bindings:397:22)
    at Event.publicClass.(anonymous function) [as dispatchToListener] (extensions::utils:93:26) (index):1
Failed to load resource: the server responded with a status of 404 (Not Found) http://libirty-world.tk/img/loading.gif
Failed to load resource: the server responded with a status of 404 (Not Found) http://libirty-world.tk/templates/Libirty/images/topline.png
Failed to load resource: the server responded with a status of 404 (Not Found) http://libirty-world.tk/templates/Libirty/images/pagebgfoot.jpg
Failed to load resource: the server responded with a status of 404 (Not Found) http://libirty-world.tk/templates/Libirty/images/fbox.png
Failed to load resource: net::ERR_CACHE_MISS http://libirty-world.tk/
Failed to load resource: net::ERR_CACHE_MISS http://vk.com/widget_community.php?app=0&width=300px&_ver=1&gid=20003922&mo…&color3=5B7FA6&height=400&url=http%3A%2F%2Flibirty-world.tk%2F&149bc84c50a
XMLHttpRequest cannot load http://jmc.url.ph/94.23.12.93:25706. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://libirty-world.tk' is therefore not allowed access. The response had HTTP status code 403. (index):1
Это никак не новая ошибка, ошибка заключается в том, что хост со скриптом (который кстати можно и самим написать.) недоступен. Эта проблема не на моей стороне.
XMLHttpRequest cannot load http://jmc.url.ph/94.23.12.93:25706. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://libirty-world.tk' is therefore not allowed access. The response had HTTP status code 403. (index):1
 
К сожалению шкальники не смогут сами написать..
 
"Потому что я сам шкальник"(c)диванные аналитики
 

Поделиться этой страницей

Назад
Верх