Added public project attribute & worker access api endpoints

This commit is contained in:
simon987
2019-01-24 20:39:17 -05:00
parent 1d656099f5
commit f250a2180c
16 changed files with 432 additions and 70 deletions

View File

@@ -10,12 +10,16 @@ import {
MatAutocompleteModule,
MatButtonModule,
MatCardModule,
MatCheckboxModule,
MatDividerModule,
MatExpansionModule,
MatFormFieldModule,
MatIconModule,
MatInputModule,
MatMenuModule,
MatPaginatorModule,
MatSliderModule,
MatSlideToggleModule,
MatSortModule,
MatTableModule,
MatToolbarModule,
@@ -58,6 +62,11 @@ import {UpdateProjectComponent} from './update-project/update-project.component'
MatTreeModule,
BrowserAnimationsModule,
HttpClientModule,
MatSliderModule,
MatSlideToggleModule,
MatCheckboxModule,
MatDividerModule
],
exports: [],
providers: [

View File

@@ -4,21 +4,30 @@
<mat-card-content>
<form>
<mat-form-field>
<input type="text" matInput [(ngModel)]="project.name" name="name" placeholder="Name">
<mat-form-field appearance="outline">
<mat-label>Project name</mat-label>
<input type="text" matInput [(ngModel)]="project.name" name="name" placeholder="Project name">
</mat-form-field>
<mat-form-field>
<mat-form-field appearance="outline">
<mat-label>Git clone URL</mat-label>
<input type="text" matInput [(ngModel)]="project.clone_url" name="clone_url"
placeholder="Git clone url">
</mat-form-field>
<mat-form-field>
<mat-form-field appearance="outline">
<mat-label>Repository name</mat-label>
<input type="text" matInput [(ngModel)]="project.git_repo" name="clone_url"
placeholder='Full repository name (e.g. "simon987/task_tracker")'>
<mat-hint align="start">Changes on the <strong>master</strong> branch will be tracked if webhooks are
enabled
<mat-hint align="start">
Changes on the <strong>master</strong> branch will be tracked if webhooks are enabled
</mat-hint>
</mat-form-field>
<mat-checkbox matInput [(ngModel)]="project.public" name="public" stype="padding-top: 1em">Public project
</mat-checkbox>
<input type="hidden" name="version" value="{{project.version}}">
</form>
</mat-card-content>

View File

@@ -11,7 +11,8 @@ export class CreateProjectComponent implements OnInit {
private project = new Project();
constructor() {
this.project.name = "test"
this.project.name = "test";
this.project.public = true;
}
ngOnInit() {

View File

@@ -6,4 +6,5 @@ export class Project {
public clone_url: string;
public git_repo: string;
public version: string;
public public: boolean;
}