Jump to content

[0.2 Release] Unofficial Epoch Redis Database Manager - Live Map


Zupa

Recommended Posts

QrlBKBA.png
 
text:

'use strict';



/**
* @ngdoc function
* @name zepochRedisApp.controller:MainCtrl
* @description
* # MainCtrl
* Controller of the zepochRedisApp
*/
ERDBM
.controller('MainCtrl', function ($scope,$rootScope,$location,$http) {
$(".nav li").removeClass("active");

$("#dashboard").addClass("active");

var MC = $scope;
var RS = $rootScope;

MC.loadingData = true;

MC.onlinePlayers = 0;
MC.vehicles = 0;
MC.buildings = 0;
MC.players = 0;
MC.traders = 0;
MC.storages = 0;


$http.post(RS.selectedServer['serverUrl'] + 'getDashboardData.php?date=+ new Date().getTime(),{"secret": String(CryptoJS.MD5(RS.selectedServer['rpw])) , "instance": RS.selectedServer['ri'], "db" : RS.selectedServer['dbi'] }).
success(function(data, status, headers, config) {
MC.unEpochorize(data);

MC.loadingData = false;
}).error(function(error){
MC.loadingData = false;
alert("Can't get dashboard data.");
});

MC.unEpochorize = unEpochorize;

function unEpochorize(data){
MC.onlinePlayers = data[2];
MC.players = data[1];
MC.vehicles = data[3];
MC.storages = data[4];
MC.traders = data[5];
MC.buildings = data[6];
}

MC.changeLoc = changeLoc;

function changeLoc(where){
$location.path(where);
}


});

Link to comment
Share on other sites

I have over 4500 buildings on my server. it seems that i can't load all the buildings into your web application (map and buildings).

On my test server with only 10 buildings it works like a charm.

 

There might be like 1 objtect that is not structured as i programmed it and then i crashes the calculations, , press f12 in browser to see JS errors

Link to comment
Share on other sites

I installed it and it works so far, but:

In Dashboard it tells me 280 Vehicles on the Map, but if I klick on Vehicle View, it pops up this:

Can't get vehicle data.

Also if I click on Traders View, theres only some Text shown in the new window on top left side:

This is the traders view

Everything else work fine, can get Player Data or Buildings and so on...

BTW, Traders and Vehicles also NOT visualized on the Map-Overview.

 

Using dedi-server and map is chernarus, Tool and server on the same machine...

 

Thats the Text, if I press F12, if this could help:

downloadable font: download failed (font-family: "Kendo UI" style:normal weight:normal stretch:normal src index:0): status=2147746065
source: http://localhost/ZRDBM0.2/styles/images/kendoui.woff?v=1.1 kendo.material.mobile.min.css:9
downloadable font: download failed (font-family: "Kendo UI" style:normal weight:normal stretch:normal src index:1): status=2147746065
source: http://localhost/ZRDBM0.2/styles/images/kendoui.ttf?v=1.1 kendo.material.mobile.min.css:9
"Error: JSON.parse: unexpected character at line 1 column 2 of the JSON data
fromJson@http://localhost/ZRDBM0.2/bower_components/angular/angular.js:1054:9
defaultHttpResponseTransform@http://localhost/ZRDBM0.2/bower_components/angular/angular.js:8497:1
transformData/<@http://localhost/ZRDBM0.2/bower_components/angular/angular.js:8574:12
forEach@http://localhost/ZRDBM0.2/bower_components/angular/angular.js:322:11
transformData@http://localhost/ZRDBM0.2/bower_components/angular/angular.js:8573:3
transformResponse@http://localhost/ZRDBM0.2/bower_components/angular/angular.js:9300:23
processQueue@http://localhost/ZRDBM0.2/bower_components/angular/angular.js:13075:27
scheduleProcessQueue/<@http://localhost/ZRDBM0.2/bower_components/angular/angular.js:13091:27
$RootScopeProvider/this.$get</Scope.prototype.$eval@http://localhost/ZRDBM0.2/bower_components/angular/angular.js:14291:16
$RootScopeProvider/this.$get</Scope.prototype.$digest@http://localhost/ZRDBM0.2/bower_components/angular/angular.js:14107:15
$RootScopeProvider/this.$get</Scope.prototype.$apply@http://localhost/ZRDBM0.2/bower_components/angular/angular.js:14395:13
done@http://localhost/ZRDBM0.2/bower_components/angular/angular.js:9569:36
completeRequest@http://localhost/ZRDBM0.2/bower_components/angular/angular.js:9756:7
requestLoaded@http://localhost/ZRDBM0.2/bower_components/angular/angular.js:9697:1
"
Link to comment
Share on other sites

Hi Chiller

 

Some explanations and bugs in 0.2

 

  • Trader view doesn't excist yet
  • Traders never show on map ( location is never saved to database, so the database doesn't know where they are on the map).
  • Your vehicles don't get showed becausecus it failed to get the data. Is there a error syntax in one of the vehicles perhaps? I would need to see the php response itself to determine the cause.
  • The dashboard currently displays the ammount of vehicle slots ( even when they are empty)
  • The map only shows the vehicles which have data in them.
  •  
Link to comment
Share on other sites

  • Your vehicles don't get showed becausecus it failed to get the data. Is there a error syntax in one of the vehicles perhaps? I would need to see the php response itself to determine the cause.

 

Can you tell me, how I can get the php response? Absolutely don't know what it is....

Link to comment
Share on other sites

Not really sure that I get the right Information, but maybe I'm right... looks like this?

[["Vehicle:NA123:126",["B_Heli_Light_0ehicle:NA123:68",["B_Heli_Transport_01_cam.................5365,[[],[[],[]],[[],[]],[[],[]]],[],0]]]

Attached a file, cause it's to big for Forum...

Get it from there:

 

123.jpg

vehicle_infos.zip

Link to comment
Share on other sites

I see the cause.

 

5 vehicles with value 

 

<null>

 

in there inventories or something else

 

I'll program exceptions for that.

 

Example=

["Vehicle:NA123:275",["Land_Cargo20_yellow_F",[[12371.3,7391.39,0],[-0.929353,0.369193,0],[0,0,1]],0,[],1,[[],[[],[]],[[],[]],[[],[]]],<null>,0]],
Link to comment
Share on other sites

Got this all going on my chernarus server to test and it all seems to be working and it looks great BTW! will we be able to see and edit traders from this eventually?

 

yes.

 

Dev is a bit slow cus of alot of parelel projects going on for me and my daytime job interferes to ^^

 

Imagine if i could spend whole days programming instead of lazy 2 hour evenings wich are mostly being tired from work xD

Link to comment
Share on other sites

I finally got around to setting this up properly on my webserver. The only page that works for me is the Players page. Even that doesn't show correct information for me. For example, it's listing all these AI but I'm not listed there. I found my UID and it says my name is "Majeed Amin" along with a whole bunch of other players. I'm so confused.

 

Everything else is empty. Map doesn't show anything on it either.

 

Here's a screenshot of the player's page. I am the second player listed but that's not my in-game name.

 

BywAyT.png

Link to comment
Share on other sites

Any help for my situation posted above?

 

Ow sorry i thought i answered,

 

Your not showing data is because u have a wrong instanename in the configs ( client side) .

THe players table doesn't use this so thats why only players succeeds.

 

The name is something to do with character saving when u log of ( it's how arma 3 works).

Thats the AI name of your character.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...