-
-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathdashboard.component.html
More file actions
127 lines (119 loc) · 6.35 KB
/
dashboard.component.html
File metadata and controls
127 lines (119 loc) · 6.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<app-placeholder-table-view *ngIf="loading"></app-placeholder-table-view>
<app-banner *ngIf="isServerError" type="error" data-testid="connection-server-error-banner">
<div *ngIf="serverError.details; else stringError" class="mat-body-1">
<strong>{{serverError.abstract}}</strong>
<p class="mat-body-1 error-details">{{serverError.details}}</p>
</div>
<ng-template #stringError>
<p class="mat-body-1">{{serverError.abstract}}</p>
</ng-template>
<div class="error-actions">
<a mat-stroked-button *ngIf="canEditConnection()"
routerLink="/edit-db/{{connectionID}}">
Check database credentials
</a>
<button type="button" *ngIf="isSaas" mat-flat-button color="warn" (click)="openIntercome()">Chat with support</button>
<a *ngIf="!isSaas" mat-flat-button color="warn"
href="https://github.com/rocket-admin/rocketadmin/issues" target="_blank">
Report a bug
</a>
</div>
</app-banner>
<app-banner *ngIf="noTablesError" type="info" data-testid="no-tables-error-banner">
<h3 class='mat-subheading-2'>Rocketadmin can not find any tables</h3>
<p class="mat-body-1">
Rocketadmin don't have access to connection tables or there aren't any.
Please grant us access to required tables or create new table.
You can create a table with SQL editor
</p>
</app-banner>
<ng-container *ngIf="!loading && !isServerError && !noTablesError">
<!-- toggle button for mobile version -->
<div class="sidenav-content__toggle-button" [ngClass]="{'sidenav-content__toggle-button_shown-mobile': !shownTableTitles}">
<button mat-button type="button" class="toggle-button" (click)="toggleSideBar(); posthog.capture('Dashboard: toggle sidebar')"
angulartics2On="click"
angularticsAction="Dashboard: toggle sidebar"
[angularticsProperties]="{'collapsed': !shownTableTitles}">
<mat-icon>chevron_right</mat-icon>
</button>
</div>
<mat-sidenav-container class="table-list-sidenav-container">
<mat-sidenav #sideList mode="side" [(opened)]="shownTableTitles"
class="table-list-sidenav"
[ngClass]="{'side-bar_collapsed': !shownTableTitles}">
<button mat-button type="button" *ngIf="shownTableTitles; else collapsedButton"
class="toggle-button"
(click)="toggleSideBar(); posthog.capture('Dashboard: toggle sidebar')"
angulartics2On="click"
angularticsAction="Dashboard: toggle sidebar"
[angularticsProperties]="{'collapsed': !shownTableTitles}">
Collapse
<mat-icon>chevron_left</mat-icon>
</button>
<ng-template #collapsedButton>
<button mat-icon-button type="button"
class="toggle-button"
(click)="toggleSideBar(); posthog.capture('Dashboard: toggle sidebar')"
angulartics2On="click"
angularticsAction="Dashboard: toggle sidebar"
[angularticsProperties]="{'collapsed': !shownTableTitles}">
<mat-icon>chevron_right</mat-icon>
</button>
</ng-template>
<app-db-tables-list
[collapsed]="!shownTableTitles"
[connectionTitle]="connectionTitle"
[tableFolders]="tableFolders"
[connectionID]="connectionID"
[selectedTable]="selectedTableName"
[uiSettings]="uiSettings"
(expandSidebar)="toggleSideBar()">
</app-db-tables-list>
</mat-sidenav>
<mat-sidenav-content class="table-preview">
<div class="table-preview-content">
<div class="alerts">
<app-alert></app-alert>
<div *ngIf="dataSource.alert_settingsInfo && canEditConnection()" class="ai-config-alert">
<mat-icon class="ai-config-alert__icon">auto_awesome</mat-icon>
<div class="ai-config-alert__message mat-body-1">
<strong class="ai-config-alert__title">New: AI Configuration</strong>
<p class="ai-config-alert__text">Automatically configure all your tables with AI. You can adjust changes in Settings and UI widgets.</p>
</div>
<div class="ai-config-alert__actions">
<a mat-button [routerLink]="'/auto-configure/' + connectionID">Configure all</a>
</div>
</div>
<app-alert *ngIf="dataSource.alert_primaryKeysInfo" [alert]="dataSource.alert_primaryKeysInfo"></app-alert>
<app-alert *ngIf="dataSource.alert_widgetsWarning" [alert]="dataSource.alert_widgetsWarning"></app-alert>
</div>
<app-content-loader *ngIf="dataSource === null"></app-content-loader>
<app-db-table-view *ngIf="dataSource"
[displayName]="selectedTableDisplayName"
[activeFilters]="filters"
[filterComparators]="comparators"
[name]="selectedTableName"
[table]="dataSource"
[selection]="selection"
[connectionID]="connectionID"
[isTestConnection]="currentConnectionIsTest"
[tableFolders]="tableFolders"
(openFilters)="openTableFilters($event)"
(removeFilter)="removeFilter($event)"
(resetAllFilters)="clearAllFilters()"
(search)="search($event)"
(activateActions)="activateActions($event)"
(applyFilter)="applyFilter($event)">
</app-db-table-view>
</div>
<app-db-table-row-view *ngIf="selectedRow"
[activeFilters]="filters"
></app-db-table-row-view>
<app-db-table-ai-panel *ngIf="isAIpanelOpened"
[displayName]="selectedTableDisplayName"
[tableColumns]="dataSource?.dataColumns || []"
[sidebarExpanded]="shownTableTitles"
></app-db-table-ai-panel>
</mat-sidenav-content>
</mat-sidenav-container>
</ng-container>