Refactored ZeroTrust out of the names of all the things

This commit is contained in:
Shay Nehmad 2019-08-07 15:32:31 +03:00
parent 9c1abf08a9
commit 274b861adc
3 changed files with 8 additions and 9 deletions

View File

@ -2,8 +2,8 @@ import React from 'react';
import {Button, Col} from 'react-bootstrap';
import AuthComponent from '../AuthComponent';
import ReportHeader, { ReportTypes } from "../report-components/common/ReportHeader";
import ZeroTrustReportPillarGrades from "../report-components/zerotrust/ZeroTrustReportPillarGrades";
import ZeroTrustReportFindingsTable from "../report-components/zerotrust/ZeroTrustReportFindingsTable";
import PillarGrades from "../report-components/zerotrust/PillarGrades";
import FindingsTable from "../report-components/zerotrust/FindingsTable";
class ZeroTrustReportPageComponent extends AuthComponent {
@ -43,9 +43,9 @@ class ZeroTrustReportPageComponent extends AuthComponent {
} else {
content = <div>
<h2>Pillars Overview</h2>
<ZeroTrustReportPillarGrades findings={this.state.report.findings} />
<PillarGrades findings={this.state.report.findings} />
<h2>Findings</h2>
<ZeroTrustReportFindingsTable findings={this.state.report.findings} />
<FindingsTable findings={this.state.report.findings} />
</div>;
}

View File

@ -67,7 +67,7 @@ const columns = [
const pageSize = 10;
class ZeroTrustReportFindingsTable extends Component {
class FindingsTable extends Component {
render() {
let defaultPageSize = this.props.findings.length > pageSize ? pageSize : this.props.findings.length;
let showPagination = this.props.findings.length > pageSize;
@ -86,4 +86,4 @@ class ZeroTrustReportFindingsTable extends Component {
}
export default ZeroTrustReportFindingsTable;
export default FindingsTable;

View File

@ -1,8 +1,7 @@
import React, {Component} from "react";
import ZeroTrustPillars from "./ZeroTrustPillars";
import ZeroTrustReportFindingsTable from "./ZeroTrustReportFindingsTable";
export class ZeroTrustReportPillarGrades extends Component {
export class PillarGrades extends Component {
render() {
let pillarsCounters = {};
for(const pillar in ZeroTrustPillars) {
@ -41,4 +40,4 @@ export class ZeroTrustReportPillarGrades extends Component {
}
}
export default ZeroTrustReportPillarGrades;
export default PillarGrades;