You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Pricing.tsx 10KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  1. /*
  2. * SonarQube
  3. * Copyright (C) 2009-2019 SonarSource SA
  4. * mailto:info AT sonarsource DOT com
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 3 of the License, or (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public License
  17. * along with this program; if not, write to the Free Software Foundation,
  18. * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  19. */
  20. import * as React from 'react';
  21. import Helmet from 'react-helmet';
  22. import Footer from './components/Footer';
  23. import { TopNavBar, FixedNavBar } from './components/NavBars';
  24. import { addWhitePageClass, removeWhitePageClass } from '../../../helpers/pages';
  25. import { scrollToElement } from '../../../helpers/scrolling';
  26. import { getBaseUrl } from '../../../helpers/urls';
  27. import './new_style.css';
  28. export default class Pricing extends React.PureComponent {
  29. container?: HTMLElement | null;
  30. componentDidMount() {
  31. addWhitePageClass();
  32. }
  33. componentWillUnmount() {
  34. removeWhitePageClass();
  35. }
  36. handleClick = (event: React.MouseEvent<HTMLAnchorElement>) => {
  37. event.preventDefault();
  38. event.stopPropagation();
  39. if (this.container) {
  40. scrollToElement(this.container, { bottomOffset: window.innerHeight - 200 });
  41. }
  42. };
  43. getReference = (node: HTMLElement | null) => {
  44. this.container = node;
  45. };
  46. render() {
  47. return (
  48. <div className="global-container">
  49. <div className="page-wrapper">
  50. <div className="page-container sc-page">
  51. <Helmet title="Plans and Pricing | SonarCloud">
  52. <meta
  53. content="Get all the SonarCloud features and functionality for free on your open-source projects. If you need privacy for your code, we have a pricing plan to fit your needs."
  54. name="description"
  55. />
  56. </Helmet>
  57. <FixedNavBar onPricingPage={true} />
  58. <PageBackgroundHeader />
  59. <TopNavBar onPricingPage={true} whiteLogo={true} />
  60. <ForEveryoneBlock onClick={this.handleClick} />
  61. <LoginCTA />
  62. <PricingFAQ getReference={this.getReference} />
  63. </div>
  64. </div>
  65. <Footer />
  66. </div>
  67. );
  68. }
  69. }
  70. function PageBackgroundHeader() {
  71. return (
  72. <div className="sc-header-background">
  73. <div className="sc-background-center">
  74. <img alt="" height="562px" src={`${getBaseUrl()}/images/sonarcloud/pricing-header.svg`} />
  75. </div>
  76. </div>
  77. );
  78. }
  79. interface ForEveryoneBlockProps {
  80. onClick: (event: React.MouseEvent<HTMLAnchorElement>) => void;
  81. }
  82. function ForEveryoneBlock({ onClick }: ForEveryoneBlockProps) {
  83. return (
  84. <div className="sc-section big-spacer-top">
  85. <h2 className="white text-center sc-big-spacer-top sc-big-spacer-bottom">
  86. SonarCloud is for everyone
  87. </h2>
  88. <div className="sc-pricing-free">
  89. <h4>
  90. Free for <span className="sc-title-orange">public projects</span>
  91. </h4>
  92. <ul className="big-spacer-top big-spacer-bottom">
  93. <li>
  94. <em>Unlimited lines of code</em>
  95. </li>
  96. <li>
  97. <em>Anyone can see your project</em> and browse your code
  98. </li>
  99. <li>
  100. You have access to the <em>full SonarCloud feature set</em>
  101. </li>
  102. <li>
  103. <em>Choose members of your team</em> who can work on your projects
  104. </li>
  105. </ul>
  106. <em>Loved by Open-Source Developers</em>
  107. <div className="sc-pricing-privacy">
  108. <h4 className="white">
  109. Need <span className="sc-title-orange">privacy?</span>
  110. </h4>
  111. <ul className="big-spacer-top big-spacer-bottom">
  112. <li>
  113. <em>Create private projects,</em> priced per lines of code.{' '}
  114. <a href="#" onClick={onClick}>
  115. See price list
  116. </a>
  117. </li>
  118. <li>
  119. <em>You have strict control</em> over who can view your private data
  120. </li>
  121. </ul>
  122. <div className="big-spacer-left">
  123. <div className="starts-at">starts at 10€/month</div>
  124. <em>Free 14-day trial</em>
  125. </div>
  126. </div>
  127. </div>
  128. </div>
  129. );
  130. }
  131. function LoginCTA() {
  132. return (
  133. <div className="sc-section text-center pricing-section sc-big-spacer-bottom">
  134. <h5 className="sc-big-spacer-top big-spacer-bottom">
  135. Log in to SonarCloud and choose your pricing plan
  136. </h5>
  137. <a className="sc-orange-button" href={`${getBaseUrl()}/sessions/new`}>
  138. Start Using SonarCloud
  139. </a>
  140. </div>
  141. );
  142. }
  143. interface PricingFAQProps {
  144. getReference: (node: HTMLDivElement | null) => void;
  145. }
  146. function PricingFAQ({ getReference }: PricingFAQProps) {
  147. return (
  148. <div className="sc-section pricing-section big-spacer-top sc-big-spacer-bottom">
  149. <h5 className="text-center sc-big-spacer-top sc-big-spacer-bottom">Pricing FAQ</h5>
  150. <div className="sc-columns">
  151. <div className="sc-column sc-column-medium display-flex-center">
  152. <div>
  153. <div className="faq-title" ref={getReference}>
  154. How does pricing work for private projects?
  155. </div>
  156. <p className="big-spacer-bottom">
  157. Subscribing to a paid plan on SonarCloud allows you to create a private organization
  158. containing private projects. You pay up front for a maximum number of private lines of
  159. code to be analyzed in your organization.
  160. <br />
  161. <br />
  162. Find your max LOC below to see what it will cost you per month:
  163. </p>
  164. <table className="loc-price sc-big-spacer-bottom">
  165. <thead>
  166. <tr>
  167. <th>Up to lines of code</th>
  168. <th>Price per month in €</th>
  169. </tr>
  170. </thead>
  171. <tbody>
  172. <tr>
  173. <td>100k</td>
  174. <td>10</td>
  175. </tr>
  176. <tr>
  177. <td>250k</td>
  178. <td>75</td>
  179. </tr>
  180. <tr>
  181. <td>500k</td>
  182. <td>150</td>
  183. </tr>
  184. <tr>
  185. <td>1M</td>
  186. <td>250</td>
  187. </tr>
  188. <tr>
  189. <td>2M</td>
  190. <td>500</td>
  191. </tr>
  192. <tr>
  193. <td>5M</td>
  194. <td>1500</td>
  195. </tr>
  196. <tr>
  197. <td>10M</td>
  198. <td>3000</td>
  199. </tr>
  200. <tr>
  201. <td>20M</td>
  202. <td>4000</td>
  203. </tr>
  204. </tbody>
  205. </table>
  206. <div className="faq-title">What payment options are available ?</div>
  207. <p>
  208. Payment is done online by credit card and will happen automatically every month, based
  209. on the plan you choose. We also accept to receive a purchase order and a wire transfer
  210. payment, if ordering a yearly subscription for more than 1M LOCs. In this case, you
  211. need to contact us through the Contact form.
  212. </p>
  213. <div className="faq-title">Can I try a private project on SonarCloud for free?</div>
  214. <p>
  215. Your first 14 days are on us. You just have to upgrade your organization to a paid
  216. plan, and fill your credit card information to get started. After your trial, if you
  217. love it you can continue using SonarCloud and you will be charged for the plan you
  218. selected when you first started your free trial. You can cancel anytime.
  219. </p>
  220. </div>
  221. </div>
  222. <div className="sc-column sc-column-medium display-flex-center">
  223. <div>
  224. <div className="faq-title">What is a Line of Code (LOC) on SonarCloud?</div>
  225. <p>
  226. LOCs are computed by summing up the LOCs of each project analyzed in SonarCloud. The
  227. LOCs used for a project are the LOCs found during the most recent analysis of this
  228. project.
  229. </p>
  230. <div className="faq-title">How are Lines of Code (LOCs) counted towards billing?</div>
  231. <p>
  232. Only LOC from your private projects are counted toward your maximum number of LOCs. If
  233. your project contains branches, the counted LOCs are the ones of the biggest branch.
  234. The count is not related to how frequently the source code is analyzed. If your
  235. private project has a 6K LOCs and you analyze it 100 times in the month, this will be
  236. counted as 6K for the billing. If you are getting close to the threshold you will be
  237. notified to either upgrade your plan or reduce the number of LOCs in your projects.
  238. </p>
  239. <div className="faq-title">When will I be invoiced?</div>
  240. <p>
  241. You will be invoiced once a month, the day of the month after your trial ends. For
  242. example if you start your free trial on January 1st, it will last till January 14th
  243. and you will be first billed on January 15th for your upcoming month, e.g. January
  244. 15th to February 15th.
  245. </p>
  246. <div className="faq-title">Can I cancel my subscription?</div>
  247. <p>
  248. Of course! There&apos;s no commitment. You can delete your paid organization whenever
  249. you wish, or simply downgrade to the free tier if you wish to keep on analysing some
  250. public projects.
  251. </p>
  252. <div className="faq-title">Still have more questions?</div>
  253. <p>
  254. Contact us <a href={`${getBaseUrl()}/about/contact`}>here</a>.
  255. </p>
  256. </div>
  257. </div>
  258. </div>
  259. </div>
  260. );
  261. }