Skip to content
This repository has been archived by the owner on Apr 12, 2021. It is now read-only.

Commit

Permalink
Merge pull request #1509 from DashboardHub/v0.11.9
Browse files Browse the repository at this point in the history
Deploy to production
  • Loading branch information
eddiejaoude committed Sep 13, 2019
2 parents 59d75ed + 22b1461 commit 3cfbfc3
Show file tree
Hide file tree
Showing 22 changed files with 57 additions and 186 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ node_js:
branches:
only:
- master
- v0.11.6
- v0.11.9
- /issue-*/
- eddie
- khush
Expand Down Expand Up @@ -49,10 +49,10 @@ deploy:
script: sh ./scripts/deployment/dev.sh
message: "Deploying v0.11.dev-$TRAVIS_BUILD_NUMBER-ALPHA"
on:
branch: v0.11.6
branch: v0.11.9
- provider: script
skip_cleanup: true
script: sh ./scripts/deployment/prod.sh
message: "Deploying v0.11.6-$TRAVIS_BUILD_NUMBER-ALPHA"
message: "Deploying v0.11-$TRAVIS_BUILD_NUMBER-ALPHA"
on:
branch: master
2 changes: 1 addition & 1 deletion functions/src/user/repos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const getUserRepos: any = async (token: string, uid: string) => {
const userRef: DocumentReference = FirebaseAdmin.firestore().collection('users').doc(uid);
let repositories: GitHubRepositoryInput[] = [];
try {
repositories = await GitHubClient<GitHubRepositoryInput[]>('/user/repos?visibility=public&affiliation=owner', token);
repositories = await GitHubClient<GitHubRepositoryInput[]>('/user/repos?visibility=public&affiliation=owner&sort=updated&per_page=100', token);
} catch (error) {
Logger.error(error);
throw new Error(error);
Expand Down
71 changes: 18 additions & 53 deletions web/src/app/main/components/help/help.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,84 +25,49 @@ export class HelpComponent implements OnInit {
description: 'Overview information on getting started',
icon: 'quickstart_icon',
path: 'quickstart',
updatedAt: '05/16/2018 11:05 AM',
updatedAt: '09/13/2019 09:05 AM',
},
{
title: 'Glossary',
description: 'Explanation of key terms',
description: 'Coming Soon',
icon: 'glosary_icon',
path: 'glossary',
updatedAt: '06/10/2018 03:48 PM',
},
{
title: 'Types of Environments',
description: 'What are the different types available and what do they mean',
icon: 'enviroment_icon',
path: 'environment-types',
updatedAt: '05/16/2018 11:05 AM',
},
{
title: 'How to Beacon your version',
description: 'Example usage in TravisCI and CircleCI',
icon: 'how_becon_icon',
path: 'ci-usage',
updatedAt: '05/16/2018 11:05 AM',
path: 'coming-soon',
updatedAt: '09/13/2019 09:05 AM',
},
{
title: 'Create Environment',
description: 'What is an environment and how do I create one?',
title: 'Create Project',
description: 'Coming Soon',
icon: 'create_enviroment_icon',
path: 'create-environment',
updatedAt: '05/16/2018 11:05 AM',
path: 'coming-soon',
updatedAt: '09/13/2019 09:05 AM',
},
{
title: 'Edit Environment',
description: 'How can I edit an environment?',
title: 'Edit Project',
description: 'Coming Soon',
icon: 'edit_enviroment_icon',
path: 'edit-environment',
updatedAt: '05/16/2018 11:05 AM',
path: 'coming-soon',
updatedAt: '09/13/2019 09:05 AM',
},
{
title: 'Delete Environment',
description: 'How do I delete an environment?',
title: 'Delete Project',
description: 'Coming Soon',
icon: 'delete_enviroment_icon',
path: 'delete-environment',
updatedAt: '05/16/2018 11:05 AM',
},
{
title: 'Badges',
description: 'How do I use a DashboardHub badge?',
icon: 'badges_icon',
path: 'badges',
updatedAt: '05/31/2018 11:05 AM',
},
{
title: 'Using CI to Beacon deploy',
description: 'How do I use CI to beacon deploy?',
icon: 'using_badges_icon',
path: 'use-ci-beacon-deploy',
updatedAt: '03/01/2018 11:05 AM',
path: 'coming-soon',
updatedAt: '09/13/2019 09:05 AM',
},
{
title: 'How to support us',
description: 'Coming Soon',
icon: 'how_icon',
path: 'coming-soon',
updatedAt: '03/01/2018 11:05 AM',
updatedAt: '09/13/2019 09:05 AM',
},
{
title: 'Why Open Source?',
description: 'Coming Soon',
icon: 'why_icon',
path: 'coming-soon',
updatedAt: '03/01/2018 11:05 AM',
},
{
title: 'Communication',
description: 'Coming Soon',
icon: 'communication_icon',
path: 'coming-soon',
updatedAt: '03/01/2018 11:05 AM',
updatedAt: '09/13/2019 09:05 AM',
},
];

Expand Down
4 changes: 2 additions & 2 deletions web/src/app/projects/repository/repository.component.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="repository__problem" *ngIf="isAlertEnabled && repository.fullName !== '' && (repository.webhook == null || repository.webhook.id == null)">
<div class="repository__problem" *ngIf="isAdmin && isAlertEnabled && repository.fullName !== '' && (repository.webhook == null || repository.webhook.id == null)">
<mat-card class="repository__problem__card" fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="5px" fxLayout.xs="column">
<div fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="5px">
<span>
Expand Down Expand Up @@ -304,7 +304,7 @@ <h3 fxLayout fxLayoutAlign="start center" class="info__header__orange">
</ng-template>
<ng-template #emptyData>no data</ng-template>
<ng-template #refresh>
<button mat-button type="submit" class="repository__header__contributors__refresh" (click)="reloadRepository(repository, $event)" [disabled]="manualReload">
<button *ngIf="isAdmin" mat-button type="submit" class="repository__header__contributors__refresh" (click)="reloadRepository(repository, $event)" [disabled]="manualReload">
<span fxLayout="row" fxLayoutAlign="center center">
<mat-icon svgIcon="refresh_icon"></mat-icon>
<span fxHide.lt-lg fxFlexOffset="10px">
Expand Down
5 changes: 4 additions & 1 deletion web/src/app/projects/repository/repository.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ export class RepositoryComponent implements OnInit, OnDestroy {
public isAlertEnabled: boolean = false;
public rating: number;

@Input()
public isAdmin: boolean = false;

@Input()
public uid: string;

Expand Down Expand Up @@ -133,7 +136,7 @@ export class RepositoryComponent implements OnInit, OnDestroy {
.subscribe(() => setTimeout(() => this.manualReload = false, 60000)); // disable the ping button for 60 seconds;
}

calculateRating(): void {
public calculateRating(): void {
this.rating = this.repositoryService.getRating(this.repository);
}

Expand Down
25 changes: 12 additions & 13 deletions web/src/app/projects/view/view.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@
<img [src]="project.logoUrl" matBadgeSize="small" *ngIf="project.logoUrl" />
</span>
<mat-menu #menu="matMenu">
<button mat [routerLink]="['edit']" mat-menu-item>
<mat-icon svgIcon="edit_icon"></mat-icon>Edit
</button>
<button (click)="delete()" mat-menu-item>
<mat-icon svgIcon="delete_icon"></mat-icon>Delete
</button>
<button mat-menu-item>
<mat-icon svgIcon="hide_icon"></mat-icon>Hide
</button>
<span *ngIf="isAdmin()">
<button mat [routerLink]="['edit']" mat-menu-item>
<mat-icon svgIcon="edit_icon"></mat-icon>Edit
</button>
<button (click)="delete()" mat-menu-item>
<mat-icon svgIcon="delete_icon"></mat-icon>Delete
</button>
</span>
</mat-menu>
<mat-icon svgIcon="{{ typeIcon }}"></mat-icon>
<span class="project-body__header__content__name">{{ project.title }}</span>
Expand All @@ -24,12 +23,12 @@
<ng-container *ngTemplateOutlet="infoContent"></ng-container>
</span>
</div>
<div class="actions-menu">
<div class="actions-menu" *ngIf="isAdmin()">
<button mat-button [matMenuTriggerFor]="menuAction" #trigger="matMenuTrigger" [ngClass]="{'actions-menu__isActive': trigger.menuOpen}">
<mat-icon *ngIf="!trigger.menuOpen; else whiteIcon" svgIcon="tune_icon"></mat-icon>Actions
</button>
<mat-menu #menuAction="matMenu">
<span fxLayout="column" fxLayoutGap="15px" fxLayoutAlign="space-around start" *ngIf="isAdmin()">
<span fxLayout="column" fxLayoutGap="15px" fxLayoutAlign="space-around start">
<ng-container *ngTemplateOutlet="infoContent"></ng-container>
</span>
</mat-menu>
Expand All @@ -52,9 +51,9 @@
</div>
</ng-template>
</div>
<dashboard-monitor-summary [monitors]="project.monitors || []"></dashboard-monitor-summary>
<dashboard-monitor-summary *ngIf="isAdmin()" [monitors]="project.monitors || []"></dashboard-monitor-summary>
<div class="repository" *ngFor="let uid of project.repositories">
<dashboard-repository [uid]="uid"></dashboard-repository>
<dashboard-repository [uid]="uid" [isAdmin]="isAdmin()"></dashboard-repository>
</div>
</div>
</div>
2 changes: 1 addition & 1 deletion web/src/app/projects/view/view.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export class ViewProjectComponent implements OnInit, OnDestroy {
}

// This function check if logged in user is also owner of the project
isAdmin(): boolean {
public isAdmin(): boolean {
return this.project.isAdmin(this.authService.profile.uid);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,12 @@
<div *ngIf="isAdmin(element)">
<mat-icon [matMenuTriggerFor]="menu" class="project__list__actions">more_horiz</mat-icon>
<mat-menu #menu="matMenu">
<button [routerLink]="['/projects', element.uid,'edit']" mat-menu-item>
<button [routerLink]="['/projects', element.uid, 'edit']" mat-menu-item>
<mat-icon svgIcon="edit_icon"></mat-icon>Edit
</button>
<button (click)="delete()" mat-menu-item>
<mat-icon svgIcon="delete_icon"></mat-icon>Delete
</button>
<button mat-menu-item>
<mat-icon svgIcon="hide_icon"></mat-icon>Hide
</button>
</mat-menu>
</div>
</div>
Expand Down
Empty file.
Empty file.
13 changes: 0 additions & 13 deletions web/src/assets/help/badges.md

This file was deleted.

25 changes: 0 additions & 25 deletions web/src/assets/help/ci-usage.md

This file was deleted.

2 changes: 2 additions & 0 deletions web/src/assets/help/coming-soon.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
### Coming soon

This page is coming soon :)
11 changes: 0 additions & 11 deletions web/src/assets/help/environment-types.md

This file was deleted.

Empty file added web/src/assets/help/my-data.md
Empty file.
1 change: 1 addition & 0 deletions web/src/assets/help/open-source.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Open source is social coding! DashboardHub is all completely open and transparent, with not only the whole codebase available but also our project board and meeting notes. Driven by the community, you influence the features you want!
46 changes: 12 additions & 34 deletions web/src/assets/help/quickstart.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,28 @@
# Get up and running in minutes without installing anything!
# Get up and running in minutes in 3 simple steps and without installing anything!

From the **DashboardHub** Team...
> Thank you for showing an interest in **DashboardHub**. We are currently in an `ALPHA` stage, your feedback would be much appreciated. Feel free to create an [Issue](https://github.com/DashboardHub/PipelineDashboard/issues) on **GitHub**
## 1. Log in
## 1. Log in with GitHub

Please log in with your GitHub account by clicking on the top right of the page.

![Log in](https://user-images.githubusercontent.com/21239137/40269782-a1bad2b6-5b7a-11e8-8221-51298394317d.png)
![Log in](https://user-images.githubusercontent.com/624760/64843082-68531780-d604-11e9-96f1-ab02eaa3aab9.png)

## 2. Create an Environment
## 2. Create a Project

Once logged click on `Add Environment`. `Type` and `Title` are both required, other fields are optional, however we strongly recommend adding a logo url.
Once logged click on `Add Project`. `name` and `type` are both required, other fields are optional, however we highly recommend filling them out, you can always update these later on.

*Note: please read the `help` section on **environment types** to find out more*
![Add project](https://user-images.githubusercontent.com/624760/64853131-0d78ea80-d61b-11e9-939d-cfd06c70502b.png)

![Add environment](https://user-images.githubusercontent.com/21239137/40323918-c8ef32ea-5d2e-11e8-88c1-dfe00acf3787.png)
Once successfully created, you will be redirected to the **Project Dashboard** page for that project.

Once successfully created, you will be redirected to the **Overview** page for that environment.
![Project dashboard page](https://user-images.githubusercontent.com/624760/64853209-39946b80-d61b-11e9-8fe2-553bda3dd272.png)

![Environment overview page](https://user-images.githubusercontent.com/21239137/40324027-2040dd14-5d2f-11e8-823a-1b2e5bb78e68.png)
## 3. Add repository

The **Overview** page will show the information you have just used to create the **environment**, and a progress bar of the **pipeline** status.
Click `Repositories` at the top right of the dashboard project, and a dialog will open to select your repositories that you wish to add to the project

## 3. Beacon deploy / release data
You don't need to install anything on your computer or server - simply beacon data with a `POST` request.
![Repositories](https://user-images.githubusercontent.com/624760/64853566-ebcc3300-d61b-11e9-9c96-5ed75488596f.png)

Our examples are using `curl`. Here is the template command:

```bash
curl -XPOST -H "Content-Type: application/json" -d '{ "release":"{RELEASE-VERSION}" }' \
https://api-pipeline.dashboardhub.io/environments/{ENVIRONMENT-ID}/deployed/{TOKEN-ID}/{PIPELINE-STATE}
```
*Note: Use your release version. For example can append the TravisCI build number*

However, **DashboardHub** generates the exact `curl` commands pre-populated with the relevant IDs and tokens to *beacon* the data to **DashboardHub**. Treat tokens as passwords. To access these commands, follow the steps below:

1) Click the key icon on the top left of the page.

![token icon](https://user-images.githubusercontent.com/21239137/40327650-99532336-5d3b-11e8-9dbe-e7fd40e9ada8.png)

2) Click the green "example usage" button

![example usage](https://user-images.githubusercontent.com/21239137/40327566-5b745292-5d3b-11e8-9490-84f88251716b.png)


You will then see the exact commands, as below:

![modal after example usage](https://user-images.githubusercontent.com/21239137/40327043-574dab20-5d39-11e8-9802-0cccd0b510be.png)
Once you click `confirm`, you will see your project dashboard with the selected repositories *(note: it could take up to 30s to collect all the information for your repositories)*
Empty file.
25 changes: 0 additions & 25 deletions web/src/assets/help/use-ci-beacon-deploy.md

This file was deleted.

0 comments on commit 3cfbfc3

Please sign in to comment.