diff --git a/js/components/settings_container.js b/js/components/settings_container.js index c35fba1e..76a6cf2c 100644 --- a/js/components/settings_container.js +++ b/js/components/settings_container.js @@ -22,6 +22,8 @@ import Form from './ascribe_forms/form'; import Property from './ascribe_forms/property'; import InputCheckbox from './ascribe_forms/input_checkbox'; +import ActionPanel from './ascribe_panel/action_panel'; + import apiUrls from '../constants/api_urls'; import AppConstants from '../constants/application_constants'; import { getLangText } from '../utils/lang_utils'; @@ -339,20 +341,18 @@ let APISettings = React.createClass({ GlobalNotificationActions.appendGlobalNotification(notification); }, - render() { + getApplications(){ let content = ; if (this.state.applications.length > -1) { content = this.state.applications.map(function(app, i) { return ( - -
-
- {'Bearer ' + app.bearer_token.token} -
-
+ key={i} + title={app.name} + content={'Bearer ' + app.bearer_token.token} + buttons={ +
-
- ); + }/> + ); }, this); - content = ( -
-
- {content} -
-
-
); } + return content; + }, + render() { + return ( Usage: curl <url> -H 'Authorization: Bearer <token>' - {content} + {this.getApplications()} ); } diff --git a/js/components/whitelabel/prize/components/settings_container.js b/js/components/whitelabel/prize/components/settings_container.js index bd426a9c..affae8f2 100644 --- a/js/components/whitelabel/prize/components/settings_container.js +++ b/js/components/whitelabel/prize/components/settings_container.js @@ -18,17 +18,12 @@ import FormPropertyHeader from '../../../ascribe_forms/form_property_header'; import ActionPanel from '../../../ascribe_panel/action_panel'; -import Table from '../../../ascribe_table/table'; -import TableItem from '../../../ascribe_table/table_item'; -import TableItemText from '../../../ascribe_table/table_item_text'; - import GlobalNotificationModel from '../../../../models/global_notification_model'; import GlobalNotificationActions from '../../../../actions/global_notification_actions'; import AppConstants from '../../../../constants/application_constants'; import apiUrls from '../../../../constants/api_urls'; -import { ColumnModel} from '../../../ascribe_table/models/table_models'; import { getLangText } from '../../../../utils/lang_utils'; @@ -299,54 +294,4 @@ let PrizeJurySettings = React.createClass({ }); -let PrizesDashboard = React.createClass({ - - getColumnList() { - return [ - new ColumnModel( - (item) => { - return { - 'content': item.name - }; }, - 'name', - getLangText('Name'), - TableItemText, - 6, - false, - null - ), - new ColumnModel( - (item) => { - return { - 'content': item.domain - }; }, - 'domain', - getLangText('Domain'), - TableItemText, - 1, - false, - null - ) - ]; - }, - - render() { - return ( - - {this.state.prizeList.map((item, i) => { - return ( - - ); - })} -
- ); - } -}); - export default Settings; \ No newline at end of file