revert accidental search&replace fail

This commit is contained in:
simon987
2019-02-16 09:56:44 -05:00
parent 6ca92bc0a7
commit 03153c4d39
20 changed files with 108 additions and 96 deletions

View File

@@ -1,7 +1,7 @@
import {AppPage} from './app.po';
import {browser, logging} from 'protractor';
describe('workspace-projectChange App', () => {
describe('workspace-project App', () => {
let page: AppPage;
beforeEach(() => {

View File

@@ -42,7 +42,8 @@
<ng-container matColumnDef="message">
<mat-header-cell mat-sort-header
*matHeaderCellDef>{{"logs.message" | translate}}</mat-header-cell>
<mat-cell style="flex: 0 0 30em" *matCellDef="let entry"> {{entry.message}} </mat-cell>
<mat-cell class="text-mono" style="flex: 0 0 30em"
*matCellDef="let entry"> {{entry.message}} </mat-cell>
</ng-container>
<ng-container matColumnDef="data">
<mat-header-cell mat-sort-header *matHeaderCellDef>{{"logs.data" | translate}}</mat-header-cell>

View File

@@ -12,7 +12,9 @@
<p *ngIf="project">
{{"project.git_repo" | translate}}:
<a target="_blank" [href]="project['clone_url']">{{project.git_repo}}</a>
<a target="_blank" [href]="project['clone_url']"
*ngIf="isSafeUrl(project['clone_url'])">{{project.git_repo}}</a>
<span class="text-mono" *ngIf="!isSafeUrl(project['clone_url'])">{{project['git_repo']}}</span>
</p>
<p>{{"project.motd" | translate}}:</p>
<pre *ngIf="project">{{project.motd}}</pre>

View File

@@ -44,13 +44,17 @@ export class ProjectDashboardComponent implements OnInit {
constructor(private apiService: ApiService, private route: ActivatedRoute) {
}
ngOnInit(): void {
this.route.params.subscribe(params => {
this.projectId = params["id"];
this.getProject();
});
}
public isSafeUrl(url: string) {
if (url.substr(0, "http".length) == "http") {
return true
}
}
public refresh() {

View File

@@ -20,6 +20,10 @@ export class ProjectListComponent implements OnInit {
this.getProjects()
}
refresh() {
this.getProjects();
}
getProjects() {
this.apiService.getProjects().subscribe(data => this.projects = data["projects"]);
}

View File

@@ -1,7 +1,3 @@
.text-mono {
font-family: Hack, Courier, "Courier New", monospace;
color: #ff4081;
}
button {
margin-left: 15px;

View File

@@ -38,7 +38,7 @@ export class ProjectPermsComponent implements OnInit {
private getProject() {
this.apiService.getProject(this.projectId).subscribe(data => {
this.project = data["projectChange"]
this.project = data["project"]
})
}

View File

@@ -94,3 +94,8 @@ pre {
margin-top: 2em !important;
}
.text-mono {
font-family: Hack, Courier, "Courier New", monospace;
color: #ff4081;
}