Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Code for Next Button #175

Merged
merged 12 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions components/centraldashboard/public/assets/i18n/languages.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
"registrationPage.linkPrivacy": "Privacy",
"registrationPage.errValidation": "Name can only start and end with alpha-num characters, dashes are only permitted between start and end. (minlength >= 1)",
"registrationPage.errDuplicate": "Namespace \"{namespace}\" already exists",
"registrationPage.errCreateNotebook": "An error occured while creating the default notebook",
"registrationPage.errTest": "Test Error!",
"namespaceNeeded.text1": "Please select a",
"namespaceNeeded.text2": "namespace",
Expand Down Expand Up @@ -188,6 +189,7 @@
"registrationPage.linkDocumentation": "Documentation",
"registrationPage.linkPrivacy": "Confidentialité",
"registrationPage.errValidation": "Le nom doit commencer et terminer par des caractères alphanumériques, les tirets ne sont autorisés qu'à l'intérieur. (longueur minimale >= 1)",
"registrationPage.errCreateNotebook": "Erreur lors de la création du bloc-note par défaut.",
"registrationPage.errDuplicate": "L'espace de noms \"{namespace}\" existe déjà",
"registrationPage.errTest": "Test Error!",
"namespaceNeeded.text1": "Veuillez choisir un ",
Expand Down
15 changes: 15 additions & 0 deletions components/centraldashboard/public/components/landing-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,21 @@ export class LandingPage extends mixinBehaviors([AppLocalizeBehavior], utilities
*/
const success = await this.pollProfile(66, 300);
if (success) this._successSetup();

// Create the default notebook
const APICreateDefault = this.$.CreateDefaultNotebook;

await APICreateDefault.generateRequest().completes.catch((e) => e);
await this.sleep(1); // So the errors and callbacks can schedule
if (this.error && this.error.response) {
if (this.error.response.error) {
this.set('error', {response: {
error: 'registrationPage.errCreateNotebook',
namespace: this.namespaceName,
}});
}
return this.waitForRedirect = false;
}
this.waitForRedirect = false;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
iron-ajax#MakeNamespace(method='POST', url='/api/workgroup/create', handle-as='json', last-error='{{error}}', last-response='{{resp}}',
content-type='application/json', loading='{{submittingWorkgroup}}')
iron-ajax#GetMyNamespace(url='/api/workgroup/exists', handle-as='json')
iron-ajax#CreateDefaultNotebook(method='POST', url='/jupyter/api/namespaces/[[namespaceName]]/createdefault', headers='{"Content-Type": "application/json"}')
paper-card#MainCard
figure#Logo !{logo}
neon-animatable.Main-Content
Expand Down
Loading