<A11ySkipTarget anchor="security_hotspots_main" />
- <DeferredSpinner className="huge-spacer-left big-spacer-top" loading={loading}>
- {hotspots.length === 0 ? (
- <div className="display-flex-column display-flex-center">
- <img
- alt={translate('hotspots.page')}
- className="huge-spacer-top"
- height={166}
- src={`${getBaseUrl()}/images/hotspot-large.svg`}
- />
- <h1 className="huge-spacer-top">{translate('hotspots.no_hotspots.title')}</h1>
- <div className="abs-width-400 text-center big-spacer-top">
- {translate('hotspots.no_hotspots.description')}
- </div>
- <Link
- className="big-spacer-top"
- target="_blank"
- to={{ pathname: '/documentation/user-guide/security-hotspots/' }}>
- {translate('hotspots.learn_more')}
- </Link>
- </div>
- ) : (
- <div className="layout-page">
- <div className="sidebar">
- <HotspotList
- hotspots={hotspots}
- hotspotsTotal={hotspotsTotal}
- isStaticListOfHotspots={isStaticListOfHotspots}
- loadingMore={loadingMore}
- onHotspotClick={props.onHotspotClick}
- onLoadMore={props.onLoadMore}
- securityCategories={securityCategories}
- selectedHotspotKey={selectedHotspotKey}
- statusFilter={filters.status}
+ {loading ? (
+ <DeferredSpinner className="huge-spacer-left big-spacer-top" />
+ ) : (
+ <>
+ {hotspots.length === 0 ? (
+ <div className="display-flex-column display-flex-center">
+ <img
+ alt={translate('hotspots.page')}
+ className="huge-spacer-top"
+ height={166}
+ src={`${getBaseUrl()}/images/hotspot-large.svg`}
/>
+ <h1 className="huge-spacer-top">{translate('hotspots.no_hotspots.title')}</h1>
+ <div className="abs-width-400 text-center big-spacer-top">
+ {translate('hotspots.no_hotspots.description')}
+ </div>
+ <Link
+ className="big-spacer-top"
+ target="_blank"
+ to={{ pathname: '/documentation/user-guide/security-hotspots/' }}>
+ {translate('hotspots.learn_more')}
+ </Link>
</div>
- <div className="main">
- {selectedHotspotKey && (
- <HotspotViewer
- branchLike={branchLike}
- hotspotKey={selectedHotspotKey}
- onUpdateHotspot={props.onUpdateHotspot}
+ ) : (
+ <div className="layout-page">
+ <div className="sidebar">
+ <HotspotList
+ hotspots={hotspots}
+ hotspotsTotal={hotspotsTotal}
+ isStaticListOfHotspots={isStaticListOfHotspots}
+ loadingMore={loadingMore}
+ onHotspotClick={props.onHotspotClick}
+ onLoadMore={props.onLoadMore}
securityCategories={securityCategories}
+ selectedHotspotKey={selectedHotspotKey}
+ statusFilter={filters.status}
/>
- )}
+ </div>
+ <div className="main">
+ {selectedHotspotKey && (
+ <HotspotViewer
+ branchLike={branchLike}
+ hotspotKey={selectedHotspotKey}
+ onUpdateHotspot={props.onUpdateHotspot}
+ securityCategories={securityCategories}
+ />
+ )}
+ </div>
</div>
- </div>
- )}
- </DeferredSpinner>
+ )}
+ </>
+ )}
</div>
)}
</ScreenPositionHelper>
<A11ySkipTarget
anchor="security_hotspots_main"
/>
- <DeferredSpinner
- className="huge-spacer-left big-spacer-top"
- loading={false}
- timeout={100}
+ <div
+ className="display-flex-column display-flex-center"
>
+ <img
+ alt="hotspots.page"
+ className="huge-spacer-top"
+ height={166}
+ src="/images/hotspot-large.svg"
+ />
+ <h1
+ className="huge-spacer-top"
+ >
+ hotspots.no_hotspots.title
+ </h1>
<div
- className="display-flex-column display-flex-center"
+ className="abs-width-400 text-center big-spacer-top"
>
- <img
- alt="hotspots.page"
- className="huge-spacer-top"
- height={166}
- src="/images/hotspot-large.svg"
- />
- <h1
- className="huge-spacer-top"
- >
- hotspots.no_hotspots.title
- </h1>
- <div
- className="abs-width-400 text-center big-spacer-top"
- >
- hotspots.no_hotspots.description
- </div>
- <Link
- className="big-spacer-top"
- onlyActiveOnIndex={false}
- style={Object {}}
- target="_blank"
- to={
- Object {
- "pathname": "/documentation/user-guide/security-hotspots/",
- }
- }
- >
- hotspots.learn_more
- </Link>
+ hotspots.no_hotspots.description
</div>
- </DeferredSpinner>
+ <Link
+ className="big-spacer-top"
+ onlyActiveOnIndex={false}
+ style={Object {}}
+ target="_blank"
+ to={
+ Object {
+ "pathname": "/documentation/user-guide/security-hotspots/",
+ }
+ }
+ >
+ hotspots.learn_more
+ </Link>
+ </div>
</div>
</div>
`;
<A11ySkipTarget
anchor="security_hotspots_main"
/>
- <DeferredSpinner
- className="huge-spacer-left big-spacer-top"
- loading={false}
- timeout={100}
+ <div
+ className="layout-page"
>
<div
- className="layout-page"
+ className="sidebar"
>
- <div
- className="sidebar"
- >
- <HotspotList
- hotspots={
- Array [
- Object {
- "author": "Developer 1",
- "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
- "creationDate": "2013-05-13T17:55:39+0200",
- "key": "h1",
- "line": 81,
- "message": "'3' is a magic number.",
- "project": "com.github.kevinsawicki:http-request",
- "resolution": undefined,
- "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
- "securityCategory": "command-injection",
- "status": "TO_REVIEW",
- "updateDate": "2013-05-13T17:55:39+0200",
- "vulnerabilityProbability": "HIGH",
- },
- Object {
- "author": "Developer 1",
- "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
- "creationDate": "2013-05-13T17:55:39+0200",
- "key": "h2",
- "line": 81,
- "message": "'3' is a magic number.",
- "project": "com.github.kevinsawicki:http-request",
- "resolution": undefined,
- "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
- "securityCategory": "command-injection",
- "status": "TO_REVIEW",
- "updateDate": "2013-05-13T17:55:39+0200",
- "vulnerabilityProbability": "HIGH",
- },
- ]
- }
- hotspotsTotal={2}
- isStaticListOfHotspots={true}
- loadingMore={false}
- onHotspotClick={[MockFunction]}
- onLoadMore={[MockFunction]}
- securityCategories={Object {}}
- statusFilter="TO_REVIEW"
- />
- </div>
- <div
- className="main"
+ <HotspotList
+ hotspots={
+ Array [
+ Object {
+ "author": "Developer 1",
+ "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
+ "creationDate": "2013-05-13T17:55:39+0200",
+ "key": "h1",
+ "line": 81,
+ "message": "'3' is a magic number.",
+ "project": "com.github.kevinsawicki:http-request",
+ "resolution": undefined,
+ "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
+ "securityCategory": "command-injection",
+ "status": "TO_REVIEW",
+ "updateDate": "2013-05-13T17:55:39+0200",
+ "vulnerabilityProbability": "HIGH",
+ },
+ Object {
+ "author": "Developer 1",
+ "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
+ "creationDate": "2013-05-13T17:55:39+0200",
+ "key": "h2",
+ "line": 81,
+ "message": "'3' is a magic number.",
+ "project": "com.github.kevinsawicki:http-request",
+ "resolution": undefined,
+ "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
+ "securityCategory": "command-injection",
+ "status": "TO_REVIEW",
+ "updateDate": "2013-05-13T17:55:39+0200",
+ "vulnerabilityProbability": "HIGH",
+ },
+ ]
+ }
+ hotspotsTotal={2}
+ isStaticListOfHotspots={true}
+ loadingMore={false}
+ onHotspotClick={[MockFunction]}
+ onLoadMore={[MockFunction]}
+ securityCategories={Object {}}
+ statusFilter="TO_REVIEW"
/>
</div>
- </DeferredSpinner>
+ <div
+ className="main"
+ />
+ </div>
</div>
</div>
`;
<A11ySkipTarget
anchor="security_hotspots_main"
/>
- <DeferredSpinner
- className="huge-spacer-left big-spacer-top"
- loading={false}
- timeout={100}
+ <div
+ className="layout-page"
>
<div
- className="layout-page"
+ className="sidebar"
>
- <div
- className="sidebar"
- >
- <HotspotList
- hotspots={
- Array [
- Object {
- "author": "Developer 1",
- "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
- "creationDate": "2013-05-13T17:55:39+0200",
- "key": "h1",
- "line": 81,
- "message": "'3' is a magic number.",
- "project": "com.github.kevinsawicki:http-request",
- "resolution": undefined,
- "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
- "securityCategory": "command-injection",
- "status": "TO_REVIEW",
- "updateDate": "2013-05-13T17:55:39+0200",
- "vulnerabilityProbability": "HIGH",
- },
- Object {
- "author": "Developer 1",
- "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
- "creationDate": "2013-05-13T17:55:39+0200",
- "key": "h2",
- "line": 81,
- "message": "'3' is a magic number.",
- "project": "com.github.kevinsawicki:http-request",
- "resolution": undefined,
- "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
- "securityCategory": "command-injection",
- "status": "TO_REVIEW",
- "updateDate": "2013-05-13T17:55:39+0200",
- "vulnerabilityProbability": "HIGH",
- },
- ]
- }
- hotspotsTotal={3}
- isStaticListOfHotspots={true}
- loadingMore={false}
- onHotspotClick={[MockFunction]}
- onLoadMore={[MockFunction]}
- securityCategories={Object {}}
- selectedHotspotKey="h2"
- statusFilter="TO_REVIEW"
- />
- </div>
- <div
- className="main"
- >
- <HotspotViewer
- hotspotKey="h2"
- onUpdateHotspot={[MockFunction]}
- securityCategories={Object {}}
- />
- </div>
+ <HotspotList
+ hotspots={
+ Array [
+ Object {
+ "author": "Developer 1",
+ "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
+ "creationDate": "2013-05-13T17:55:39+0200",
+ "key": "h1",
+ "line": 81,
+ "message": "'3' is a magic number.",
+ "project": "com.github.kevinsawicki:http-request",
+ "resolution": undefined,
+ "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
+ "securityCategory": "command-injection",
+ "status": "TO_REVIEW",
+ "updateDate": "2013-05-13T17:55:39+0200",
+ "vulnerabilityProbability": "HIGH",
+ },
+ Object {
+ "author": "Developer 1",
+ "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
+ "creationDate": "2013-05-13T17:55:39+0200",
+ "key": "h2",
+ "line": 81,
+ "message": "'3' is a magic number.",
+ "project": "com.github.kevinsawicki:http-request",
+ "resolution": undefined,
+ "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
+ "securityCategory": "command-injection",
+ "status": "TO_REVIEW",
+ "updateDate": "2013-05-13T17:55:39+0200",
+ "vulnerabilityProbability": "HIGH",
+ },
+ ]
+ }
+ hotspotsTotal={3}
+ isStaticListOfHotspots={true}
+ loadingMore={false}
+ onHotspotClick={[MockFunction]}
+ onLoadMore={[MockFunction]}
+ securityCategories={Object {}}
+ selectedHotspotKey="h2"
+ statusFilter="TO_REVIEW"
+ />
+ </div>
+ <div
+ className="main"
+ >
+ <HotspotViewer
+ hotspotKey="h2"
+ onUpdateHotspot={[MockFunction]}
+ securityCategories={Object {}}
+ />
</div>
- </DeferredSpinner>
+ </div>
</div>
</div>
`;