Skip to content

Commit

Permalink
feat(examples): add json & jira extensions to example
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphaël Benitte committed Jul 30, 2018
1 parent 101783f commit 71aa2c8
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 31 deletions.
2 changes: 2 additions & 0 deletions examples/basic/apis.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ module.exports = (Mozaik, configFile, config) => {
Mozaik.registerApi('github', require('@mozaik/ext-github/client'))
Mozaik.registerApi('travis', require('@mozaik/ext-travis/client'))
Mozaik.registerApi('gitlab', require('@mozaik/ext-gitlab/client'))
Mozaik.registerApi('json', require('@mozaik/ext-json/client'))
Mozaik.registerApi('jira', require('@mozaik/ext-jira/client'))
}
4 changes: 2 additions & 2 deletions examples/basic/conf/config-github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ github_org: &github_org ekino
github_repo: &github_repo plouc/mozaik

dashboards:
- title: GitHub Dashboard Demo 1 (mozaik-ext-github)
- title: '@mozaik/ext-github demo 1'
columns: 3
rows: 3
widgets:
Expand Down Expand Up @@ -70,7 +70,7 @@ dashboards:
x: 2
y: 2

- title: GitHub Dashboard Demo 2 (mozaik-ext-github)
- title: '@mozaik/ext-github demo 2'
columns: 3
rows: 3
widgets:
Expand Down
69 changes: 45 additions & 24 deletions examples/basic/conf/config-gitlab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,64 +8,85 @@ rotationDuration: 8000
apisPollInterval: 100000

extension: &extension gitlab
gitlabProject: &gitlabProject gitlab-org/gitlab-ci-multi-runner
gitlabProject: &gitlabProject gitlab-org/gitlab-runner

dashboards:
- title: GitLab Demo
columns: 3
rows: 3
- title: '@mozaik/ext-gitlab demo'
columns: 4
rows: 6
widgets:
-
extension: *extension
widget: Project
project: *gitlabProject
columns: 1
rows: 1
rows: 2
x: 0
y: 0
-
extension: *extension
widget: ProjectMembers
project: *gitlabProject
columns: 1
rows: 1
rows: 2
x: 1
y: 2
y: 3
-
extension: *extension
widget: ProjectContributors
project: *gitlabProject
columns: 1
rows: 1
x: 1
y: 1
# - type: gitlab.merge_requests_gauge
# project: *gitlabProject
# columns: 1
# rows: 1
# x: 2
# y: 0
rows: 2
x: 2
y: 3
-
extension: *extension
widget: BuildHistory
widget: ProjectActivity
project: *gitlabProject
columns: 1
rows: 2
rows: 4
x: 0
y: 1
y: 2
-
extension: *extension
widget: Branches
project: *gitlabProject
columns: 1
rows: 2
x: 2
y: 1
rows: 4
x: 3
y: 2
-
extension: *extension
widget: BuildHistogram
widget: JobHistogram
project: *gitlabProject
columns: 2
rows: 1
rows: 2
x: 1
y: 0
-
extension: mozaik
widget: Inspector
columns: 1
rows: 2
x: 3
y: 0
-
extension: *extension
widget: LatestProjectPipeline
project: *gitlabProject
gitRef: master
hideCommitMessage: true
columns: 2
rows: 1
x: 1
y: 2
-
extension: *extension
widget: LatestProjectPipeline
project: *gitlabProject
gitRef: runner-self-signed-docs
hideCommitMessage: false
columns: 2
rows: 1
x: 1
y: 5
12 changes: 7 additions & 5 deletions examples/basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@mozaik/ext-github": "^2.0.0-alpha.6",
"@mozaik/ext-gitlab": "^2.0.0-alpha.3",
"@mozaik/ext-github": "^2.0.0-alpha.9",
"@mozaik/ext-gitlab": "^2.0.0-alpha.8",
"@mozaik/ext-jira": "^0.4.0",
"@mozaik/ext-json": "^0.3.0",
"@mozaik/ext-time": "^2.0.0-alpha.11",
"@mozaik/ext-travis": "^2.0.0-rc.0",
"@mozaik/server": "^2.0.0-alpha.2",
"@mozaik/themes": "1.0.0-alpha.13",
"@mozaik/ui": "^2.0.0-alpha.13",
"@mozaik/server": "^2.0.0-alpha.5",
"@mozaik/themes": "^1.0.0-alpha.17",
"@mozaik/ui": "^2.0.0-alpha.25",
"nivo": "^0.15.0",
"react": "^16.4.0",
"react-dom": "^16.4.0"
Expand Down
4 changes: 4 additions & 0 deletions examples/basic/src/register_extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@ import { Registry } from '@mozaik/ui'

import github from '@mozaik/ext-github'
import gitlab from '@mozaik/ext-gitlab'
import jira from '@mozaik/ext-jira'
import json from '@mozaik/ext-json'
import time from '@mozaik/ext-time'
import travis from '@mozaik/ext-travis'

Registry.addExtensions({
github,
gitlab,
jira,
json,
time,
travis,
})

0 comments on commit 71aa2c8

Please sign in to comment.