conjur-asset-ui 1.4.2 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +8 -3
- data/CHANGELOG.md +10 -0
- data/Makefile +19 -0
- data/README.md +0 -3
- data/Rakefile +22 -17
- data/TODO.md +0 -23
- data/app/.csscomb.json +304 -0
- data/app/.eslintignore +3 -0
- data/app/.eslintrc +265 -0
- data/app/config/preprocessor.js +19 -0
- data/app/config/webpack.js +124 -0
- data/app/gulpfile.js +96 -0
- data/app/package.json +86 -0
- data/app/src/actions.js +550 -0
- data/app/src/app.js +83 -0
- data/app/src/clients/audit.js +34 -0
- data/app/src/clients/auth.js +24 -0
- data/app/src/clients/generic.js +52 -0
- data/app/src/clients/graph.js +7 -0
- data/app/src/clients/layer_members.js +18 -0
- data/app/src/clients/list.js +31 -0
- data/app/src/clients/members.js +20 -0
- data/app/src/clients/request.js +531 -0
- data/app/src/clients/search.js +5 -0
- data/app/src/components/app/__tests__/app-test.js +22 -0
- data/app/src/components/app/app.js +36 -0
- data/app/src/components/app/wrapper.js +17 -0
- data/app/src/components/audit/__tests__/table_header-test.js +22 -0
- data/app/src/components/audit/box.js +9 -0
- data/app/src/components/audit/constants.js +5 -0
- data/app/src/components/audit/entry.js +105 -0
- data/app/src/components/audit/fields_mixin.js +11 -0
- data/app/src/components/audit/humanize_event.js +213 -0
- data/app/src/components/audit/table.js +64 -0
- data/app/src/components/audit/table_header.js +37 -0
- data/app/src/components/audit/timestamp.js +28 -0
- data/app/src/components/auth/login.js +177 -0
- data/app/src/components/auth/login.less +71 -0
- data/app/src/components/auth/logout.js +42 -0
- data/app/src/components/auth/logout.less +21 -0
- data/app/src/components/chart/chart.js +540 -0
- data/app/src/components/chart/chart_helper_mixin.js +78 -0
- data/app/src/components/custom/list.js +3 -0
- data/app/src/components/custom/view.js +81 -0
- data/app/src/components/dashboard/activity.js +144 -0
- data/app/src/components/dashboard/dashboard.js +46 -0
- data/app/src/components/flash/flash.js +98 -0
- data/app/src/components/flash/flash.less +3 -0
- data/app/src/components/generic/__tests__/time-test.js +42 -0
- data/app/src/components/generic/annotations.js +39 -0
- data/app/src/components/generic/breadcrumbs.js +57 -0
- data/app/src/components/generic/foldable_audit_section.js +204 -0
- data/app/src/components/generic/list.js +141 -0
- data/app/src/components/generic/list_factory.js +41 -0
- data/app/src/components/generic/resource_link.js +64 -0
- data/app/src/components/generic/role_link.js +66 -0
- data/app/src/components/generic/tab_mixin.js +146 -0
- data/app/src/components/generic/time.js +32 -0
- data/app/src/components/graph/__tests__/collapse-test.js +133 -0
- data/app/src/components/graph/__tests__/edges-from-vertices-test.js +48 -0
- data/app/src/components/graph/__tests__/new-vertex-set-test.js +16 -0
- data/app/src/components/graph/__tests__/next-id-test.js +27 -0
- data/app/src/components/graph/__tests__/role-kind-from-id-test.js +24 -0
- data/app/src/components/graph/__tests__/vertices-from-edges-test.js +72 -0
- data/app/src/components/graph/graph.js +449 -0
- data/app/src/components/graph/graph.less +39 -0
- data/app/src/components/graph/helpers.js +368 -0
- data/app/src/components/group/list.js +3 -0
- data/app/src/components/group/view.js +153 -0
- data/app/src/components/host/activity.js +111 -0
- data/app/src/components/host/details.js +28 -0
- data/app/src/components/host/executors.js +77 -0
- data/app/src/components/host/host_link.js +18 -0
- data/app/src/components/host/list.js +3 -0
- data/app/src/components/host/updaters.js +77 -0
- data/app/src/components/host/view.js +145 -0
- data/app/src/components/layer/list.js +3 -0
- data/app/src/components/layer/view.js +197 -0
- data/app/src/components/navbar/__tests__/navbar-test.js +21 -0
- data/app/src/components/navbar/nav_search_form.js +40 -0
- data/app/src/components/navbar/navbar.js +96 -0
- data/app/src/components/notfound/notfound.js +35 -0
- data/app/src/components/notfound/notfound.less +21 -0
- data/app/src/components/owned_resources/owned_resources.js +84 -0
- data/app/src/components/owned_resources/owned_resources_box.js +101 -0
- data/app/src/components/permissions/permissions.js +138 -0
- data/app/src/components/permissions/permissions_table.js +101 -0
- data/app/src/components/policy/list.js +3 -0
- data/app/src/components/policy/view.js +107 -0
- data/app/src/components/refresh/refresh.js +29 -0
- data/app/src/components/refresh/refresh.less +15 -0
- data/app/src/components/search/group.js +43 -0
- data/app/src/components/search/group_heading.js +50 -0
- data/app/src/components/search/group_title.js +37 -0
- data/app/src/components/search/result_item.js +55 -0
- data/app/src/components/search/search.js +118 -0
- data/app/src/components/user/activity.js +112 -0
- data/app/src/components/user/details.js +30 -0
- data/app/src/components/user/list.js +3 -0
- data/app/src/components/user/pubkeys.js +118 -0
- data/app/src/components/user/pubkeys.less +56 -0
- data/app/src/components/user/view.js +143 -0
- data/app/src/components/variable/activity.js +101 -0
- data/app/src/components/variable/details.js +46 -0
- data/app/src/components/variable/fetchers.js +77 -0
- data/app/src/components/variable/list.js +3 -0
- data/app/src/components/variable/updaters.js +77 -0
- data/app/src/components/variable/view.js +115 -0
- data/app/src/constants.js +36 -0
- data/{public → app/src}/images/conjur-logo.svg +0 -0
- data/{public → app/src}/images/icon-client-pc.svg +0 -0
- data/{public → app/src}/images/icon-environment.png +0 -0
- data/{public → app/src}/images/icon-person.svg +0 -0
- data/{public → app/src}/images/icon-policy.png +0 -0
- data/{public → app/src}/images/icon-resource.png +0 -0
- data/{public → app/src}/images/icon-service-dots.svg +0 -0
- data/{public → app/src}/images/icon-variable.png +0 -0
- data/app/src/pages/index.html +27 -0
- data/app/src/routes.js +64 -0
- data/app/src/stores/app_store.js +35 -0
- data/app/src/stores/audit_store.js +143 -0
- data/app/src/stores/graph_store.js +51 -0
- data/app/src/stores/group_store.js +104 -0
- data/app/src/stores/host_store.js +111 -0
- data/app/src/stores/layer_store.js +115 -0
- data/app/src/stores/policy_store.js +88 -0
- data/app/src/stores/resources_store.js +115 -0
- data/app/src/stores/route_store.js +21 -0
- data/app/src/stores/search_store.js +77 -0
- data/app/src/stores/user_store.js +109 -0
- data/app/src/stores/variable_store.js +93 -0
- data/app/src/styles/bootstrap.less +54 -0
- data/{public/css → app/src/styles}/styles.less +26 -82
- data/app/src/utils.js +38 -0
- data/app/src/vendor/pace.js +2 -0
- data/conjur-asset-ui.gemspec +3 -4
- data/docker/assets-build/Dockerfile +12 -0
- data/docker/conjur-ui/Dockerfile +33 -0
- data/docker/conjur-ui/README.md +38 -0
- data/docker/conjur-ui/mime.types +90 -0
- data/docker/conjur-ui/nginx.conf +110 -0
- data/docker/conjur-ui/start.py +72 -0
- data/docker/conjur-ui/start.sh +18 -0
- data/docker/conjur-ui/test.env +8 -0
- data/lib/conjur-asset-ui-version.rb +1 -1
- data/lib/conjur/command/ui.rb +10 -2
- data/lib/conjur/webserver/home.rb +3 -3
- data/lib/conjur/webserver/login.rb +1 -1
- data/lib/conjur/webserver/server.rb +16 -4
- data/public/js/views/roleGraph.js +91 -0
- metadata +167 -105
- data/.jshintrc +0 -41
- data/bower.json +0 -98
- data/gulpfile.js +0 -139
- data/package.json +0 -47
- data/preprocessor.js +0 -7
- data/public/_client_libs.html +0 -9
- data/public/index.html.erb +0 -63
- data/public/js/init.js +0 -196
- data/public/js/lib/pace.js +0 -2
- data/public/js/lib/sorted-set.no-require.js +0 -1145
- data/public/js/lib/sorted-set.no-require.js.txt +0 -6
- data/public/js/models/groupRecord.js +0 -72
- data/public/js/models/hostRecord.js +0 -60
- data/public/js/models/layerRecord.js +0 -79
- data/public/js/models/namespace.js +0 -12
- data/public/js/models/policyList.js +0 -16
- data/public/js/models/policyRecord.js +0 -54
- data/public/js/models/record.js +0 -117
- data/public/js/models/resourceList.js +0 -87
- data/public/js/models/userList.js +0 -25
- data/public/js/models/userRecord.js +0 -75
- data/public/js/models/variableList.js +0 -27
- data/public/js/models/variableRecord.js +0 -77
- data/public/js/routers.js +0 -242
- data/public/js/views/annotations.js +0 -47
- data/public/js/views/audit.js +0 -369
- data/public/js/views/breadcrumbs.js +0 -62
- data/public/js/views/chart.js +0 -617
- data/public/js/views/dashboard.js +0 -146
- data/public/js/views/generic.js +0 -122
- data/public/js/views/group.js +0 -109
- data/public/js/views/groups.js +0 -26
- data/public/js/views/host.js +0 -200
- data/public/js/views/hosts.js +0 -26
- data/public/js/views/layer.js +0 -146
- data/public/js/views/layers.js +0 -26
- data/public/js/views/mixins/search.js +0 -22
- data/public/js/views/mixins/tabs.js +0 -154
- data/public/js/views/namespaces.js +0 -40
- data/public/js/views/navSearch.js +0 -36
- data/public/js/views/owned.js +0 -184
- data/public/js/views/permissions.js +0 -254
- data/public/js/views/policies.js +0 -26
- data/public/js/views/policy.js +0 -70
- data/public/js/views/resource.js +0 -59
- data/public/js/views/role.js +0 -63
- data/public/js/views/searchResults.js +0 -212
- data/public/js/views/sections.js +0 -226
- data/public/js/views/time.js +0 -39
- data/public/js/views/user.js +0 -297
- data/public/js/views/users.js +0 -26
- data/public/js/views/variable.js +0 -310
- data/public/js/views/variables.js +0 -26
- data/spec/javascripts/helpers/.gitkeep +0 -0
- data/spec/javascripts/support/jasmine.yml +0 -112
- data/spec/javascripts/support/jasmine_helper.rb +0 -22
- data/spec/javascripts/support/run.html.erb +0 -23
- data/spec/javascripts/views/AuditSpec.js +0 -22
- data/spec/javascripts/views/AuditSpec.ls +0 -18
@@ -0,0 +1,46 @@
|
|
1
|
+
var React = require('react');
|
2
|
+
|
3
|
+
var RoleLink = require('../generic/role_link'),
|
4
|
+
Refresh = require('../refresh/refresh');
|
5
|
+
|
6
|
+
export default React.createClass({
|
7
|
+
displayName: 'VariableDetails',
|
8
|
+
|
9
|
+
propTypes: {
|
10
|
+
variable: React.PropTypes.object,
|
11
|
+
owner: React.PropTypes.string,
|
12
|
+
isLoading: React.PropTypes.bool
|
13
|
+
},
|
14
|
+
|
15
|
+
getDefaultProps() {
|
16
|
+
return {
|
17
|
+
variable: {},
|
18
|
+
owner: '',
|
19
|
+
isLoading: false
|
20
|
+
};
|
21
|
+
},
|
22
|
+
|
23
|
+
render() {
|
24
|
+
return (
|
25
|
+
<div className="b-variable-details">
|
26
|
+
<h2>Details<Refresh show={this.props.isLoading} /></h2>
|
27
|
+
<dl className="dl-horizontal">
|
28
|
+
<dt>Owner</dt>
|
29
|
+
<dd><RoleLink id={this.props.owner} /></dd>
|
30
|
+
|
31
|
+
<dt>Created by</dt>
|
32
|
+
<dd><RoleLink id={this.props.variable.userid} /></dd>
|
33
|
+
|
34
|
+
<dt>MIME type</dt>
|
35
|
+
<dd>{this.props.variable.mime_type}</dd>
|
36
|
+
|
37
|
+
<dt>Kind</dt>
|
38
|
+
<dd>{this.props.variable.kind}</dd>
|
39
|
+
|
40
|
+
<dt>Versions</dt>
|
41
|
+
<dd>{this.props.variable.version_count}</dd>
|
42
|
+
</dl>
|
43
|
+
</div>
|
44
|
+
);
|
45
|
+
}
|
46
|
+
});
|
@@ -0,0 +1,77 @@
|
|
1
|
+
var React = require('react');
|
2
|
+
|
3
|
+
import {take} from 'lodash';
|
4
|
+
|
5
|
+
var RoleLink = require('../generic/role_link'),
|
6
|
+
Refresh = require('../refresh/refresh');
|
7
|
+
|
8
|
+
export default React.createClass({
|
9
|
+
displayName: 'VariableFetchers',
|
10
|
+
|
11
|
+
propTypes: {
|
12
|
+
data: React.PropTypes.array,
|
13
|
+
isLoading: React.PropTypes.bool
|
14
|
+
},
|
15
|
+
|
16
|
+
getDefaultProps() {
|
17
|
+
return {
|
18
|
+
data: [],
|
19
|
+
isLoading: false
|
20
|
+
};
|
21
|
+
},
|
22
|
+
|
23
|
+
getInitialState() {
|
24
|
+
return {showAll: false};
|
25
|
+
},
|
26
|
+
|
27
|
+
handleClick(e) {
|
28
|
+
e.preventDefault();
|
29
|
+
|
30
|
+
this.setState({showAll: !this.state.showAll});
|
31
|
+
},
|
32
|
+
|
33
|
+
getItems() {
|
34
|
+
return this.props.data.map((e) => {
|
35
|
+
return (
|
36
|
+
<li className="list-group-item list-group-item-noborder">
|
37
|
+
<RoleLink id={e} />
|
38
|
+
</li>
|
39
|
+
);
|
40
|
+
});
|
41
|
+
},
|
42
|
+
|
43
|
+
render() {
|
44
|
+
var items = this.getItems(),
|
45
|
+
itemsToDisplay = this.state.showAll ? items : take(items, 5),
|
46
|
+
msg = this.state.showAll ? 'Show top 5' : 'See all',
|
47
|
+
empty = items.length === 0,
|
48
|
+
lessThan5 = items.length <= 5,
|
49
|
+
body = [(<h2>Fetchers<Refresh show={this.props.isLoading} /></h2>)];
|
50
|
+
|
51
|
+
if (!empty) {
|
52
|
+
body.push(
|
53
|
+
<ul className="b-variable-fetchers__list list-unstyled list-group">
|
54
|
+
{itemsToDisplay}
|
55
|
+
</ul>
|
56
|
+
);
|
57
|
+
} else {
|
58
|
+
body.push(
|
59
|
+
<p>There are no fetchers</p>
|
60
|
+
);
|
61
|
+
}
|
62
|
+
|
63
|
+
if (!lessThan5) {
|
64
|
+
body.push(
|
65
|
+
<div className="b-variable-fetchers__toggle">
|
66
|
+
<a href="#" onClick={this.handleClick}>{msg}</a>
|
67
|
+
</div>
|
68
|
+
);
|
69
|
+
}
|
70
|
+
|
71
|
+
return (
|
72
|
+
<div className="b-variable-fetchers">
|
73
|
+
{body}
|
74
|
+
</div>
|
75
|
+
);
|
76
|
+
}
|
77
|
+
});
|
@@ -0,0 +1,77 @@
|
|
1
|
+
var React = require('react');
|
2
|
+
|
3
|
+
import {take} from 'lodash';
|
4
|
+
|
5
|
+
var RoleLink = require('../generic/role_link'),
|
6
|
+
Refresh = require('../refresh/refresh');
|
7
|
+
|
8
|
+
export default React.createClass({
|
9
|
+
displayName: 'VariableUpdaters',
|
10
|
+
|
11
|
+
propTypes: {
|
12
|
+
data: React.PropTypes.array,
|
13
|
+
isLoading: React.PropTypes.bool
|
14
|
+
},
|
15
|
+
|
16
|
+
getDefaultProps() {
|
17
|
+
return {
|
18
|
+
data: [],
|
19
|
+
isLoading: false
|
20
|
+
};
|
21
|
+
},
|
22
|
+
|
23
|
+
getInitialState() {
|
24
|
+
return {showAll: false};
|
25
|
+
},
|
26
|
+
|
27
|
+
handleClick(e) {
|
28
|
+
e.preventDefault();
|
29
|
+
|
30
|
+
this.setState({showAll: !this.state.showAll});
|
31
|
+
},
|
32
|
+
|
33
|
+
getItems() {
|
34
|
+
return this.props.data.map((e) => {
|
35
|
+
return (
|
36
|
+
<li className="list-group-item list-group-item-noborder">
|
37
|
+
<RoleLink id={e} />
|
38
|
+
</li>
|
39
|
+
);
|
40
|
+
});
|
41
|
+
},
|
42
|
+
|
43
|
+
render() {
|
44
|
+
var items = this.getItems(),
|
45
|
+
itemsToDisplay = this.state.showAll ? items : take(items, 5),
|
46
|
+
msg = this.state.showAll ? 'Show top 5' : 'See all',
|
47
|
+
empty = items.length === 0,
|
48
|
+
lessThan5 = items.length <= 5,
|
49
|
+
body = [(<h2>Updaters<Refresh show={this.props.isLoading} /></h2>)];
|
50
|
+
|
51
|
+
if (!empty) {
|
52
|
+
body.push(
|
53
|
+
<ul className="b-variable-updaters__list list-unstyled list-group">
|
54
|
+
{itemsToDisplay}
|
55
|
+
</ul>
|
56
|
+
);
|
57
|
+
} else {
|
58
|
+
body.push(
|
59
|
+
<p>There are no updaters</p>
|
60
|
+
);
|
61
|
+
}
|
62
|
+
|
63
|
+
if (!lessThan5) {
|
64
|
+
body.push(
|
65
|
+
<div className="b-variable-updaters__toggle">
|
66
|
+
<a href="#" onClick={this.handleClick}>{msg}</a>
|
67
|
+
</div>
|
68
|
+
);
|
69
|
+
}
|
70
|
+
|
71
|
+
return (
|
72
|
+
<div className="b-variable-updaters">
|
73
|
+
{body}
|
74
|
+
</div>
|
75
|
+
);
|
76
|
+
}
|
77
|
+
});
|
@@ -0,0 +1,115 @@
|
|
1
|
+
var React = require('react'),
|
2
|
+
Fluxxor = require('fluxxor');
|
3
|
+
|
4
|
+
var FluxMixin = Fluxxor.FluxMixin(React),
|
5
|
+
StoreWatchMixin = Fluxxor.StoreWatchMixin;
|
6
|
+
|
7
|
+
var AuditTable = require('../audit/table'),
|
8
|
+
Annotations = require('../generic/annotations'),
|
9
|
+
Breadcrumbs = require('../generic/breadcrumbs'),
|
10
|
+
FoldableAuditSection = require('../generic/foldable_audit_section'),
|
11
|
+
Refresh = require('../refresh/refresh');
|
12
|
+
|
13
|
+
var Activity = require('./activity'),
|
14
|
+
Updaters = require('./updaters'),
|
15
|
+
Fetchers = require('./fetchers'),
|
16
|
+
Details = require('./details');
|
17
|
+
|
18
|
+
export default React.createClass({
|
19
|
+
displayName: 'VariableView',
|
20
|
+
|
21
|
+
mixins: [FluxMixin, StoreWatchMixin('audit', 'variable', 'resources', 'route')],
|
22
|
+
|
23
|
+
askForNewData(state) {
|
24
|
+
var actions = this.getFlux().actions;
|
25
|
+
|
26
|
+
actions.audit.loadForResource('variable', state.id);
|
27
|
+
actions.variable.load(state.id);
|
28
|
+
actions.resources.loadOne('variable', state.id);
|
29
|
+
},
|
30
|
+
|
31
|
+
componentDidMount() {
|
32
|
+
this.askForNewData(this.state);
|
33
|
+
},
|
34
|
+
|
35
|
+
componentWillUpdate(nextProps, nextState) {
|
36
|
+
if (this.state.id !== nextState.id) {
|
37
|
+
this.askForNewData(nextState);
|
38
|
+
}
|
39
|
+
|
40
|
+
return true;
|
41
|
+
},
|
42
|
+
|
43
|
+
getStateFromFlux() {
|
44
|
+
var flux = this.getFlux(),
|
45
|
+
id = flux.store('route').getParam('id'),
|
46
|
+
audit = flux.store('audit').getEventFor('variable', id),
|
47
|
+
data = flux.store('variable').getData(),
|
48
|
+
resource = flux.store('resources').getResource('variable', id);
|
49
|
+
|
50
|
+
var ret = {
|
51
|
+
id: id,
|
52
|
+
loading: data.loading,
|
53
|
+
variable: data.variable,
|
54
|
+
owner: resource.data.owner,
|
55
|
+
annotations: resource.data.annotations,
|
56
|
+
audit: audit.data,
|
57
|
+
fetchers: data.fetchers,
|
58
|
+
updaters: data.updaters
|
59
|
+
};
|
60
|
+
|
61
|
+
ret.loading.audit = audit.loading;
|
62
|
+
ret.loading.owner = resource.loading;
|
63
|
+
ret.loading.annotations = resource.loading;
|
64
|
+
|
65
|
+
return ret;
|
66
|
+
},
|
67
|
+
|
68
|
+
render() {
|
69
|
+
var elems = [
|
70
|
+
{url: '/ui/variables', text: 'Variables'},
|
71
|
+
{url: '', text: this.state.variable.id},
|
72
|
+
{url: '', text: '(owned by ' + this.state.variable.ownerid + ')'}
|
73
|
+
];
|
74
|
+
|
75
|
+
return (
|
76
|
+
<div className="b-variable">
|
77
|
+
<Breadcrumbs elems={elems} />
|
78
|
+
<hr />
|
79
|
+
<Activity audit={this.state.audit}
|
80
|
+
isLoading={this.state.loading.audit} />
|
81
|
+
<hr />
|
82
|
+
<div className="row">
|
83
|
+
<div className="col-md-6">
|
84
|
+
<Updaters data={this.state.updaters}
|
85
|
+
isLoading={this.state.loading.updaters} />
|
86
|
+
</div>
|
87
|
+
<div className="col-md-6">
|
88
|
+
<Fetchers data={this.state.fetchers}
|
89
|
+
isLoading={this.state.loading.fetchers} />
|
90
|
+
</div>
|
91
|
+
</div>
|
92
|
+
<hr />
|
93
|
+
{FoldableAuditSection.updates(this.state.audit, this.state.loading.audit)}
|
94
|
+
<hr />
|
95
|
+
{FoldableAuditSection.warnings(this.state.audit, this.state.loading.audit)}
|
96
|
+
<hr />
|
97
|
+
<div className="row">
|
98
|
+
<div className="col-md-6">
|
99
|
+
<Details owner={this.state.owner}
|
100
|
+
variable={this.state.variable}
|
101
|
+
isLoading={this.state.loading.variable || this.state.loading.owner} />
|
102
|
+
</div>
|
103
|
+
<div className="col-md-6">
|
104
|
+
<h2>Annotations<Refresh show={this.state.loading.annotations} /></h2>
|
105
|
+
<Annotations annotations={this.state.annotations} />
|
106
|
+
</div>
|
107
|
+
</div>
|
108
|
+
<hr />
|
109
|
+
<AuditTable events={this.state.audit}
|
110
|
+
caption="Recent Activity"
|
111
|
+
isLoading={this.state.loading.audit} />
|
112
|
+
</div>
|
113
|
+
);
|
114
|
+
}
|
115
|
+
});
|
@@ -0,0 +1,36 @@
|
|
1
|
+
var constants = {
|
2
|
+
FLASH_MESSAGE: 'FLASH_MESSAGE',
|
3
|
+
FLASH_MESSAGE_CLEAR: 'FLASH_MESSAGE_CLEAR',
|
4
|
+
ROUTES: {
|
5
|
+
TRANSITION: 'TRANSITION'
|
6
|
+
}
|
7
|
+
};
|
8
|
+
|
9
|
+
function addExtraConsts(prefix) {
|
10
|
+
constants[prefix] = {};
|
11
|
+
|
12
|
+
constants[prefix].ASSET_TYPE = prefix.toLowerCase();
|
13
|
+
constants[prefix].LOAD = prefix + '_LOAD';
|
14
|
+
constants[prefix].LOAD_SUCCESS = prefix + '_LOAD_SUCCESS';
|
15
|
+
constants[prefix].LOAD_FAIL = prefix + '_LOAD_FAIL';
|
16
|
+
}
|
17
|
+
|
18
|
+
[
|
19
|
+
'AUDIT',
|
20
|
+
'DASHBOARD',
|
21
|
+
'SEARCH',
|
22
|
+
'RESOURCES',
|
23
|
+
'RESOURCE',
|
24
|
+
'GRAPH',
|
25
|
+
// ---------------
|
26
|
+
'USER',
|
27
|
+
'GROUP',
|
28
|
+
'HOST',
|
29
|
+
'LAYER',
|
30
|
+
'VARIABLE',
|
31
|
+
'POLICY'
|
32
|
+
].forEach((prefix) => {
|
33
|
+
addExtraConsts(prefix);
|
34
|
+
});
|
35
|
+
|
36
|
+
export default constants;
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Conjur UI</title>
|
5
|
+
<meta http-equiv="content-type" content="text/html; charset=UTF8">
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
7
|
+
<link href='http://fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic,700italic' rel='stylesheet' type='text/css'>
|
8
|
+
|
9
|
+
<script src="/js/pace.js"></script>
|
10
|
+
<link href="/js/styles.css" rel="stylesheet">
|
11
|
+
|
12
|
+
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
13
|
+
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
14
|
+
<!--[if lt IE 9]>
|
15
|
+
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
|
16
|
+
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
|
17
|
+
<![endif]-->
|
18
|
+
|
19
|
+
<script src="/js/vendor.bundle.js"></script>
|
20
|
+
<script src="/js/app.js"></script>
|
21
|
+
</head>
|
22
|
+
<body>
|
23
|
+
<div id="wrapper">
|
24
|
+
|
25
|
+
</div>
|
26
|
+
</body>
|
27
|
+
</html>
|
data/app/src/routes.js
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import {Route, DefaultRoute, NotFoundRoute} from 'react-router';
|
3
|
+
|
4
|
+
import App from './components/app/app';
|
5
|
+
import Wrapper from './components/app/wrapper';
|
6
|
+
import {NotFound} from './components/notfound/notfound';
|
7
|
+
import {Login} from './components/auth/login';
|
8
|
+
import {Logout} from './components/auth/logout';
|
9
|
+
import Dashboard from './components/dashboard/dashboard';
|
10
|
+
import Search from './components/search/search';
|
11
|
+
|
12
|
+
import UserList from './components/user/list';
|
13
|
+
import UserView from './components/user/view';
|
14
|
+
import GroupList from './components/group/list';
|
15
|
+
import GroupView from './components/group/view';
|
16
|
+
import HostList from './components/host/list';
|
17
|
+
import HostView from './components/host/view';
|
18
|
+
import LayerList from './components/layer/list';
|
19
|
+
import LayerView from './components/layer/view';
|
20
|
+
import VariableList from './components/variable/list';
|
21
|
+
import VariableView from './components/variable/view';
|
22
|
+
import PolicyList from './components/policy/list';
|
23
|
+
import PolicyView from './components/policy/view';
|
24
|
+
import CustomList from './components/custom/list';
|
25
|
+
import CustomView from './components/custom/view';
|
26
|
+
|
27
|
+
export default ([
|
28
|
+
<Route handler={Wrapper}>
|
29
|
+
<Route path="/ui/?" handler={App}>
|
30
|
+
<Route name="dashboard" path="/ui/?" handler={Dashboard} />
|
31
|
+
|
32
|
+
<Route name="users" path="/ui/users/?" handler={UserList} />
|
33
|
+
<Route name="user" path="/ui/users/:id/?" handler={UserView} />
|
34
|
+
|
35
|
+
<Route name="groups" path="/ui/groups/?" handler={GroupList} />
|
36
|
+
<Route name="group" path="/ui/groups/:id/?" handler={GroupView} />
|
37
|
+
|
38
|
+
<Route name="hosts" path="/ui/hosts/?" handler={HostList} />
|
39
|
+
<Route name="host" path="/ui/hosts/:id/?" handler={HostView} />
|
40
|
+
|
41
|
+
<Route name="layers" path="/ui/layers/?" handler={LayerList} />
|
42
|
+
<Route name="layer" path="/ui/layers/:id/?" handler={LayerView} />
|
43
|
+
|
44
|
+
<Route name="variables" path="/ui/variables/?" handler={VariableList} />
|
45
|
+
<Route name="variable" path="/ui/variables/:id/?" handler={VariableView} />
|
46
|
+
|
47
|
+
<Route name="policies" path="/ui/policies/?" handler={PolicyList} />
|
48
|
+
<Route name="policy" path="/ui/policies/:id/?" handler={PolicyView} />
|
49
|
+
|
50
|
+
<Route name="custom-types" path="/ui/custom-types/?" handler={CustomList} />
|
51
|
+
<Route name="custom-type" path="/ui/custom-type/:kind/:id/?" handler={CustomView} />
|
52
|
+
|
53
|
+
<Route name="search" path="/ui/search/:query/?" handler={Search} />
|
54
|
+
|
55
|
+
<DefaultRoute handler={Dashboard} />
|
56
|
+
</Route>
|
57
|
+
|
58
|
+
<Route name="login" path="/ui/login/?" handler={Login} />
|
59
|
+
|
60
|
+
<Route name="logout" path="/ui/logout/?" handler={Logout} />
|
61
|
+
|
62
|
+
<NotFoundRoute handler={NotFound} />
|
63
|
+
</Route>
|
64
|
+
]);
|