generateSharingUrl()

in src/app/main/main.component.ts [337:354]


  generateSharingUrl() {
    if (!this._hasJobParams()) {
      this.showMessage('Please first run a valid query before generating a sharing URL.');
      return;
    }
    if (this.stepIndex == Step.SHARE && this.stepperChanged && this.sharingDataChanged) {
      this.sharingDataChanged = false;
      this.sharingIdGenerationPending = true;

      this.saveDataToSharedStorage().then(() => {
        this.sharingFormGroup.patchValue({
          sharingUrl: window.location.origin + '?shareid=' + this.generatedSharingId
        });
      }).catch((e) => this.showMessage(parseErrorMessage(e)));
    }
    this.sharingIdGenerationPending = false;
    this.analyticsService.report('saved_state', 'share');
  }