@atlassian/johnson
A frontend module for Johnson framework
$ cnpm install @atlassian/johnson 
SYNC missed versions from official npm registry.

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 from '@atlassian/johnson';
import '@atlassian/johnson/build/assets/johnson.css';

...

render(
  <Johnson endpoints={endpoints} i18n={i18n} initialData={initialData} productName="jira" />,
  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',
      findTheLogs: 'kb article about finding and providing logs for support',
      addAndRemoveSystemProps: 'kb article about adding and removing system properties'
    }
    

    kbLinkStartStop example

    findTheLogs example

    addAndRemoveSystemProps example

  • i18n (required)

    An object containing translations.

    {
      'johnson.check.acknowledge.warnings.cta': 'Ignore these problems and start Confluence',
      'johnson.check.events.event.kblink': 'Learn more', // this text will be wrapped in a link to endpoints.addAndRemoveSystemProps kb article
      'johnson.legacy.columnheading.description': 'Description',
      'johnson.legacy.columnheading.exception': 'Exception',
      'johnson.legacy.columnheading.level': 'Level',
      'johnson.legacy.columnheading.time': 'Time',
      'johnson.page.detail.restricted.intro': 'We haven\'t been able to start Confluence due to a configuration error. If you\'re the Confluence Administrator, you can check the logs for more extensive details on the configuration error, and possible resolution.',
      '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': 'Confluence had problems starting up',
      'johnson.page.headline.title.warning': 'Preparing to start Confluence',
      'johnson.page.headline.description.error': 'Confluence encountered the following problems during startup. You need to fix any errors before you {0}start Confluence{1} again.', // this text will contain a link to endpoints.kbLinkStartStop kb article
      'johnson.page.headline.description.warning': 'We discovered a problem when preparing to start Confluence. If you\'re a Confluence admin, you can either fix this problem now or ignore it, and start Confluence anyway.',
      'johnson.page.headline.neutral': 'Confluence 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.', // this text will contain a link to endpoints.findTheLogs kb article
      'johnson.page.progress': 'Finishing up checks',
      'johnson.page.subheadline.error': 'This page is for Confluence administrators. If you\'re seeing this page, your Confluence administrator is probably working to restore the service.',
      'johnson.page.subheadline.neutral': 'Take me to my {0}Confluence home{1}.', // this text will contain a link to endpoints.home
      'johnson.warnings.ignore.cli': 'If you want to ignore these warnings and start Confluence, you need to use the {0}-Dconfluence.startup.warnings.disable{1} startup flag that will ignore the warnings. {2}Learn more{3}',
      'system.error.progress.completed': 'This process is {0}% complete.'
    }
    
  • 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',
    }
    

    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
    }
    

Current Tags

  • 3.0.0                                ...           latest (7 months ago)

24 Versions

  • 3.0.0                                ...           7 months ago
  • 2.0.6                                ...           9 months ago
  • 2.0.5                                ...           9 months ago
  • 2.0.4                                ...           9 months ago
  • 2.0.3                                ...           9 months ago
  • 2.0.2                                ...           9 months ago
  • 2.0.1                                ...           9 months ago
  • 2.0.0                                ...           9 months ago
  • 1.2.0                                ...           9 months ago
  • 1.1.0                                ...           10 months ago
  • 1.0.3                                ...           a year ago
  • 1.0.2                                ...           a year ago
  • 1.0.1                                ...           a year ago
  • 1.0.0                                ...           a year ago
  • 0.0.10                                ...           a year ago
  • 0.0.9                                ...           a year ago
  • 0.0.8                                ...           a year ago
  • 0.0.7                                ...           a year ago
  • 0.0.6                                ...           a year ago
  • 0.0.5                                ...           a year ago
  • 0.0.4                                ...           a year ago
  • 0.0.3                                ...           a year ago
  • 0.0.2                                ...           a year ago
  • 0.0.1                                ...           a year ago
Downloads
Today 0
This Week 0
This Month 49
Last Day 0
Last Week 0
Last Month 48
Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |