v-ngu / backstage-plugin-bulletin-board Goto Github PK
View Code? Open in Web Editor NEWBulletin Board is a Backstage plugin that allows you to share interesting ideas, news and links with your teammates.
License: MIT License
Bulletin Board is a Backstage plugin that allows you to share interesting ideas, news and links with your teammates.
License: MIT License
Earlier, i had backstage 1.17.5
installed, also I was using the newest version of bulletin plugin but after upgrading backstage to 1.20.2
version, it is giving error on docker image build, With new backstage version we have required node version greater than 16.
Error:
yarn run v1.22.19
$ tsc
packages/backend/src/plugins/bulletin-board.ts:11:5 - error TS2322: Type 'import("/home/il58d0/smb/backstage-conf-repo/backstage-conf-repo-original/node_modules/@backstage/backend-plugin-api/dist/index").DatabaseService' is not assignable to type 'import("/home/il58d0/smb/backstage-conf-repo/backstage-conf-repo-original/node_modules/backstage-plugin-bulletin-board-backend/node_modules/@backstage/backend-plugin-api/dist/index").DatabaseService'.
The types returned by 'getClient()' are incompatible between these types.
Type 'Promise<import("/home/il58d0/smb/backstage-conf-repo/backstage-conf-repo-original/node_modules/knex/types/index").Knex<any, any[]>>' is not assignable to type 'Promise<import("/home/il58d0/smb/backstage-conf-repo/backstage-conf-repo-original/node_modules/backstage-plugin-bulletin-board-backend/node_modules/@backstage/backend-plugin-api/node_modules/knex/types/index").Knex<any, any[]>>'.
Type 'import("/home/il58d0/smb/backstage-conf-repo/backstage-conf-repo-original/node_modules/knex/types/index").Knex<any, any[]>' is not assignable to type 'import("/home/il58d0/smb/backstage-conf-repo/backstage-conf-repo-original/node_modules/backstage-plugin-bulletin-board-backend/node_modules/@backstage/backend-plugin-api/node_modules/knex/types/index").Knex<any, any[]>'.
The types of 'raw(...).transacting' are incompatible between these types.
Type '(trx: import("/home/il58d0/smb/backstage-conf-repo/backstage-conf-repo-original/node_modules/knex/types/index").Knex.Transaction<any, any[]>) => import("/home/il58d0/smb/backstage-conf-repo/backstage-conf-repo-original/node_modules/knex/types/index").Knex.Raw<any>' is not assignable to type '(trx: import("/home/il58d0/smb/backstage-conf-repo/backstage-conf-repo-original/node_modules/backstage-plugin-bulletin-board-backend/node_modules/@backstage/backend-plugin-api/node_modules/knex/types/index").Knex.Transaction<any, any[]>) => import("/home/il58d0/smb/backstage-conf-repo/backstage-conf-repo-original/no...'.
Types of parameters 'trx' and 'trx' are incompatible.
Type 'Transaction<any, any[]>' is missing the following properties from type 'Transaction<any, any[]>': comment, except, havingNull, havingNotNull, updateFrom
11 database: env.database,
~~~~~~~~
node_modules/backstage-plugin-bulletin-board-backend/dist/index.d.ts:8:5
8 database: PluginDatabaseManager;
~~~~~~~~
The expected type comes from property 'database' which is declared here on type 'RouterOptions'
Found 1 error in packages/backend/src/plugins/bulletin-board.ts:11
Hi - thanks for the plugin, I've been playing around with it and it looks promising. Just randomly noticed - should the Open URL
button even be displayed if no URL is provided, since it's an optional field? Seems pretty straightforward, I could help contribute with a PR if we think that makes sense.
I have recently installed the bulletin board and trying to test by adding the new ideas via bulletin board screen. After clicking save button, it is giving 500 on network tab. The network trace is mention below -
API URL - http://localhost:7007/api/bulletin-board/bulletins
PAyload - {"id":"DQeoA75Nf6y_NtGUxl-ba","title":"React","url":"https://legacy.reactjs.org/docs/context.html","description":"React description","tags":[],"user":null}
Response -
{
"error": {
"name": "error",
"message": "insert into "bulletins" ("bulletin_description", "bulletin_id", "bulletin_tags", "bulletin_title", "bulletin_url", "created_at", "created_by", "updated_at", "updated_by") values ($1, $2, $3, $4, $5, $6, $7, $8, $9) - null value in column "created_by" of relation "bulletins" violates not-null constraint",
"length": 392,
"severity": "ERROR",
"code": "23502",
"detail": "Failing row contains (DQeoA75Nf6y_NtGUxl-ba, React, React description, https://github.com/Maersk-Global/gco-test-dotnet/blob/main/catal..., , null, null, 2023-06-20 08:41:56.468+00, 2023-06-20 08:41:56.468+00).",
"schema": "public",
"table": "bulletins",
"column": "created_by",
"file": "execMain.c",
"line": "1968",
"routine": "ExecConstraints",
"stack": "error: insert into "bulletins" ("bulletin_description", "bulletin_id", "bulletin_tags", "bulletin_title", "bulletin_url", "created_at", "created_by", "updated_at", "updated_by") values ($1, $2, $3, $4, $5, $6, $7, $8, $9) - null value in column "created_by" of relation "bulletins" violates not-null constraint\n at Parser.parseErrorMessage (/Users/vaibhav.shimpi/source/repos//node_modules/pg-protocol/dist/parser.js:287:98)\n at Parser.handlePacket (/Users/vaibhav.shimpi/source/repos//node_modules/pg-protocol/dist/parser.js:126:29)\n at Parser.parse (/Users/vaibhav.shimpi/source/repos//node_modules/pg-protocol/dist/parser.js:39:38)\n at Socket. (/Users/vaibhav.shimpi/source/repos//node_modules/pg-protocol/dist/index.js:11:42)\n at Socket.emit (node:events:513:28)\n at Socket.emit (node:domain:489:12)\n at addChunk (node:internal/streams/readable:324:12)\n at readableAddChunk (node:internal/streams/readable:297:9)\n at Readable.push (node:internal/streams/readable:234:10)\n at TCP.onStreamRead (node:internal/stream_base_commons:190:23)"
},
"request": {
"method": "POST",
"url": "/bulletins"
},
"response": {
"statusCode": 500
}
}
Hello!!
Thanks for the plugin! I'm using in my company. It's is very useful!
Could you add custom title and subtitle?
Like this:
type Props = {
title?: string;
subtitle?: string;
};
export const BulletinBoardPage = (props: Props) => {
...
<Header title={props.title ?? 'Bulletin Board'} subtitle={props.subtitle ?? 'A basic place to share ideas and links with your team.'} />
Thank You!!!
Add Backstage permission framework support to control who can post new / edit / see specific bulletins. See the docs from https://backstage.io/docs/permissions/plugin-authors/01-setup
Add analytics support to the plugin by utilizing the @backstage/core-plugin-api
useAnalytics
hook. Analytics could be collected from for example posting of a new bulletin, editing it, deleting it or opening the bulletin URL.
If you want to go back to update a card with tags, text, or even the link, the default sort is by updated_at time.
This is quickly growing confusing as we have more important updates to show but older cards are coming up and appearing as newer because they only highlight the last update time.
I will create a PR for this, but I want to allow the users the option to select which filter they want with 2 current options, updated_at and created_at.
Additionally, the subtitles of the cards when displayed should show information based on this filter. Currently, it should last update time from the current time, but if you selected created_at it will show the time since it was created.
Hey it would be nice for backstage users to receive mails every time a new bulletin card is created or every time a card is created with a specific tag. WDYT?
To make most of this great plugin, you could also provide a Search Collator for the backend to be able to search bulletins from the Backstage search. It's quite easy to do by just providing a CollatorFactory
that implements the DocumentCollatorFactory
from @backstage/plugin-search-common
. You can check my Q&A plugin as a reference https://github.com/drodil/backstage-plugin-qeta/blob/main/plugins/qeta-backend/src/search/collators/QetaCollatorFactory.ts
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.