]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-13628 UI fixes
authorJeremy Davis <jeremy.davis@sonarsource.com>
Fri, 7 Aug 2020 14:57:43 +0000 (16:57 +0200)
committersonartech <sonartech@sonarsource.com>
Mon, 17 Aug 2020 20:06:23 +0000 (20:06 +0000)
server/sonar-web/src/main/js/apps/create/project/PersonalAccessTokenForm.tsx
server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/PersonalAccessTokenForm-test.tsx.snap
sonar-core/src/main/resources/org/sonar/l10n/core.properties

index 2a0342a5d33e976f30029d9055978168bd9025a2..0329de3f987ff2472b41d204a85d04072bd14aaa 100644 (file)
@@ -63,6 +63,7 @@ export default function PersonalAccessTokenForm(props: PersonalAccessTokenFormPr
   return (
     <div className="display-flex-start">
       <form
+        className="width-50"
         onSubmit={(e: React.SyntheticEvent<HTMLFormElement>) => {
           e.preventDefault();
           const value = new FormData(e.currentTarget).get('personal_access_token') as string;
@@ -74,7 +75,7 @@ export default function PersonalAccessTokenForm(props: PersonalAccessTokenFormPr
         </p>
 
         <ValidationInput
-          error={isInvalid ? translate('onboarding.create_project.pat_incorrect') : undefined}
+          error={isInvalid ? translate('onboarding.create_project.pat_incorrect', alm) : undefined}
           id="personal_access_token"
           isInvalid={isInvalid}
           isValid={false}
@@ -101,7 +102,7 @@ export default function PersonalAccessTokenForm(props: PersonalAccessTokenFormPr
         <DeferredSpinner className="spacer-left" loading={submitting} />
       </form>
 
-      <Alert className="big-spacer-left big-spacer-top" display="block" variant="info">
+      <Alert className="big-spacer-left huge-spacer-top width-50" display="block" variant="info">
         <h3>{translate('onboarding.create_project.pat_help.title')}</h3>
 
         <p className="big-spacer-top big-spacer-bottom">
index c735dca4150fe30de84327c8dafd9d3943390c0e..7f7cb95101e13f0697715132607105209df6b121 100644 (file)
@@ -5,6 +5,7 @@ exports[`should render correctly: bitbucket 1`] = `
   className="display-flex-start"
 >
   <form
+    className="width-50"
     onSubmit={[Function]}
   >
     <h2
@@ -46,7 +47,7 @@ exports[`should render correctly: bitbucket 1`] = `
     />
   </form>
   <Alert
-    className="big-spacer-left big-spacer-top"
+    className="big-spacer-left huge-spacer-top width-50"
     display="block"
     variant="info"
   >
@@ -125,6 +126,7 @@ exports[`should render correctly: gitlab 1`] = `
   className="display-flex-start"
 >
   <form
+    className="width-50"
     onSubmit={[Function]}
   >
     <h2
@@ -166,7 +168,7 @@ exports[`should render correctly: gitlab 1`] = `
     />
   </form>
   <Alert
-    className="big-spacer-left big-spacer-top"
+    className="big-spacer-left huge-spacer-top width-50"
     display="block"
     variant="info"
   >
@@ -226,6 +228,7 @@ exports[`should render correctly: gitlab with non-standard api path 1`] = `
   className="display-flex-start"
 >
   <form
+    className="width-50"
     onSubmit={[Function]}
   >
     <h2
@@ -267,7 +270,7 @@ exports[`should render correctly: gitlab with non-standard api path 1`] = `
     />
   </form>
   <Alert
-    className="big-spacer-left big-spacer-top"
+    className="big-spacer-left huge-spacer-top width-50"
     display="block"
     variant="info"
   >
@@ -327,6 +330,7 @@ exports[`should render correctly: submitting 1`] = `
   className="display-flex-start"
 >
   <form
+    className="width-50"
     onSubmit={[Function]}
   >
     <h2
@@ -368,7 +372,7 @@ exports[`should render correctly: submitting 1`] = `
     />
   </form>
   <Alert
-    className="big-spacer-left big-spacer-top"
+    className="big-spacer-left huge-spacer-top width-50"
     display="block"
     variant="info"
   >
@@ -447,6 +451,7 @@ exports[`should render correctly: validation failed 1`] = `
   className="display-flex-start"
 >
   <form
+    className="width-50"
     onSubmit={[Function]}
   >
     <h2
@@ -460,7 +465,7 @@ exports[`should render correctly: validation failed 1`] = `
       onboarding.create_project.pat_form.help.bitbucket
     </p>
     <ValidationInput
-      error="onboarding.create_project.pat_incorrect"
+      error="onboarding.create_project.pat_incorrect.bitbucket"
       id="personal_access_token"
       isInvalid={true}
       isValid={false}
@@ -489,7 +494,7 @@ exports[`should render correctly: validation failed 1`] = `
     />
   </form>
   <Alert
-    className="big-spacer-left big-spacer-top"
+    className="big-spacer-left huge-spacer-top width-50"
     display="block"
     variant="info"
   >
index 1c0e844aa9828a593abfdf5ff723902556a5fc8e..5d051d6227166ebae3e520fb6c4e40f2bbb919fd 100644 (file)
@@ -3143,7 +3143,8 @@ onboarding.create_project.zero_alm_instances.github=You must first configure a G
 onboarding.create_project.wrong_binding_count=You must have exactly 1 {alm} instance configured in order to use this method, but none were found. Either create the project manually, or contact your system administrator.
 onboarding.create_project.wrong_binding_count.admin=You must have exactly 1 {alm} instance configured in order to use this method. You can configure instances under {url}.
 onboarding.create_project.enter_pat=Enter personal access token
-onboarding.create_project.pat_incorrect=Your personal access token failed to validate.
+onboarding.create_project.pat_incorrect.bitbucket=Your personal access token failed to validate.
+onboarding.create_project.pat_incorrect.gitlab=Your personal access token failed to validate. Please make sure it has the right scope and that it is not expired.
 onboarding.create_project.pat_help.title=How to create a personal access token?
 
 onboarding.create_project.pat_help.instructions=Click the following link to generate a token in {alm}, and copy-paste it into the personal access token field.