Noldy Posted February 15, 2015 Report Share Posted February 15, 2015 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 More sharing options...
Zupa Posted February 15, 2015 Author Report Share Posted February 15, 2015 NODLY, the PHP answer... not my js files, lol... Link to comment Share on other sites More sharing options...
Zupa Posted February 15, 2015 Author Report Share Posted February 15, 2015 Nice work! For me it only works on a localhost. If i put it on my webspace it doesen't work. are there any special features needed? PHP evironment 5.5+ open ports. Link to comment Share on other sites More sharing options...
Noldy Posted February 15, 2015 Report Share Posted February 15, 2015 Sry :D Link to comment Share on other sites More sharing options...
Zupa Posted February 15, 2015 Author Report Share Posted February 15, 2015 Sry :D add me on skype, i need some specific data, u got prob got some erros in your config xertie Link to comment Share on other sites More sharing options...
Bc00L Posted February 15, 2015 Report Share Posted February 15, 2015 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. Link to comment Share on other sites More sharing options...
San Posted February 15, 2015 Report Share Posted February 15, 2015 @Zupa I think I love you!! hahahaha.. Nice work, I love what you have done soo far wow!! Link to comment Share on other sites More sharing options...
Zupa Posted February 15, 2015 Author Report Share Posted February 15, 2015 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 More sharing options...
CH!LL3R Posted February 16, 2015 Report Share Posted February 16, 2015 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 More sharing options...
Zupa Posted February 16, 2015 Author Report Share Posted February 16, 2015 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 More sharing options...
Zupa Posted February 16, 2015 Author Report Share Posted February 16, 2015 Some extra info We currently hit 425 downloads on the tool ^^ Link to comment Share on other sites More sharing options...
CH!LL3R Posted February 16, 2015 Report Share Posted February 16, 2015 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 More sharing options...
Zupa Posted February 16, 2015 Author Report Share Posted February 16, 2015 Can you tell me, how I can get the php response? Absolutely don't know what it is.... F12 -> Network tab -> Refresh map -> getVehicleData.php -> Response tab -> Whatever is in there Link to comment Share on other sites More sharing options...
CH!LL3R Posted February 16, 2015 Report Share Posted February 16, 2015 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: vehicle_infos.zip Link to comment Share on other sites More sharing options...
Zupa Posted February 16, 2015 Author Report Share Posted February 16, 2015 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 More sharing options...
Zupa Posted February 16, 2015 Author Report Share Posted February 16, 2015 Use this new file in your server https://github.com/DevZupa/ZER-DBM/blob/master/app/server/getVehicleData.php Link to comment Share on other sites More sharing options...
Gorgy Posted February 16, 2015 Report Share Posted February 16, 2015 looks really nice but i cant get it to work i think its me beeing really stupid again... get this with F12 Link to comment Share on other sites More sharing options...
CH!LL3R Posted February 16, 2015 Report Share Posted February 16, 2015 Use this new file in your server https://github.com/DevZupa/ZER-DBM/blob/master/app/server/getVehicleData.php Works like a charme now, thanks for the quick response and help Link to comment Share on other sites More sharing options...
Zupa Posted February 16, 2015 Author Report Share Posted February 16, 2015 looks really nice but i cant get it to work i think its me beeing really stupid again... get this with F12 I'm sorry but i need more info then, " it does not work" ^^ Link to comment Share on other sites More sharing options...
TPwalker Posted February 18, 2015 Report Share Posted February 18, 2015 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? Link to comment Share on other sites More sharing options...
Zupa Posted February 20, 2015 Author Report Share Posted February 20, 2015 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 KiloSwiss 1 Link to comment Share on other sites More sharing options...
BetterDeadThanZed Posted February 20, 2015 Report Share Posted February 20, 2015 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. Link to comment Share on other sites More sharing options...
BetterDeadThanZed Posted February 22, 2015 Report Share Posted February 22, 2015 Any help for my situation posted above? Link to comment Share on other sites More sharing options...
Zupa Posted February 22, 2015 Author Report Share Posted February 22, 2015 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 More sharing options...
BetterDeadThanZed Posted February 22, 2015 Report Share Posted February 22, 2015 Are you talking about what I enter in "Redis Server Instance"? If so, I made that "Chernarus" based on what I see in the Redis desktop manager: Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now