Fix Bug 2294: Incorrect notification in update descriptor

	- Fixed the update descriptor issue to show 'Please Change something'
	  when no changes is made.

Change-Id: I042835c1934c1b94a8e8d880dae8d97b289750df
Signed-off-by: SANDHYA.JS <sandhya.j@tataelxsi.co.in>
diff --git a/src/app/osm-repositories/osm-repo-create-update/OsmRepoCreateUpdateComponent.ts b/src/app/osm-repositories/osm-repo-create-update/OsmRepoCreateUpdateComponent.ts
index e653e7c..16ecadd 100644
--- a/src/app/osm-repositories/osm-repo-create-update/OsmRepoCreateUpdateComponent.ts
+++ b/src/app/osm-repositories/osm-repo-create-update/OsmRepoCreateUpdateComponent.ts
@@ -139,7 +139,6 @@
     if (this.osmrepoForm.invalid) {
       return;
     }
-    this.isLoadingResults = true;
     const modalData: MODALCLOSERESPONSEDATA = {
       message: 'Done'
     };
@@ -160,10 +159,11 @@
 
   /** This function used to add the osm repo @public */
   public addOsmRepo(apiURLHeader: APIURLHEADER, modalData: MODALCLOSERESPONSEDATA): void {
+    this.isLoadingResults = true;
     this.restService.postResource(apiURLHeader, this.osmrepoForm.value).subscribe(() => {
+      this.isLoadingResults = false;
       this.activeModal.close(modalData);
       this.notifierService.notify('success', this.translateService.instant('PAGE.OSMREPO.CREATEDSUCCESSFULLY'));
-      this.isLoadingResults = false;
     }, (error: ERRORDATA) => {
       this.isLoadingResults = false;
       this.restService.handleError(error, 'post');
@@ -172,10 +172,15 @@
 
   /** This function used to Edit the osm repo @public */
   public editOsmRepo(apiURLHeader: APIURLHEADER, modalData: MODALCLOSERESPONSEDATA): void {
+    if (!this.osmrepoForm.dirty) {
+      this.notifierService.notify('warning', this.translateService.instant('PAGE.TOPOLOGY.DATAEMPTY'));
+      return;
+    }
+    this.isLoadingResults = true;
     this.restService.patchResource(apiURLHeader, this.osmrepoForm.value).subscribe(() => {
-      this.activeModal.close(modalData);
-      this.notifierService.notify('success', this.translateService.instant('PAGE.OSMREPO.UPDATEDSUCCESSFULLY'));
       this.isLoadingResults = false;
+      this.notifierService.notify('success', this.translateService.instant('PAGE.OSMREPO.UPDATEDSUCCESSFULLY'));
+      this.activeModal.close(modalData);
     }, (error: ERRORDATA) => {
       this.isLoadingResults = false;
       this.restService.handleError(error, 'patch');