-
Notifications
You must be signed in to change notification settings - Fork 218
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feature/prioritize_templates_job
- Loading branch information
Showing
41 changed files
with
2,351 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
apps/dashboard/src/main/java/com/akto/action/testing/TestTemplatesAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package com.akto.action.testing; | ||
|
||
import org.apache.commons.lang3.StringUtils; | ||
|
||
import com.akto.action.UserAction; | ||
import com.akto.dao.testing.RemediationsDao; | ||
import com.akto.dto.testing.Remediation; | ||
import com.akto.util.Constants; | ||
|
||
public class TestTemplatesAction extends UserAction { | ||
|
||
public String execute(){ | ||
throw new IllegalStateException("Not implemented"); | ||
} | ||
|
||
String testId; | ||
String remediation; | ||
public String fetchRemediationInfo() { | ||
|
||
if (StringUtils.isEmpty(testId)) { | ||
addActionError("testId is empty"); | ||
return ERROR.toUpperCase(); | ||
} | ||
|
||
Remediation remediationObj = RemediationsDao.instance.findOne(Constants.ID, testId); | ||
|
||
if (remediationObj == null) { | ||
this.remediation = ""; | ||
} else { | ||
this.remediation = remediationObj.getRemediationText(); | ||
} | ||
|
||
return SUCCESS.toUpperCase(); | ||
} | ||
|
||
public String getTestId() { | ||
return this.testId; | ||
} | ||
|
||
public void setTestId(String testId) { | ||
this.testId = testId; | ||
} | ||
|
||
public String getRemediation() { | ||
return this.remediation; | ||
} | ||
|
||
public void setRemediation(String remediation) { | ||
this.remediation = remediation; | ||
} | ||
|
||
|
||
} |
Oops, something went wrong.