Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add JSDocs to components #9125

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions ui/lib/core/addon/components/replication-doc-link.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
import Component from '@ember/component';
import layout from '../templates/components/replication-doc-link';

/**
* @module ReplicationDocLink
* The `ReplicationDocLink` component is a learn link with helper text used on the Replication Dashboards.
* The link takes you to the key monitoring metrics learn doc.
*
* @example
* ```js
* <ReplicationDocLink />
* ```
*/

export default Component.extend({
layout,
});
19 changes: 19 additions & 0 deletions ui/lib/core/addon/components/replication-header.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
import Component from '@ember/component';
import layout from '../templates/components/replication-header';

/**
* @module ReplicationHeader
* The `ReplicationHeader` is a header component used on the Replication Dashboards.
*
* @example
* ```js
* <ReplicationHeader
@data={{model}}
@title="Secondary"
@secondaryID="meep_123"
@isSummaryDashboard=false
/>
* ```
* @param {Object} model=null - An Ember data object pulled from the Ember cluster model.
* @param {String} title=null - The title of the header.
* @param {String} [secondaryID=null] - The secondaryID pulled off of the model object.
* @param {Boolean} isSummaryDashboard=false - True when you have both a primary performance and dr cluster dashboard.
*/

export default Component.extend({
layout,
classNames: ['replication-header'],
Expand Down
15 changes: 15 additions & 0 deletions ui/lib/core/addon/components/replication-table-rows.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@ import Component from '@ember/component';
import { computed } from '@ember/object';
import layout from '../templates/components/replication-table-rows';

/**
* @module ReplicationTableRows
* The `ReplicationTableRows` component is table component. It displays cluster mode details specific to the cluster of the Dashboard it is used on.
*
* @example
* ```js
* <ReplicationTableRows
@replicationDetails={{replicationDetails}}
@clusterMode="primary"
/>
* ```
* @param {Object} replicationDetails=null - An Ember data object pulled from the Ember Model. It contains details specific to the whether the replication is dr or performance.
* @param {String} clusterMode=null - The cluster mode (e.g. primary or secondary) passed through to a table component.
*/

export default Component.extend({
layout,
classNames: ['replication-table-rows'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export default Component.extend({
return false;
}),
errorMessage: computed('hasError', function() {
// TODO figure out if we need another error message
return this.hasError ? 'Check server logs!' : false;
}),
});