Project

General

Profile

« Previous | Next » 

Revision 51581

fixed checking if at least one interface was saved

View differences:

datasource-interface-form.component.ts
58 58
  ngOnInit() {
59 59
    this.currentRepository = <Repository>this.otherData;
60 60
    this.getCompatibilityClasses();
61
    console.log(`other data is: ${JSON.stringify(this.otherData)}`);
61
    console.log(`other data is: ${JSON.stringify(this.otherData,null,2)}`);
62 62
    if (this.data && this.data.length) {
63 63
      this.currentInterface = this.data[0];
64 64
      this.patchData.next({
......
71 71
      this.data.splice(0,1);
72 72
      this.oldInterface = true;
73 73
      console.log(`received an interface!`);
74
      if (this.currentInterface.baseUrl && this.currentInterface.accessParams['set'] && this.currentInterface.desiredCompatibilityLevel) {
75
        this.wasSaved = true;
76
      }
74 77
    }
75 78

  
76 79
    /* initializes MyGroup parent component and the FormGroup */
......
105 108
  getInterfaceInfo(baseUrl: string) {
106 109
    this.successMessage = '';
107 110
    this.errorMessage = '';
111
    this.groupErrorMessage = '';
108 112
    if (baseUrl) {
109 113
      this.loadingMessage = formInfoLoading;
110 114
      this.valService.getInterfaceInformation(baseUrl).subscribe(
......
201 205
        console.log(`updateRepository responded ${JSON.stringify(response)}`);
202 206
        if (response) {
203 207
          this.successMessage = formSuccessUpdatedInterface;
208
          this.wasSaved = true;
204 209
        } else {
205 210
          this.errorMessage = formErrorWasntSaved;
206 211
        }
......
240 245
      () => {
241 246
        if (this.currentInterface.id) {
242 247
          this.successMessage = formSuccessAddedInterface;
248
          this.wasSaved = true;
243 249
        } else {
244 250
          this.errorMessage = formErrorWasntSaved;
245 251
        }

Also available in: Unified diff