Skip to content

Commit

Permalink
Update the installation failure flow.
Browse files Browse the repository at this point in the history
  • Loading branch information
sbruens committed Apr 24, 2024
1 parent 24fcdb6 commit 8907aac
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
4 changes: 2 additions & 2 deletions server_manager/web_app/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {DisplayDataAmount, displayDataAmountToBytes} from './data_formatting';
import {filterOptions, getShortName} from './location_formatting';
import {parseManualServerConfig} from './management_urls';
import type {AppRoot, ServerListEntry} from './ui_components/app-root';
import { FeedbackDetail } from './ui_components/outline-feedback-dialog';
import type {DisplayAccessKey, ServerView} from './ui_components/outline-server-view';
import * as digitalocean_api from '../cloud/digitalocean_api';
import {HttpError} from '../cloud/gcp_api';
Expand All @@ -30,7 +31,6 @@ import * as digitalocean from '../model/digitalocean';
import * as gcp from '../model/gcp';
import type {CloudLocation} from '../model/location';
import * as server_model from '../model/server';
import { FeedbackDetail } from './ui_components/outline-feedback-dialog';


// The Outline DigitalOcean team's referral code:
Expand Down Expand Up @@ -1152,7 +1152,7 @@ export class App {
// Remove inaccessible manual server from local storage if it was just created.
manualServer.forget();
console.error('Manual server installed but unreachable.');
throw new Error('foobar');
throw new UnreachableServerError();
}
}

Expand Down
12 changes: 10 additions & 2 deletions server_manager/web_app/ui_components/outline-contact-us-dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ export class OutlineContactUsDialog extends LitElement implements OutlineFeedbac
}

reset() {
if (this.installationFailed) {
this.close();
}
this.isFormSubmitting = false;
this.showIssueSelector = false;
this.openTicketSelectionOptions.forEach(element => {
Expand Down Expand Up @@ -359,8 +362,13 @@ export class OutlineContactUsDialog extends LitElement implements OutlineFeedbac
this.reset();

this.installationFailed = showInstallationFailed;
console.log(prepopulatedMessage, showInstallationFailed);
// this.$.userFeedback.value = prepopulatedMessage || '';
if (this.installationFailed) {
// We go straight to the form and bypass the wizard in the case of a failed
// installation.
this.step = Step.FORM;
this.selectedIssueType = IssueType.GENERAL;
this.formValues.description = prepopulatedMessage;
}

this.dialogRef.value?.open();
}
Expand Down

0 comments on commit 8907aac

Please sign in to comment.