Skip to content

Commit

Permalink
Move link to API Browser into System menu
Browse files Browse the repository at this point in the history
Refs #2360
  • Loading branch information
Jochen Schalanda committed Jun 16, 2016
1 parent 69fbf30 commit 5a7b2a5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ import naturalSort from 'javascript-natural-sort';

import PermissionsMixin from 'util/PermissionsMixin';
import Routes from 'routing/Routes';

import StoreProvider from 'injection/StoreProvider';

import URLUtils from 'util/URLUtils';

const NotificationsStore = StoreProvider.getStore('Notifications');

import { PluginStore } from 'graylog-web-plugin/plugin';
Expand Down Expand Up @@ -216,6 +218,8 @@ const Navigation = React.createClass({
</LinkContainer>
}
{pluginSystemNavigations}
<MenuItem divider/>
<MenuItem href={URLUtils.qualifyUrl('api-browser')} target="_blank">REST API Browser</MenuItem>
</NavDropdown>
</Nav>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ const NodeMaintenanceDropdown = React.createClass({
<MenuItem>Configure internal logging</MenuItem>
</LinkContainer>
</IfPermitted>

<MenuItem href={`${this.props.node.transport_address}api-browser`} target="_blank">
API Browser <i className="fa fa-external-link"/>
</MenuItem>
</DropdownButton>
</ButtonGroup>
);
Expand Down
6 changes: 0 additions & 6 deletions graylog2-web-interface/src/components/nodes/NodesActions.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, {PropTypes} from 'react';
import { LinkContainer } from 'react-router-bootstrap';
import { Button, DropdownButton, MenuItem } from 'react-bootstrap';
import URI from 'urijs';

import { IfPermitted } from 'components/common';

Expand Down Expand Up @@ -39,7 +38,6 @@ const NodesActions = React.createClass({
}
},
render() {
const apiBrowserURI = new URI(`${this.props.node.transport_address}/api-browser`).normalizePathname();
return (
<div className="item-actions">
<LinkContainer to={Routes.SYSTEM.NODES.SHOW(this.props.node.node_id)}>
Expand All @@ -50,10 +48,6 @@ const NodesActions = React.createClass({
<Button bsStyle="info">Metrics</Button>
</LinkContainer>

<Button bsStyle="info" href={apiBrowserURI} target="_blank">
<i className="fa fa-external-link"/>&nbsp; API browser
</Button>

<DropdownButton title="More actions" id={`more-actions-dropdown-${this.props.node.node_id}`} pullRight>
<IfPermitted permissions="processing:changestate">
<MenuItem onSelect={this._toggleMessageProcessing}>
Expand Down

0 comments on commit 5a7b2a5

Please sign in to comment.