diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts index 97b1b74..1134ae2 100644 --- a/client/src/app/app.component.ts +++ b/client/src/app/app.component.ts @@ -102,6 +102,9 @@ export class AppComponent implements OnInit, WSReceiver { this.updateDashboards(message.dashboards); } break; + case 'keepalive': + Log.Debug(new LogMessage('Keepalive message received in app', this.className, message)); + break; default: Log.Debug(new LogMessage('Uncategorized message received in app', this.className, message)); break; diff --git a/client/src/app/ctl/document/document.component.css b/client/src/app/ctl/document/document.component.css index 76a0870..73fdede 100644 --- a/client/src/app/ctl/document/document.component.css +++ b/client/src/app/ctl/document/document.component.css @@ -12,3 +12,20 @@ # limitations under the License. */ +/* add border & center the table */ +.documentBorder { + padding-left: 10px; + padding-right: 10px; + padding-top: 10px; + padding-bottom: 10px; + border-spacing: 10px; + border:1px gray solid; + border-radius: 5px; + align-self: center; + width: 100%; +} + +.container { + padding-left: 10px; + padding-right: 10px; +} diff --git a/client/src/app/ctl/document/document.component.html b/client/src/app/ctl/document/document.component.html index 5e2ee30..df4bb52 100644 --- a/client/src/app/ctl/document/document.component.html +++ b/client/src/app/ctl/document/document.component.html @@ -1,7 +1,6 @@ - - -
- -

Response to Pull: {{statusMsg}}

-
-
+

Airship Document Operations

+
+
+   Response: {{statusMsg}} +
+
\ No newline at end of file diff --git a/client/src/app/ctl/document/document.component.spec.ts b/client/src/app/ctl/document/document.component.spec.ts index bce8304..0f44879 100644 --- a/client/src/app/ctl/document/document.component.spec.ts +++ b/client/src/app/ctl/document/document.component.spec.ts @@ -14,10 +14,7 @@ import {async, ComponentFixture, TestBed} from '@angular/core/testing'; import {DocumentComponent} from './document.component'; -import {MatTabsModule} from '@angular/material/tabs'; -import {MatButtonModule} from '@angular/material/button'; import { ToastrModule } from 'ngx-toastr'; -import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; describe('DocumentComponent', () => { let component: DocumentComponent; @@ -26,10 +23,7 @@ describe('DocumentComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ imports: [ - MatTabsModule, - MatButtonModule, ToastrModule.forRoot(), - BrowserAnimationsModule ], declarations: [DocumentComponent] }) diff --git a/client/src/app/ctl/document/document.component.ts b/client/src/app/ctl/document/document.component.ts index 3b23203..1235074 100644 --- a/client/src/app/ctl/document/document.component.ts +++ b/client/src/app/ctl/document/document.component.ts @@ -41,8 +41,10 @@ export class DocumentComponent implements WSReceiver { this.websocketService.printIfToast(message); } else { switch (message.subComponent) { - case 'docPull': - this.statusMsg = 'Message pull was a ' + message.message; + case 'pull': + this.statusMsg = 'Document pull was a ' + message.message; + const button = (document.getElementById('DocPullBtn') as HTMLInputElement); + button.removeAttribute('disabled'); break; default: Log.Error(new LogMessage('Document message sub component not handled', this.className, message)); @@ -52,6 +54,9 @@ export class DocumentComponent implements WSReceiver { } documentPull(): void { + this.statusMsg = ''; this.websocketService.sendMessage(new WebsocketMessage(this.type, this.component, 'pull')); + const button = (document.getElementById('DocPullBtn') as HTMLInputElement); + button.setAttribute('disabled', 'disabled'); } } diff --git a/client/src/app/ctl/document/document.module.ts b/client/src/app/ctl/document/document.module.ts index 549f3e5..32f5e87 100644 --- a/client/src/app/ctl/document/document.module.ts +++ b/client/src/app/ctl/document/document.module.ts @@ -13,17 +13,13 @@ */ import {NgModule} from '@angular/core'; -import {MatTabsModule} from '@angular/material/tabs'; import {DocumentComponent} from './document.component'; -import {MatButtonModule} from '@angular/material/button'; @NgModule({ declarations: [ DocumentComponent, ], imports: [ - MatTabsModule, - MatButtonModule, ], providers: [], }) diff --git a/client/src/services/auth-guard/auth-guard.service.ts b/client/src/services/auth-guard/auth-guard.service.ts index e04ba9f..4df0fc3 100755 --- a/client/src/services/auth-guard/auth-guard.service.ts +++ b/client/src/services/auth-guard/auth-guard.service.ts @@ -73,7 +73,6 @@ export class AuthGuard implements WSReceiver, CanActivate { async receiver(message: WebsocketMessage): Promise { if (message.hasOwnProperty('error')) { Log.Error(new LogMessage('Error received in AuthGuard', this.className, message)); - this.websocketService.printIfToast(message); AuthGuard.logout(); } else { switch (message.subComponent) { diff --git a/pkg/ctl/document.go b/pkg/ctl/document.go index d1d1727..0f42cd7 100644 --- a/pkg/ctl/document.go +++ b/pkg/ctl/document.go @@ -67,7 +67,7 @@ func (c *Client) docPull() (*string, error) { // so setting to false err := pull.Pull(cfgFactory, false) if err == nil { - s := fmt.Sprintf("Success") + s := "Success" message = &s }