-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Implement grid based dashboard and limit view widths * Remove relics from old dashboard * Translate drag to remove message * Some refactoring
- Loading branch information
Showing
44 changed files
with
7,026 additions
and
980 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78 changes: 27 additions & 51 deletions
78
angular/src/app/dashboard/custom-dashboard/dashboard-tile/dashboard-tile.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,27 @@ | ||
<div class="container-fluid"> | ||
<div class="row pr-3" style="justify-content: right"> | ||
<button | ||
type="button" | ||
class="col-1 btn btn-circle btn-link" | ||
(click)="moveUp()" | ||
*ngIf="editMode && !isFirst" | ||
> | ||
<i class="fa-solid fa-arrow-up"></i> | ||
</button> | ||
<button | ||
type="button" | ||
class="col-1 btn btn-circle btn-link" | ||
(click)="moveDown()" | ||
*ngIf="editMode && !isLast" | ||
> | ||
<i class="fa-solid fa-arrow-down"></i> | ||
</button> | ||
<button | ||
type="button" | ||
class="col-1 btn btn-circle btn-link" | ||
(click)="deleteTileClicked()" | ||
*ngIf="editMode" | ||
> | ||
<i class="fa-solid fa-trash"></i> | ||
</button> | ||
</div> | ||
</div> | ||
|
||
<div class="container-fluid"> | ||
<app-package-preview | ||
*ngIf="isPackageTile()" | ||
[packageId]="tile.itemId" | ||
[showDate]="false" | ||
[showPath]="true" | ||
></app-package-preview> | ||
<app-asset-summary | ||
*ngIf="isAssetTile()" | ||
[assetId]="tile.itemId" | ||
[showImage]="false" | ||
[showPackages]="false" | ||
[showPath]="true" | ||
(assetClicked)="routeToAsset()" | ||
></app-asset-summary> | ||
<app-group-summary | ||
*ngIf="isGroupTile()" | ||
[groupId]="tile.itemId" | ||
[showPath]="true" | ||
(groupClicked)="routeToGroup()" | ||
></app-group-summary> | ||
</div> | ||
<app-package-preview | ||
*ngIf="isPackageTile()" | ||
[packageId]="tile.itemId" | ||
[showDate]="false" | ||
[showPath]="true" | ||
[showTimeline]="tile.height > 2" | ||
></app-package-preview> | ||
<app-asset-summary | ||
*ngIf="isAssetTile()" | ||
[assetId]="tile.itemId" | ||
[showImage]="tile.height > 6" | ||
[showPackages]="tile.height > 2" | ||
[showPath]="true" | ||
(assetClicked)="routeToAsset()" | ||
></app-asset-summary> | ||
<app-group-summary | ||
*ngIf="isGroupTile()" | ||
[groupId]="tile.itemId" | ||
[showPath]="true" | ||
(groupClicked)="routeToGroup()" | ||
></app-group-summary> | ||
<app-markdown-tile | ||
*ngIf="isMarkdownTile()" | ||
[dashboardId]="dashboardId" | ||
[editMode]="editMode" | ||
[tile]="tile" | ||
></app-markdown-tile> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
.../app/dashboard/custom-dashboard/dashboard-tile/markdown-tile/markdown-tile.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<textarea | ||
*ngIf="editMode" | ||
style="width: 100%; height: 100%" | ||
class="form-control" | ||
[(ngModel)]="markdown" | ||
></textarea> | ||
|
||
<div class="card card-body h-100" *ngIf="!editMode"> | ||
<markdown style="overflow: auto">{{ markdown }}</markdown> | ||
</div> |
58 changes: 58 additions & 0 deletions
58
...rc/app/dashboard/custom-dashboard/dashboard-tile/markdown-tile/markdown-tile.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import { | ||
Component, | ||
Injector, | ||
Input, | ||
OnChanges, | ||
OnInit, | ||
SimpleChanges, | ||
} from '@angular/core'; | ||
import {AppComponentBase} from '@shared/app-component-base'; | ||
import { | ||
DashboardServiceProxy, | ||
DashboardTileDto, | ||
} from '@shared/service-proxies/service-proxies'; | ||
|
||
@Component({ | ||
selector: 'app-markdown-tile', | ||
templateUrl: './markdown-tile.component.html', | ||
}) | ||
export class MarkdownTileComponent | ||
extends AppComponentBase | ||
implements OnInit, OnChanges | ||
{ | ||
@Input() dashboardId: number; | ||
@Input() tile: DashboardTileDto; | ||
@Input() editMode: boolean = false; | ||
|
||
initialized = false; | ||
markdown: string; | ||
|
||
constructor( | ||
injector: Injector, | ||
private _dashboardService: DashboardServiceProxy | ||
) { | ||
super(injector); | ||
} | ||
|
||
ngOnInit() { | ||
this.markdown = this.tile.content; | ||
this.initialized = true; | ||
} | ||
|
||
ngOnChanges(changes: SimpleChanges) { | ||
if (!this.initialized) return; | ||
|
||
if (!!changes.editMode && changes.editMode.currentValue === false) { | ||
if (this.markdown !== this.tile.content) { | ||
this.tile.content = this.markdown; | ||
this.saveMarkdown(); | ||
} | ||
} | ||
} | ||
|
||
saveMarkdown() { | ||
this._dashboardService | ||
.updateTileContent(this.dashboardId, this.tile.id, this.markdown) | ||
.subscribe(); | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
angular/src/app/dashboard/custom-dashboard/dashboard/dashboard.component.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@import 'gridstack/dist/gridstack.min.css'; |
Oops, something went wrong.