You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ab...@apache.org on 2017/06/22 13:16:43 UTC

[16/21] ambari git commit: AMBARI-21312 Provide Log Search UI authorization functionality (additional patch). (ababiichuk)

AMBARI-21312 Provide Log Search UI authorization functionality (additional patch). (ababiichuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a0e713df
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a0e713df
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a0e713df

Branch: refs/heads/branch-feature-logsearch-ui
Commit: a0e713dfd719daba1dff3de041b47e5f2c9d57b6
Parents: 6fc2fef
Author: ababiichuk <ab...@hortonworks.com>
Authored: Mon Jun 12 13:01:21 2017 +0300
Committer: ababiichuk <ab...@hortonworks.com>
Committed: Thu Jun 22 15:42:28 2017 +0300

----------------------------------------------------------------------
 .../src/app/login-form/login-form.component.ts                  | 5 ++++-
 .../src/app/services/mock-api-data.service.ts                   | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/a0e713df/ambari-logsearch/ambari-logsearch-web-new/src/app/login-form/login-form.component.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web-new/src/app/login-form/login-form.component.ts b/ambari-logsearch/ambari-logsearch-web-new/src/app/login-form/login-form.component.ts
index 2a93775..61d1fa1 100644
--- a/ambari-logsearch/ambari-logsearch-web-new/src/app/login-form/login-form.component.ts
+++ b/ambari-logsearch/ambari-logsearch-web-new/src/app/login-form/login-form.component.ts
@@ -43,10 +43,13 @@ export class LoginFormComponent implements OnInit {
 
   login() {
     this.isRequestInProgress = true;
+    /*
+    TODO uncomment for using the real server
     this.httpClient.post('login', {
       username: this.username,
       password: this.password
-    }).finally(() => {
+    })*/
+    this.httpClient.get('api/login').finally(() => {
       this.isRequestInProgress = false;
     }).subscribe(() => {
       this.isLoginAlertDisplayed = false;

http://git-wip-us.apache.org/repos/asf/ambari/blob/a0e713df/ambari-logsearch/ambari-logsearch-web-new/src/app/services/mock-api-data.service.ts
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web-new/src/app/services/mock-api-data.service.ts b/ambari-logsearch/ambari-logsearch-web-new/src/app/services/mock-api-data.service.ts
index be39536..ff2ed2c 100644
--- a/ambari-logsearch/ambari-logsearch-web-new/src/app/services/mock-api-data.service.ts
+++ b/ambari-logsearch/ambari-logsearch-web-new/src/app/services/mock-api-data.service.ts
@@ -21,6 +21,7 @@ import {InMemoryDbService} from 'angular-in-memory-web-api';
 export class mockApiDataService implements InMemoryDbService {
   createDb() {
     return {
+      login: {},
       audit: {
         logs: {
           logList: [