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

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