Skip to content

Commit

Permalink
Add JSDocs to components (#9125)
Browse files Browse the repository at this point in the history
* jsdocs

* remove todo that is no longer relevant

* clean up wording

* wordsmithing

* fix spelling

* example for clusterMode
  • Loading branch information
Monkeychip authored Jun 2, 2020
1 parent bd59ffc commit 65e53f8
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 1 deletion.
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;
}),
});

0 comments on commit 65e53f8

Please sign in to comment.