conjur-asset-ui 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -1
- data/.jshintrc +41 -0
- data/Gemfile +3 -1
- data/README.md +34 -0
- data/Rakefile +69 -1
- data/bower.json +93 -0
- data/conjur-asset-ui.gemspec +1 -1
- data/features/navigation_bar.feature +31 -0
- data/features/step_definitions/custom_step.rb +32 -0
- data/features/support/env.rb +38 -0
- data/features/support/hooks.rb +30 -0
- data/features/support/world.rb +17 -0
- data/gulpfile.js +140 -0
- data/lib/conjur/command/ui.rb +1 -1
- data/lib/conjur/webserver/server.rb +14 -9
- data/lib/conjur-asset-ui-version.rb +1 -1
- data/package.json +47 -0
- data/preprocessor.js +7 -0
- data/public/_client_libs.html +2 -15
- data/public/css/styles.less +170 -4
- data/public/index.html.erb +5 -7
- data/public/js/init.js +183 -97
- data/public/js/lib/sorted-set.no-require.js +3 -28
- data/public/js/models/groupRecord.js +12 -11
- data/public/js/models/hostRecord.js +6 -7
- data/public/js/models/layerRecord.js +12 -11
- data/public/js/models/namespace.js +2 -0
- data/public/js/models/policyList.js +3 -1
- data/public/js/models/policyRecord.js +6 -7
- data/public/js/models/record.js +24 -23
- data/public/js/models/resourceList.js +28 -10
- data/public/js/models/userList.js +7 -2
- data/public/js/models/userRecord.js +7 -8
- data/public/js/models/variableList.js +18 -7
- data/public/js/models/variableRecord.js +13 -12
- data/public/js/routers.js +72 -26
- data/public/js/views/annotations.js +38 -27
- data/public/js/views/audit.js +23 -17
- data/public/js/views/chart.js +471 -0
- data/public/js/views/dashboard.js +94 -58
- data/public/js/views/generic.js +16 -9
- data/public/js/views/group.js +94 -55
- data/public/js/views/groups.js +3 -7
- data/public/js/views/host.js +75 -44
- data/public/js/views/hosts.js +2 -6
- data/public/js/views/layer.js +127 -82
- data/public/js/views/layers.js +2 -6
- data/public/js/views/mixins/search.js +12 -5
- data/public/js/views/mixins/tabs.js +95 -55
- data/public/js/views/navSearch.js +16 -5
- data/public/js/views/owned.js +14 -8
- data/public/js/views/permissions.js +244 -178
- data/public/js/views/policies.js +2 -4
- data/public/js/views/policy.js +65 -38
- data/public/js/views/resource.js +49 -34
- data/public/js/views/role.js +52 -37
- data/public/js/views/searchResults.js +205 -138
- data/public/js/views/time.js +26 -13
- data/public/js/views/user.js +178 -55
- data/public/js/views/users.js +2 -7
- data/public/js/views/variable.js +226 -45
- data/public/js/views/variables.js +4 -8
- metadata +20 -20
- data/public/_client_code.html +0 -42
- data/public/css/bootstrap.css +0 -7
- data/public/fonts/glyphicons-halflings-regular.eot +0 -0
- data/public/fonts/glyphicons-halflings-regular.svg +0 -229
- data/public/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/public/fonts/glyphicons-halflings-regular.woff +0 -0
- data/public/js/lib/JSXTransformer.js +0 -10862
- data/public/js/lib/async.js +0 -958
- data/public/js/lib/backbone.js +0 -2
- data/public/js/lib/bootstrap.js +0 -6
- data/public/js/lib/less.js +0 -16
- data/public/js/lib/moment.js +0 -7768
- data/public/js/lib/react-bootstrap.js +0 -5346
- data/public/js/lib/react-bootstrap.min.js +0 -4
- data/public/js/lib/underscore-min.js +0 -6
- data/public/js/lib/underscore.string.min.js +0 -1
- data/public/js/main.js +0 -57
data/public/js/views/group.js
CHANGED
@@ -1,61 +1,100 @@
|
|
1
1
|
/** @jsx React.DOM */
|
2
|
+
/* global conjur, React, ReactBootstrap, _ */
|
2
3
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
var
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
4
|
+
(function(conjur, React, ReactBootstrap, _) {
|
5
|
+
'use strict';
|
6
|
+
|
7
|
+
var TabbedArea = ReactBootstrap.TabbedArea,
|
8
|
+
TabPane = ReactBootstrap.TabPane,
|
9
|
+
Tab = conjur.views.mixins.Tab,
|
10
|
+
AuditBox = window.AuditBox,
|
11
|
+
RoleLink = conjur.views.RoleLink;
|
12
|
+
|
13
|
+
this.Group = React.createClass({
|
14
|
+
mixins: [Tab],
|
15
|
+
|
16
|
+
render: function() {
|
17
|
+
var data = this.props.data;
|
18
|
+
|
19
|
+
var members = data.members.map(function(member) {
|
20
|
+
return (
|
21
|
+
<li className="list-group-item list-group-item-noborder">
|
22
|
+
<RoleLink id={member.member} />
|
23
|
+
</li>
|
24
|
+
);
|
25
|
+
});
|
26
|
+
|
27
|
+
var resourceId = [
|
28
|
+
conjur.app.configuration.account,
|
29
|
+
'group',
|
30
|
+
data.group.id
|
31
|
+
].join(':');
|
32
|
+
|
33
|
+
var group = data.group;
|
34
|
+
|
35
|
+
// TODO: refactor (common code should go to mixins)
|
36
|
+
// TODO: memberships
|
37
|
+
// TODO: controls for members management
|
38
|
+
var overviewTab =(
|
39
|
+
<TabPane key="overview" tab="Overview">
|
20
40
|
<dl className="dl-horizontal">
|
21
41
|
<dt>Created by</dt>
|
22
|
-
<dd><RoleLink id={group.userid}/></dd>
|
42
|
+
<dd><RoleLink id={group.userid} /></dd>
|
43
|
+
|
23
44
|
<dt>Owner</dt>
|
24
|
-
<dd><RoleLink id={
|
45
|
+
<dd><RoleLink id={data.group.ownerid} /></dd>
|
25
46
|
</dl>
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
{members}
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
47
|
+
</TabPane>
|
48
|
+
);
|
49
|
+
|
50
|
+
var membersTab = (
|
51
|
+
<TabPane key="members" tab={conjur.utils.getTabname('Members', members)}>
|
52
|
+
<ul className="list-group">
|
53
|
+
{members}
|
54
|
+
</ul>
|
55
|
+
</TabPane>
|
56
|
+
);
|
57
|
+
|
58
|
+
var ownedTab = this.ownedTab(),
|
59
|
+
membershipsTab = this.membershipsTab(group.roleid),
|
60
|
+
permissionsTab = this.permissionsTab(group.roleid),
|
61
|
+
annotationsTab = this.annotationsTab();
|
62
|
+
|
63
|
+
var auditTab = (
|
64
|
+
<TabPane key="audit" tab="Recent Activity">
|
65
|
+
<div className="audit auditGroup">
|
66
|
+
<AuditBox roles={[resourceId]}
|
67
|
+
resources={[resourceId]}
|
68
|
+
tabview={true} />
|
69
|
+
</div>
|
70
|
+
</TabPane>
|
71
|
+
);
|
72
|
+
|
73
|
+
var tabs = _.compact([
|
74
|
+
overviewTab,
|
75
|
+
membersTab,
|
76
|
+
ownedTab,
|
77
|
+
membershipsTab,
|
78
|
+
permissionsTab,
|
79
|
+
annotationsTab,
|
80
|
+
auditTab
|
81
|
+
]);
|
82
|
+
|
83
|
+
return (
|
84
|
+
<div className="group">
|
85
|
+
<h2>Group {data.group.id}</h2>
|
86
|
+
<TabbedArea defaultActiveKey="overview">
|
87
|
+
{tabs}
|
88
|
+
</TabbedArea>
|
89
|
+
</div>
|
90
|
+
);
|
91
|
+
}
|
92
|
+
});
|
93
|
+
|
94
|
+
}).bind(conjur.views)
|
95
|
+
(
|
96
|
+
conjur,
|
97
|
+
React,
|
98
|
+
ReactBootstrap,
|
99
|
+
_
|
100
|
+
);
|
data/public/js/views/groups.js
CHANGED
@@ -1,22 +1,18 @@
|
|
1
1
|
/** @jsx React.DOM */
|
2
|
+
/* global conjur, React */
|
2
3
|
|
3
4
|
(function(conjur, React) {
|
4
5
|
'use strict';
|
5
6
|
|
6
7
|
var GenericList = conjur.views.GenericList;
|
7
8
|
|
8
|
-
|
9
|
-
/*getInitialState: function() {
|
10
|
-
return { currentNamespace: "", members: [] };
|
11
|
-
},*/
|
9
|
+
this.GroupBox = React.createClass({
|
12
10
|
render: function() {
|
13
|
-
//<NamespaceFilter currentNamespace={this.props.currentNamespace}
|
14
|
-
// namespaces={this.props.data.namespaces} />
|
15
11
|
return (
|
16
12
|
<div className="groupBox">
|
17
13
|
<div className="groupList">
|
18
14
|
<h2>Groups</h2>
|
19
|
-
<GenericList data={{kind:
|
15
|
+
<GenericList data={{kind: 'groups', members: this.props.data.members}} />
|
20
16
|
</div>
|
21
17
|
</div>
|
22
18
|
);
|
data/public/js/views/host.js
CHANGED
@@ -1,64 +1,95 @@
|
|
1
1
|
/** @jsx React.DOM */
|
2
|
+
/* global conjur, React, ReactBootstrap, _ */
|
2
3
|
|
3
|
-
|
4
|
-
|
5
|
-
return this.props.data.split(':')[2];
|
6
|
-
},
|
4
|
+
(function(conjur, React, ReactBootstrap, _) {
|
5
|
+
'use strict';
|
7
6
|
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
var TabbedArea = ReactBootstrap.TabbedArea,
|
8
|
+
TabPane = ReactBootstrap.TabPane,
|
9
|
+
Tab = conjur.views.mixins.Tab,
|
10
|
+
AuditBox = window.AuditBox,
|
11
|
+
RoleLink = conjur.views.RoleLink,
|
12
|
+
Time = conjur.views.Time;
|
11
13
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
</a>
|
17
|
-
);
|
18
|
-
}
|
19
|
-
});
|
14
|
+
this.HostLink = React.createClass({
|
15
|
+
hostId : function() {
|
16
|
+
return this.props.data.split(':')[2];
|
17
|
+
},
|
20
18
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
var host = this.props.data.host;
|
19
|
+
hostUrl: function() {
|
20
|
+
return '/ui/hosts/' + window.encodeURIComponent(this.hostId());
|
21
|
+
},
|
25
22
|
|
26
|
-
|
27
|
-
|
28
|
-
|
23
|
+
render: function() {
|
24
|
+
return (
|
25
|
+
<a href={this.hostUrl()}>
|
26
|
+
{this.hostId()}
|
27
|
+
</a>
|
28
|
+
);
|
29
|
+
}
|
30
|
+
});
|
31
|
+
|
32
|
+
this.Host = React.createClass({
|
33
|
+
mixins: [Tab],
|
34
|
+
|
35
|
+
render: function() {
|
36
|
+
var host = this.props.data.host;
|
37
|
+
|
38
|
+
// TODO: control for 'enroll'
|
39
|
+
var overviewTab = (
|
40
|
+
<TabPane key="overview" tab="Overview">
|
29
41
|
<dl className="dl-horizontal">
|
30
42
|
<dt> Owner </dt>
|
31
43
|
<dd> <RoleLink id={host.ownerid}/> </dd>
|
44
|
+
|
32
45
|
<dt>Created by</dt>
|
33
46
|
<dd><RoleLink id={host.userid}/></dd>
|
47
|
+
|
34
48
|
<dt> Created At </dt>
|
35
49
|
<dd> <Time timestamp={host.created_at}/> </dd>
|
36
50
|
</dl>
|
37
|
-
|
51
|
+
</TabPane>
|
52
|
+
);
|
38
53
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
54
|
+
var permissionsTab = this.permissionsTab(host.roleid),
|
55
|
+
membershipsTab = this.membershipsTab(host.roleid),
|
56
|
+
annotationsTab = this.annotationsTab(),
|
57
|
+
ownedTab = this.ownedTab();
|
43
58
|
|
44
|
-
|
45
|
-
|
59
|
+
var auditTab = (
|
60
|
+
<TabPane key="audit" tab="Recent Activity">
|
46
61
|
<div className="audit auditHost">
|
47
|
-
<AuditBox roles={[host.roleid]}
|
62
|
+
<AuditBox roles={[host.roleid]}
|
63
|
+
resources={[host.resource_identifier]}
|
64
|
+
tabview={true} />
|
48
65
|
</div>
|
49
|
-
|
66
|
+
</TabPane>
|
67
|
+
);
|
68
|
+
|
69
|
+
var tabs = _.compact([
|
70
|
+
overviewTab,
|
71
|
+
ownedTab,
|
72
|
+
membershipsTab,
|
73
|
+
permissionsTab,
|
74
|
+
annotationsTab,
|
75
|
+
auditTab
|
76
|
+
]);
|
50
77
|
|
51
|
-
|
52
|
-
|
53
|
-
|
78
|
+
return (
|
79
|
+
<div className="host">
|
80
|
+
<h2> Host {host.id} </h2>
|
81
|
+
<TabbedArea defaultActiveKey="overview">
|
82
|
+
{tabs}
|
83
|
+
</TabbedArea>
|
84
|
+
</div>
|
85
|
+
);
|
86
|
+
}
|
87
|
+
});
|
54
88
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
);
|
63
|
-
}
|
64
|
-
})
|
89
|
+
}).bind(conjur.views)
|
90
|
+
(
|
91
|
+
conjur,
|
92
|
+
React,
|
93
|
+
ReactBootstrap,
|
94
|
+
_
|
95
|
+
);
|
data/public/js/views/hosts.js
CHANGED
@@ -1,17 +1,13 @@
|
|
1
1
|
/** @jsx React.DOM */
|
2
|
+
/* global conjur, React */
|
2
3
|
|
3
4
|
(function(conjur, React) {
|
4
5
|
'use strict';
|
5
6
|
|
6
7
|
var GenericList = conjur.views.GenericList;
|
7
8
|
|
8
|
-
|
9
|
-
/*getInitialState: function() {
|
10
|
-
return { currentNamespace: "", members: [] };
|
11
|
-
},*/
|
9
|
+
this.HostBox = React.createClass({
|
12
10
|
render: function() {
|
13
|
-
//<NamespaceFilter currentNamespace={this.props.currentNamespace}
|
14
|
-
//namespaces={this.props.data.namespaces} />
|
15
11
|
return (
|
16
12
|
<div className="hostBox">
|
17
13
|
<div className="hostList">
|
data/public/js/views/layer.js
CHANGED
@@ -1,92 +1,137 @@
|
|
1
1
|
/** @jsx React.DOM */
|
2
|
+
/* global conjur, React, ReactBootstrap, _ */
|
2
3
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
}
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
4
|
+
(function(conjur, React, ReactBootstrap, _) {
|
5
|
+
'use strict';
|
6
|
+
|
7
|
+
var TabbedArea = ReactBootstrap.TabbedArea,
|
8
|
+
TabPane = ReactBootstrap.TabPane,
|
9
|
+
Tab = conjur.views.mixins.Tab,
|
10
|
+
AuditBox = window.AuditBox,
|
11
|
+
RoleLink = conjur.views.RoleLink,
|
12
|
+
HostLink = conjur.views.HostLink;
|
13
|
+
|
14
|
+
var abstractRole = function(expected) {
|
15
|
+
return function(role) {
|
16
|
+
var tokens = role.split(':'),
|
17
|
+
kind = tokens[1],
|
18
|
+
abstractKinds = ['@', 'layer'],
|
19
|
+
isAbstract = abstractKinds.indexOf(kind) !== -1;
|
20
|
+
|
21
|
+
return isAbstract === expected;
|
22
|
+
};
|
23
|
+
};
|
24
|
+
|
25
|
+
this.Layer = React.createClass({
|
26
|
+
mixins: [Tab],
|
27
|
+
|
28
|
+
render: function() {
|
29
|
+
var data = this.props.data;
|
30
|
+
|
31
|
+
var hosts = data.layer.hosts.map(function(host) {
|
32
|
+
return (
|
33
|
+
<li className="list-group-item list-group-item-noborder">
|
34
|
+
<HostLink data={host} />
|
35
|
+
</li>
|
36
|
+
);
|
37
|
+
});
|
38
|
+
|
39
|
+
var admins = data.admins.filter(abstractRole(false)).map(function(role) {
|
40
|
+
return (
|
41
|
+
<li className="list-group-item list-group-item-noborder">
|
42
|
+
<RoleLink id={role}/>
|
43
|
+
</li>
|
44
|
+
);
|
45
|
+
});
|
46
|
+
|
47
|
+
var users = data.users.filter(abstractRole(false)).map(function(role) {
|
48
|
+
return (
|
49
|
+
<li className="list-group-item list-group-item-noborder">
|
50
|
+
<RoleLink id={role}/>
|
51
|
+
</li>
|
52
|
+
);
|
53
|
+
});
|
54
|
+
|
55
|
+
// TODO: controls to add/remove admins/users/hosts
|
56
|
+
var overviewTab = (
|
57
|
+
<TabPane key="overview" tab="Overview">
|
58
|
+
<dl className="dl-horizontal">
|
59
|
+
<dt>Owner</dt>
|
60
|
+
<dd><RoleLink id={data.layer.ownerid} /></dd>
|
61
|
+
|
62
|
+
<dt>Created by</dt>
|
63
|
+
<dd><RoleLink id={data.layer.userid} /></dd>
|
64
|
+
</dl>
|
65
|
+
</TabPane>
|
66
|
+
);
|
67
|
+
|
68
|
+
var adminsTab = (
|
69
|
+
<TabPane key="admins" tab={conjur.utils.getTabname('Admins', admins)}>
|
70
|
+
<ul className="list-group">
|
71
|
+
{admins}
|
72
|
+
</ul>
|
73
|
+
</TabPane>
|
74
|
+
);
|
75
|
+
|
76
|
+
var usersTab = (
|
77
|
+
<TabPane key="users" tab={conjur.utils.getTabname('Users', users)}>
|
53
78
|
<ul className="list-group">
|
54
79
|
{users}
|
55
80
|
</ul>
|
56
|
-
|
57
|
-
|
58
|
-
|
81
|
+
</TabPane>
|
82
|
+
);
|
83
|
+
|
84
|
+
var hostsTab = (
|
85
|
+
<TabPane key="hosts" tab={conjur.utils.getTabname('Hosts', hosts)}>
|
59
86
|
<ul className="list-group">
|
60
87
|
{hosts}
|
61
88
|
</ul>
|
62
|
-
|
63
|
-
|
64
|
-
|
89
|
+
</TabPane>
|
90
|
+
);
|
91
|
+
|
92
|
+
var auditTab = (
|
93
|
+
<TabPane key="audit" tab="Recent Activity">
|
65
94
|
<div className="audit auditGroup">
|
66
|
-
<AuditBox roles={[layer.roleid]}
|
95
|
+
<AuditBox roles={[data.layer.roleid]}
|
96
|
+
resources={[data.layer.resource_identifier]}
|
97
|
+
tabview={true} />
|
67
98
|
</div>
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
99
|
+
</TabPane>
|
100
|
+
);
|
101
|
+
|
102
|
+
|
103
|
+
var permissionsTab = this.permissionsTab(data.layer.roleid),
|
104
|
+
membershipsTab = this.membershipsTab(data.layer.roleid),
|
105
|
+
annotationsTab = this.annotationsTab(),
|
106
|
+
ownedTab = this.ownedTab();
|
107
|
+
|
108
|
+
var tabs = _.compact([
|
109
|
+
overviewTab,
|
110
|
+
adminsTab,
|
111
|
+
usersTab,
|
112
|
+
hostsTab,
|
113
|
+
ownedTab,
|
114
|
+
membershipsTab,
|
115
|
+
permissionsTab,
|
116
|
+
annotationsTab,
|
117
|
+
auditTab
|
118
|
+
]);
|
119
|
+
|
120
|
+
return (
|
121
|
+
<div className="layer">
|
122
|
+
<h2>Layer {data.layer.id}</h2>
|
123
|
+
<TabbedArea defaultActiveKey="overview">
|
124
|
+
{tabs}
|
125
|
+
</TabbedArea>
|
126
|
+
</div>
|
127
|
+
);
|
128
|
+
}
|
129
|
+
});
|
130
|
+
|
131
|
+
}).bind(conjur.views)
|
132
|
+
(
|
133
|
+
conjur,
|
134
|
+
React,
|
135
|
+
ReactBootstrap,
|
136
|
+
_
|
137
|
+
);
|
data/public/js/views/layers.js
CHANGED
@@ -1,17 +1,13 @@
|
|
1
1
|
/** @jsx React.DOM */
|
2
|
+
/* global conjur, React */
|
2
3
|
|
3
4
|
(function(conjur, React) {
|
4
5
|
'use strict';
|
5
6
|
|
6
7
|
var GenericList = conjur.views.GenericList;
|
7
8
|
|
8
|
-
|
9
|
-
/* getInitialState: function() {
|
10
|
-
return { currentNamespace: "", members: [] };
|
11
|
-
}, */
|
9
|
+
this.LayerBox = React.createClass({
|
12
10
|
render: function() {
|
13
|
-
// <NamespaceFilter currentNamespace={this.props.currentNamespace}
|
14
|
-
// namespaces={this.props.data.namespaces} />
|
15
11
|
return (
|
16
12
|
<div className="layerBox">
|
17
13
|
<div className="layerList">
|
@@ -1,15 +1,22 @@
|
|
1
|
+
/* global conjur */
|
2
|
+
|
1
3
|
(function(conjur) {
|
2
4
|
'use strict';
|
3
5
|
|
4
|
-
|
5
|
-
handleSubmit: function(
|
6
|
+
this.Search = {
|
7
|
+
handleSubmit: function() {
|
6
8
|
var search = this.refs.input.getDOMNode().value;
|
7
9
|
|
8
|
-
if (search && search.length
|
9
|
-
conjur.app.router.navigate('/ui/search/' + encodeURIComponent(search),
|
10
|
+
if (search && search.length !== 0) {
|
11
|
+
conjur.app.router.navigate('/ui/search/' + window.encodeURIComponent(search),
|
12
|
+
{trigger: true});
|
10
13
|
}
|
11
14
|
|
12
15
|
return false;
|
13
16
|
}
|
14
17
|
};
|
15
|
-
|
18
|
+
|
19
|
+
}).bind(conjur.views.mixins)
|
20
|
+
(
|
21
|
+
conjur
|
22
|
+
);
|