From 6ff6e32a5994b366fa61e99e0b9698f8125c616b Mon Sep 17 00:00:00 2001 From: Khushboo Date: Thu, 12 Sep 2019 22:56:18 +0530 Subject: [PATCH 1/7] feat(projects): #1494 added owner check for refresh , webhook and monitor summary components --- web/src/app/projects/repository/repository.component.html | 4 ++-- web/src/app/projects/repository/repository.component.ts | 7 ++++++- web/src/app/projects/view/view.component.html | 2 +- web/src/app/projects/view/view.component.ts | 4 ++++ 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/web/src/app/projects/repository/repository.component.html b/web/src/app/projects/repository/repository.component.html index 235ae3750..b06e965f4 100644 --- a/web/src/app/projects/repository/repository.component.html +++ b/web/src/app/projects/repository/repository.component.html @@ -1,4 +1,4 @@ -
+
@@ -304,7 +304,7 @@

no data -

- +
diff --git a/web/src/app/projects/view/view.component.ts b/web/src/app/projects/view/view.component.ts index 1b0ad999d..45c853eba 100644 --- a/web/src/app/projects/view/view.component.ts +++ b/web/src/app/projects/view/view.component.ts @@ -101,6 +101,10 @@ export class ViewProjectComponent implements OnInit, OnDestroy { return this.project.isAdmin(this.authService.profile.uid); } + public isAuthenticated(): boolean { + return this.authService.isAuthenticated; + } + ngOnDestroy(): void { this.projectSubscription.unsubscribe(); if (this.deleteSubscription) { From 181a201f5406986748b86e0677531a16e1d69741 Mon Sep 17 00:00:00 2001 From: Eddie Jaoude Date: Fri, 13 Sep 2019 07:57:02 +0200 Subject: [PATCH 2/7] feat(project): #1494 owner checks --- .../projects/repository/repository.component.html | 4 ++-- .../app/projects/repository/repository.component.ts | 12 +++++------- web/src/app/projects/view/view.component.html | 4 ++-- web/src/app/projects/view/view.component.ts | 6 +----- 4 files changed, 10 insertions(+), 16 deletions(-) diff --git a/web/src/app/projects/repository/repository.component.html b/web/src/app/projects/repository/repository.component.html index b06e965f4..2a4b4f11b 100644 --- a/web/src/app/projects/repository/repository.component.html +++ b/web/src/app/projects/repository/repository.component.html @@ -1,4 +1,4 @@ -
+
@@ -304,7 +304,7 @@

no data -

- +
- +
diff --git a/web/src/app/projects/view/view.component.ts b/web/src/app/projects/view/view.component.ts index 45c853eba..5d91afa79 100644 --- a/web/src/app/projects/view/view.component.ts +++ b/web/src/app/projects/view/view.component.ts @@ -97,14 +97,10 @@ 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); } - public isAuthenticated(): boolean { - return this.authService.isAuthenticated; - } - ngOnDestroy(): void { this.projectSubscription.unsubscribe(); if (this.deleteSubscription) { From 49ef47c0815e1677f990c550d26b3389c9819803 Mon Sep 17 00:00:00 2001 From: Eddie Jaoude Date: Fri, 13 Sep 2019 09:08:04 +0200 Subject: [PATCH 3/7] fix(repositories): #1501 increase my repo list --- functions/src/user/repos.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/src/user/repos.ts b/functions/src/user/repos.ts index 3a32898d1..1ca827017 100644 --- a/functions/src/user/repos.ts +++ b/functions/src/user/repos.ts @@ -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('/user/repos?visibility=public&affiliation=owner', token); + repositories = await GitHubClient('/user/repos?visibility=public&affiliation=owner&sort=updated&per_page=100', token); } catch (error) { Logger.error(error); throw new Error(error); From 6834c8b35f801a4247abc5b31d546dee9e009035 Mon Sep 17 00:00:00 2001 From: Eddie Jaoude Date: Fri, 13 Sep 2019 10:02:38 +0200 Subject: [PATCH 4/7] fix(project): #1506 remove admin menu for not owner --- .../components/projects-list/projects-list.component.html | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/web/src/app/shared/components/projects-list/projects-list.component.html b/web/src/app/shared/components/projects-list/projects-list.component.html index 884e464ee..15cd7359a 100644 --- a/web/src/app/shared/components/projects-list/projects-list.component.html +++ b/web/src/app/shared/components/projects-list/projects-list.component.html @@ -71,15 +71,12 @@
more_horiz - -
From 2899b0931db467eb6388b8f77ed30ed7d1d1991e Mon Sep 17 00:00:00 2001 From: Eddie Jaoude Date: Fri, 13 Sep 2019 10:04:24 +0200 Subject: [PATCH 5/7] fix(project): #1505 remove hide from admin menu --- web/src/app/projects/view/view.component.html | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/web/src/app/projects/view/view.component.html b/web/src/app/projects/view/view.component.html index f9c43e6ca..c8a104dba 100644 --- a/web/src/app/projects/view/view.component.html +++ b/web/src/app/projects/view/view.component.html @@ -6,15 +6,14 @@ - - - + + + + {{ project.title }} @@ -24,12 +23,12 @@ -
+
- + From abeb4b0190f67d3c3f125b914a16873aa0854f4f Mon Sep 17 00:00:00 2001 From: Eddie Jaoude Date: Fri, 13 Sep 2019 11:50:06 +0200 Subject: [PATCH 6/7] feat(docs): #1472 quickstart --- .../main/components/help/help.component.ts | 71 +++++-------------- web/src/assets/help/add-repository.md | 0 web/src/assets/help/add-users.md | 0 web/src/assets/help/badges.md | 13 ---- web/src/assets/help/ci-usage.md | 25 ------- web/src/assets/help/coming-soon.md | 2 + ...reate-environment.md => create-project.md} | 0 ...elete-environment.md => delete-project.md} | 0 .../{edit-environment.md => edit-project.md} | 0 web/src/assets/help/environment-types.md | 11 --- web/src/assets/help/my-data.md | 0 web/src/assets/help/open-source.md | 1 + web/src/assets/help/quickstart.md | 46 ++++-------- web/src/assets/help/remove-repository.md | 0 web/src/assets/help/use-ci-beacon-deploy.md | 25 ------- 15 files changed, 33 insertions(+), 161 deletions(-) create mode 100644 web/src/assets/help/add-repository.md create mode 100644 web/src/assets/help/add-users.md delete mode 100644 web/src/assets/help/badges.md delete mode 100644 web/src/assets/help/ci-usage.md rename web/src/assets/help/{create-environment.md => create-project.md} (100%) rename web/src/assets/help/{delete-environment.md => delete-project.md} (100%) rename web/src/assets/help/{edit-environment.md => edit-project.md} (100%) delete mode 100644 web/src/assets/help/environment-types.md create mode 100644 web/src/assets/help/my-data.md create mode 100644 web/src/assets/help/open-source.md create mode 100644 web/src/assets/help/remove-repository.md delete mode 100644 web/src/assets/help/use-ci-beacon-deploy.md diff --git a/web/src/app/main/components/help/help.component.ts b/web/src/app/main/components/help/help.component.ts index c8016a04f..0185f8d33 100644 --- a/web/src/app/main/components/help/help.component.ts +++ b/web/src/app/main/components/help/help.component.ts @@ -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', }, ]; diff --git a/web/src/assets/help/add-repository.md b/web/src/assets/help/add-repository.md new file mode 100644 index 000000000..e69de29bb diff --git a/web/src/assets/help/add-users.md b/web/src/assets/help/add-users.md new file mode 100644 index 000000000..e69de29bb diff --git a/web/src/assets/help/badges.md b/web/src/assets/help/badges.md deleted file mode 100644 index a00863c37..000000000 --- a/web/src/assets/help/badges.md +++ /dev/null @@ -1,13 +0,0 @@ -# How do I use a DashboardHub badge? - -Badges are tag-like buttons at the top of your README.md, to showcase key features of your project (e.g. build, npm packages). They are dynamic, which means that a new button will be generated each time that feature changes (e.g. your build status has changed, or you started to use a more updated npm package), without you having to change the code in your README.md file. The buttons are also hyperlinks, so clicking on a badge would redirect you to the relevant page (e.g. the build page of your CI, or the page of the npm package version you are using). - -DashboardHub auto-generates the markdown code you can directly copy & paste into your README.md. To access this, click into the relevant environment for which you want the badges. - -For example - -``` -[![DashboardHub Badge](https://img.shields.io/badge/DashboardHub-Venzra%20Website-orange.svg)](https://pipeline.dashboardhub.io/c6631f90-de59-11e7-baca-539d2ad633e4/view) -``` - -![DashboardHub badge](https://user-images.githubusercontent.com/21239137/40886576-70fd8fc4-6732-11e8-9648-9ef0ee33a89e.png) diff --git a/web/src/assets/help/ci-usage.md b/web/src/assets/help/ci-usage.md deleted file mode 100644 index 6ca60302e..000000000 --- a/web/src/assets/help/ci-usage.md +++ /dev/null @@ -1,25 +0,0 @@ -# CI Usage - -Here are some examples of how to use **DashboardHub** `curl` commands on CI to beacon your release version number. - -## CircleCI example usage - -``` -- run: - name: Notify build completed - command: | - BUILD=$CIRCLE_BRANCH-${CIRCLE_SHA1:0:7} - curl -H "Content-Type: application/json" \ - -d '{ "release": "'$BUILD'" }' \ - -X POST https://api-pipeline.dashboardhub.io/environments/xxxxxxxxx/deployed/xxxxxxxx/finishBuild -``` - -## TravisCI example usage - -``` -script: - - > - curl -H 'Content-Type: application/json' - -d '{ "release":"v0.1.'${TRAVIS_BUILD_NUMBER}'" }' - -X POST https://api-pipeline.dashboardhub.io/environments/62944660-2c15-11e8-978f-d3b74ee07930/deployed/${DH_TOKEN}/startBuild -``` diff --git a/web/src/assets/help/coming-soon.md b/web/src/assets/help/coming-soon.md index 6e63bf5ea..4e6819a27 100644 --- a/web/src/assets/help/coming-soon.md +++ b/web/src/assets/help/coming-soon.md @@ -1 +1,3 @@ ### Coming soon + +This page is coming soon :) diff --git a/web/src/assets/help/create-environment.md b/web/src/assets/help/create-project.md similarity index 100% rename from web/src/assets/help/create-environment.md rename to web/src/assets/help/create-project.md diff --git a/web/src/assets/help/delete-environment.md b/web/src/assets/help/delete-project.md similarity index 100% rename from web/src/assets/help/delete-environment.md rename to web/src/assets/help/delete-project.md diff --git a/web/src/assets/help/edit-environment.md b/web/src/assets/help/edit-project.md similarity index 100% rename from web/src/assets/help/edit-environment.md rename to web/src/assets/help/edit-project.md diff --git a/web/src/assets/help/environment-types.md b/web/src/assets/help/environment-types.md deleted file mode 100644 index 5243aa429..000000000 --- a/web/src/assets/help/environment-types.md +++ /dev/null @@ -1,11 +0,0 @@ -# The **environment** `type` configures the Pipeline flow. - -*Note: You can update the environment `type` at anytime*. - -## Environment types - -| Type | Example | Description | -| :--- | :--- | :--- | -| `build` | Library, Dependency or Assets | This *type* only does the `build` part of the **pipeline** | -| `deploy` | Deploy / Release Application or Platform | This *type* only does the `deploy` part of the **pipeline** | -| `build-deploy` | Both of the above | This *type* does both of the above **pipeline**, with the `build` first, then `deploys` if the build was successful | diff --git a/web/src/assets/help/my-data.md b/web/src/assets/help/my-data.md new file mode 100644 index 000000000..e69de29bb diff --git a/web/src/assets/help/open-source.md b/web/src/assets/help/open-source.md new file mode 100644 index 000000000..24741739d --- /dev/null +++ b/web/src/assets/help/open-source.md @@ -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! diff --git a/web/src/assets/help/quickstart.md b/web/src/assets/help/quickstart.md index 21dd2c4a3..4e268a1e4 100644 --- a/web/src/assets/help/quickstart.md +++ b/web/src/assets/help/quickstart.md @@ -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)* diff --git a/web/src/assets/help/remove-repository.md b/web/src/assets/help/remove-repository.md new file mode 100644 index 000000000..e69de29bb diff --git a/web/src/assets/help/use-ci-beacon-deploy.md b/web/src/assets/help/use-ci-beacon-deploy.md deleted file mode 100644 index cefa5fef1..000000000 --- a/web/src/assets/help/use-ci-beacon-deploy.md +++ /dev/null @@ -1,25 +0,0 @@ -# How do I use CI to beacon deploy? -You don't need to install anything on your computer or server - simply beacon data with a `POST` request. - -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) From 4559431684615c1f3c804513b94f402d2f647a5c Mon Sep 17 00:00:00 2001 From: Eddie Jaoude Date: Fri, 13 Sep 2019 12:45:10 +0200 Subject: [PATCH 7/7] feat(deploy): #1511 default dev branch / deploy --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index c6df7a011..1b89eb0f5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ node_js: branches: only: - master - - v0.11.6 + - v0.11.9 - /issue-*/ - eddie - khush @@ -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