summaryrefslogtreecommitdiffstats
path: root/cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.component.ts
diff options
context:
space:
mode:
authorArundathi Patil <arundpil@in.ibm.com>2019-04-15 15:12:34 +0530
committerIBM602-PC0F1E3C\Arundathi <arundpil@in.ibm.com>2019-04-15 15:12:47 +0530
commit695f9a8c735d27bbae3dddfccc87a6efe1c36cee (patch)
tree3ad3bbf335066dc050fb1dd44c6175439cdd92bd /cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.component.ts
parent1c98d5673c70325bb9913419e730a31af009b6df (diff)
Test template- display message
Add code to display custom message to user in test screen Issue-ID: CCSDK-1227 Change-Id: Ief1492722f30a5dd6f2bb43e984f2ed72a2f21bd Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
Diffstat (limited to 'cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.component.ts')
-rw-r--r--cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.component.ts16
1 files changed, 15 insertions, 1 deletions
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.component.ts b/cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.component.ts
index 9a7a570ad..63c00e508 100644
--- a/cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.component.ts
+++ b/cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.component.ts
@@ -30,6 +30,7 @@ import { IBlueprintState } from 'src/app/common/core/store/models/blueprintState
import { IBlueprint } from 'src/app/common/core/store/models/blueprint.model';
import { IMetaData } from '../../../common/core/store/models/metadata.model';
import { LoadBlueprintSuccess } from 'src/app/common/core/store/actions/blueprint.action';
+import { TestTemplateService } from './test-template.service'
import "ace-builds/webpack-resolver";
import 'brace';
@@ -47,8 +48,10 @@ export class TestTemplateComponent implements OnInit {
private workflows = [];
@ViewChild('editor') editor;
options: any = { fontSize: "100%", printMargin: false, tabSize: 2 };
+ requestText: string;
+ responseText: string;
- constructor(private store: Store<IAppState>) {
+ constructor(private store: Store<IAppState>, private testTemplateService: TestTemplateService) {
this.blueprintpState = this.store.select('blueprint')
.subscribe((data: any) => {
console.log(data);
@@ -81,4 +84,15 @@ export class TestTemplateComponent implements OnInit {
}
+ submitRequest() {
+ this.testTemplateService.submitRequest(this.requestText)
+ .subscribe((response) =>{
+ this.responseText = response;
+ window.alert('Success');
+ },
+ (error)=>{
+ this.responseText = "Error in processing request";
+ })
+ }
+
}