diff options
Diffstat (limited to 'webapp/client')
-rw-r--r-- | webapp/client/client.jsx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/webapp/client/client.jsx b/webapp/client/client.jsx index 598871002..28d121011 100644 --- a/webapp/client/client.jsx +++ b/webapp/client/client.jsx @@ -4,6 +4,7 @@ import request from 'superagent'; const HEADER_X_VERSION_ID = 'x-version-id'; +const HEADER_X_CLUSTER_ID = 'x-cluster-id'; const HEADER_TOKEN = 'token'; const HEADER_BEARER = 'BEARER'; const HEADER_AUTH = 'Authorization'; @@ -12,6 +13,7 @@ export default class Client { constructor() { this.teamId = ''; this.serverVersion = ''; + this.clusterId = ''; this.logToConsole = false; this.useToken = false; this.token = ''; @@ -152,6 +154,11 @@ export default class Client { if (res.header[HEADER_X_VERSION_ID]) { this.serverVersion = res.header[HEADER_X_VERSION_ID]; } + + this.clusterId = res.header[HEADER_X_CLUSTER_ID]; + if (res.header[HEADER_X_CLUSTER_ID]) { + this.clusterId = res.header[HEADER_X_CLUSTER_ID]; + } } if (err) { @@ -295,6 +302,15 @@ export default class Client { end(this.handleResponse.bind(this, 'getLogs', success, error)); } + getClusterStatus(success, error) { + return request. + get(`${this.getAdminRoute()}/cluster_status`). + set(this.defaultHeaders). + type('application/json'). + accept('application/json'). + end(this.handleResponse.bind(this, 'getClusterStatus', success, error)); + } + getServerAudits(success, error) { return request. get(`${this.getAdminRoute()}/audits`). |