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/package.json
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
{
|
2
|
+
"name": "conjur-asset-ui",
|
3
|
+
"version": "1.2.0",
|
4
|
+
"description": "",
|
5
|
+
"main": "",
|
6
|
+
"dependencies": {},
|
7
|
+
"devDependencies": {
|
8
|
+
"gulp": "~3.8.8",
|
9
|
+
"main-bower-files": "~2.0.0",
|
10
|
+
"gulp-sourcemaps": "~1.2.2",
|
11
|
+
"del": "~0.1.3",
|
12
|
+
"gulp-uglify": "~1.0.1",
|
13
|
+
"gulp-concat": "~2.4.1",
|
14
|
+
"gulp-react": "~1.0.2",
|
15
|
+
"gulp-cached": "~1.0.1",
|
16
|
+
"gulp-jshint": "~1.8.4",
|
17
|
+
"jshint-stylish": "~1.0.0",
|
18
|
+
"gulp-remember": "~0.2.1",
|
19
|
+
"gulp-less": "~1.3.5",
|
20
|
+
"gulp-minify-css": "~0.3.10",
|
21
|
+
"gulp-filter": "~1.0.2",
|
22
|
+
"gulp-flatten": "0.0.3",
|
23
|
+
"jest-cli": "~0.1.18",
|
24
|
+
"react": "~0.11.2",
|
25
|
+
"react-tools": "~0.11.2",
|
26
|
+
"gulp-autoprefixer": "~1.0.1",
|
27
|
+
"gulp-plumber": "~0.6.6"
|
28
|
+
},
|
29
|
+
"scripts": {
|
30
|
+
"test": "jest"
|
31
|
+
},
|
32
|
+
"jest": {
|
33
|
+
"scriptPreprocessor": "<rootDir>/preprocessor.js",
|
34
|
+
"unmockedModulePathPatterns": [
|
35
|
+
"<rootDir>/node_modules/react"
|
36
|
+
]
|
37
|
+
},
|
38
|
+
"repository": {
|
39
|
+
"type": "git",
|
40
|
+
"url": "git://github.com/conjurinc/conjur-asset-ui.git"
|
41
|
+
},
|
42
|
+
"author": "Nikolai Sevostjanov <nikolai.sevostjanov@gmail.com>",
|
43
|
+
"license": "MIT",
|
44
|
+
"bugs": {
|
45
|
+
"url": "https://github.com/conjurinc/conjur-asset-ui/issues"
|
46
|
+
}
|
47
|
+
}
|
data/preprocessor.js
ADDED
data/public/_client_libs.html
CHANGED
@@ -6,19 +6,6 @@
|
|
6
6
|
<![endif]-->
|
7
7
|
|
8
8
|
<script src="/js/lib/sorted-set.no-require.js"></script>
|
9
|
-
<script src="/js/lib/
|
10
|
-
<script src="http://fb.me/react-with-addons-0.11.1.js"></script>
|
11
|
-
<!--script src="/js/lib/react-with-addons.js"></script-->
|
12
|
-
<script src="/js/lib/JSXTransformer.js"></script>
|
13
|
-
<script src="http://cdnjs.cloudflare.com/ajax/libs/showdown/0.3.1/showdown.min.js"></script>
|
14
|
-
<script src="http://code.jquery.com/jquery-1.10.0.min.js"></script>
|
15
|
-
<script src="/js/lib/async.js"></script>
|
16
|
-
<script src="/js/lib/underscore-min.js"></script>
|
17
|
-
<script src="/js/lib/underscore.string.min.js"></script>
|
18
|
-
<script src="/js/lib/backbone.js"></script>
|
19
|
-
<script src="/js/lib/bootstrap.js"></script>
|
20
|
-
<script src="/js/lib/date.extensions.js"></script>
|
21
|
-
<script src="/js/lib/moment.js"></script>
|
9
|
+
<!-- <script src="/js/lib/date.extensions.js"></script> -->
|
22
10
|
<script src="/js/lib/prelude-browser-min.js"></script>
|
23
|
-
<script src="/js/
|
24
|
-
<script src="/js/lib/react-bootstrap.js"></script>
|
11
|
+
<script src="/build/js/vendor.min.js"></script>
|
data/public/css/styles.less
CHANGED
@@ -189,10 +189,6 @@ dl.propertyList {
|
|
189
189
|
background-position-y: -0.2em;
|
190
190
|
}
|
191
191
|
|
192
|
-
.pubkeysUser .list-group-item {
|
193
|
-
max-width: 300px;
|
194
|
-
}
|
195
|
-
|
196
192
|
.group.role-link, .group.resource-link {
|
197
193
|
.role-link-padding;
|
198
194
|
.group-icon(1.2em);
|
@@ -459,3 +455,173 @@ section.permissions {
|
|
459
455
|
.tab-pane {
|
460
456
|
padding-top: 5px;
|
461
457
|
}
|
458
|
+
|
459
|
+
/* ---------------------------------- */
|
460
|
+
/* -Variables------------------------ */
|
461
|
+
|
462
|
+
.b-breadcrumb {
|
463
|
+
|
464
|
+
}
|
465
|
+
|
466
|
+
.b-breadcrumbs {
|
467
|
+
|
468
|
+
}
|
469
|
+
|
470
|
+
.b-variable-activity {
|
471
|
+
|
472
|
+
}
|
473
|
+
|
474
|
+
.b-variable-updaters {
|
475
|
+
|
476
|
+
}
|
477
|
+
|
478
|
+
.b-variable-fetchers {
|
479
|
+
|
480
|
+
}
|
481
|
+
|
482
|
+
.b-variable-updates {
|
483
|
+
|
484
|
+
}
|
485
|
+
|
486
|
+
.b-variable-warnings {
|
487
|
+
|
488
|
+
}
|
489
|
+
|
490
|
+
.revealer {
|
491
|
+
cursor: pointer;
|
492
|
+
}
|
493
|
+
|
494
|
+
/* ---------------------------------- */
|
495
|
+
/* -Pubkeys-------------------------- */
|
496
|
+
|
497
|
+
.b-pubkeys {
|
498
|
+
|
499
|
+
}
|
500
|
+
|
501
|
+
.b-pubkeys__help {
|
502
|
+
|
503
|
+
}
|
504
|
+
|
505
|
+
.b-pubkeys__list {
|
506
|
+
padding-top: 10px;
|
507
|
+
}
|
508
|
+
|
509
|
+
.b-pubkeys__item {
|
510
|
+
|
511
|
+
}
|
512
|
+
|
513
|
+
.b-pubkeys__item--headline {
|
514
|
+
margin-bottom: 1px;
|
515
|
+
box-shadow: 0 2px 1px -2px gray;
|
516
|
+
}
|
517
|
+
|
518
|
+
.b-pubkey {
|
519
|
+
margin-right: 55px;
|
520
|
+
height: 20px;
|
521
|
+
}
|
522
|
+
|
523
|
+
.b-pubkey__logo {
|
524
|
+
display: inline-block;
|
525
|
+
width: 70px;
|
526
|
+
}
|
527
|
+
|
528
|
+
.b-pubkey__list {
|
529
|
+
display: inline-block;
|
530
|
+
}
|
531
|
+
|
532
|
+
.b-pubkey__name {
|
533
|
+
|
534
|
+
}
|
535
|
+
|
536
|
+
.b-pubkey__fingerprint {
|
537
|
+
|
538
|
+
}
|
539
|
+
|
540
|
+
.b-pubkey__info {
|
541
|
+
|
542
|
+
}
|
543
|
+
|
544
|
+
.b-pubkey__actions {
|
545
|
+
display: inline-block;
|
546
|
+
}
|
547
|
+
|
548
|
+
.b-chart-demo {
|
549
|
+
height: 300px;
|
550
|
+
}
|
551
|
+
|
552
|
+
/* ------------------------------------------------ */
|
553
|
+
/* Chart */
|
554
|
+
|
555
|
+
.b-chart {
|
556
|
+
height: 100%;
|
557
|
+
}
|
558
|
+
|
559
|
+
/* Line Chart */
|
560
|
+
|
561
|
+
.d3-line-chart {
|
562
|
+
font: 10px sans-serif;
|
563
|
+
}
|
564
|
+
|
565
|
+
.d3-line-chart__inner {
|
566
|
+
|
567
|
+
}
|
568
|
+
|
569
|
+
/* Axises */
|
570
|
+
|
571
|
+
.d3-axis {
|
572
|
+
|
573
|
+
}
|
574
|
+
|
575
|
+
.d3-axis__x line,
|
576
|
+
.d3-axis__x path {
|
577
|
+
fill: none;
|
578
|
+
stroke: #000;
|
579
|
+
shape-rendering: crispEdges;
|
580
|
+
}
|
581
|
+
|
582
|
+
.d3-axis__y line,
|
583
|
+
.d3-axis__y path {
|
584
|
+
fill: none;
|
585
|
+
stroke: #000;
|
586
|
+
shape-rendering: crispEdges;
|
587
|
+
}
|
588
|
+
|
589
|
+
/* Legend */
|
590
|
+
|
591
|
+
.d3-legend {
|
592
|
+
|
593
|
+
}
|
594
|
+
|
595
|
+
.d3-legend__item {
|
596
|
+
|
597
|
+
}
|
598
|
+
|
599
|
+
/* Graph */
|
600
|
+
|
601
|
+
.d3-graph {
|
602
|
+
|
603
|
+
}
|
604
|
+
|
605
|
+
.d3-graph__line {
|
606
|
+
|
607
|
+
}
|
608
|
+
|
609
|
+
.d3-graph__line path {
|
610
|
+
fill: none;
|
611
|
+
stroke: steelblue;
|
612
|
+
stroke-width: 1.5px;
|
613
|
+
}
|
614
|
+
|
615
|
+
.d3-graph__focus {
|
616
|
+
|
617
|
+
}
|
618
|
+
|
619
|
+
.d3-graph__focus circle {
|
620
|
+
fill: none;
|
621
|
+
stroke: steelblue;
|
622
|
+
}
|
623
|
+
|
624
|
+
.d3-graph__overlay {
|
625
|
+
fill: none;
|
626
|
+
pointer-events: all;
|
627
|
+
}
|
data/public/index.html.erb
CHANGED
@@ -7,10 +7,10 @@
|
|
7
7
|
|
8
8
|
<script src="/js/lib/pace.js"></script>
|
9
9
|
<!-- Bootstrap -->
|
10
|
-
<link href="/css/
|
10
|
+
<link href="/build/css/vendor.css" rel="stylesheet">
|
11
11
|
|
12
12
|
<!-- Some styles of our own -->
|
13
|
-
<link href="/css/styles.
|
13
|
+
<link href="/build/css/styles.css" rel="stylesheet">
|
14
14
|
|
15
15
|
<%= client_libs %>
|
16
16
|
</head>
|
@@ -20,7 +20,7 @@
|
|
20
20
|
<div class="navbar-collapse collapse">
|
21
21
|
<ul class="nav navbar-nav">
|
22
22
|
<li id="nav-home" class="nav-item"><a href="/ui">Dashboard</a></li>
|
23
|
-
<li
|
23
|
+
<li class="dropdown">
|
24
24
|
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
25
25
|
Directory <span class="caret"></span>
|
26
26
|
</a>
|
@@ -46,9 +46,8 @@
|
|
46
46
|
<span class="text"></span>
|
47
47
|
</div>
|
48
48
|
<div id="modal">
|
49
|
-
|
50
|
-
</div>
|
51
49
|
|
50
|
+
</div>
|
52
51
|
|
53
52
|
<div id="content"></div>
|
54
53
|
<div id="bottom" class="navbar-default">
|
@@ -56,7 +55,6 @@
|
|
56
55
|
</div>
|
57
56
|
</div><!-- /.container -->
|
58
57
|
|
59
|
-
|
60
|
-
<%= client_code %>
|
58
|
+
<script src="/build/js/app.min.js"></script>
|
61
59
|
</body>
|
62
60
|
</html>
|
data/public/js/init.js
CHANGED
@@ -1,107 +1,193 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
1
|
+
/* global _, Backbone, React, jQuery */
|
2
|
+
|
3
|
+
(function(_, Backbone, React, $) {
|
4
|
+
'use strict';
|
5
|
+
|
6
|
+
var conjur = window.conjur = {
|
7
|
+
models: {
|
8
|
+
Record: {}
|
9
|
+
},
|
10
|
+
collections: {},
|
11
|
+
views: {
|
12
|
+
mixins: {}
|
13
|
+
},
|
14
|
+
routers: {},
|
15
|
+
createEndpoints: function() {
|
16
|
+
function genericEndpoint(path) {
|
17
|
+
return function() {
|
18
|
+
var i = 0,
|
19
|
+
length = arguments.length,
|
20
|
+
localPath = [].concat(path); // clone it
|
21
|
+
|
22
|
+
for(; i < length && _.isString(arguments[i]); i++) {
|
23
|
+
localPath.push(arguments[i]);
|
24
|
+
}
|
25
|
+
|
26
|
+
var pathString = _.flatten(localPath.map(function(p) {
|
27
|
+
return p.split('/').map(encodeURIComponent);
|
28
|
+
})).join('/');
|
29
|
+
|
30
|
+
if (i < length) {
|
31
|
+
pathString += '?' + $.param(arguments[i]);
|
32
|
+
}
|
33
|
+
|
34
|
+
if (pathString.charAt(0) !== '/') {
|
35
|
+
pathString = '/' + pathString;
|
36
|
+
}
|
37
|
+
|
38
|
+
return pathString;
|
39
|
+
};
|
40
|
+
}
|
41
|
+
|
42
|
+
conjur.app.endpoints.authz = genericEndpoint(['api/authz',
|
43
|
+
conjur.app.configuration.account]);
|
44
|
+
conjur.app.endpoints.core = genericEndpoint('api');
|
45
|
+
},
|
46
|
+
initialize: function() {
|
47
|
+
conjur.app.namespace = conjur.models.Namespace();
|
48
|
+
conjur.app.lists.groups = new conjur.models.ResourceList('group');
|
49
|
+
conjur.app.lists.layers = new conjur.models.ResourceList('layer');
|
50
|
+
conjur.app.lists.variables = new conjur.models.VariableList();
|
51
|
+
conjur.app.lists.policies = new conjur.models.PolicyList();
|
52
|
+
conjur.app.lists.users = new conjur.models.UserList();
|
53
|
+
conjur.app.lists.hosts = new conjur.models.ResourceList('host');
|
54
|
+
|
55
|
+
var cookie = conjur.utils.readCookie('conjur_configuration');
|
56
|
+
|
57
|
+
conjur.app.configuration = JSON.parse(decodeURIComponent(cookie).replace(/\+/g, ' '));
|
58
|
+
conjur.app.userId = decodeURIComponent(conjur.utils.readCookie('conjur_userid'));
|
59
|
+
|
60
|
+
conjur.createEndpoints();
|
61
|
+
}
|
62
|
+
};
|
63
|
+
|
64
|
+
conjur.app = {
|
65
|
+
kind: '',
|
66
|
+
lists: {
|
67
|
+
groups: undefined,
|
68
|
+
layers: undefined,
|
69
|
+
variables: undefined,
|
70
|
+
policies: undefined,
|
71
|
+
users: undefined,
|
72
|
+
hosts: undefined
|
73
|
+
},
|
74
|
+
configuration: undefined,
|
75
|
+
userId: undefined,
|
76
|
+
// components: {},
|
77
|
+
router: undefined,
|
78
|
+
// globalIds: undefined,
|
79
|
+
endpoints: {},
|
80
|
+
flash: null
|
81
|
+
};
|
82
|
+
|
83
|
+
conjur.utils = {
|
84
|
+
errback: function(err) {
|
85
|
+
console.log('error:', err);
|
86
|
+
},
|
87
|
+
pluralize: function(kind) {
|
88
|
+
if (kind[kind.length-1] === 'y') {
|
89
|
+
return kind.slice(0, kind.length-1) + 'ies';
|
90
|
+
} else if (kind[kind.length - 1] !== 's') {
|
91
|
+
return kind + 's';
|
92
|
+
} else {
|
93
|
+
return kind;
|
94
|
+
}
|
95
|
+
},
|
96
|
+
// http://www.quirksmode.org/js/cookies.html
|
97
|
+
readCookie: function(name) {
|
98
|
+
var nameEQ = name + '=',
|
99
|
+
ca = document.cookie.split(';');
|
19
100
|
|
20
|
-
|
21
|
-
|
22
|
-
})).join("/");
|
101
|
+
for (var i = 0; i < ca.length; i++) {
|
102
|
+
var c = ca[i];
|
23
103
|
|
24
|
-
|
25
|
-
|
104
|
+
while (c.charAt(0) === ' ') {
|
105
|
+
c = c.substring(1, c.length);
|
26
106
|
}
|
27
107
|
|
28
|
-
if (
|
29
|
-
|
108
|
+
if (c.indexOf(nameEQ) === 0) {
|
109
|
+
return c.substring(nameEQ.length, c.length);
|
30
110
|
}
|
111
|
+
}
|
31
112
|
|
32
|
-
|
33
|
-
|
34
|
-
|
113
|
+
return null;
|
114
|
+
},
|
115
|
+
getTabname: function(header, set) {
|
116
|
+
if (!set || !set.length) {
|
117
|
+
return header + ' (0)';
|
118
|
+
}
|
35
119
|
|
36
|
-
|
37
|
-
conjur.app.endpoints.core = genericEndpoint('api');
|
38
|
-
},
|
39
|
-
initialize: function() {
|
40
|
-
conjur.app.namespace = conjur.models.Namespace();
|
41
|
-
conjur.app.lists.groups = new conjur.models.ResourceList('group');
|
42
|
-
conjur.app.lists.layers = new conjur.models.ResourceList('layer');
|
43
|
-
conjur.app.lists.variables = new conjur.models.VariableList();
|
44
|
-
conjur.app.lists.policies = new conjur.models.PolicyList();
|
45
|
-
conjur.app.lists.users = new conjur.models.UserList();
|
46
|
-
conjur.app.lists.hosts = new conjur.models.ResourceList('host');
|
47
|
-
conjur.app.configuration = JSON.parse(decodeURIComponent(conjur.utils.readCookie('conjur_configuration')).replace(/\+/g, ' '));
|
48
|
-
conjur.app.userId = decodeURIComponent(conjur.utils.readCookie('conjur_userid'));
|
49
|
-
|
50
|
-
conjur.createEndpoints();
|
51
|
-
}
|
52
|
-
};
|
53
|
-
|
54
|
-
window.conjur.app = {
|
55
|
-
kind: '',
|
56
|
-
lists: {
|
57
|
-
groups: undefined,
|
58
|
-
layers: undefined,
|
59
|
-
variables: undefined,
|
60
|
-
policies: undefined,
|
61
|
-
users: undefined,
|
62
|
-
hosts: undefined
|
63
|
-
},
|
64
|
-
configuration: undefined,
|
65
|
-
userId: undefined,
|
66
|
-
// components: {},
|
67
|
-
router: undefined,
|
68
|
-
// globalIds: undefined,
|
69
|
-
endpoints: {},
|
70
|
-
flash: null
|
71
|
-
};
|
72
|
-
|
73
|
-
window.conjur.utils = {
|
74
|
-
errback: function(err) {
|
75
|
-
console.log('error:', err);
|
76
|
-
},
|
77
|
-
pluralize: function(kind) {
|
78
|
-
if (kind[kind.length-1] === 'y') {
|
79
|
-
return kind.slice(0, kind.length-1) + 'ies';
|
80
|
-
} else if (kind[kind.length - 1] != 's') {
|
81
|
-
return kind + 's';
|
82
|
-
} else {
|
83
|
-
return kind;
|
84
|
-
}
|
85
|
-
},
|
86
|
-
// http://www.quirksmode.org/js/cookies.html
|
87
|
-
readCookie: function(name) {
|
88
|
-
var nameEQ = name + "=";
|
89
|
-
var ca = document.cookie.split(';');
|
90
|
-
for (var i = 0; i < ca.length; i++) {
|
91
|
-
var c = ca[i];
|
92
|
-
while (c.charAt(0) == ' ')
|
93
|
-
c = c.substring(1, c.length);
|
94
|
-
if (c.indexOf(nameEQ) == 0)
|
95
|
-
return c.substring(nameEQ.length, c.length);
|
120
|
+
return header + ' (' + set.length + ')';
|
96
121
|
}
|
97
|
-
return null;
|
98
|
-
}
|
99
|
-
};
|
100
|
-
|
101
|
-
function get_tabname(header, set) {
|
102
|
-
if (!set || !set.length) {
|
103
|
-
return header + " (0)";
|
104
122
|
};
|
105
123
|
|
106
|
-
|
107
|
-
|
124
|
+
// var components = {};
|
125
|
+
// var globalIds;
|
126
|
+
|
127
|
+
// function updateNamespace(ns) {
|
128
|
+
// conjur.app.namespace.currentNamespace = ns;
|
129
|
+
// // it won't work with reactjs 11.0 -- state should be set from within component
|
130
|
+
// // components[kind].setState({currentNamespace: ns, members: lists[kind].members(ns)});
|
131
|
+
// }
|
132
|
+
|
133
|
+
$(document).ready(function() {
|
134
|
+
conjur.initialize();
|
135
|
+
|
136
|
+
_.mixin(_.str.exports());
|
137
|
+
_.mixin({deepExtend: window.underscoreDeepExtend(_)});
|
138
|
+
|
139
|
+
// Use delegation to avoid initial DOM selection and allow all matching elements to bubble
|
140
|
+
$(document).delegate('a', 'click', function(evt) {
|
141
|
+
// Get the anchor href and protcol
|
142
|
+
var href = $(this).attr('href');
|
143
|
+
var protocol = this.protocol + '//';
|
144
|
+
|
145
|
+
// Ensure the protocol is not part of URL, meaning its relative.
|
146
|
+
// Stop the event bubbling to ensure the link will not cause a page refresh.
|
147
|
+
if (typeof(href) === 'string' &&
|
148
|
+
href.slice(0, protocol.length) !== protocol &&
|
149
|
+
href[0] !== '#') {
|
150
|
+
|
151
|
+
evt.preventDefault();
|
152
|
+
|
153
|
+
// Note by using Backbone.history.navigate, router events will not be
|
154
|
+
// triggered. If this is a problem, change this to navigate on your
|
155
|
+
// router.
|
156
|
+
Backbone.history.navigate(href, {trigger:true});
|
157
|
+
}
|
158
|
+
});
|
159
|
+
|
160
|
+
conjur.app.router = new conjur.Workspace();
|
161
|
+
|
162
|
+
conjur.app.router.on('all', function(route) {
|
163
|
+
console.log('router.all', route, conjur.app.flash);
|
164
|
+
|
165
|
+
if (route !== 'route') {
|
166
|
+
return;
|
167
|
+
}
|
168
|
+
|
169
|
+
if (conjur.app.flash) {
|
170
|
+
var old = conjur.app.flash;
|
171
|
+
conjur.app.flash = null;
|
172
|
+
var $flash = $('#flash');
|
173
|
+
var $text = $('.text', $flash);
|
174
|
+
$text.text(old);
|
175
|
+
$flash.show();
|
176
|
+
} else {
|
177
|
+
$('#flash').hide();
|
178
|
+
}
|
179
|
+
});
|
180
|
+
|
181
|
+
Backbone.history.start({pushState: true});
|
182
|
+
|
183
|
+
React.renderComponent(conjur.views.NavSearchForm(null),
|
184
|
+
document.getElementById('inlineSearchContainer'));
|
185
|
+
});
|
186
|
+
|
187
|
+
})
|
188
|
+
(
|
189
|
+
_,
|
190
|
+
Backbone,
|
191
|
+
React,
|
192
|
+
jQuery
|
193
|
+
);
|
@@ -364,9 +364,8 @@ var requirejs, require, define;
|
|
364
364
|
//If want a value immediately, use require('id') instead -- something
|
365
365
|
//that works in almond on the global level, but not guaranteed and
|
366
366
|
//unlikely to work in other AMD implementations.
|
367
|
-
|
368
|
-
|
369
|
-
}, 4);
|
367
|
+
|
368
|
+
main(undef, deps, callback, relName);
|
370
369
|
}
|
371
370
|
|
372
371
|
return req;
|
@@ -505,9 +504,6 @@ define("almond", function(){});
|
|
505
504
|
|
506
505
|
}).call(this);
|
507
506
|
|
508
|
-
/*
|
509
|
-
//@ sourceMappingURL=AbstractSortedSet.js.map
|
510
|
-
*/;
|
511
507
|
(function() {
|
512
508
|
define('SortedSet/ArrayStrategy',[],function() {
|
513
509
|
var ArrayStrategy, Iterator, binarySearchForIndex;
|
@@ -631,9 +627,6 @@ define("almond", function(){});
|
|
631
627
|
|
632
628
|
}).call(this);
|
633
629
|
|
634
|
-
/*
|
635
|
-
//@ sourceMappingURL=ArrayStrategy.js.map
|
636
|
-
*/;
|
637
630
|
(function() {
|
638
631
|
define('SortedSet/BinaryTreeIterator',[], function() {
|
639
632
|
var BinaryTreeIterator, descendAllTheWay, moveCursor;
|
@@ -776,9 +769,6 @@ define("almond", function(){});
|
|
776
769
|
|
777
770
|
}).call(this);
|
778
771
|
|
779
|
-
/*
|
780
|
-
//@ sourceMappingURL=BinaryTreeIterator.js.map
|
781
|
-
*/;
|
782
772
|
(function() {
|
783
773
|
define('SortedSet/AbstractBinaryTreeStrategy',['./BinaryTreeIterator'], function(BinaryTreeIterator) {
|
784
774
|
var AbstractBinaryTree, binaryTreeTraverse;
|
@@ -848,9 +838,6 @@ define("almond", function(){});
|
|
848
838
|
|
849
839
|
}).call(this);
|
850
840
|
|
851
|
-
/*
|
852
|
-
//@ sourceMappingURL=AbstractBinaryTreeStrategy.js.map
|
853
|
-
*/;
|
854
841
|
(function() {
|
855
842
|
var __hasProp = {}.hasOwnProperty,
|
856
843
|
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
|
@@ -940,9 +927,6 @@ define("almond", function(){});
|
|
940
927
|
|
941
928
|
}).call(this);
|
942
929
|
|
943
|
-
/*
|
944
|
-
//@ sourceMappingURL=BinaryTreeStrategy.js.map
|
945
|
-
*/;
|
946
930
|
(function() {
|
947
931
|
var __hasProp = {}.hasOwnProperty,
|
948
932
|
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
|
@@ -1121,9 +1105,6 @@ define("almond", function(){});
|
|
1121
1105
|
|
1122
1106
|
}).call(this);
|
1123
1107
|
|
1124
|
-
/*
|
1125
|
-
//@ sourceMappingURL=RedBlackTreeStrategy.js.map
|
1126
|
-
*/;
|
1127
1108
|
(function() {
|
1128
1109
|
var __hasProp = {}.hasOwnProperty,
|
1129
1110
|
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
|
@@ -1153,9 +1134,6 @@ define("almond", function(){});
|
|
1153
1134
|
|
1154
1135
|
}).call(this);
|
1155
1136
|
|
1156
|
-
/*
|
1157
|
-
//@ sourceMappingURL=SortedSet.js.map
|
1158
|
-
*/;
|
1159
1137
|
(function() {
|
1160
1138
|
require(['./SortedSet'], function(SortedSet) {
|
1161
1139
|
return window.SortedSet = SortedSet;
|
@@ -1163,8 +1141,5 @@ define("almond", function(){});
|
|
1163
1141
|
|
1164
1142
|
}).call(this);
|
1165
1143
|
|
1166
|
-
/*
|
1167
|
-
//@ sourceMappingURL=index.js.map
|
1168
|
-
*/;
|
1169
1144
|
define("index", function(){});
|
1170
|
-
}());
|
1145
|
+
}());
|