Skip to content

Commit

Permalink
Remove View Logs Link
Browse files Browse the repository at this point in the history
  • Loading branch information
zackcl committed Aug 22, 2024
1 parent 056283f commit c18e749
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@
[title]="flag.name"
[createdAt]="flag.createdAt"
[updatedAt]="flag.updatedAt"
[showViewLogs]="true"
[chipClass]="flag.status"
[showWarning]="shouldShowWarning$ | async"
(viewLogs)="viewLogsClicked($event)"
></app-common-section-card-title-header>

<!-- header-right -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,6 @@ export class FeatureFlagOverviewDetailsSectionCardComponent implements OnInit, O
return FILTER_MODE;
}

viewLogsClicked(event) {
console.log('viewLogs Clicked');
console.log(event);
}

onSlideToggleChange(event: MatSlideToggleChange, flag: FeatureFlag) {
const slideToggleEvent = event.source;
const newStatus = slideToggleEvent.checked ? FEATURE_FLAG_STATUS.ENABLED : FEATURE_FLAG_STATUS.DISABLED;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,5 @@ <h5 class="title ft-18-700">
{{ ('feature-flags.details-updated-at.text' | translate) + (updatedAt | formatDate: 'short date') + '.' }}
</span>
</ng-container>
<ng-container *ngIf="showViewLogs">
<a class="view-logs-link ft-14-400" [href]="" (click)="viewLogsClicked()">View logs</a>
</ng-container>
</p>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,17 @@ import { SharedModule } from '../../../shared/shared.module';
* - `title`: The title of the section card.
* - `tableRowCount`: The count of rows in the table. If it's falsy, nothing will be displayed. If it's greater than 1, the count will be displayed in parentheses.
* - `subtitle`: The subtitle of the section card.
* - `showViewLogs`: A boolean that determines whether to show the "View Logs" text anchor tag.
* - `chipClass`: The class for the status chip. For example, `STATUS_INDICATOR_CHIP_TYPE.ENROLLMENT_COMPLETE`.
*
* The component emits a `viewLogs` event when the "View Logs" text is clicked. This event can be used to notify a parent component.
*
* Example usage:
*
* ```html
* <app-common-section-card-title-header
* [title]="title"
* [tableRowCount]="tableRowCount"
* [subtitle]="subtitle"
* [showViewLogs]="true"
* [chipClass]="STATUS_INDICATOR_CHIP_TYPE.ENROLLMENT_COMPLETE"
* [showWarning]="false"
* (viewLogs)="viewLogsClicked($event)"
* ></app-common-section-card-title-header>
* ```
*/
Expand All @@ -47,12 +42,4 @@ export class CommonSectionCardTitleHeaderComponent {
@Input() updatedAt?: string;
@Input() chipClass?: STATUS_INDICATOR_CHIP_TYPE;
@Input() showWarning?: boolean;
@Input() showViewLogs?: boolean;
@Output() viewLogs = new EventEmitter<{ clicked: boolean }>();

viewLogsClicked(): void {
this.viewLogs.emit({
clicked: true,
});
}
}

0 comments on commit c18e749

Please sign in to comment.