conjur-asset-ui-api 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. checksums.yaml +7 -0
  2. data/.git-hooks/pre_commit/ensure_livescript_compiled.rb +31 -0
  3. data/.git-hooks/pre_commit/trailing_whitespace.rb +26 -0
  4. data/.gitignore +20 -0
  5. data/.overcommit.yml +5 -0
  6. data/.project +18 -0
  7. data/Gemfile +8 -0
  8. data/LICENSE.txt +22 -0
  9. data/README.md +41 -0
  10. data/Rakefile +1 -0
  11. data/compile_ls +2 -0
  12. data/conjur-asset-ui.gemspec +36 -0
  13. data/lib/conjur-asset-ui-version.rb +7 -0
  14. data/lib/conjur-asset-ui.rb +7 -0
  15. data/lib/conjur/audit/follower.rb +63 -0
  16. data/lib/conjur/audit/humanizer.rb +53 -0
  17. data/lib/conjur/audit/tableizer.rb +55 -0
  18. data/lib/conjur/command/ui.rb +38 -0
  19. data/lib/conjur/webserver/api_proxy.rb +94 -0
  20. data/lib/conjur/webserver/audit_stream.rb +92 -0
  21. data/lib/conjur/webserver/authorize.rb +28 -0
  22. data/lib/conjur/webserver/conjur_info.rb +33 -0
  23. data/lib/conjur/webserver/home.rb +36 -0
  24. data/lib/conjur/webserver/login.rb +50 -0
  25. data/lib/conjur/webserver/server.rb +111 -0
  26. data/livescript/views/audit.ls +124 -0
  27. data/public/css/bootstrap.css +7 -0
  28. data/public/css/styles.less +400 -0
  29. data/public/fonts/glyphicons-halflings-regular.eot +0 -0
  30. data/public/fonts/glyphicons-halflings-regular.svg +229 -0
  31. data/public/fonts/glyphicons-halflings-regular.ttf +0 -0
  32. data/public/fonts/glyphicons-halflings-regular.woff +0 -0
  33. data/public/images/conjur-logo.svg +26 -0
  34. data/public/images/icon-client-pc.svg +12 -0
  35. data/public/images/icon-environment.png +0 -0
  36. data/public/images/icon-person.svg +12 -0
  37. data/public/images/icon-service-dots.svg +13 -0
  38. data/public/images/icon-variable.png +0 -0
  39. data/public/index.html +121 -0
  40. data/public/js/lib/JSXTransformer.js +10862 -0
  41. data/public/js/lib/async.js +958 -0
  42. data/public/js/lib/backbone.js +2 -0
  43. data/public/js/lib/bootstrap.js +6 -0
  44. data/public/js/lib/date.extensions.js +141 -0
  45. data/public/js/lib/less.js +16 -0
  46. data/public/js/lib/moment.js +7768 -0
  47. data/public/js/lib/pace.js +2 -0
  48. data/public/js/lib/prelude-browser-min.js +1 -0
  49. data/public/js/lib/react-with-addons.js +15505 -0
  50. data/public/js/lib/react.js +14469 -0
  51. data/public/js/lib/sorted-set.no-require.js +1170 -0
  52. data/public/js/lib/sorted-set.no-require.js.txt +6 -0
  53. data/public/js/lib/underscore-min.js +6 -0
  54. data/public/js/lib/underscore.string.min.js +1 -0
  55. data/public/js/main.js +353 -0
  56. data/public/js/models/namespace.js +6 -0
  57. data/public/js/models/policyList.js +10 -0
  58. data/public/js/models/record.js +26 -0
  59. data/public/js/models/resourceList.js +61 -0
  60. data/public/js/models/userList.js +16 -0
  61. data/public/js/models/variableList.js +12 -0
  62. data/public/js/views/audit.js +191 -0
  63. data/public/js/views/dashboard.js +35 -0
  64. data/public/js/views/generic.js +42 -0
  65. data/public/js/views/group.js +32 -0
  66. data/public/js/views/groups.js +18 -0
  67. data/public/js/views/host.js +40 -0
  68. data/public/js/views/hosts.js +18 -0
  69. data/public/js/views/layer.js +63 -0
  70. data/public/js/views/layers.js +18 -0
  71. data/public/js/views/mixins/search.js +9 -0
  72. data/public/js/views/namespaces.js +40 -0
  73. data/public/js/views/navSearch.js +16 -0
  74. data/public/js/views/permissions.js +91 -0
  75. data/public/js/views/policies.js +17 -0
  76. data/public/js/views/policy.js +23 -0
  77. data/public/js/views/resource.js +23 -0
  78. data/public/js/views/role.js +18 -0
  79. data/public/js/views/searchResults.js +146 -0
  80. data/public/js/views/time.js +14 -0
  81. data/public/js/views/user.js +22 -0
  82. data/public/js/views/users.js +18 -0
  83. data/public/js/views/variable.js +41 -0
  84. data/public/js/views/variables.js +18 -0
  85. data/vendor/prelude-ls/.gitignore +2 -0
  86. data/vendor/prelude-ls/.travis.yml +3 -0
  87. data/vendor/prelude-ls/CHANGELOG.md +81 -0
  88. data/vendor/prelude-ls/LICENSE +22 -0
  89. data/vendor/prelude-ls/Makefile +50 -0
  90. data/vendor/prelude-ls/README.md +15 -0
  91. data/vendor/prelude-ls/browser/prelude-browser-min.js +1 -0
  92. data/vendor/prelude-ls/browser/prelude-browser.js +1172 -0
  93. data/vendor/prelude-ls/lib/Func.js +40 -0
  94. data/vendor/prelude-ls/lib/List.js +602 -0
  95. data/vendor/prelude-ls/lib/Num.js +129 -0
  96. data/vendor/prelude-ls/lib/Obj.js +153 -0
  97. data/vendor/prelude-ls/lib/Str.js +68 -0
  98. data/vendor/prelude-ls/lib/index.js +164 -0
  99. data/vendor/prelude-ls/package.json +50 -0
  100. data/vendor/prelude-ls/package.ls +46 -0
  101. data/vendor/prelude-ls/src/Func.ls +17 -0
  102. data/vendor/prelude-ls/src/List.ls +299 -0
  103. data/vendor/prelude-ls/src/Num.ls +83 -0
  104. data/vendor/prelude-ls/src/Obj.ls +61 -0
  105. data/vendor/prelude-ls/src/Str.ls +32 -0
  106. data/vendor/prelude-ls/src/index.ls +56 -0
  107. data/vendor/prelude-ls/test/Func.ls +36 -0
  108. data/vendor/prelude-ls/test/List.ls +751 -0
  109. data/vendor/prelude-ls/test/Num.ls +258 -0
  110. data/vendor/prelude-ls/test/Obj.ls +145 -0
  111. data/vendor/prelude-ls/test/Prelude.ls +49 -0
  112. data/vendor/prelude-ls/test/Str.ls +208 -0
  113. data/vendor/prelude-ls/test/browser.html +5 -0
  114. metadata +328 -0
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "prelude-ls",
3
+ "version": "1.0.3",
4
+ "author": "George Zahariev <z@georgezahariev.com>",
5
+ "description": "prelude.ls is a functionally oriented utility library. It is powerful and flexible. Almost all of its functions are curried. It is written in, and is the recommended base library for, LiveScript.",
6
+ "keywords": [
7
+ "prelude",
8
+ "livescript",
9
+ "utility",
10
+ "ls",
11
+ "coffeescript",
12
+ "javascript",
13
+ "library",
14
+ "functional",
15
+ "array",
16
+ "list",
17
+ "object",
18
+ "string"
19
+ ],
20
+ "main": "lib/",
21
+ "files": [
22
+ "lib/",
23
+ "README.md",
24
+ "LICENSE"
25
+ ],
26
+ "homepage": "http://preludels.com",
27
+ "bugs": "https://github.com/gkz/prelude-ls/issues",
28
+ "licenses": [
29
+ {
30
+ "type": "MIT",
31
+ "url": "https://raw.github.com/gkz/prelude-ls/master/LICENSE"
32
+ }
33
+ ],
34
+ "engines": {
35
+ "node": ">= 0.8.0"
36
+ },
37
+ "repository": {
38
+ "type": "git",
39
+ "url": "git://github.com/gkz/prelude-ls.git"
40
+ },
41
+ "scripts": {
42
+ "test": "make test"
43
+ },
44
+ "devDependencies": {
45
+ "LiveScript": "~1.1.1",
46
+ "uglify-js": "~2.2.5",
47
+ "mocha": "~1.8.2",
48
+ "browserify": "~2.13.2"
49
+ }
50
+ }
@@ -0,0 +1,46 @@
1
+ name: 'prelude-ls'
2
+ version: '1.0.3'
3
+
4
+ author: 'George Zahariev <z@georgezahariev.com>'
5
+
6
+ description: "prelude.ls is a functionally oriented utility library. It is powerful and flexible. Almost all of its functions are curried. It is written in, and is the recommended base library for, LiveScript."
7
+
8
+ keywords:
9
+ 'prelude'
10
+ 'livescript'
11
+ 'utility'
12
+ 'ls'
13
+ 'coffeescript'
14
+ 'javascript'
15
+ 'library'
16
+ 'functional'
17
+ 'array'
18
+ 'list'
19
+ 'object'
20
+ 'string'
21
+
22
+ main: 'lib/'
23
+ files:
24
+ 'lib/'
25
+ 'README.md'
26
+ 'LICENSE'
27
+
28
+ homepage: 'http://preludels.com'
29
+ bugs: 'https://github.com/gkz/prelude-ls/issues'
30
+ licenses:
31
+ * type: 'MIT'
32
+ url: 'https://raw.github.com/gkz/prelude-ls/master/LICENSE'
33
+ ...
34
+ engines:
35
+ node: '>= 0.8.0'
36
+ repository:
37
+ type: 'git'
38
+ url: 'git://github.com/gkz/prelude-ls.git'
39
+ scripts:
40
+ test: "make test"
41
+
42
+ dev-dependencies:
43
+ LiveScript: '~1.1.1'
44
+ 'uglify-js': '~2.2.5'
45
+ mocha: '~1.8.2'
46
+ browserify: '~2.13.2'
@@ -0,0 +1,17 @@
1
+ curry = (f) ->
2
+ curry$ f # using util method curry$ from livescript
3
+
4
+ flip = (f, x, y) --> f y, x
5
+
6
+ fix = (f) ->
7
+ ( (g, x) -> -> f(g g) ...arguments ) do
8
+ (g, x) -> -> f(g g) ...arguments
9
+
10
+ apply = (f, list) -->
11
+ f.apply null, list
12
+
13
+ #? memoize, wrap
14
+
15
+ module.exports = {
16
+ curry, flip, fix, apply
17
+ }
@@ -0,0 +1,299 @@
1
+ each = (f, xs) -->
2
+ for x in xs then f x
3
+ xs
4
+
5
+ map = (f, xs) -->
6
+ [f x for x in xs]
7
+
8
+ compact = (xs) -->
9
+ [x for x in xs when x]
10
+
11
+ filter = (f, xs) -->
12
+ [x for x in xs when f x]
13
+
14
+ reject = (f, xs) -->
15
+ [x for x in xs when not f x]
16
+
17
+ partition = (f, xs) -->
18
+ passed = []
19
+ failed = []
20
+ for x in xs
21
+ (if f x then passed else failed).push x
22
+ [passed, failed]
23
+
24
+ find = (f, xs) -->
25
+ for x in xs when f x then return x
26
+ void
27
+
28
+ head = first = (xs) ->
29
+ return void unless xs.length
30
+ xs.0
31
+
32
+ tail = (xs) ->
33
+ return void unless xs.length
34
+ xs.slice 1
35
+
36
+ last = (xs) ->
37
+ return void unless xs.length
38
+ xs[*-1]
39
+
40
+ initial = (xs) ->
41
+ len = xs.length
42
+ return void unless len
43
+ xs.slice 0, len - 1
44
+
45
+ empty = (xs) ->
46
+ not xs.length
47
+
48
+ reverse = (xs) ->
49
+ xs.concat!.reverse!
50
+
51
+ unique = (xs) ->
52
+ result = []
53
+ for x in xs when x not in result
54
+ result.push x
55
+ result
56
+
57
+ fold = foldl = (f, memo, xs) -->
58
+ for x in xs then memo = f memo, x
59
+ memo
60
+
61
+ fold1 = foldl1 = (f, xs) -->
62
+ fold f, xs.0, xs.slice 1
63
+
64
+ foldr = (f, memo, xs) -->
65
+ fold f, memo, (xs.concat!.reverse!)
66
+
67
+ foldr1 = (f, xs) -->
68
+ ys = xs.concat!.reverse!
69
+ fold f, ys.0, ys.slice 1
70
+
71
+ unfoldr = (f, b) -->
72
+ result = []
73
+ x = b
74
+ while (f x)?
75
+ result.push that.0
76
+ x = that.1
77
+ result
78
+
79
+ concat = (xss) ->
80
+ [].concat.apply [], xss
81
+
82
+ concat-map = (f, xs) -->
83
+ [].concat.apply [], [f x for x in xs]
84
+
85
+ flatten = (xs) -->
86
+ [].concat.apply [], [(if typeof! x is 'Array' then flatten x else x) for x in xs]
87
+
88
+ difference = (xs, ...yss) ->
89
+ results = []
90
+ :outer for x in xs
91
+ for ys in yss
92
+ continue outer if x in ys
93
+ results.push x
94
+ results
95
+
96
+ intersection = (xs, ...yss) ->
97
+ results = []
98
+ :outer for x in xs
99
+ for ys in yss
100
+ continue outer unless x in ys
101
+ results.push x
102
+ results
103
+
104
+ union = (...xss) ->
105
+ results = []
106
+ for xs in xss
107
+ for x in xs
108
+ results.push x unless x in results
109
+ results
110
+
111
+ count-by = (f, xs) -->
112
+ results = {}
113
+ for x in xs
114
+ key = f x
115
+ if key of results
116
+ results[key] += 1
117
+ else
118
+ results[key] = 1
119
+ results
120
+
121
+ group-by = (f, xs) -->
122
+ results = {}
123
+ for x in xs
124
+ key = f x
125
+ if key of results
126
+ results[key].push x
127
+ else
128
+ results[key] = [x]
129
+ results
130
+
131
+ and-list = (xs) ->
132
+ for x in xs when not x
133
+ return false
134
+ true
135
+
136
+ or-list = (xs) ->
137
+ for x in xs when x
138
+ return true
139
+ false
140
+
141
+ any = (f, xs) -->
142
+ for x in xs when f x
143
+ return true
144
+ false
145
+
146
+ all = (f, xs) -->
147
+ for x in xs when not f x
148
+ return false
149
+ true
150
+
151
+ sort = (xs) ->
152
+ xs.concat!.sort (x, y) ->
153
+ if x > y
154
+ 1
155
+ else if x < y
156
+ -1
157
+ else
158
+ 0
159
+
160
+ sort-with = (f, xs) -->
161
+ return [] unless xs.length
162
+ xs.concat!.sort f
163
+
164
+ sort-by = (f, xs) -->
165
+ return [] unless xs.length
166
+ xs.concat!.sort (x, y) ->
167
+ if (f x) > (f y)
168
+ 1
169
+ else if (f x) < (f y)
170
+ -1
171
+ else
172
+ 0
173
+
174
+ sum = (xs) ->
175
+ result = 0
176
+ for x in xs
177
+ result += x
178
+ result
179
+
180
+ product = (xs) ->
181
+ result = 1
182
+ for x in xs
183
+ result *= x
184
+ result
185
+
186
+ mean = average = (xs) ->
187
+ sum = 0
188
+ len = xs.length
189
+ for i til len
190
+ sum += xs[i]
191
+ sum / len
192
+
193
+ maximum = (xs) ->
194
+ max = xs.0
195
+ for x in xs.slice 1 when x > max
196
+ max = x
197
+ max
198
+
199
+ minimum = (xs) ->
200
+ min = xs.0
201
+ for x in xs.slice 1 when x < min
202
+ min = x
203
+ min
204
+
205
+ scan = scanl = (f, memo, xs) -->
206
+ last = memo
207
+ [memo] ++ [last = f last, x for x in xs]
208
+
209
+ scan1 = scanl1 = (f, xs) -->
210
+ return void unless xs.length
211
+ scan f, xs.0, xs.slice 1
212
+
213
+ scanr = (f, memo, xs) -->
214
+ xs = xs.concat!.reverse!
215
+ (scan f, memo, xs).reverse!
216
+
217
+ scanr1 = (f, xs) -->
218
+ return void unless xs.length
219
+ xs = xs.concat!.reverse!
220
+ (scan f, xs.0, xs.slice 1).reverse!
221
+
222
+ slice = (x, y, xs) -->
223
+ xs.slice x, y
224
+
225
+ take = (n, xs) -->
226
+ if n <= 0
227
+ xs.slice 0, 0
228
+ else if not xs.length
229
+ xs
230
+ else
231
+ xs.slice 0, n
232
+
233
+ drop = (n, xs) -->
234
+ if n <= 0 or not xs.length
235
+ xs
236
+ else
237
+ xs.slice n
238
+
239
+ split-at = (n, xs) --> [(take n, xs), (drop n, xs)]
240
+
241
+ take-while = (p, xs) -->
242
+ len = xs.length
243
+ return xs unless len
244
+ i = 0
245
+ while i < len and p xs[i]
246
+ i += 1
247
+ xs.slice 0 i
248
+
249
+ drop-while = (p, xs) -->
250
+ len = xs.length
251
+ return xs unless len
252
+ i = 0
253
+ while i < len and p xs[i]
254
+ i += 1
255
+ xs.slice i
256
+
257
+ span = (p, xs) --> [(take-while p, xs), (drop-while p, xs)]
258
+
259
+ break-list = (p, xs) --> span (not) << p, xs
260
+
261
+ zip = (xs, ys) -->
262
+ result = []
263
+ len = ys.length
264
+ for x, i in xs
265
+ break if i is len
266
+ result.push [x, ys[i]]
267
+ result
268
+
269
+ zip-with = (f, xs, ys) -->
270
+ result = []
271
+ len = ys.length
272
+ for x, i in xs
273
+ break if i is len
274
+ result.push f x, ys[i]
275
+ result
276
+
277
+ zip-all = (...xss) ->
278
+ min-length = 9e9
279
+ for xs in xss
280
+ min-length <?= xs.length
281
+ [[xs[i] for xs in xss] for i til min-length]
282
+
283
+ zip-all-with = (f, ...xss) ->
284
+ min-length = 9e9
285
+ for xs in xss
286
+ min-length <?= xs.length
287
+ [f.apply(null, [xs[i] for xs in xss]) for i til min-length]
288
+
289
+ module.exports = {
290
+ each, map, filter, compact, reject, partition, find,
291
+ head, first, tail, last, initial, empty,
292
+ reverse, difference, intersection, union, count-by, group-by,
293
+ fold, fold1, foldl, foldl1, foldr, foldr1, unfoldr, and-list, or-list,
294
+ any, all, unique, sort, sort-with, sort-by, sum, product, mean, average,
295
+ concat, concat-map, flatten,
296
+ maximum, minimum, scan, scan1, scanl, scanl1, scanr, scanr1,
297
+ slice, take, drop, split-at, take-while, drop-while, span, break-list,
298
+ zip, zip-with, zip-all, zip-all-with,
299
+ }
@@ -0,0 +1,83 @@
1
+ max = (>?)
2
+
3
+ min = (<?)
4
+
5
+ negate = (x) -> -x
6
+
7
+ abs = Math.abs
8
+
9
+ signum = (x) ->
10
+ if x < 0
11
+ -1
12
+ else if x > 0
13
+ 1
14
+ else
15
+ 0
16
+
17
+ quot = (x, y) --> ~~(x / y)
18
+
19
+ rem = (%)
20
+
21
+ div = (x, y) --> Math.floor x / y
22
+
23
+ mod = (%%)
24
+
25
+ recip = (1 /)
26
+
27
+ pi = Math.PI
28
+
29
+ tau = pi * 2
30
+
31
+ exp = Math.exp
32
+
33
+ sqrt = Math.sqrt
34
+
35
+ ln = Math.log
36
+
37
+ pow = (^)
38
+
39
+ sin = Math.sin
40
+
41
+ tan = Math.tan
42
+
43
+ cos = Math.cos
44
+
45
+ asin = Math.asin
46
+
47
+ acos = Math.acos
48
+
49
+ atan = Math.atan
50
+
51
+ atan2 = (x, y) --> Math.atan2 x, y
52
+
53
+ truncate = (x) -> ~~x
54
+
55
+ round = Math.round
56
+
57
+ ceiling = Math.ceil
58
+
59
+ floor = Math.floor
60
+
61
+ is-it-NaN = (x) -> x isnt x
62
+
63
+ even = (x) -> x % 2 == 0
64
+
65
+ odd = (x) -> x % 2 != 0
66
+
67
+ gcd = (x, y) -->
68
+ x = Math.abs x
69
+ y = Math.abs y
70
+ until y is 0
71
+ z = x % y
72
+ x = y
73
+ y = z
74
+ x
75
+
76
+ lcm = (x, y) -->
77
+ Math.abs Math.floor (x / (gcd x, y) * y)
78
+
79
+ module.exports = {
80
+ max, min, negate, abs, signum, quot, rem, div, mod, recip,
81
+ pi, tau, exp, sqrt, ln, pow, sin, tan, cos, acos, asin, atan, atan2,
82
+ truncate, round, ceiling, floor, is-it-NaN, even, odd, gcd, lcm,
83
+ }