From 71aa2c8e1885955acbd65e7aab6391e5ccd6274a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Benitte?= Date: Mon, 30 Jul 2018 21:06:02 +0900 Subject: [PATCH] feat(examples): add json & jira extensions to example --- examples/basic/apis.js | 2 + examples/basic/conf/config-github.yml | 4 +- examples/basic/conf/config-gitlab.yml | 69 +++++++++++++++-------- examples/basic/package.json | 12 ++-- examples/basic/src/register_extensions.js | 4 ++ 5 files changed, 60 insertions(+), 31 deletions(-) diff --git a/examples/basic/apis.js b/examples/basic/apis.js index b056475e..17cb19f4 100644 --- a/examples/basic/apis.js +++ b/examples/basic/apis.js @@ -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')) } diff --git a/examples/basic/conf/config-github.yml b/examples/basic/conf/config-github.yml index a9d3674f..24ec6612 100644 --- a/examples/basic/conf/config-github.yml +++ b/examples/basic/conf/config-github.yml @@ -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: @@ -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: diff --git a/examples/basic/conf/config-gitlab.yml b/examples/basic/conf/config-gitlab.yml index ba60593a..18f00384 100644 --- a/examples/basic/conf/config-gitlab.yml +++ b/examples/basic/conf/config-gitlab.yml @@ -8,19 +8,19 @@ 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 - @@ -28,44 +28,65 @@ dashboards: 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 diff --git a/examples/basic/package.json b/examples/basic/package.json index f7979a5f..79e5257b 100644 --- a/examples/basic/package.json +++ b/examples/basic/package.json @@ -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" diff --git a/examples/basic/src/register_extensions.js b/examples/basic/src/register_extensions.js index 65754add..cf3cabb8 100644 --- a/examples/basic/src/register_extensions.js +++ b/examples/basic/src/register_extensions.js @@ -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, })