Git Product home page Git Product logo

dashboard's Introduction

Dashboard for Packit

dashboard.packit.dev

Packit logo

Dashboard for Packit Service.

Uses Packit Service API (or the staging API for the staging instance).

Local Development

Running the dashboard locally

# install dependencies
:~/dashboard $ make install-dependencies
# this will start the flask development server
:~/dashboard $ make run-dev-flask
# in another terminal
:~/dashboard $ make run-dev-frontend

# use the frontend application for development
# it will proxy non react requests to flask during dev
# read the Makefile for details

(you make have to use modify the make command if you want to run flask in a virtulenv instead of using python3-flask from the fedora repos.)

# to create a production build of react and/or any other javascript libs
:~/dashboard $ make transpile-prod
# now forget everything about npm, deploy flask the usual way

Running the dashboard in a container

:~/dashboard $ make run-container-stg

For more details, see the contribution guide.

Pre-commit

Note

For more details on pre-commit see https://github.com/packit/contributing#pre-commit

Running pre-commit is recommended for development, this will run a few tasks that are helpful

# install pre-commit on your system
:~/dashboard $ pip3 install pre-commit
# add pre-commit to git hooks for committing and pushing
:~/dashboard $ pre-commit install -t pre-commit -t pre-push

More Info

If you'd like to know more about packit, please check:

dashboard's People

Contributors

c3d avatar cathay4t avatar debdutgoswami avatar dependabot[bot] avatar icewreck avatar jpopelka avatar jreznik avatar jscotka avatar lachmanfrantisek avatar lbarcziova avatar majamassarini avatar mfocko avatar nforro avatar nikromen avatar pre-commit-ci[bot] avatar rfjbraunstingl avatar rishavanand avatar ritwickraj78 avatar rkpattnaik780 avatar sakalosj avatar shreyaspapi avatar softwarefactory-project-zuul[bot] avatar stefwalter avatar sudhanaruna avatar tomastomecek avatar venefilyn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

dashboard's Issues

Link Copr build result page from the test result page

Here is the current state of the test result page:

Screenshot from 2021-04-27 09-36-31

For comparison, in the Copr build result page, we have a link for an SRPM result page:

Screenshot from 2021-04-27 09-36-48

The task here is to:

  • enhance the packit API if needed
  • show the Copr build link in the details section

Not able to run app.py

Hi
I am a GSoC aspirant. I am looking forward to applying for GSoC in fedora.

I was trying to run app.py and I got this -
Screenshot from 2020-02-25 17-28-11
Screenshot from 2020-02-25 17-28-23

I want to know is app.py is the main entry point of the whole project or some other script is the main entry point?

Setup tests

  • Create some tests.
  • Setup the directory structure as we have in other projects.
  • Add Makefile target for that.
  • Make the tests in a way we can easily run them in the CI.

Breadcrumbs

Providing run ID in SRPM, Copr, Koji and TF API endpoints allows creating breadcrumbs for navigation through the whole pipeline of run builds or tests. Create a component that can be used at top of the result page for navigation through the pipeline. Optionally provide link to the pipeline result from #130

requests.exceptions.ConnectionError

Dashboard can be moody - The requests fail with Connection error sometimes:

127.0.0.1 - - [27/Jan/2020 16:39:33] "GET /projects/?__debugger__=yes&cmd=resource&f=debugger.js HTTP/1.1" 200 -
127.0.0.1 - - [27/Jan/2020 16:39:34] "GET /projects/?__debugger__=yes&cmd=resource&f=ubuntu.ttf HTTP/1.1" 200 -
127.0.0.1 - - [27/Jan/2020 16:39:34] "GET /projects/?__debugger__=yes&cmd=resource&f=console.png HTTP/1.1" 200 -
127.0.0.1 - - [27/Jan/2020 16:39:34] "GET /projects/?__debugger__=yes&cmd=resource&f=console.png HTTP/1.1" 200 -
127.0.0.1 - - [27/Jan/2020 16:39:56] "GET /projects/ HTTP/1.1" 500 -
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/flask/app.py", line 2309, in __call__
    return self.wsgi_app(environ, start_response)
  File "/usr/lib/python3.7/site-packages/flask/app.py", line 2295, in wsgi_app
    response = self.handle_exception(e)
  File "/usr/lib/python3.7/site-packages/flask/app.py", line 1741, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/lib/python3.7/site-packages/flask/_compat.py", line 35, in reraise
    raise value
  File "/usr/lib/python3.7/site-packages/flask/app.py", line 2292, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/lib/python3.7/site-packages/flask/app.py", line 1815, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/lib/python3.7/site-packages/flask/app.py", line 1718, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/lib/python3.7/site-packages/flask/_compat.py", line 35, in reraise
    raise value
  File "/usr/lib/python3.7/site-packages/flask/app.py", line 1813, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/lib/python3.7/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/dhodovsk/repos/github.com/packit-service/dashboard/main.py", line 76, in projects
    for build in all_from(f"{API_URL}/copr-builds"):
  File "/home/dhodovsk/repos/github.com/packit-service/dashboard/main.py", line 64, in all_from
    page = return_json(url_, method, **kwargs)
  File "/home/dhodovsk/repos/github.com/packit-service/dashboard/main.py", line 37, in return_json
    response = requests.request(method=method, url=url, **kwargs)
  File "/usr/lib/python3.7/site-packages/requests/api.py", line 60, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3.7/site-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python3.7/site-packages/requests/adapters.py", line 498, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
127.0.0.1 - - [27/Jan/2020 16:39:56] "GET /projects/?__debugger__=yes&cmd=resource&f=style.css HTTP/1.1" 200 -
127.0.0.1 - - [27/Jan/2020 16:39:56] "GET /projects/?__debugger__=yes&cmd=resource&f=jquery.js HTTP/1.1" 200 -
127.0.0.1 - - [27/Jan/2020 16:39:56] "GET /projects/?__debugger__=yes&cmd=resource&f=debugger.js HTTP/1.1" 200 -
127.0.0.1 - - [27/Jan/2020 16:39:56] "GET /projects/?__debugger__=yes&cmd=resource&f=ubuntu.ttf HTTP/1.1" 200 -
127.0.0.1 - - [27/Jan/2020 16:39:56] "GET /projects/?__debugger__=yes&cmd=resource&f=console.png HTTP/1.1" 200 -
127.0.0.1 - - [27/Jan/2020 16:39:56] "GET /projects/?__debugger__=yes&cmd=resource&f=console.png HTTP/1.1" 200 -

Stage icon

Would it be hard to use the stage icon in the stage deployment?

It's not so important but would be nice to match the behaviour on Github/GitLab where we use different avatars.

Screenshot from 2021-04-27 07-54-37

Screenshot from 2021-04-27 07-54-24

Screenshot from 2021-04-27 07-56-02

Link on logo

Logo on page links to the page itself. Clicking on it opens dashboard in new tab.

How to reproduce:

  1. Open dashboard
  2. Click on packit logo
  3. Dashboard gets opened in new tab

Expected outcome:

  1. Current page is switched to the homepage of dashboard

Result page(s)

  • Create a nice view of a single result. (We already have a table/list of them at https://dashboard.stg.packit.dev/jobs).
  • Basically, it should be a nice-looking variant of the old result page packit-service is providing.

Here is a list of information I would like to see for all job types:

  • Project name and link to the upstream
  • Information about upstream trigger (PR, branch, release) and link to it.
  • Human readable datetime.

In the case of SRPM, add:

In the case of Copr build, add:

In the case of Koji build, add:

In the case of Testing Farm result, add:

  • Link to the Copr Build view
  • Some status, basic result description
  • Link to the TF dashboard/result page
  • No alternative in the service.

I've described all the pages so we have a bigger picture and see if something can be shared/connected.

List of COPR builds

In the list of jobs, we provide URL to our own result pages in all cases except COPR

  • Switch URL to our result page (or add new column Results)

PR/MR description in the pipeline view

I spent the last day looking a lot into the Pipelines view and it would be really nice to get a PR/MR description when hovering on the PR/MR link.

Something like this:
Screenshot from 2021-08-02 22-01-05

Ignore projects without any handled item

Most of the project on the projects page is irrelevant because they don't handle any pr/issue/branch/release.

What about skipping those projects (they don't bring any value)? Or adding some option to opt-in/opt-out from listing them.

Better PR and release icon

I've been a bit confused about the PR icon in the project list.

Screenshot from 2020-11-04 09-30-52

What about something like this?

And we can maybe use fa-tag/fa-tags for release.

Or maybe something like upgrade:

List projects on instance or in the namespace

Now, I can't search all the projects on one git forge -- e.g. all the GitHub projects.

It would be nice to allow * or any regex?

A related one, what about treating empty field(s) as all(=*)?

So the task here is to:

  • allow a search of all projects on the git forge (only the first field is set) - done in #122
  • allow a search of all project for a namespace (only the forge and namespace is set) (EDIT by @lbarcziova: this already works with empty project field and * as well)

project pages violates CORS and cannot be loaded

We got a report from @msehnout that they cannot load https://dashboard.packit.dev/projects/github.com/osbuild/osbuild

Easily reproducible, the error is:

Unable to connect
There was an error retrieving data.

Console seems to suggest that:

Access to fetch at 'https://prod.packit.dev/api/projects/github.com/osbuild/osbuild' from origin 'https://dashboard.packit.dev' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

Do we just need to set some CORS-related header to make browsers happy?

Use icons for git forges

  • the forge icon at /projects/... is hardcoded to github right now, replace it with the correct one
  • Jobs view should also display git forge icon in every row

SRPM jobs: add datetime

I'd love to see a datetime of the SRPM build so that I know the timespan I am looking at.

Make the URL of Testing Farm results more visible

After helping someone with the TF today I feel like It's now not clear where a user can find more details about the TF result.

Screenshot from 2021-05-21 18-29-27

My concerns:

  • People don't need to know doest the Testing-Farm mean.
  • The term result is used as a link to the Copr build, not for the actual Test results.
  • The field names are not consistent (with or without URL).

AC:

  • Remove the "Testing Farm URL" field, and place the link on the Status text, that is "passed" or "failed" will be also a link to the testing farm page.
  • Instead of "Copr build: Results" say: "Copr build: Details"

Take the acceptance criteria as a suggestion.

Charts for jobs

The jobs page in Dashboard should show some useful charts.

TODO for @csomh to figure out what these should be.

Testing Farm results

Route: /results/testing-farm/<id>

We show <a> link for testing farm even though we do not have any link yet.

Link to the issues/pull-requests/branches of the repository

Each git forge has its own url scheme for issues, pull/merge requests and braches. Since we now provide the forge name and other repo details in the API, dashboard should make links according to the respective forge's url scheme.

  • /project.../issues
  • /project.../releases
  • the trigger column in jobs view should link to pull request or branch
  • copr link should be moved over to the build id column

RFE: Make successful build message more specific

The message for successful Copr builds looks like this:

Congratulations! One of the builds has completed. :champagne:

You can install the built RPMs by following these steps:

* `sudo yum install -y dnf-plugins-core` on RHEL 8
* `sudo dnf install -y dnf-plugins-core` on Fedora
* `dnf copr enable packit/nmstate-nmstate-852`
* And now you can install the packages.

Please note that the RPMs should be used only in a testing environment.

from nmstate/nmstate#852 (comment)

This could be more specific:

  • It mentions Fedora but Fedora is not part of the configured chroots
  • It mentions only RHEL 8 but it should also work for CentOS and probably also RHEL/CentOS 7 with the correct command
  • It does not mention how to install/update the packages but the information should also be available to packit.

Favicon

Favicons don't work for the dashboard. They are caught by the React and 404 gets returned.

Can be reproduced:

  • deployment of production and stage
  • locally via container

Cannot be reproduced:

  • locally via yarn

Project Page lacks filters

I'm pretty sure Adam Saleh story's are fascinating but regardless his storydrafts are not packaged in Fedora thus there needs to be means to filter such stuff out. That said you will pretty fast exhaust all infra's resources if everything and everyone is allowed to use packit for anything so I recommend that packit is limited only to official teams/maintainers and their official maintained packages in the distribution. ( If packit takes off for real then you are talking about what 14k+ components that will be using it )
packit-projects

[RFE] Add search functionality in the service "Jobs" tab

The Jobs tab of the service dashboard does not allow searching the list by any criteria. The list can be only sorted and not even by any column, only a subset of them.

One has to search on the page using the browser functionality, which is fine for new jobs, but not very convenient for jobs triggered e.g. 1 or 2 days ago. Due to pagination, one has to click multiple times to "Load More" jobs, until they find the specific one.

It would be great if the Jobs tab had a search functionality allowing to quickly find a specific job (or a set of jobs) based on various criteria (e.g. project name, PR number, etc...).

Home page is empty

There is no content being displayed on the dashboard other than "Dashboard Page Title" which is kinda useless...
packit-dashboard-home

Charts for projects

The project page in Dashboard should show some useful charts.

TODO for @csomh to figure out what these should be.

Single pipeline result page

Create a result page for single pipeline (ideally with merged runs). Try to use as much as possible from the result components used so far.

Edit:

  • make sure that all builds and tests are included in the view

Broken icons for Copr/Koji builds in pipeline view

How to reproduce:

  • lower width of view than full HD; by slowly narrowing the view it is possible to see the shrinking in progress

Doesn't happen with regular icons (can be seen on SRPM status on the screenshot), suspected bug on upstream.

Example:

Better Tooling ?

Our current way to compile/transpile Javascript is a custom webpack config, which we needed because React's default preconfigured Create React App toolchain (which itself is based on webpack) couldn't inject environment variables in JavaScript at build time.

I realized that it can do that now, but only with env vars starting with REACT_APP_.

React generally recommends writing your own webpack config if using it with something like flask, but we don't need any advanced webpack features so I think its time to retire our config.

On the flip side, switching to Create React App would give us:

  • Proper Code splitting and our final prod js bundle size is halved. (tested the half thing by compiling dashboard with CRA, but I think it can be reduced even more if we make it aware of routes later someday)
  • No need to maintain or rely on webpack.config.js
  • Warnings about bad JS/React practices
  • Better debugging (and better error messages during dev)

All this can be done by writing your own config, but its too complicated and I'm not a fan of the JS/npm ecosystem.

BTW, if we do this, we'll have to provide another env variable in openshift, something like REACT_APP_DEPLOYMENT because it needs to start with that.

All of the code will remain the same, but there might be some changes to the folder structure. I can do it next weekend if everyone is okay with it.

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.