Skip to content

Commit

Permalink
Merge pull request #77 from GSA/bugfix/43_test_flow_failures
Browse files Browse the repository at this point in the history
Fixing the bugs found in the test flow by downgrading JQuery to 3.5.1.
  • Loading branch information
gsa-bri authored Jul 12, 2023
2 parents f9be3d3 + 05e91bd commit 6959e41
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 24 deletions.
2 changes: 1 addition & 1 deletion src/app/analytics/analytics.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ <h1 class="srt-blue analytic-big-title">LAST 30 DAYS</h1>
[ngModel]="selectedGovernment"
(ngModelChange)="onChange($event)" >
<option value="Government-wide" >Government-wide</option>
<option *ngFor="let data of agencyList" >{{data}}</option>
<option *ngFor="let data of agencyList" >{{data.Agency}}</option>
</select>
</div>
</div>
Expand Down
28 changes: 15 additions & 13 deletions src/app/analytics/line-charts/line-charts.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ export class LineChartsComponent implements OnInit {
pointHoverBorderColor: 'rgba(44,129,192,1)',
}
},
legend: {
display: false
plugins: {
legend: {
display: false
}
},
maintainAspectRatio: false,
responsive: true,
Expand Down Expand Up @@ -102,13 +104,13 @@ export class LineChartsComponent implements OnInit {
const array = this.TopAgenciesChart.topAgencies[this.selectedGovernment];

if (this.selectedPeriod === 'This Year' || this.selectedPeriod === 'All') {
const percentage: any[] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
const pass: any[] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
const total: any[] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
let percentage: any[] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
let pass: any[] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
let total: any[] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
for (const item of this.TopAgenciesChart.topAgencies[this.selectedGovernment])
{
if (item.date != null) {
const date = +item.date.split('/')[0];
const date = +item.date.split('-')[1];
if (item.predictions.value === 'green') {
pass[date - 1]++;
}
Expand All @@ -134,12 +136,13 @@ export class LineChartsComponent implements OnInit {
};
this.xAxis = 'Month';
this.forceChartRefresh();
} else if (this.selectedPeriod === 'This Month') {
}
else if (this.selectedPeriod === 'This Month') {
const indexFrom = 1;
const indexTo = this.toPeriod.getDate() + 1;
const percentage: any[] = [];
const pass: any[] = [];
const total: any[] = [];
let percentage: any[] = [];
let pass: any[] = [];
let total: any[] = [];
this.lineChartLabels = [];
const month = new Date().getMonth() + 1;
for (let i = 1; i < indexTo; i ++) {
Expand All @@ -148,11 +151,10 @@ export class LineChartsComponent implements OnInit {
pass.push(0);
total.push(0);
}

for (const item of this.TopAgenciesChart.topAgencies[this.selectedGovernment])
{
if (item.date != null) {
const date = +item.date.split('/')[1];
if (item.date != null && +item.date.split('-')[1] === month) {
const date = +item.date.split('T')[0].split('-')[2];
if (item.predictions.value === 'green') {
pass[date - 1]++;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ <h2 class="srt-blue chart">Last 30 Days Excluded Solicitations from SRT Predicti
[type]="pieChartType">
</canvas>
</div>
<div class="undeter-solic-dispaly1" aria-hidden="true">
<div *ngIf="displayPresolicitation != '0%'" class="undeter-solic-dispaly1" aria-hidden="true">
{{displayPresolicitation}}
</div>
<div class="undeter-solic-dispaly2" aria-hidden="true">
<div *ngIf="displayNonMachineReadable != '0%'" class="undeter-solic-dispaly2" aria-hidden="true">
{{displayNonMachineReadable}}
</div>
<div class="undeter-solic-dispaly3" aria-hidden="true">
<div *ngIf="displayNoDocument != '0%'" class="undeter-solic-dispaly3" aria-hidden="true">
{{displayNoDocument}}
</div>
<div class="undeter-solic-dispaly4" aria-hidden="true">
<div *ngIf="displayOtherUndetermined != '0%'" class="undeter-solic-dispaly4" aria-hidden="true">
{{displayOtherUndetermined}}
</div>
<div class="visually-hidden">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ <h1 class="srt-page-title srt-blue" style="padding-bottom: 5px;" role="heading"
<span class=" glyphicon glyphicon-search"></span>
</button>
</span>
<input pInputText id="ksearch" #gb
<input pInputText id="ksearch"
type="text"
class="search-query form-control"
placeholder="search string"
Expand Down
11 changes: 6 additions & 5 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
<link rel="icon" type="image/x-icon" href="favicon.ico">

<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">

<!-- Optional theme -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap-theme.min.css" integrity="sha384-6pzBo3FDv/PJ8r2KRkGHifhEocL+1X2rVCTTkUfGk7/0pbek5mMa1upzvWbrUbOZ" crossorigin="anonymous">
<script>
__Zone_enable_cross_context_check = true;
</script>
Expand All @@ -22,10 +24,9 @@
<body>
<app-root>Loading...</app-root>

<script src="https://cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<!-- Latest compiled and minified JavaScript -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous"></script>

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous"></script>
<script src="https://use.fontawesome.com/22ad9bb71f.js"></script>


Expand Down

0 comments on commit 6959e41

Please sign in to comment.