Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove "View Logs" link on the details page #1857

Merged
merged 1 commit into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>
Yagnik56 marked this conversation as resolved.
Show resolved Hide resolved
</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;
Yagnik56 marked this conversation as resolved.
Show resolved Hide resolved
@Output() viewLogs = new EventEmitter<{ clicked: boolean }>();

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