teleren/devto huggingface dataset:
DYK: Generate PDF Reports of Grafana Dashboards with OpenNMS
Tags: blog, dashboard, grafana, pdfreport
Published: 2020-05-07 14:30:21

---
title: DYK: Generate PDF Reports of Grafana Dashboards with OpenNMS
published: true
date: 2020-05-05 19:29:04 UTC
tags: Blog,dashboard,grafana,PDF report
canonical_url: https://www.opennms.com/en/blog/2020-05-05-dyk-generate-pdf-reports-of-grafana-dashboards-with-opennms/?utm_source=rss&utm_medium=rss&utm_campaign=dyk-generate-pdf-reports-of-grafana-dashboards-with-opennms
cover_image: https://i.imgur.com/74fmzvG.png
---

OpenNMS makes it easy to generate PDF reports from [Grafana](https://grafana.com/ "Grafana") dashboards. You can also schedule and email these PDF reports to anyone:

- Keep staff without access to OpenNMS informed about network performance for improved capacity planning.
- Create a permanent, historic record of strategic information by retaining reports in your inbox and/or the OpenNMS reporting library.
- Create reports from _any_ Grafana dashboard whether or not it has OpenNMS data.

## **How It Works**

All you need is OpenNMS and an instance of Grafana with at least one dashboard and panel. OpenNMS allows you to create a PDF report for ANY Grafana dashboard, not just dashboards created using [OpenNMS Helm](http://docs.opennms.org/helm/branches/master/helm/latest/welcome/index.html "OpenNMS Helm"). Simply obtain the Grafana Viewer API key from your Grafana instance, plug it into the Grafana endpoint configuration in OpenNMS, and you’re ready to go.

## **Set It and Forget It**

With three templates (layouts) to choose from, your PDF can display one panel, two panels, or four panels per page. The templates have placeholders for each panel found on a Grafana dashboard.

OpenNMS connects with Grafana through the API key, retrieves a list of available dashboards, and displays them in the **Report Parameters** dialog:

![](https://www.opennms.com/wp-content/uploads/sites/3/2020/05/report-parameters.png)

Select a Grafana dashboard from the drop-down list, specify the time period for the report, and create a schedule to email the report to the people who need and want to see it.

From Dashboard to PDF:

![](https://www.opennms.com/wp-content/uploads/sites/3/2020/05/Dashboard-to-PDF.png)

## **Learn More!**

For detailed procedures on how to create PDF reports from Grafana dashboards with OpenNMS, see the [online documentation](https://docs.opennms.org/opennms/releases/latest/guide-admin/guide-admin.html#_creating_pdf_reports_from_grafana_dashboards_using_opennms_horizon "online documentation") or check out this [video](https://youtu.be/XQaneDgPP78 "video").
Welcoming Joe Doss to the DEV Team
Tags: meta
Published: 2020-05-05 19:10:38

---
title: Welcoming Joe Doss to the DEV Team
published: true
description: 
tags: meta
cover_image: https://thepracticaldev.s3.amazonaws.com/i/97a2sge9bgapcn6szuep.png
---

We are very excited to welcome Joe Doss to the DEV Team as our Principal Systems Architect.

Joe has been working in tech for 20+ years, is a serious Linux user, and has made significant contributions to open source. He's joining us from Kenna Security, where he was the Director of Engineering Operations. 

The Principal Systems Architect is responsible for helping us set up and maintain the infrastructure we need to empower more people to build communities. It's not an easy task, and we're so happy to have found the right person for the job. 

To learn more about Joe's background and motivation for joining DEV, check out his post below: 

{% link https://dev.to/jdoss/hello-world-systems-engineering-1i60 %}

![creepy-one-of-us](https://media.giphy.com/media/W1lflsvjc6n101G0W4/giphy.gif)


Please give Joe a warm welcome!
This 20-Year-Old Virus Infected 50 Million Windows Computers In 10 Days: Why The ILOVEYOU Pandemic Matters In 2020
Tags: virus, windows, worm, trojan
Published: 2020-05-05 19:09:27

On May 4, 2000, users of Windows computers began receiving an email with a malicious attachment. Within just ten days, some fifty million infections were reported, and it has been estimated that as many as 10% of the internet-connected computers in the world ultimately caught the ILOVEYOU virus.
The economic impact was equally massive, with some putting the eventual cost of removing the infection and recovering deleted files from backups as high as $10 billion (£8.3 billion) by the time the dust had settled. The Pentagon, the CIA and the U.K. Parliament all closed down their email systems in response to the incident.

Unsurprisingly, ILOVEYOU dominated the news headlines globally at the time. The spread of the infection was accelerated because victims were largely complacent to the threat it posed initially, and the devastating impact of the virus would have been significantly reduced if expert warnings from years before had been heeded. Substitute COVID-19 for ILOVEYOU and those words could so easily apply today.
My response to: What are your salary expectations in this role?
Tags: salary, jobsearch, hiring, interview
Published: 2020-05-05 18:57:50

I never like to talk about salary unless I know what I am signing up for and what are the benefits, drawbacks, stress level, growth opportunities, available vacation, sick leave policy, whether or not I need to be on call outside of working hours, the level of responsibility I have for team members, the meeting to coding ratio, the non-development work, the possibility of future raises and promotions, the stability of the company etc. However, since you asked, anywhere between 120K and 70K, pending the aforementioned variables. :-)
Accessing Prismic Releases Programmatically
Tags: cypress, prismic, e2etesting, javascript
Published: 2020-05-05 18:51:04

---
title: Accessing Prismic Releases Programmatically
published: true
description: How to programmatically access Prismic releases
tags: Cypress, Prismic, E2E Testing, JavaScript
---

I have been working with the Prismic CMS for the past several months and ran into a problem running Cypress E2E tests with Prismic data that was not yet in a published [release](https://user-guides.prismic.io/en/articles/778358-what-is-a-release).

The tests fail because the Prismic data isn’t available (not published) and the view isn’t rendered.  

When you are developing locally there is no issue, because you have access to the **release** preview link, but I needed a way to access Prismic releases programmatically in my staging and testing environments.

I am primarily querying by Uid in a Node environment which looks like this:

```
api.query(
  Prismic.Predicates.at('my.docName.uid', 'uid')
);
```

[The Prismic docs mention a query option ref](https://prismic.io/docs/javascript/query-the-api/query-options-reference#32_0-ref), so I could simply create an env variable and pass it in like this:
```
api.query(
  Prismic.Predicates.at('my.docName.uid', 'uid'),
  {
    ref: process.env.PRISMIC_RELEASE_REF
  }
);
```

I also need to create a token that allows refs other than master be queried. That can be found at https://your-repository-name.prismic.io/settings/apps > API & Security.

The final step is finding my release ref uid. An easy way to find it is in the Prismic API browser which is located at:
https://your-repository-name.prismic.io/api/v2

![alt text](https://images.prismic.io/prismicio-docs%2Fd8077650-c681-4b34-a8a0-46de62ae691a_ref_browser.gif?auto=compress,format "gif showing how to find the release ref")
or when you init the api the refs are listed under `data.refs`

Plug that into your config and you’ll be off and running with passing E2E tests. ✅
Learn CSS3 - web development
Tags: css, webdev, html, codenewbie
Published: 2020-05-05 18:43:28

## Course Screenshot

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/21x348jcudh8wuzul9xr.png)

## Intro

This is the course where I have put my heart and soul into creating one, which would help a lot of Web Development fans to learn more about it. In this course, I have covered all the topics that you need to know with the CSS3 using which you will gain the confidence to learn advanced Frameworks and libraries.

## Why this course?

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/phikpzj41199yzkgykkd.png)

This is the course content, all that you will learn from the course. I will also be uploading more videos to the course within 2 weeks from the day of request for any videos from the students.

## About me

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/xjqi6xjdw6h72mz9gce1.png)

I have been into Web development for a long time and been teaching it for a couple of years now. Lots of feedback has helped me improve my teaching skills.

## Link To enroll

https://www.udemy.com/course/web-dev-css/?couponCode=CSS_DEV

Click on the link to enroll yourself in the Udemy Course. **It would be kind of you if you could give me a 5-star rating for the course.**

# Learn JavaScript complete course for free, find it in this post
{% link https://dev.to/tharunshiv/free-course-learn-javascript-in-7-hours-540e %}
Learn JavaScript in 7 hours
Tags: javascript, webdev, tutorial, motivation
Published: 2020-05-05 18:15:35

## Course Screenshot

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/u668tfz8mqopui5gxxpy.png)


## Intro

This is the course where I have put my heart and soul into creating one, which would help a lot of JavaScript fans to learn more about it. In this course, I have covered all the topics that you need to know with the JavaScript ES6 using which you will gain the confidence to learn advanced Frameworks and libraries.

## Why this course?

![screenshot](https://dev-to-uploads.s3.amazonaws.com/i/nsgbtvypmywub4p8eexs.png)

This is the course content, all that you will learn from the course. I will also be uploading more videos to the course within 2 weeks from the day of request for any videos from the students.

## About me

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/xjqi6xjdw6h72mz9gce1.png)

I have been into Web development for a long time and been teaching it for a couple of years now. Lots of feedback has helped me improve my teaching skills.

## Coming up in the course

I will also be uploading a series of videos in which we will build a PWA Project that uses the JavaScript DOM Concepts and refreshes up of the concepts in the course.You can look at the final webapp here: http://bit.ly/stick-it-notes

## Link To enroll

Learn complete JavaScript at https://www.udemy.com/course/javascript-tharunshiv/?referralCode=6326CE49CCF4074B11CE

Click on the link to enroll yourself in the Udemy Course. **It would be kind of you if you could give me a 5-star rating for the course.**

Written by,
{% user developertharun %}

# Thank you for reading, This is Tharun Shiv a.k.a Developer Tharun

![Tharun Shiv](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xtxq6bdms36fmn62450h.png)
+Con Online 2020
Tags: eventsinyourcity, techtalks, sre, datascience
Published: 2020-05-05 18:12:18

#  ¿Qué es +CON Online 2020?
Incripciones (https://mascon-online.eventbrite.com)

+Con es un gran evento que ofrece conferencias de diversas áreas, siempre orientadas al desarrollo. El objetivo de +Con es unir a todas las comunidades de desarrolladores, diseñadores y otros y dar a conocer otras tecnologías.

El evento está dirigido a todos los niveles de conocimiento, abarcando desde estudiantes o aficionados, hasta profesionales de alto nivel de desempeño.

__Si bien la entrada no posee valor monetario, pedimos una donación que luego serán donados al comedor Los Angelitos de Dios - Mendoza - Argentina.__

** *Evento en español*


## ¿Cuándo?
> Jueves 15 de Mayo, 2020. 
> 17:00 | 22:00
> YouTube Live Stream

## Perfil de la audiencia
- Entusiastas de la tecnología.
- Desarrolladores.
- Diseñadores.
- Estudiantes y graduados de carreras relacionadas a los Sistemas. 
- Aficionados.

## Oradores
- [Hosward Rodriguez - Product Analyst en Eventbrite](www.linkedin.com/in/hosward)
- [Juan Jose Ciarlante - SRE at Bitnami (acquired by VMware)](
https://www.linkedin.com/in/jjocv)
- [Mariano Vallés - Tonsser Aps. Now freelancer](twitter.com/zucaritask)
- [Matias Chomicki - Full stack developer en SolarWinds](github.com/matyax)
- [Vinicius Pacheco - Software Architecture at Flieber](
https://twitter.com/viniciuspach)
Is AI really intelligent?
Tags: machinelearning, discuss
Published: 2020-05-05 18:01:22

I'm a computer science student who started his journey in Machine Learning not long ago and as I kept moving on and studying some learning algorithms and many more this question came up to me. Is AI really intelligent?

## What I think
For me, I'll say AI isn't that smart. Everything we've done is a nice try but we've gotten nowhere making computers smart.

AI to me is just an imitation game, why would I say this? You'll realize it more when you see some of the applications of AI in visual arts, music, and writing screenplays. It's unable to create but to imitate. It simply tries to find patterns in the data it's fed and the funny thing is that even if none exists it still finds you something.

## The difference
When a human is fed with different paintings from different painters, he/she studies their individual artistic styles and uses it as a guide to creating something new but what AI will do is to just combine these paintings for you.

## My definition of AI
Using mathematical formulas to find patterns in data and giving out an output that falls within that same pattern. Which humans can also do the hard way.

Hence, I'll say AI is cool but it's just an imitation game. What do you think?
you committed a dirty schema, eh?
Tags: ruby, beginners, rails, git
Published: 2020-05-05 17:53:45

You know when work gets assigned to you - you buckle down and focus, right? All of a sudden, you're hit with a different assignment. **UGH!**  To quote the little voice in my head:

> "Context switching is a bitch." 

![It's a bitch](https://media.giphy.com/media/tw5TJsxY8k49y/giphy.gif)

This is the case for all knowledge workers. We can agree tripping on the floor, getting a scab - that's annoying! Let me introduce you to the scab of context switching: a dirty schema.

#### Andy's Dictionary:
> **Dirty schema** - a pull request ready for review with changes to the database schema file not related to the pull request. 

![andysdictionary](https://media.giphy.com/media/JrGlLg0Ycz3XrufJ40/giphy.gif)

I get dirty schemas switching git branches. Typically after switching branches with **different migrations files already ran** in each branch. It's a common problem dealing with the the nature of migration files.

Here's a solution that's worked for me: **migrate your database back to its original state before switching git branches**. The state of your database isn't pristine until performing a rollback to the initial state of the branch. After doing so, switching to a different branch with migrations will migrate with a reliable schema.

#### Tips to switch branches with a clean schema:
1. Find the branch with the unneeded changes to your schema, find the migration file with the changes... look for the timestamp - `db/migrate/20160204222302_add_name_to_user.rb`.. so `20160204222302`
2. Run `$ bundle exec rails db:migrate:down VERSION=<timestamp>`
3. Run `$ git checkout db/schema.rb` so git doesn't save the migration changes.
4. Switch branches to continue working.

If you're savvy, you can automate this with a script. That's a post for another time.

If you fucked up and have a dirty schema, you can still recover. The real question is.. at what cost? My particular solution will wipe out your local database, but you'll have a clean schema to open a pull request. This is convenient when you're meeting deadlines and it's all systems go! 

I've since discovered other dirty schema solutions, but this is a beginner post. It's only right I share with you my solution when I was starting out.

#### Beginner dirty schema solution
``` bash
$ bundle exec rake db:drop
$ bundle exec rake db:create
$ git rm db/schema.rb
$ bundle exec rake db:migrate
$ bundle exec rake db:seed
```

- Drop your database
- Create a new instance
- Delete your current schema.
- Run `$ bundle exec rake db:migrate` - this creates a new schema reflecting the migration files in `db/migrate`
- Run your development seed. You're now at a clean slate. This is only useful if your local data isn't important to you

It's not sexy, but it works.
What are your favorite themes for your IDE/Shell?
Tags: discuss, productivity, webdev
Published: 2020-05-05 17:33:52

---
title: What are your favorite themes for your IDE/Shell?
published: true
description: 
tags: discuss, productivity, webdev
---

I'm on the hunt for a new VIM/VSCode/ZSH theme, I'd love to hear what your favorite ones are! (Mine will be in the comments)
Myanmar Language
Published: 2020-05-05 17:15:07

To test that the following is a correct sentence.
မင်္ဂလာပါ


![Rey Tech Logo](https://dev-to-uploads.s3.amazonaws.com/i/u91gfviajj3hf3z08emv.png)

```java
public static void main(String[] args){
  System.out.println("Hello World");
}
```

```python
print("Hello World")

i = 0
if i = 1:
 print("i= " + str(i))
else:
 print("i= " + str(i))
```

```html
<dl>
  <dt>Definition list</dt>
  <dd>Is something people use sometimes.</dd>

  <dt>Markdown in HTML</dt>
  <dd>Does *not* work **very** well. Use HTML <em>tags</em>.</dd>
</dl>
```


```diff
+ const newMethodName = (a, b) => {
- const myMethod = (a, b) => {
    return a + b
 }
```

{% runkit%}
// visible, reader-editable JavaScript code goes here
main()
function main(){
  hello();
}
function hello() {
  const hiddenVar = 42
  console.log(hiddenVar)
  console.log("hello world")
}
{% endrunkit %}
Fikir veren girişimcilik bankası.
Published: 2020-05-05 16:58:27

Fikirbanka; faizsiz ve masrafsız, sıra bekleme derdi olmadan kullanabileceğiniz dünyanın ilk fikir bankası olarak kuruldu. Sıradan bankaların aksine Fikirbanka, para birimi olarak bilgiyi, faiz olarak yüksek kaliteyi, masraf olarak da yalnızca harcamak istediğiniz kadar zamanınızı kullanıyor. Dorebar Teknoloji Hizmetleri iştiraki olarak 9 Şubat 2017 tarihinde mesaisine başlayan dünyanın ilk fikir bankası, sürekli olarak yerel ve ulusal fikir piyasalarının nabzını tutup, fikirlere değer katarak kendi borsasını oluşturuyor.

[Fikir Banka](https://www.fikirbanka.com.tr/)
forEach loop
Tags: javascript, beginners
Published: 2020-05-05 16:53:40

---
title: forEach loop
published: true
description: forEach loop
tags: javascript, beginners
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/j81rutpyhthktq606waz.jpg
---
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/tqgotjbqa8c4m8xy56vy.png)
In my opinion, forEach loop is super cool, elegant and short.
In the code above you may see that forEach loop takes three arguments, but most of the time you will only use the current value to do stuff.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/ehljcizrkcami10bmrto.png)
We may use a call back to make a code shorter or the normal function.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/zpnkismz4of90i86jamn.png)
If we need to show the index we can do this.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/rq11ex7zv2izifvrvaej.png)
It`s fun and simple. If you want to know more about forEach loop here is the link
[forEach loop MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)
100daysofcode Flutter
Tags: 100daysofcode, flutter
Published: 2020-05-05 16:49:34

day 57/100 of #100daysofcode #Flutter
Learning Flutter , courses Udemy from
@maxedapps

Today implements http.get , some logic with loading , play with Map ( for each , as Map) , reversed.list
https://github.com/triyono777/100-days-of-code/blob/master/log.md
How to get JSON.stringify formatted
Tags: todayilearned, javascript
Published: 2020-05-05 16:27:21

Today I learned how to get the JSON stringified string to be human-readable, which could be nice when saving the data to a file, with `JSON.stringify(value, null, 2)`.

```js
const characters = [
  {
    name: 'Mario',
    color: 'red'
  },
  {
    name: 'Luigi',
    color: 'green'
  }
];

const oneLine = JSON.stringify(characters) ;
const readable = JSON.stringify(characters, null, 2);

console.log(oneLine);
/* "[{"name":"Mario","color":"red"},{"name":"Luigi","color":"green"}]" */

console.log(readable);
/*
"[
  {
    "name": "Mario",
    "color": "red"
  },
  {
    "name": "Luigi",
    "color": "green"
  }
]"
*/
```

See how adding 2 as the third parameter helped us. Especially if the list would have been larger. The number 2 is the number of spaces you want. For tab, you can use `JSON.stringify(characters, null, '\t')`.
The Viewport & The Responsive web Design
Tags: viewport, responsivedesign, frontend, webdev
Published: 2020-05-05 16:09:28

# What is the viewport?

The viewport is the area of a browser which shows the content of your website. The viewport can be different for devices of various sizes. If the content of the website does not fit in your browser's viewport, the browser adds scroll bar to make it accessible.

*A viewport is neither the size of the windows of your browser nor the screen resolution. For the same window size, a browser with more toolbars displayed will have a smaller viewport.*

Devices with a narrow screen, e.g. mobiles,  render pages in a virtual viewport which has a width of a desktop screen and then shrink the pages to fit in the mobile screens to show all of the content at once.  That allows users to pan and zoom to see different areas of the page. 

This mechanism works well for the pages which are not optimized for small screens. But it does not work well for the pages which are optimized for small screens.
To solve this problem, we use the **viewport meta tag**. A mobile-optimized website should contain a **viewport meta tag** like:

`<meta name="viewport" content="width=device-width, initial-scale=1">`

Here width is the width of the viewport, and It can be set to a specific number of pixels or to device-width, which is the width of the screen in CSS pixels at a scale of 100%. The initial scale property controls the zoom level for the first load of the page.

Apart from these two, there are some other properties available which we can use to control the viewport.
E.g.
- **height**: To control the height of the viewport of the device.
- **minimum-scale:** To control the minimum zoom level to which a user can zoom the page.
- **maximum-scale**: To control the maximum zoom level to which a user can zoom the page.
- **user-scalable**: To control if a user can zoom in or out. (value= yes/no).