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
data/.jshintrc
DELETED
@@ -1,41 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"bitwise": true,
|
3
|
-
"camelcase": true,
|
4
|
-
"curly": true,
|
5
|
-
"eqeqeq": true,
|
6
|
-
"es3": true,
|
7
|
-
"forin": true,
|
8
|
-
"freeze": true,
|
9
|
-
"immed": false,
|
10
|
-
"indent": 4,
|
11
|
-
"latedef": true,
|
12
|
-
"newcap": false,
|
13
|
-
"noarg": true,
|
14
|
-
"noempty": true,
|
15
|
-
"nonbsp": true,
|
16
|
-
"nonew": true,
|
17
|
-
"plusplus": false,
|
18
|
-
// "quotmark": "single",
|
19
|
-
"undef": true,
|
20
|
-
"unused": true,
|
21
|
-
"strict": true,
|
22
|
-
"maxparams": 8,
|
23
|
-
"maxdepth": 4,
|
24
|
-
"maxstatements": 20,
|
25
|
-
"maxcomplexity": 20,
|
26
|
-
"maxlen": 100,
|
27
|
-
"browser": true,
|
28
|
-
"couch": false,
|
29
|
-
"devel": true,
|
30
|
-
"dojo": false,
|
31
|
-
"jquery": true,
|
32
|
-
"mootools": false,
|
33
|
-
"node": false,
|
34
|
-
"nonstandard": true,
|
35
|
-
"phantom": false,
|
36
|
-
"prototypejs": false,
|
37
|
-
"rhino": false,
|
38
|
-
"worker": false,
|
39
|
-
"wsh": false,
|
40
|
-
"yui": false
|
41
|
-
}
|
data/bower.json
DELETED
@@ -1,98 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"name": "conjur-asset-ui",
|
3
|
-
"private": true,
|
4
|
-
"version": "1.2.0",
|
5
|
-
"homepage": "https://github.com/conjurinc/conjur-asset-ui",
|
6
|
-
"authors": [
|
7
|
-
"Nikolai Sevostjanov <nikolai.sevostjanov@gmail.com>"
|
8
|
-
],
|
9
|
-
"license": "MIT",
|
10
|
-
"ignore": [
|
11
|
-
"**/.*",
|
12
|
-
"node_modules",
|
13
|
-
"bower_components",
|
14
|
-
"test",
|
15
|
-
"tests"
|
16
|
-
],
|
17
|
-
"dependencies": {
|
18
|
-
"jquery": "~2.1.1",
|
19
|
-
"async": "~0.9.0",
|
20
|
-
"backbone": "~1.1.2",
|
21
|
-
"moment": "~2.8.3",
|
22
|
-
"underscore": "~1.7.0",
|
23
|
-
"underscore.string": "~2.3.3",
|
24
|
-
"react": "~0.11.2",
|
25
|
-
"bootstrap": "~3.2.0",
|
26
|
-
"react-bootstrap": "~0.12.0",
|
27
|
-
"d3": "~3.4.13",
|
28
|
-
"underscore-deep-extend": "~0.0.5",
|
29
|
-
"prelude-ls": "~1.1.1"
|
30
|
-
},
|
31
|
-
"overrides": {
|
32
|
-
"jquery": {
|
33
|
-
"main": [
|
34
|
-
"dist/jquery.js"
|
35
|
-
]
|
36
|
-
},
|
37
|
-
"async": {
|
38
|
-
"main": [
|
39
|
-
"lib/async.js"
|
40
|
-
]
|
41
|
-
},
|
42
|
-
"backbone": {
|
43
|
-
"main": [
|
44
|
-
"backbone.js"
|
45
|
-
]
|
46
|
-
},
|
47
|
-
"moment": {
|
48
|
-
"main": [
|
49
|
-
"min/moment-with-locales.js"
|
50
|
-
]
|
51
|
-
},
|
52
|
-
"underscore": {
|
53
|
-
"main": [
|
54
|
-
"underscore.js"
|
55
|
-
]
|
56
|
-
},
|
57
|
-
"underscore.string": {
|
58
|
-
"main": [
|
59
|
-
"lib/underscore.string.js"
|
60
|
-
]
|
61
|
-
},
|
62
|
-
"react": {
|
63
|
-
"main": [
|
64
|
-
"react-with-addons.js"
|
65
|
-
]
|
66
|
-
},
|
67
|
-
"react-bootstrap": {
|
68
|
-
"main": [
|
69
|
-
"react-bootstrap.js"
|
70
|
-
]
|
71
|
-
},
|
72
|
-
"bootstrap": {
|
73
|
-
"main": [
|
74
|
-
"dist/js/bootstrap.js",
|
75
|
-
"dist/css/bootstrap.min.css",
|
76
|
-
"dist/fonts/*.eot",
|
77
|
-
"dist/fonts/*.svg",
|
78
|
-
"dist/fonts/*.ttf",
|
79
|
-
"dist/fonts/*.woff"
|
80
|
-
]
|
81
|
-
},
|
82
|
-
"d3": {
|
83
|
-
"main": [
|
84
|
-
"d3.js"
|
85
|
-
]
|
86
|
-
},
|
87
|
-
"underscore-deep-extend": {
|
88
|
-
"main": [
|
89
|
-
"index.js"
|
90
|
-
]
|
91
|
-
},
|
92
|
-
"prelude-ls": {
|
93
|
-
"main": [
|
94
|
-
"browser/prelude-browser-min.js"
|
95
|
-
]
|
96
|
-
}
|
97
|
-
}
|
98
|
-
}
|
data/gulpfile.js
DELETED
@@ -1,139 +0,0 @@
|
|
1
|
-
var gulp = require('gulp'),
|
2
|
-
autoprefixer = require('gulp-autoprefixer'),
|
3
|
-
flatten = require('gulp-flatten'),
|
4
|
-
cache = require('gulp-cached'),
|
5
|
-
concat = require('gulp-concat'),
|
6
|
-
uglify = require('gulp-uglify'),
|
7
|
-
plumber = require('gulp-plumber'),
|
8
|
-
react = require('gulp-react'),
|
9
|
-
remember = require('gulp-remember'),
|
10
|
-
jshint = require('gulp-jshint'),
|
11
|
-
stylish = require('jshint-stylish'),
|
12
|
-
less = require('gulp-less'),
|
13
|
-
sourcemaps = require('gulp-sourcemaps'),
|
14
|
-
mainBowerFiles = require('main-bower-files'),
|
15
|
-
minifyCSS = require('gulp-minify-css'),
|
16
|
-
filter = require('gulp-filter'),
|
17
|
-
del = require('del');
|
18
|
-
|
19
|
-
var paths = {
|
20
|
-
bower: 'bower_components',
|
21
|
-
styles: 'public/css/*.less',
|
22
|
-
scripts: [
|
23
|
-
'public/js/init.js',
|
24
|
-
'public/js/models/record.js',
|
25
|
-
'public/js/models/*.js',
|
26
|
-
'public/js/views/owned.js',
|
27
|
-
'public/js/views/chart.js',
|
28
|
-
'public/js/views/resource.js',
|
29
|
-
'public/js/views/role.js',
|
30
|
-
'public/js/views/annotations.js',
|
31
|
-
'public/js/views/permissions.js',
|
32
|
-
'public/js/views/time.js',
|
33
|
-
'public/js/views/sections.js',
|
34
|
-
'public/js/views/breadbrumbs.js',
|
35
|
-
'public/js/views/mixins/search.js',
|
36
|
-
'public/js/views/mixins/tabs.js',
|
37
|
-
'public/js/views/**/*.js',
|
38
|
-
'public/js/routers.js'
|
39
|
-
]
|
40
|
-
};
|
41
|
-
|
42
|
-
gulp.task('clean', function(cb) {
|
43
|
-
del(['public/build'], cb);
|
44
|
-
});
|
45
|
-
|
46
|
-
gulp.task('bower', function() {
|
47
|
-
var jsFilter = filter(function(file) {
|
48
|
-
return /\.js$/.test(file.path) && !/\.min\.js$/.test(file.path);
|
49
|
-
});
|
50
|
-
|
51
|
-
var cssFilter = filter(['*.min.css']),
|
52
|
-
fontFilter = filter(['*.eot', '*.woff', '*.svg', '*.ttf']);
|
53
|
-
|
54
|
-
return gulp
|
55
|
-
.src(mainBowerFiles())
|
56
|
-
.pipe(fontFilter)
|
57
|
-
.pipe(flatten())
|
58
|
-
.pipe(gulp.dest('public/build/fonts'))
|
59
|
-
.pipe(fontFilter.restore())
|
60
|
-
|
61
|
-
.pipe(jsFilter)
|
62
|
-
.pipe(sourcemaps.init())
|
63
|
-
.pipe(concat('vendor.min.js'))
|
64
|
-
.pipe(uglify())
|
65
|
-
.pipe(sourcemaps.write('../maps'))
|
66
|
-
.pipe(gulp.dest('public/build/js'))
|
67
|
-
.pipe(jsFilter.restore())
|
68
|
-
|
69
|
-
.pipe(cssFilter)
|
70
|
-
.pipe(concat('vendor.css'))
|
71
|
-
.pipe(gulp.dest('public/build/css'))
|
72
|
-
.pipe(cssFilter.restore());
|
73
|
-
});
|
74
|
-
|
75
|
-
gulp.task('scripts', function() {
|
76
|
-
return gulp.src(paths.scripts)
|
77
|
-
.pipe(cache('scripts'))
|
78
|
-
.pipe(plumber())
|
79
|
-
.pipe(react())
|
80
|
-
.pipe(plumber.stop())
|
81
|
-
.pipe(remember('scripts'))
|
82
|
-
.pipe(sourcemaps.init())
|
83
|
-
.pipe(concat('app.min.js'))
|
84
|
-
.pipe(uglify())
|
85
|
-
.pipe(sourcemaps.write('../maps'))
|
86
|
-
.pipe(gulp.dest('public/build/js'));
|
87
|
-
});
|
88
|
-
|
89
|
-
gulp.task('jshint', function() {
|
90
|
-
var stream = gulp.src(paths.scripts)
|
91
|
-
.pipe(cache('linting'))
|
92
|
-
.pipe(plumber())
|
93
|
-
.pipe(react())
|
94
|
-
.pipe(plumber.stop())
|
95
|
-
.pipe(jshint())
|
96
|
-
.pipe(jshint.reporter(stylish));
|
97
|
-
|
98
|
-
if (process.env.CI) {
|
99
|
-
stream = stream.pipe(jshint.reporter('fail'));
|
100
|
-
}
|
101
|
-
|
102
|
-
return stream;
|
103
|
-
});
|
104
|
-
|
105
|
-
gulp.task('styles', function() {
|
106
|
-
return gulp.src(paths.styles)
|
107
|
-
// https://github.com/plus3network/gulp-less/pull/85
|
108
|
-
// .pipe(sourcemaps.init())
|
109
|
-
.pipe(less())
|
110
|
-
.pipe(autoprefixer({
|
111
|
-
browsers: ['> 1%', 'last 2 versions', 'Firefox ESR'],
|
112
|
-
cascade: false
|
113
|
-
}))
|
114
|
-
.pipe(minifyCSS({keepBreaks: true}))
|
115
|
-
// .pipe(sourcemaps.write('../maps'))
|
116
|
-
.pipe(gulp.dest('public/build/css'));
|
117
|
-
});
|
118
|
-
|
119
|
-
gulp.task('watch', function(cb) {
|
120
|
-
gulp.watch(paths.bower, ['bower']);
|
121
|
-
gulp.watch(paths.styles, ['styles']);
|
122
|
-
|
123
|
-
var watcher = gulp.watch(paths.scripts, ['jshint', 'scripts']);
|
124
|
-
|
125
|
-
watcher.on('change', function (event) {
|
126
|
-
if (event.type === 'deleted') {
|
127
|
-
delete cache.caches['scripts'][event.path];
|
128
|
-
remember.forget('scripts', event.path);
|
129
|
-
}
|
130
|
-
});
|
131
|
-
|
132
|
-
cb();
|
133
|
-
|
134
|
-
console.log('Watching files for changes...');
|
135
|
-
});
|
136
|
-
|
137
|
-
gulp.task('build', ['bower', 'styles', 'jshint', 'scripts']);
|
138
|
-
|
139
|
-
gulp.task('default', ['build']);
|
data/package.json
DELETED
@@ -1,47 +0,0 @@
|
|
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
DELETED
data/public/_client_libs.html
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
2
|
-
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
3
|
-
<!--[if lt IE 9]>
|
4
|
-
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
|
5
|
-
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
|
6
|
-
<![endif]-->
|
7
|
-
|
8
|
-
<script src="/js/lib/sorted-set.no-require.js"></script>
|
9
|
-
<script src="/build/js/vendor.min.js"></script>
|
data/public/index.html.erb
DELETED
@@ -1,63 +0,0 @@
|
|
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/lib/pace.js"></script>
|
10
|
-
<!-- Bootstrap -->
|
11
|
-
<link href="/build/css/vendor.css" rel="stylesheet">
|
12
|
-
|
13
|
-
<!-- Some styles of our own -->
|
14
|
-
<link href="/build/css/styles.css" rel="stylesheet">
|
15
|
-
|
16
|
-
<%= client_libs %>
|
17
|
-
</head>
|
18
|
-
<body>
|
19
|
-
<div class="container">
|
20
|
-
<div class="navbar navbar-default" role="navigation">
|
21
|
-
<div class="navbar-collapse collapse">
|
22
|
-
<ul class="nav navbar-nav">
|
23
|
-
<li id="nav-home" class="nav-item"><a href="/ui">Dashboard</a></li>
|
24
|
-
<li class="dropdown">
|
25
|
-
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
26
|
-
Directory <span class="caret"></span>
|
27
|
-
</a>
|
28
|
-
<ul class="dropdown-menu">
|
29
|
-
<li id="nav-users" class="nav-item"><a href="/ui/users">Users</a></li>
|
30
|
-
<li id="nav-groups" class="nav-item"><a href="/ui/groups">Groups</a></li>
|
31
|
-
<li class="divider"></li>
|
32
|
-
<li id="nav-hosts" class="nav-item"><a href="/ui/hosts">Hosts</a></li>
|
33
|
-
<li id="nav-layers" class="nav-item"><a href="/ui/layers">Layers</a></li>
|
34
|
-
<li class="divider"></li>
|
35
|
-
<li id="nav-variables" class="nav-item"><a href="/ui/variables">Variables</a></li>
|
36
|
-
</ul>
|
37
|
-
</li>
|
38
|
-
<li id="nav-policies" class="nav-item"><a href="/ui/policies">Policies</a></li>
|
39
|
-
<!-- disabled until we'll have reliable search/sort support
|
40
|
-
<li id="nav-audit" class="nav-item"><a href="/ui/audit">Audit</a></li>
|
41
|
-
-->
|
42
|
-
</ul>
|
43
|
-
<div class="navbar-right" id="inlineSearchContainer"></div>
|
44
|
-
<div class="navbar-right" style="padding-top:14px;padding-right:10px;" id="inlineUserId"></div>
|
45
|
-
</div>
|
46
|
-
</div>
|
47
|
-
<div class="alert alert-danger alert-dismissable" id="flash">
|
48
|
-
<button type="button" class="close" aria-hidden="true" onClick="$('#flash').hide();" >×</button>
|
49
|
-
<span class="text"></span>
|
50
|
-
</div>
|
51
|
-
<div id="modal">
|
52
|
-
|
53
|
-
</div>
|
54
|
-
|
55
|
-
<div id="content"></div>
|
56
|
-
<div id="bottom" class="navbar-default">
|
57
|
-
<a href="http://conjur.net" class="nav-item" target="_blank">© 2014, Conjur Inc.</a>
|
58
|
-
</div>
|
59
|
-
</div><!-- /.container -->
|
60
|
-
|
61
|
-
<script src="/build/js/app.min.js"></script>
|
62
|
-
</body>
|
63
|
-
</html>
|
data/public/js/init.js
DELETED
@@ -1,196 +0,0 @@
|
|
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(';');
|
100
|
-
|
101
|
-
for (var i = 0; i < ca.length; i++) {
|
102
|
-
var c = ca[i];
|
103
|
-
|
104
|
-
while (c.charAt(0) === ' ') {
|
105
|
-
c = c.substring(1, c.length);
|
106
|
-
}
|
107
|
-
|
108
|
-
if (c.indexOf(nameEQ) === 0) {
|
109
|
-
return c.substring(nameEQ.length, c.length);
|
110
|
-
}
|
111
|
-
}
|
112
|
-
|
113
|
-
return null;
|
114
|
-
},
|
115
|
-
getTabname: function(header, set) {
|
116
|
-
if (!set || !set.length) {
|
117
|
-
return header + ' (0)';
|
118
|
-
}
|
119
|
-
|
120
|
-
return header + ' (' + set.length + ')';
|
121
|
-
}
|
122
|
-
};
|
123
|
-
|
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
|
-
React.renderComponent(conjur.views.RoleLink({id: conjur.app.userId}),
|
187
|
-
document.getElementById('inlineUserId'));
|
188
|
-
});
|
189
|
-
|
190
|
-
})
|
191
|
-
(
|
192
|
-
_,
|
193
|
-
Backbone,
|
194
|
-
React,
|
195
|
-
jQuery
|
196
|
-
);
|