Feature 10912, 10916: NS Update
*Added NG-UI support to remove VNF and change VNF in NS update
*In NS Instances page. Click "Ns Update" in the actions menu.
*Then a new pop-up page will opened.
*In the popup there will be drop-down containing Update Type with 'CHANGE_VNFPKG' & 'REMOVE_VNFPKG', membervnfIndex and text field Vnfd Id.
*When the fields are selected then Click Apply button.
*For CHANGE_VNFPKG type, the software-version will be checked whether matching or not and corresponding popup will be shown.
*The pop-up window is closed and the page is directed to "History of operations" page
Change-Id: I135dda039a381b1faa62baa263543e1f210384f7
Signed-off-by: SANDHYA.JS <sandhya.j@tataelxsi.co.in>
diff --git a/src/app/utilities/warning/WarningComponent.ts b/src/app/utilities/warning/WarningComponent.ts
new file mode 100644
index 0000000..0ccb888
--- /dev/null
+++ b/src/app/utilities/warning/WarningComponent.ts
@@ -0,0 +1,74 @@
+/*
+ Copyright 2020 TATA ELXSI
+
+ Licensed under the Apache License, Version 2.0 (the 'License');
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ Author: SANDHYA JS (sandhya.j@tataelxsi.co.in)
+*/
+/**
+ * @file WarningConfiguration Model
+ */
+import { Component, Injector, Input } from '@angular/core';
+import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
+/**
+ * Creating component
+ * @Component takes WarningComponent.html as template url
+ */
+@Component({
+ selector: 'app-warning',
+ templateUrl: './WarningComponent.html',
+ styleUrls: ['./WarningComponent.scss']
+})
+/** Exporting a class @exports WarningComponent */
+export class WarningComponent {
+ /** To inject services @public */
+ public injector: Injector;
+
+ /** Instance for active modal service @public */
+ public activeModal: NgbActiveModal;
+
+ /** Check the loading results @public */
+ public isLoad: Boolean = false;
+
+ /** Contains title data @public */
+ @Input()
+ public heading: string;
+
+ /** Contains body data @public */
+ @Input()
+ public confirmationMessage: string;
+
+ /** Contains footer data @public */
+ @Input()
+ public submitMessage: string;
+
+ /** Give the message for the loading @public */
+ public message: string = 'PLEASEWAIT';
+
+ constructor(injector: Injector) {
+ this.injector = injector;
+ this.activeModal = this.injector.get(NgbActiveModal);
+ }
+
+ /**
+ * Lifecyle Hooks the trigger before component is instantiate
+ */
+ public ngOnInit(): void {
+ //empty
+ }
+
+ /** Close the modal @public */
+ public closeModal(getMessage: string): void {
+ this.activeModal.close({ message: getMessage });
+ }
+}