Project

General

Profile

« Previous | Next » 

Revision 57594

[Monitor Dashboard]: Add delete functionality on elements. Add docs on components.

View differences:

home.component.ts
146 146
  }
147 147

  
148 148
  deleteTopic() {
149

  
149
    let path = [
150
      this.stakeholder.alias,
151
      this.stakeholder.topics[this.index].alias
152
    ];
153
    this.stakeholderService.deleteElement(this.properties.monitorServiceAPIURL, path).subscribe(stakeholder => {
154
      this.stakeholderService.setStakeholder(stakeholder);
155
      UIkit.notification('Topic has been successfully deleted', {
156
        status: 'success',
157
        timeout: 3000,
158
        pos: 'top-left'
159
      });
160
      this.hide(this.element);
161
    }, error => {
162
      UIkit.notification(error.error.message, {
163
        status: 'danger',
164
        timeout: 3000,
165
        pos: 'top-left'
166
      });
167
      this.hide(this.element);
168
    });
150 169
  }
151 170
}

Also available in: Unified diff