npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@atlassian/johnson

v3.4.2

Published

A frontend module for Johnson framework

Downloads

72

Readme

Johnson frontend

This is a frontend module for Johnson framework

Getting Started

After installing you can use it by importing the module itself and css:

import React from 'react';
import {render} from 'react-dom';

import Johnson, {JIRA as ProductName} from '@atlassian/johnson';
import '@atlassian/johnson/build/johnson.css';

...

render(
  <Johnson endpoints={endpoints} i18n={i18n} initialData={initialData} productName={ProductName} />,
  document.getElementById('root')
);

Properties

  • endpoints (required)

    An object containing urls where the module will send requests to.

    {
      data: 'url to get events data',
      eventKbClickedAnalytics: 'analytics event, event kb article clicked',
      generalKbClickedAnalytics: 'analytics event, general kb article clicked',
      home: 'product home url',
      dismissEvents: 'url to dismiss events',
      kbLinkStartStop: 'kb article about starting a product',
      kbLinkMigrateConfigManually: 'kb article about migrating custom configurations manually',
      findTheLogs: 'kb article about finding and providing logs for support',
      addAndRemoveSystemProps: 'kb article about adding and removing system properties',
      migrateConfig: 'url to migrate custom configurations after an upgrade',
    }

    kbLinkStartStop example

    findTheLogs example

    addAndRemoveSystemProps example

  • i18n (required)

    An object containing translations.

    {
      'johnson.check.events.event.kblink': 'Learn more',
        'johnson.legacy.columnheading.description': 'Description',
        'johnson.legacy.columnheading.exception': 'Exception',
        'johnson.legacy.columnheading.level': 'Level',
        'johnson.legacy.columnheading.time': 'Time',
        'johnson.page.detail.restricted.footer': 'We can\'t show you any more detail here as the <code>hide.system.error.details</code> system property has been set. If you\'d like to see more details here, remove the system property.',
        'johnson.page.headline.title.error': 'Jira had problems starting up',
        'johnson.page.headline.title.warning': 'Preparing to start Jira',
        'johnson.page.headline.neutral': 'Jira had failed to start, but we're back up and running again',
        'johnson.page.footer': 'If you\'re unable to fix the problems and need to contact support, we can respond faster if you provide {0}the logs{1} of your instance.',
        'johnson.page.progress': 'Finishing up checks',
        'johnson.page.subheadline.error': 'This page is for Jira administrators. If you're seeing this page, your Jira administrator is probably working to restore the service.',
        'johnson.page.subheadline.neutral': 'Take me to my {0}Jira home{1}.',
        'system.error.progress.completed': 'This process is {0}% complete.',
        'johnson.page.helium.show.files': 'Show {0} files',
        'johnson.page.helium.close.button': 'Close',
        'johnson.page.helium.button.title': 'Copy configuration',
        'johnson.page.helium.cant.copy.files': 'The following files contain custom changes, but we can’t copy them automatically. You’ll need to reapply these changes manually.',
        'johnson.page.helium.description': 'To copy these changes to your new installation, click <b>Copy configuration.</b>',
        'johnson.page.helium.ignore.description': 'If you ignore and continue, Jira will start using the default configuration.',
        'johnson.page.helium.note': 'Note: Make sure you only copy over the changes not the entire files.',
        'johnson.page.helium.title': 'Some of your configuration files contain custom changes',
        'johnson.page.helium.modal.title': 'List of modified files',
        'johnson.page.helium.modal.description': 'The following files contain custom changes:',
        'johnson.page.helium.read.only.description': 'The listed configuration files contain custom changes. To keep your current configuration, re-apply these custom changes to the new version of the files during upgrade.',
        'johnson.page.helium.read.only.title': 'Upgrade: Custom changes have not been carried over',
        'johnson.page.helium.read.only.files.copied': `One or more files were successfully copied to your new installation. To finalize these changes, {0}restart Jira{1} now.`,
        'johnson.page.helium.success.title': 'Files copied successfully',
        'johnson.page.helium.success.description': 'We successfully copied {0} files to your new installation. If there are no other warnings on this page, you can {1}start Jira{2} now.',
        'johnson.check.acknowledge.warnings.cta': 'Ignore all warnings and continue',
        'johnson.warnings.ignore.cli': 'If you want to ignore these warnings and start Jira, you need to use the {0}-Djira.startup.warnings.disable{1} startup flag that will ignore the warnings. {2}Learn more{3}',
    }
  • productName (required)

    Defines what logo to be shown in the left top corner. Currently supported values: 'confluence', 'jira'.

  • initialData

    Initial events data, if not provided request to endpoints.data will be sent to get it.

    {
      canAuthoriseUsers: bool, indicating that a product loaded far enough to be able to authorise users,
      checksComplete: bool, if true loading gif will appear at the bottom of the page,
      events: array of events, can be new or old, see below,
      errorsPresentButHidden: bool, should be true when hide.system.error.details flag is set
    }

    New style event:

    {
      description: 'required, event description',
      helpLink: 'not required, a link to be attached to description, works only with new events',
      title: 'required, event title',
      level: 'required, event level, can be fatal, error or warning. ',
      dismissible: 'not required, bool, indicates whether or not event is dismissible',
      templateContext: {  // not required, contains event rendering details 
        type: 'template name, apart from default can be configCustomisation or configCustomisationSuccess,
        filesThatCanBeCopied: 'array of config files that can be migrated automatically to a new version, used in configCustomisation template',
        filesThatCannotBeCopied: 'array of config files that can not be migrated automatically to a new version, used in configCustomisation template',
        numberOfFilesCopied: 'number of config files migrated to a new version, used in configCustomisationSuccess template',
      }
    }

    Old style event:

    {
      old: 'should be set for old events',
      description,
      date,
      level,
      dismissible,
      exception,
      additionalMarkup: 'additional html markup to be attached to description. Can contain translation aliases, in that case make sure its included in i18n prop',
      progress
    }