Skip to content

Commit 5f7e60b

Browse files
committed
Cosmetic fix
Signed-off-by: Francesco Torchia <[email protected]>
1 parent 72b2076 commit 5f7e60b

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

src/console/src/app/components/dashboard/admin/admin-views/admin-views.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
class="goto"
129129
[disabled]="deleting || element.Session?.length === 0"
130130
mat-mini-fab color="primary"
131-
matTooltip="{{(element.Session?.length > 0 ? 'COPY_TO_CLIP' : 'GOTO_DISABLED') | translate}}"
131+
matTooltip="{{(element.Session?.length > 0 ? getUrl(element) : 'GOTO_DISABLED') | translate}}"
132132
[cdkCopyToClipboard]="getUrl(element)">
133133
<mat-icon>content_copy</mat-icon>
134134
</button>

src/console/src/app/components/dashboard/user/user-views/user-views.component.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88
class="goto"
99
[disabled]="data.Session.length === 0"
1010
mat-mini-fab color="primary"
11-
matTooltip="{{(data.Session.length > 0 ? 'VIEW_URL' : 'GOTO_DISABLED') | translate}}"
11+
matTooltip="{{(data.Session.length > 0 ? getUrl(data) : 'GOTO_DISABLED') | translate}}"
1212
(click)="goToView(data)">
1313
<mat-icon>launch</mat-icon>
1414
</button>
1515
</div>
1616
<div class="view-row" fxLayout="column" fxLayoutAlign="space-around center" fxLayoutGap="15px">
1717
<mat-label class="view-label">{{'COLUMN_PATH' | translate}}</mat-label>
18-
<mat-label>{{ data.Repo }}</mat-label>
18+
<mat-label>{{ data.Repo || 'none'}}</mat-label>
1919
</div>
2020
<div class="view-row" fxLayout="row" fxLayoutAlign="center center" fxLayoutGap="5px">
2121
<mat-label class="view-label">{{'COLUMN_GIT_AUTH' | translate}}</mat-label>

src/console/src/app/components/dashboard/user/user-views/user-views.component.ts

+7-4
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ export class UserViewsComponent implements OnInit, OnDestroy {
4646
this.cardRefresh$.complete();
4747
}
4848

49+
public getUrl(element: View) {
50+
const url = `${environment.protocol}://${window.location.hostname}${element.Path}?${element.Query}`;
51+
52+
return url;
53+
}
54+
4955
public goToView(element: View) {
5056
this.cookieService.get('code-server-session');
5157
this.cookieService.put('code-server-session', element.Session, {
@@ -54,10 +60,7 @@ export class UserViewsComponent implements OnInit, OnDestroy {
5460
storeUnencoded: true
5561
});
5662

57-
58-
const url = `${environment.protocol}://${window.location.hostname}${element.Path}?${element.Query}`;
59-
60-
window.open(url, '_blank');
63+
window.open(this.getUrl(element), '_blank');
6164
}
6265

6366
public goToCreateView() {

0 commit comments

Comments
 (0)