Skip to content

Commit

Permalink
Merge pull request #238 from anvithks/fix236
Browse files Browse the repository at this point in the history
Fixes #236. Fixed the null value sent in description field in Create snapshot/acl
  • Loading branch information
kumarashit authored Dec 12, 2019
2 parents e7bf40a + 28eb870 commit 863eecd
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,10 @@ export class FileShareDetailComponent implements OnInit{
showSnapshotPropertyDialog(dialog, selectedSnapshot?){
if(dialog == 'create'){
this.snapshotCreateShow = true;
this.createSnapshotFormGroup.reset();
this.createSnapshotFormGroup.reset({
name: "",
description: ""
});
this.getSnapshotNameCheck(this.createSnapshotFormGroup);
}else if(dialog == 'modify'){
this.snapshotModifyShow = true;
Expand Down
12 changes: 10 additions & 2 deletions src/app/business/block/fileShare.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,10 @@ export class FileShareComponent implements OnInit{
returnSelectedFileShare(selectedFileShare, dialog){
if(dialog == 'snapshot'){
this.createSnapshotShow = true;
this.createSnapshotForm.reset();
this.createSnapshotForm.reset({
name: "",
description: ""
});
this.checkSnapshotName = false;
this.createSnapshotForm.get("name").valueChanges.subscribe((value: string)=>{
let defaultLength = "snapshot".length;
Expand All @@ -181,7 +184,12 @@ export class FileShareComponent implements OnInit{
}else if(dialog == 'acl'){
this.aclCreateShow = true;
this.aclsItems = [0];
this.createAclsFormGroup.reset();
this.createAclsFormGroup.reset({
level : "",
user : "",
userInput0 : "",
description : ""
});
this.getAcls(selectedFileShare);
this.showIpErrorMessage = [false];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,11 @@ export class SnapshotListComponent implements OnInit {

showSnapshotPropertyDialog(method,selectedSnapshot?){
this.snapshotPropertyDisplay = true;
this.snapshotFormGroup.reset();
this.snapshotFormGroup.reset({
name: "",
profile : "",
description: ""
});
if(method === 'create'){
this.isCreate = true;
this.isModify = false;
Expand Down
14 changes: 11 additions & 3 deletions src/app/business/block/volumeGroup.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,22 @@ export class VolumeGroupComponent implements OnInit{
}
//show create volumes group
createVolumeGroup(){
this.volumeGroupForm.reset();
this.volumeGroupForm.reset({
group_name : "",
description : "",
profile : "",
zone : ""
});
this.showVolumeGroupDialog = true;
}
ModifyVolumeGroupDisplay(volumeGroup){
this.modifyGroupForm.reset();
this.modifyGroupForm.reset({
group_name : "",
description : ""
});
this.currentGroup = volumeGroup;
this.modifyGroupForm.controls['group_name'].setValue(this.currentGroup.name);
this.modifyGroupForm.controls['description'].setValue("");
this.modifyGroupForm.controls['description'].setValue(this.currentGroup.description);
this.showModifyGroup = true;
}
submit(group){
Expand Down
6 changes: 5 additions & 1 deletion src/app/business/block/volumeList.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,11 @@ export class VolumeListComponent implements OnInit {

returnSelectedVolume(selectedVolume, dialog) {
if (dialog === 'snapshot') {
this.snapshotFormGroup.reset();
this.snapshotFormGroup.reset({
name: "",
profile : "",
description: ""
});
this.createSnapshotDisplay = true;
} else if (dialog === 'replication') {
this.createReplicationDisplay = true;
Expand Down

0 comments on commit 863eecd

Please sign in to comment.