Skip to content
This repository was archived by the owner on Nov 14, 2023. It is now read-only.
Open
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 @@ -22,7 +22,6 @@ import { DASHBOARD_VIEWS } from './../custom-dashboards-view.component';
<div class="dashboard-viewer">
<div class="header-container">
<ht-input
[disabled]="!isMyDashboard"
type="string"
class="dashboard-name-input"
appearance="${InputAppearance.Border}"
Expand All @@ -31,7 +30,7 @@ import { DASHBOARD_VIEWS } from './../custom-dashboards-view.component';
>
</ht-input>
<div class="actions">
<div class="button-container" *ngIf="isMyDashboard; else goBack">
<div class="button-container">
<ht-button
class="save-btn"
[label]="'Save'"
Expand All @@ -41,11 +40,6 @@ import { DASHBOARD_VIEWS } from './../custom-dashboards-view.component';
</ht-button>
<ht-button [label]="'Cancel'" role="${ButtonRole.Destructive}" (click)="redirectToListing()"> </ht-button>
</div>
<ng-template #goBack>
<div>
<ht-button [label]="'Go Back'" role="${ButtonRole.Destructive}" (click)="navigateBack()"> </ht-button>
</div>
</ng-template>
<ht-copy-to-clipboard
size="${ButtonSize.Small}"
icon="${IconType.Share}"
Expand All @@ -57,7 +51,6 @@ import { DASHBOARD_VIEWS } from './../custom-dashboards-view.component';
<div class="panels-list" *htLoadAsync="this.panels$ as panels">
<ht-custom-dashboard-panel
[panel]="panel"
[isOwner]="isMyDashboard"
*ngFor="let panel of panels"
(editPanel)="onPanelEdit($event)"
(deletePanel)="onPanelDelete($event)"
Expand All @@ -75,7 +68,7 @@ import { DASHBOARD_VIEWS } from './../custom-dashboards-view.component';
</ht-message-display>
</div>
</div>
<button *ngIf="isMyDashboard" class="add-panel" (click)="redirectToCreatePanel()">Add Panel +</button>
<button class="add-panel" (click)="redirectToCreatePanel()">Add Panel +</button>
</div>
`
})
Expand Down Expand Up @@ -193,12 +186,11 @@ export class CustomDashboardDetailComponent {
replaceCurrentHistory: false
});
}

public redirectToListing(): void {
const confirmation = confirm(`Your unsaved changes will be lost! Discard them anyways?`);
if (confirmation) {
this.navigateBack();
}
this.navigateBack();
}

public navigateBack(): void {
this.navigationService.navigate({
navType: NavigationParamsType.InApp,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { ExploreSpecificationBuilder } from './../../../shared/graphql/request/b
<ht-panel-title [expanded]="expanded"
><span class="panel-title">{{ panel?.name || panel?.id }}</span>
</ht-panel-title>
<div class="actions-container" *ngIf="this.isOwner">
<div class="actions-container">
<ht-icon
title="Rename"
class="panel-icon panel-edit"
Expand Down Expand Up @@ -69,9 +69,6 @@ export class CustomDashboardPanelComponent implements OnInit {
@Input()
public panel?: PanelData;

@Input()
public isOwner: boolean = true;

@Output()
public readonly editPanel: EventEmitter<string> = new EventEmitter();

Expand Down