-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Making Enhanced Compliance Reporting configurable (#7477)
* Making Enhanced Compliance Reporting configurable Signed-off-by: Durga Sarat Chandra Maddu <dmaddu@progress.com> * Adding delta upgrade logic Signed-off-by: Durga Sarat Chandra Maddu <dmaddu@progress.com> * Serving Enhanced Reporting APIs based on configuration Signed-off-by: Durga Sarat Chandra Maddu <dmaddu@progress.com> * updating getStartDateFromEndDate based on enhanced_reporting configuration Signed-off-by: Durga Sarat Chandra Maddu <dmaddu@progress.com> * adding upgrade time for upgrade process (#7490) * adding upgrade time for upgrade process Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * adding the correct names Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * control report with date range logic update (#7491) * logic fix Signed-off-by: Abdul-Az <aazeez@progress.com> * modifying the control summary Signed-off-by: Durga Sarat Chandra Maddu <dmaddu@progress.com> * error message fix Signed-off-by: Abdul-Az <aazeez@progress.com> Signed-off-by: Abdul-Az <aazeez@progress.com> Signed-off-by: Durga Sarat Chandra Maddu <dmaddu@progress.com> Co-authored-by: dmaddu <dmaddu@progress.com> * Addressing review comments Signed-off-by: Durga Sarat Chandra Maddu <dmaddu@progress.com> Signed-off-by: Durga Sarat Chandra Maddu <dmaddu@progress.com> Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> Signed-off-by: Abdul-Az <aazeez@progress.com> Co-authored-by: dmaddu <dmaddu@progress.com> Co-authored-by: Yashvi Jain <91940132+YashviJain01@users.noreply.github.com> Co-authored-by: Abdul Azeez <aazeez@progress.com>
- Loading branch information
1 parent
6d79094
commit 863d7b9
Showing
44 changed files
with
673 additions
and
263 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
2 changes: 2 additions & 0 deletions
2
...compliance-service/dao/pgdb/migration/sql/44_alter_upgrade_time_on_upgrade_flags.down.sql
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,2 @@ | ||
ALTER TABLE IF EXISTS upgrade_flags | ||
DROP COLUMN IF EXISTS upgrade_time; |
2 changes: 2 additions & 0 deletions
2
...s/compliance-service/dao/pgdb/migration/sql/44_alter_upgrade_time_on_upgrade_flags.up.sql
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,2 @@ | ||
ALTER TABLE IF EXISTS upgrade_flags | ||
ADD COLUMN IF NOT EXISTS upgrade_time TIMESTAMP DEFAULT '0001-01-01T00:00:00Z00:00'; |
26 changes: 26 additions & 0 deletions
26
components/compliance-service/dao/pgdb/migration/sql/45_add_enhanced_reporting.up.sql
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,26 @@ | ||
INSERT INTO UPGRADE_FLAGS( | ||
id, upgrade_flag, upgrade_value, upgrade_time | ||
) | ||
select | ||
* | ||
from | ||
( | ||
select | ||
3 as id, | ||
'enhanced_reporting' as upgrade_flag, | ||
false as upgrade_value, | ||
TO_TIMESTAMP( | ||
'2022-07-18 01:00:00', 'YYYY-MM-DD HH:MI:SS' | ||
) as upgrade_time | ||
) as tmp | ||
where | ||
not exists ( | ||
select | ||
upgrade_flag | ||
from | ||
UPGRADE_FLAGS | ||
where | ||
upgrade_flag = 'enhanced_reporting' | ||
limit | ||
1 | ||
); |
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 |
---|---|---|
@@ -1,17 +1,25 @@ | ||
package pgdb | ||
|
||
import "time" | ||
|
||
type Storage interface { | ||
GetUpgradeFlags() (map[string]bool, error) | ||
UpdateControlFlagToFalse() error | ||
GetUpgradeFlags() (map[string]Flag, error) | ||
UpdateControlFlagValue(bool) error | ||
UpdateControlFlagTimeStamp() error | ||
AddEnhancedReportingFlag() error | ||
RemoveEnhancedReportingFlag() error | ||
} | ||
|
||
const DayLatestFlag = "day_latest" | ||
|
||
const ControlIndexFlag = "control_index" | ||
|
||
const CompRunInfoFlag = "comp_run_info" | ||
// constants represents the flags | ||
const ( | ||
DayLatestFlag = "day_latest" | ||
ControlIndexFlag = "control_index" | ||
CompRunInfoFlag = "comp_run_info" | ||
EnhancedReportingEnabledFlag = "enhanced_reporting" | ||
) | ||
|
||
type Flag struct { | ||
flag string | ||
status bool | ||
FlagName string `db:"upgrade_flag"` | ||
Status bool `db:"upgrade_value"` | ||
UpgradedTime time.Time `db:"upgrade_time"` | ||
} |
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
Oops, something went wrong.