I wanted to know if we can remove options like "dev tools","monitering" etc from kibana page , localhost:5601. I want to have only Dashboard visualization options .
Nevermind, I found one way to do this by modifying src/core_plugins/kibana/index.js , deleting these blocks
{
id: 'kibana:dev_tools',
title: 'Dev Tools',
order: 9001,
url: '/app/kibana#/dev_tools',
description: 'development tools',
icon: 'plugins/kibana/assets/wrench.svg'
}, {
id: 'kibana:management',
title: 'Management',
order: 9003,
url: `${kbnBaseUrl}#/management`,
description: 'define index patterns, change config, and more',
icon: 'plugins/kibana/assets/settings.svg',
linkToLastSubUrl: false
}
and other blocks as per your need
Related
I have several collections with my Netlify CMS site, all worked fine, but needed to add a new one which is not working on the live site.
I’ve added a new collection to the config file, which works flawlessly in a local environment (I can see the content of the folder referenced in the CMS, all entries are editable, I can create new ones or delete them) but this new collection shows up empty in the live environment - no entries are visible in the live CMS.
I got no error in the console, no build errors either.
I’ve tried to create an entry on the live site, which shows up in the CMS, but not on the site itself, and when I pull it, the newly created page/.md is not getting added to the folder where the other entries are - cannot be found locally.
The site itself displays the content of the folder - all articles show up on the site that were visible in the local CMS environment.
The newly created collection is a copy of a working one (tried it multiple times with different naming) and no matter how I renamed it, each try produced the same result - shows up locally, not in the live CMS.
Any ideas what should I do to display the content of the folder in the live CMS?
a trimmed version of the config file:
backend:
name: git-gateway
branch: main
media_folder: "public/logos"
public_folder: "/logos"
logo_url: "/img/cb_logo.svg"
local_backend: true
collections:
- name: "review"
editor:
preview: false
label: "Reviews"
folder: "src/review"
create: true
slug: "{{slug}}"
fields:
- {label: "Page Title", name: "pagetitle", widget: "string", hint: "Displayed in browser tabs", default: "placeholder text" }
- {label: "Page meta description", name: "pagemeta", widget: "string", required: false }
- name: "article"
editor:
preview: false
label: "Articles"
folder: "src/article"
create: true
slug: "{{slug}}"
fields:
- {label: "Title for Page URL", name: "title", widget: "string", default: "url-friendly-text" }
- {label: "Page Title", name: "pagetitle", widget: "string", default: "placeholder text" }
"Articles" is the one that shows as an empty collection on the live site.
The project folder structure:
src/
_data/
_includes/
assets/
article/
review/
I followed the instructions to use Sass in my Docusaurus v2 project, but I get the following error when I run yarn start:
Error: Cannot find module 'docusaurus-plugin-sass'
My config file is straight out of the box:
module.exports = {
title: '...',
tagline: '...',
url: '...',
baseUrl: '/',
favicon: 'img/favicon.ico',
organizationName: '...', // Usually your GitHub org/user name.
projectName: '...', // Usually your repo name.
themeConfig: {
navbar: {...},
footer: {...},
},
presets: [
[
'#docusaurus/preset-classic',
{
docs: {...},
blog: {...},
theme: {
customCss: require.resolve('./src/scss/index.scss'),
},
},
],
],
plugins: ['docusaurus-plugin-sass'],
};
Is this a bug or am I missing something?
Few things to check
Did you add docusaurus-plugin-sass to your package.json?
If you're using alpha.56, take note of the following change - https://github.com/facebook/docusaurus/releases/tag/v2.0.0-alpha.56
If you refer to modules (plugins) in your config file in a string form, you will need to replace them with require.resolve calls, for example:
- plugins: ['#docusaurus/plugin-google-analytics']
+ plugins: [require.resolve('#docusaurus/plugin-google-analytics')]
Here is the relevant portion of my config.yml for NetlifyCMS where I want to use Uploadcare's image widget to select multiple images for a gallery:
media_library:
name: uploadcare
config:
publickey: mypublicapikey
media_folder: "/src/images/"
public_folder: "/src/images/"
collections:
- label: "Projects"
name: "projects"
folder: "src/data/projects"
media_folder: 'images'
media_library:
name: uploadcare
config:
publickey: mypublicapikey
fields: # The fields for each document, usually in front matter
- {label: "Image", name: "image", widget: "image", allow_multiple: false}
- label: "Gallery Images"
name: "images"
widget: "image"
options:
media_library:
config:
multiple: true
previewStep: false
This results in a widget where I can only select one image. I have tried shift/ctrl/ctrl+shift clicking additional entries but it doesn't work. The docs say allowing for multiple images is the default, but this is not the behavior I am experiencing.
To get Uploadcare working, you may need to install the uploadcare plugin for netlify-cms:
npm i netlify-cms-media-library-uploadcare --save
I followed the solution posted here, to break it down:
Create a cms folder in src
Add a cms.js file to the src/cms folder
Add this code:
import CMS from 'netlify-cms-app'
import uploadcare from 'netlify-cms-media-library-uploadcare';
CMS.registerMediaLibrary(uploadcare);
Then follow the docs for Uploadcare.
I have tried following numerous tutorials on connecting Drupal, and GatsbyJS. For instance, in this article, I get to step 4.3b, "Pull Content from the Drupal 8 site using GraphQL" before everything fails.
I have followed every instruction, but GraphQL seems to be pulling from the temporary Gatsby page rather than the Drupal site I made. Queries such as "allNodeBlog" don't exist, and I'm not sure how to fix everything so I can get to pulling information from my Drupal JSON API page rather than the Gatsby site.
Any help/advice would be great. And/or articles that aren't simply the first Googled "Drupal and Gatsby" help sites (as I've looked at them all).
module.exports = {
siteMetadata: {
title: 'Gatsby Default Starter',
},
plugins: [
'gatsby-plugin-react-helmet',
{
resolve: 'gatsby-source-drupal',
options: {
baseUrl: 'http://gatsbydrupal.dd:8083/',
apiBase: 'api', // endpoint of Drupal server
},
},
{
resolve: `gatsby-plugin-manifest`,
options: {
name: 'gatsby-starter-default',
short_name: 'starter',
start_url: '/',
background_color: '#663399',
theme_color: '#663399',
display: 'minimal-ui',
icon: 'src/images/gatsby-icon.png', // This path is relative to the root of the site.
},
},
'gatsby-plugin-offline',
],
}
I am changing only a couple of pages but docpad seems to render everything again. I'm not using any fancy plugins or dynamic components - just the basic ghost template. Are there some techniques to make less pages render?
maybe its something to do with the timestamp format in the docpad.coffee ?
moment = require('moment')
docpadConfig = {
templateData:
vars:
appserver: 'http://xxx'
site:
title: 'Pocket Tutor'
tagline: 'English language chat tutor'
description: 'Learn english by chatting'
logo: '/uploads/images/corpid/comiceng/96/logo-96.png'
url: 'http://app:9005'
cover: '/img/cover.jpg'
navigation: [
{
name: 'Home',
href: '/',
section: 'home'
},
{
name: 'About',
href: '/about.html',
section: 'about'
},
{
name: 'Lessons',
href: '/tags/lessons.html',
section: 'tag-lessons'
},
{
name: 'Grammar',
href: '/tags/grammar.html',
section: 'tag-grammar'
}
{
name: 'Teachers',
href: '/tags/tech.html',
section: 'tag-tech'
},
]
author:
name: 'Rikai Labs'
img: ''
url: 'http://rikai.co'
website: 'http://RIKAI.co'
location: 'space',
bio: 'we build chat apps'
getPreparedTitle: -> if #document.title then "#{#document.title} | #{#site.title}" else #site.title
getDescription: -> if #document.description then "#{#document.description} | #{#site.description}" else #site.description
bodyClass: -> if #document.isPost then "post-template" else "home-template"
masthead: (d) ->
d = d || #document
if d.cover then d.cover else #site.cover
isCurrent: (l) ->
if #document.section is l.section then ' nav-current'
else if #document.url is l.href then ' nav-current'
else ''
excerpt: (p,w) ->
w = w || 26
if p.excerpt then p.excerpt else p.content.replace(/<%.+%>/gi, '').split(' ').slice(0, w).join(' ')
encode: (s) -> encodeURIComponent(s)
slug: (s) -> return s.toLowerCase().replace(' ', '-')
currentYear: -> new Date().getFullYear()
time: (ts, format) ->
format = format || 'MMMM DO, YYYY'
ts = new Date(ts) || new Date()
moment(ts).format(format)
collections:
posts: ->
#getCollection("html").findAllLive({active:true, isPost: true, isPagedAuto: {$ne: true}}, {postDate: -1}).on "add", (model) ->
model.setMetaDefaults({layout:"post"})
plugins:
tags:
extension: '.html'
injectDocumentHelper: (doc) ->
doc.setMeta { layout: 'tag' }
rss:
default:
collection: 'posts'
url: '/rss.xml'
marked:
gfm: true
environments: # default
development: # default
# Always refresh from server
maxAge: false # default
# Only do these if we are running standalone via the `docpad` executable
checkVersion: process.argv.length >= 2 and /docpad$/.test(process.argv[1]) # default
welcome: process.argv.length >= 2 and /docpad$/.test(process.argv[1]) # default
prompts: process.argv.length >= 2 and /docpad$/.test(process.argv[1]) # default
# Listen to port 9005 on the development environment
port: 9005 # example
production:
port: 9005
maxAge: false # default
}
module.exports = docpadConfig
update: stubbing out the date and time methods
time: -> 'time'
currentYear: -> 'year'
gives a little speed up but still making one edit to one file gives info:
Generated 40/150 files in 7.364 seconds
update2: added
standalone: true
to some pages to test, but still takes
info: Generated 40/150 files in 7.252 seconds
so even a single standalone page triggers a bunch of other stuff.
It is possible to handle the Docpad regeneration process manually. To do this you need to turn off Docpad's watch. That is, run Docpad with the docpad server command. What will happen here is that it doesn't matter how many times you edit a document it will not be loaded into the docpad collection. You will then have to load any updates manually. That is, have some code to load the document.
model = #docpad.getCollection('posts').findOne({someValue: someValue})
model.load()
Following that trigger the regeneration.
#docpad.action 'generate', reset: false, (err) ->
if err
#docpad.log "warn", "GENERATE ERROR"
This is what I do in my posteditor plugin
I suspect this is not really what you are asking for but it does give you full control over the regeneration process.