forked from p15670423/monkey
Changed "general" report to "security" all over
This commit is contained in:
parent
d693b216a7
commit
d50095b570
|
@ -123,7 +123,7 @@ def init_api_resources(api):
|
|||
api.add_resource(Edge, '/api/netmap/edge', '/api/netmap/edge/')
|
||||
api.add_resource(Node, '/api/netmap/node', '/api/netmap/node/')
|
||||
|
||||
# report_type: zero_trust or general
|
||||
# report_type: zero_trust or security
|
||||
api.add_resource(
|
||||
Report,
|
||||
'/api/report/<string:report_type>',
|
||||
|
|
|
@ -9,8 +9,8 @@ from monkey_island.cc.services.reporting.report import ReportService
|
|||
from monkey_island.cc.services.reporting.zero_trust_service import ZeroTrustService
|
||||
|
||||
ZERO_TRUST_REPORT_TYPE = "zero_trust"
|
||||
GENERAL_REPORT_TYPE = "general"
|
||||
REPORT_TYPES = [GENERAL_REPORT_TYPE, ZERO_TRUST_REPORT_TYPE]
|
||||
SECURITY_REPORT_TYPE = "security"
|
||||
REPORT_TYPES = [SECURITY_REPORT_TYPE, ZERO_TRUST_REPORT_TYPE]
|
||||
|
||||
REPORT_DATA_PILLARS = "pillars"
|
||||
REPORT_DATA_FINDINGS = "findings"
|
||||
|
@ -22,8 +22,8 @@ __author__ = ["itay.mizeretz", "shay.nehmad"]
|
|||
class Report(flask_restful.Resource):
|
||||
|
||||
@jwt_required()
|
||||
def get(self, report_type=GENERAL_REPORT_TYPE, report_data=None):
|
||||
if report_type == GENERAL_REPORT_TYPE:
|
||||
def get(self, report_type=SECURITY_REPORT_TYPE, report_data=None):
|
||||
if report_type == SECURITY_REPORT_TYPE:
|
||||
return ReportService.get_report()
|
||||
elif report_type == ZERO_TRUST_REPORT_TYPE:
|
||||
if report_data == REPORT_DATA_PILLARS:
|
||||
|
|
|
@ -148,7 +148,7 @@ class AppComponent extends AuthComponent {
|
|||
</NavLink>
|
||||
</li>
|
||||
<li>
|
||||
<NavLink to="/report/general">
|
||||
<NavLink to="/report/security">
|
||||
<span className="number">4.</span>
|
||||
Security Report
|
||||
{this.state.completedSteps.report_done ?
|
||||
|
@ -199,7 +199,7 @@ class AppComponent extends AuthComponent {
|
|||
{this.renderRoute('/infection/map', <MapPage onStatusChange={this.updateStatus}/>)}
|
||||
{this.renderRoute('/infection/telemetry', <TelemetryPage onStatusChange={this.updateStatus}/>)}
|
||||
{this.renderRoute('/start-over', <StartOverPage onStatusChange={this.updateStatus}/>)}
|
||||
{this.renderRoute('/report/general', <ReportPage onStatusChange={this.updateStatus}/>)}
|
||||
{this.renderRoute('/report/security', <ReportPage onStatusChange={this.updateStatus}/>)}
|
||||
{this.renderRoute('/report/zero_trust', <ZeroTrustReportPage onStatusChange={this.updateStatus}/>)}
|
||||
{this.renderRoute('/license', <LicensePage onStatusChange={this.updateStatus}/>)}
|
||||
</Col>
|
||||
|
|
|
@ -119,7 +119,7 @@ class ReportPageComponent extends AuthComponent {
|
|||
|
||||
getReportFromServer(res) {
|
||||
if (res['completed_steps']['run_monkey']) {
|
||||
this.authFetch('/api/report/general')
|
||||
this.authFetch('/api/report/security')
|
||||
.then(res => res.json())
|
||||
.then(res => {
|
||||
this.setState({
|
||||
|
|
Loading…
Reference in New Issue