Giter Club home page Giter Club logo

gitlab-monitor's Introduction

An abstract representation of an eye GitLab Monitor

A browser-based monitor dashboard for GitLab CI

Use & Download

Hosted version

If you don't want to setup your own server, you can always use the latest version of GitLab Monitor I upload here:

https://gitlab-monitor.timoschwarzer.com/

Don't worry, I don't save access tokens or anything else. Additionally, this version has a manifest.json attached which makes it easy to pin it to your Android home screen and open it as a full screen app.

Support me on Patreon

Docker

dockeri.co

There's an official docker image available on Dockerhub:

docker pull timoschwarzer/gitlab-monitor

Host it yourself

Go to releases

Screenshots

Screenshot 1 Screenshot 2

Build Setup

# install dependencies
yarn install

# serve with hot reload at localhost:8080
yarn run dev

# build for production with minification
yarn run build

Configuration

See configuration.

Used libraries

Visit my website!

gitlab-monitor's People

Contributors

andrelmlins avatar blastdan avatar boillodmanuel avatar bonndan avatar csbiggar avatar dependabot[bot] avatar dersvenhesse avatar dirtcrusher avatar gpaoliveira avatar grebois avatar hatemzidi avatar jasiek avatar jbertaux avatar jcberthon avatar kangasta avatar keroth avatar lholst avatar lscheibel avatar lukepatrick avatar lunik avatar martinstundner avatar mribichich avatar norrs avatar panzerfahrer avatar rsommer avatar siarheifrunchak avatar sichapman avatar stefanvdk avatar timoschwarzer avatar timothyearley avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gitlab-monitor's Issues

Suggestion: Sort projects by last run build (descending)

There should be an option to change the sort of the projects to last build time (or ideally, last triggered time). When a job/pipeline is manually triggered is should cause the project to be moved to the top so it is move visible.

Add option to display configurable header

Background

We're currently using the gitlab-monitor to track the status of our various (small and large) repositories.

What we are missing is the possibility to visualize the status of different branches. The background color of each component shows the status of one branch only, and splitting it would probably clutter the view (?).

One idea is to set up different configurations and regularly swap them: Show devel dashboard for 5 minutes, then master dashboard for five minutes, ...

Feature request

Add an optional header that shows a configurable text. In our case, this would simply be "master" or "devel", to quickly distinguish what is currently displayed.

Show jobs status icon and names at the same time

At present there is a boolean parameter showJobNames to switch between showing status icon or job name. However when job name is displayed it isn't intuitive enough that a job was success or failed. Would be nice to be able to show status icon and name together.

There is two alternatives to config it:

  1. Add param showJobs. Can be icon(default), name and iconAndName. Deprecate param showJobNames and make showJobs=name when it's set for backward compatibility.

  2. Keep param showJobNames and add new boolean param showJobStatusIcon.

showJobNames showJobSatusIcon display
true true icon & name
true false/undefined name
false true/false/undefined icon
undefined true/undefined icon

I favor alternative 1.

Non root docker

Hello,

Is it possible to create a different docker image that is not using root? On Open shift cluster by default images that require root are disabled...

Thank you for considering!

Best regards,
Andrej

Badge variables

Our badges are broken. We use variables inside our badges, and gitlab-monitor shows a broken image. The generated url/image looks like this: https:///%%7Bproject_path%7D/pipelines
Seems like %{project_path} is not translated. Don't know wether this is a bug in gitlab or in gitlab-monitor.

Usage without dedicated (sub-)domain

Can you update the documentation with how to configure gitlab-monitor (and probably its docker equivalent) when you want to use it behind a reverse proxy and a other bath besides the root path. E.g. add the documentation how you implemented timoschwarzer.com/gitlab-monitor.

Make default branch always displayed

Is there a way to make the default branch pipeline status always on the display even if the last build was more than maxAge?
e.g master was last ran 20 hours ago, maxAge is set to 100 hours but the card was showing "No recent builds"

Monitor can't fetch recent pipelines anymore … ?

Hi Timo!

I've happily using the monitor for the past months and got totally used to my bird's eye view of running pipelines. ❤️

Since a couple days, the monitor seems to have trouble fetching the right information about running pipelines. Like, when I leave maxAge to the default, it only shows me one project which also has a wrong last run timestamp on it. When I set maxAge: 0 it shows me everything but all the last run times are off...

Maybe something changes in the Gitlab API? Anyone else with this issue?

Thanks!

Some builds don't show up when manually triggering the pipelines

I trigger pipelines of projects manually a lot and when I do it on projects that haven't had a new commit in a long time, they won't show up in the monitor.

Another issue with manually triggering pipelines (for projects that have had a commit in the last 7 days) is that the monitor gets confused and displays multiple (X) symbols for instance...

Here I just clicked the retry button on the right of the first pipeline:
gitlab
The result was pretty much the same:
gitlab2
But this is what the monitor displays:
monitor3

The time is wrong as well btw. It shows 17:39 instead of 3:49.

Also, why does the monitor always display the pipeline stages from right to left instead of from left to right like Gitlab does? This is very confusing.

filter not working as expected

Hello, thanks for this really cool tool! :-)
I have one little problem though. I try to limit the visible projects to the ones of my group/subgroup and I use the 'filter' param for this. I have tried something like this:

 "filter": {
    "include": ".*cxa-dsi.*",
    "exclude": null
  }

and also

    "include": "cxa/cxa-dsi",

and also

    "include": "cxa/cxa-dsi.*",

and also

    "include": "/cxa/cxa-dsi.*",

Always I get projects that do not contain cxa-dsi in their path.
So I assume I don't understand what I am supposed to put in or it doesn't work or I have the wrong idea of how to use the filtering at all. :-)
Help is appreciated.

  • Thomas

API token exposed

It would be nice to not pass the token around everywhere-- maybe a proxy mode so all requests go through the gitlab-monitor server? Additionally being able to disable the configure page would make it a little less obvious the token is exposed.

Skipped pipelines

Would it be possible to filter out skipped pipelines?
Background: We use semantic commits to automatically generate tags and a changelog. Since this is a step in our build pipeline, it results in a commit and a tag for this commit, which only contains the changelog (and other minor things, like a version number in a config file). We skip the build, since it does not contain changes to our code.
The problem is now - the master and the latest tags now don't have a successful build, which results in gitlab-monitor always showing it in gray instead of green (or red).
Would it be possible to filter these pipelines out? We would like to use default branch "master" and the penultimate pipeline.
Hope you get what I mean ;-)

Doesn't show pipelines triggered by git tags

Hi,

Some of my projects are being build by gitlab ci when new tag is added (only tags gitlab ci settings). These project are not shown in gitlab monitor (https://timoschwarzer.com/gitlab-monitor/).

My gitlab monitor configuration

{
  "gitlabApi": "xxx",
  "privateToken": "xxx",
  "maxAge": 24,
  "fetchCount": 20,
  "pipelinesOnly": true,
  "autoZoom": true,
  "showPipelineIds": true,
  "showJobNames": true,
  "showDurations": true,
  "showUsers": true,
  "projectVisibility": "any",
  "filter": {
    "include": "rnd",
    "exclude": null
  }
}

Regards
Arek

Sound alerts

Hello,
Your project is very interesting. After going around the features, I think there is one missing ..: p

Indeed, it would be very favorable to be able to integrate the sound alerts from the browsers.

We use gitlab-monitor on a TV in our company but we do not always have eyes on it. A sound alert would be very interesting in the case of an error (build failed etc ...)

[Request] Ability to filter projects based on tags

Gitlab allows you to tag a project (not tag as in the Git sense)

It would be great if we could include projects on our dashboard based on these tags, as we have a handful of projects across several groups we would like to include.

You get a list of tags from the v4 API project search scope response:

[
  {
    "id": 201,
    // other fields omitted
    "created_at": "2016-08-12T16:05:03.531Z",
    "default_branch": "master",
    "tag_list": [
      "composer",
      "monitored"
    ],
    // other fields omitted
  }
]

Filter multiple projects

I tried to filter only selected projects from our group.

I did it as array but unfortunately it doesn't work for me. Nothing shows up.

"filter": { "include": [ "group/project1", "group/project2", "group/project3" ], "exclude": null },

Is it bugged or I misunderstand something?

Token shouldn't be passed via GET variable

Hey, just found this project and love it! I'm working on some ideas to customize it and tweak it but had one thing I wanted to add as an issue. Passing a full access token as a GET variable I think is an accident waiting to happen!

An API token being passed as a GET variable is susceptible to being grabbed or snagged by all sorts of things

  • Previous page URL can be grabbed by javascript
  • URL can be viewed in the history (even via CLI)
  • Open hotspots where someone nearby is sniffing traffic
  • Router/Firewall logs
  • etc

There have been cases, albeit rare, of code repositories being compromised and code being injected with malware. Corporate espionage cases of companies stealing competitors software. Holding source code for ransom not to publicly release.

Passing info via get vars is cool but you wouldn't ask someone to include a password in the URL. I would have a field that lets someone enter the token in a form field, hit submit, and keep it in a post variable or cookie.

GitLab returns 500

Hi @timoschwarzer,

Do you have any idea why GitLab returns 500 on this API request:
GET https://gitlab.com/api/v4/projects?order_by=last_activity_at&per_page=20&visibility=private?

This is configuration I am using for your monitor:

{
  "gitlabApi": "https://gitlab.com/api/v4",
  "privateToken": "<MY PRIVATE API TOKEN>",
  "maxAge": 0,
  "fetchCount": 20,
  "pipelinesOnly": false,
  "autoZoom": false,
  "showPipelineIds": true,
  "showJobs": "icon",
  "showDurations": true,
  "showUsers": false,
  "projectVisibility": "private",
  "title": null,
  "filter": {
    "include": ".*",
    "includeTags": ".*",
    "exclude": null,
    "excludeTags": null
  },
  "projectFilter": {
    "*": {
      "include": ".*",
      "exclude": null,
      "default": null,
      "showMerged": true,
      "showTags": true
    }
  }
}

Your monitor loads quite long and when I inspected network requests I saw that for this configuration your monitor is calling above given API point. I tried calling the same API point from Postman and I am getting again 500. My API token is valid, I checked that by listing my private groups: GET https://gitlab.com/api/v4/groups?owned=yes.

So basically, I cannot list private projects from my private group with a valid API private token and thus I cannot see anything on your monitor.

Note that I also have one or more private projects that belong to my account on GitLab. I also have one or more private projects in my private group.

Thanks for any help and thanks for your awesome open-source contribution!

Best regards,
Herman

Allowed failures

Next feature request :-D

We have pipeline with jobs that are allowed to fail, which gitlab shows with an orange exclamation mark. gitlab-monitor shows these jobs with a red cross, like a normal failed job.
Would be nice to have this visible in gitlab-monitor with an orange exclamation mark, too.

Move project to GitLab

Hi there!

I want to move the project to GitLab in the next weeks.

If there are reasons against this, please comment.

Config to slow down requests

Since I don't need full real-time updates, it would be awesome if we could configure how often the page pokes the GitLab API.

Request for UX research applicants for GitLab

My intention here is that this issue is short-lived and doesn't distract from the development of this repository. If this content is deemed not supported, feel free to close/remove.

Dear GitLab-monitor users,

I am reaching out to you as one of the Product designers from GitLab focusing in on CI. This project was listed as one of the inspirations for that feature area.

We believe our users are best-served by features that are influenced by them. As GitLab is developing a feature called public pipeline page we would like to find out more about this problem space and define exactly what is needed to solve which use cases. This will help prioritization, ideation, and iteration scope.

In preparation of our research effort I am reaching out to you directly to ask if you are willing to help us out. We would love to interview you similar to our direct "GitLab first look" research applicants. This would take around one hour of your time and there are immediate personal rewards aside from us implementing a great feature in the long run.

If you are willing to help out, please sign up at https://about.gitlab.com/community/gitlab-first-look/ and if possible send an email to [email protected].

kind regards,

Dimitrie

Only show most recent Job for given name

If I rerun a job in the pipeline, gitlab-monitor displays a duplicate of the job.
Instead it would be nice to (optionally) only display the newes job of a given name in a pipeline.

I suggest the following patch

pipeline-view.vue.patch.txt

but since I'm not a JavaScript programmer, I'd like a second opinion

Limit number of tags/branches shown

On my team, for better or worse some projects build a lot of tags every day. This throws off the display:

image

Suggest maxTagCount and maxBranchCount options. Each project would show just its latest tags/branches, no more than the count specified.

Docker container runs in dev mode with build artifacts missing

Several issues are encountered when running the dashboard in docker:

  • build.js is missing, see below
  • yarn build is missing in Dockerfile (build is not meant to be run at runtime, but at build time)
  • the container command activates "dev" script, which is not meant for production use, better run a dedicated server like serve-static or express

Trouble with Docker and GITLAB_MONITOR_CONFIG

Using the docker image, I set GITLAB_MONITOR_CONFIG to my config json (verified works), but when I browse to localhost, I get the "Before you can use GitLab Monitor, it has to be configured" page.

Here's how I'm running the container:

docker run --publish 80:80/tcp --env GITLAB_MONITOR_CONFIG={...json...} timoschwarzer/gitlab-monitor

I opened an interactive session, ran the commands from wrapper.sh, and verified that /usr/share/nginx/html/config.json was populated with my config before nginx started.

Does this look like a bug, or am I doing something wrong?

Add option to order alphabetically

What about a configuration option to change the default sorting?
Personally I have some use cases where I'd love to see my projects ordered alphabetically, because I have a high number of projects and for me it is hard to find the right project in the dashboard.

Only show projects that have a specific tag

Hi, i wonder if it's possible to only show projects that have a specific tag?
Let's assume i have many projects, that don't have a consistent naming scheme and are distributed in different groups and subgroups.
I would like to tag some of these projects and only show these projects in the monitor.

As far as i understand it is currently only possible to also include tagged projects, but not to only show tagged ones.

Can't see any project details

So, I've pulled the project, and filled in the default config in src/config.default.json and moved that file to the public folder.

I've made a API key token (which works) and I use the following URL: https://gitlab.com/api/v4/users/<my_user_id>.

This also works, but when I do the project detail API call (https://gitlab.com/api/v4/users/<my_user_id>/projects/<project_id>, it throws a 404, so I don't see any project. I've tried seting projects public etc... but nothing seems to work... what am I doing wrong here?

UglifyJs build error when running `yarn run build`

Hey there,

sorry this is my first time creating an issue on github, not sure if this is the right place for a build error. I'm trying to build the project and I am running into the following error:

yarn run v1.7.0
$ cross-env NODE_ENV=production webpack --progress --hide-modules
Hash: 595d2233e810a76f4a1b
Version: webpack 3.10.0
Time: 18159ms
       Asset       Size  Chunks                    Chunk Names
   icons.svg      86 kB          [emitted]
    build.js     735 kB       0  [emitted]  [big]  main
build.js.map     950 kB       0  [emitted]         main
  index.html  254 bytes          [emitted]

ERROR in build.js from UglifyJs
Invalid assignment [./node_modules/query-string/index.js:8,0][build.js:22681,30]
Child html-webpack-plugin for "index.html":
     1 asset
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I tried googling this error but couldn't find much info on it. Here's an attached screenshot of my steps as well:

gitlab-monitor build error

Any idea where I am going wrong here?

Start with current configuration automatically

For usage at a TV I would like to have an autostart-option so that the gitlab-monitor is starting with the supplied configuration automatically instead of showing the configuration and the Save-button for the first time.

Further project filtering

We'd like more ways to filter the projects that get displayed. Currently I'm thinking groups and projects optional parameters that can be used separately or together.

e.g. ?groups=mygroup1,mygroup2&projects=mygroup1/myproject1,mygroup2/myproject2 (or maybe a repeating parameter rather than comma separated)

So if there was a project=mygroup3/myproject3 in the example above, it would not be displayed due to the group filter not including mygroup3. But if it did, or there was no group filter, it would be shown. (The project names are fully qualified because of possible duplicate names leading to ambiguity.)

I didn't want to do a PR out of nowhere as I'm not sure if there's a better/more elegant way (this was just my off the cuff thoughts).

Only show latest Tag

What about an option to only show the latest tags?

In our project we have several repositories each with several tags. Using the option to limit the number of pipelines to 5 would result in always showing 5 pipelines for each project. This would potentially hide some branches in the process.

Suggestion: Job names as hover/tooltips on job icons

Just found this project and tried it, nice work!

One suggestion: Adding hovers to job icons would allow to have the compact job representation with icons, but easily see e.g. which job failed. I just added it via :title="job.name" to my local version:

<a class="job-view" target="_blank" rel="noopener noreferrer" :href="project.web_url + '/-/jobs/' + job.id">

is now

<a class="job-view" target="_blank" :title="job.name" rel="noopener noreferrer" :href="project.web_url + '/-/jobs/' + job.id">

<a class="job-view" target="_blank" rel="noopener noreferrer" :href="project.web_url + '/-/jobs/' + job.id">

P.S.: Sorry for not sending a pull request, but I don't have the repository cloned atm.

Feature: Show more than one pipeline per project

It seems that it always shows the last pipeline being run.

It would be great to see the last X pipelines.
Instead of showing one card per project, you could show the card pipelines as the first citizen, and filter the amount of pipelines per project according to a config value of last pipelines.

this is a pipeline response eg:

[
{"id":1163,"sha":"2bfae32771c66a375cde4fa9bd746b7788999ce3","ref":"master","status":"success"},
{"id":1162,"sha":"b5158a9347961d671df6f6933403842ee2f374b1","ref":"14-delete-dialogs-bug","status":"success"},
{"id":1153,"sha":"66e97da8d1f80f3f70e20bedf99defc1c9f1f231","ref":"master","status":"success"},
{"id":1150,"sha":"4636977f5447c97f249199cdba2dcf8d39887575","ref":"13-env-vars-config","status":"success"}, 
... ]

Imaging if you have multiples branches building at the same time, you could only see one

Update view only when tab is active

Hi there, I was thinking that for desktop uses, it would be great to check whether the tab is active or not, and depending on that, not send requests to gitlab

Since the tab is not active, the user can't see the changes, so it kinda not make sense to update the view, until the tab get active again.

This way, we could save a lot of requests or load to Gitlab, when the user is not watching

The behavior is transparent to users. Or maybe we could add a config flag, but it doesn't make sense for now.
Maybe in the future if we add notifications for failed builds, then the config flag makes sense, because you'll want to be notify even if the tab is not active

what do you think? I could work on this in this week, and maybe if you want we could also try out notifications separately

Filter by branch/master OR show branches as separate sections

It would be useful to have the option to filter by a particular branch or to show all branches at once.

For instance, right now we have some development super active on a branch, so the build monitor is almost always showing that branch, but most of the team only needs to know if master is active and that branch being red isn't useful information for them.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.