From c18f682a5a424de1f2156668bef2805a72062496 Mon Sep 17 00:00:00 2001 From: Exodus4D Date: Mon, 6 Jun 2016 19:21:49 +0200 Subject: [PATCH] - fixed upcoming CREST changes. They are already on SISI ... --- app/main/controller/ccp/sso.php | 7 +++---- app/main/data/mapper/crestservicestatus.php | 19 ------------------- app/main/data/mapper/crestusercounts.php | 18 ------------------ js/app/login.js | 7 +++++-- public/js/v1.0.1/app/login.js | 7 +++++-- public/templates/ui/server_panel.html | 2 +- 6 files changed, 14 insertions(+), 46 deletions(-) delete mode 100644 app/main/data/mapper/crestservicestatus.php delete mode 100644 app/main/data/mapper/crestusercounts.php diff --git a/app/main/controller/ccp/sso.php b/app/main/controller/ccp/sso.php index b0051766..e392de90 100644 --- a/app/main/controller/ccp/sso.php +++ b/app/main/controller/ccp/sso.php @@ -800,13 +800,12 @@ class Sso extends Api\User{ $endpoint = $this->walkEndpoint($endpoints, '', ['serviceStatus']); if( !empty($endpoint) ){ $data->crestOffline = false; - $data->serviceStatus = (new Mapper\CrestServiceStatus($endpoint))->getData(); + $data->serviceStatus = (string) $endpoint; } - - $endpoint = $this->walkEndpoint($endpoints, '', ['userCounts']); + $endpoint = $this->walkEndpoint($endpoints, '', ['userCount_str']); if( !empty($endpoint) ){ $data->crestOffline = false; - $data->userCounts = (new Mapper\CrestUserCounts($endpoint))->getData(); + $data->userCounts = (string) $endpoint; } return $data; } diff --git a/app/main/data/mapper/crestservicestatus.php b/app/main/data/mapper/crestservicestatus.php deleted file mode 100644 index 07b39a76..00000000 --- a/app/main/data/mapper/crestservicestatus.php +++ /dev/null @@ -1,19 +0,0 @@ - 'dust', - 'eve' => 'eve', - 'server' => 'server' - ]; -} \ No newline at end of file diff --git a/app/main/data/mapper/crestusercounts.php b/app/main/data/mapper/crestusercounts.php deleted file mode 100644 index 7ed58b7b..00000000 --- a/app/main/data/mapper/crestusercounts.php +++ /dev/null @@ -1,18 +0,0 @@ - 'dust', - 'eve' => 'eve' - ]; -} \ No newline at end of file diff --git a/js/app/login.js b/js/app/login.js index 40f3f305..bf90cb3b 100644 --- a/js/app/login.js +++ b/js/app/login.js @@ -486,12 +486,15 @@ define([ data.serverPanelId = config.serverPanelId; var statusClass = ''; - switch(data.serviceStatus.eve.toLowerCase()){ + switch(data.serviceStatus.toLowerCase()){ case 'online': statusClass = 'txt-color-green'; break; case 'vip': statusClass = 'txt-color-orange'; break; case 'offline': statusClass = 'txt-color-redDarker'; break; } - data.serviceStatus.style = statusClass; + data.serviceStatus = { + eve: data.serviceStatus, + style: statusClass + }; requirejs(['text!templates/ui/server_panel.html', 'mustache'], function(template, Mustache) { var content = Mustache.render(template, data); diff --git a/public/js/v1.0.1/app/login.js b/public/js/v1.0.1/app/login.js index 40f3f305..bf90cb3b 100644 --- a/public/js/v1.0.1/app/login.js +++ b/public/js/v1.0.1/app/login.js @@ -486,12 +486,15 @@ define([ data.serverPanelId = config.serverPanelId; var statusClass = ''; - switch(data.serviceStatus.eve.toLowerCase()){ + switch(data.serviceStatus.toLowerCase()){ case 'online': statusClass = 'txt-color-green'; break; case 'vip': statusClass = 'txt-color-orange'; break; case 'offline': statusClass = 'txt-color-redDarker'; break; } - data.serviceStatus.style = statusClass; + data.serviceStatus = { + eve: data.serviceStatus, + style: statusClass + }; requirejs(['text!templates/ui/server_panel.html', 'mustache'], function(template, Mustache) { var content = Mustache.render(template, data); diff --git a/public/templates/ui/server_panel.html b/public/templates/ui/server_panel.html index 455329ba..cc1d7eb0 100644 --- a/public/templates/ui/server_panel.html +++ b/public/templates/ui/server_panel.html @@ -5,7 +5,7 @@
  • {{ eve }}
  • {{/serviceStatus}} {{#userCounts}} -
  • {{ eve }}
  • +
  • {{ userCounts }}
  • {{/userCounts}} \ No newline at end of file