janus_admin_monitor_token 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +28 -0
- data/Rakefile +37 -0
- data/app/controllers/janus_admin_monitor_token/tokens_controller.rb +30 -0
- data/app/views/janus_admin_monitor_token/tokens/index.html.haml +29 -0
- data/app/views/janus_admin_monitor_token/tokens/new.html.haml +12 -0
- data/app/views/shared/_menu_apps_tokens.html.haml +13 -0
- data/config/locales/token.en.yml +26 -0
- data/config/locales/token.fr.yml +26 -0
- data/config/routes.rb +3 -0
- data/lib/janus_admin_monitor_token.rb +5 -0
- data/lib/janus_admin_monitor_token/engine.rb +5 -0
- data/lib/janus_admin_monitor_token/info.rb +7 -0
- data/lib/tasks/janus_admin_monitor_token_tasks.rake +4 -0
- metadata +127 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 64b3a1e1209afa5ff07bf375ddc53364bc0daa52
|
4
|
+
data.tar.gz: 1a17beb22884ca4f8c8413238c968cd536303e28
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 33f25fcc8613d08ca7f8b6c4c1ba872019a98b200298afd571ea0d085be8f208ad7597752a3f45c153058d31dbb70040cd7e99f201b5543bcd2de75ae34ec4e7
|
7
|
+
data.tar.gz: 79c7fdf8143bb52c9edb937feb46d4fad218a9e76e4fe7e1c2c73f16ebb3bcb036ef38d93309dd8f6ec9595bc896368ea42abdd9fefa9a00f79881acf3eb0d83
|
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright 2016
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# JanusAdminMonitorToken
|
2
|
+
Short description and motivation.
|
3
|
+
|
4
|
+
## Usage
|
5
|
+
How to use my plugin.
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
Add this line to your application's Gemfile:
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
gem 'janus_admin_monitor_token'
|
12
|
+
```
|
13
|
+
|
14
|
+
And then execute:
|
15
|
+
```bash
|
16
|
+
$ bundle
|
17
|
+
```
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
```bash
|
21
|
+
$ gem install janus_admin_monitor_token
|
22
|
+
```
|
23
|
+
|
24
|
+
## Contributing
|
25
|
+
Contribution directions go here.
|
26
|
+
|
27
|
+
## License
|
28
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
begin
|
2
|
+
require 'bundler/setup'
|
3
|
+
rescue LoadError
|
4
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
5
|
+
end
|
6
|
+
|
7
|
+
require 'rdoc/task'
|
8
|
+
|
9
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
10
|
+
rdoc.rdoc_dir = 'rdoc'
|
11
|
+
rdoc.title = 'JanusAdminMonitorToken'
|
12
|
+
rdoc.options << '--line-numbers'
|
13
|
+
rdoc.rdoc_files.include('README.md')
|
14
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
15
|
+
end
|
16
|
+
|
17
|
+
APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
|
18
|
+
load 'rails/tasks/engine.rake'
|
19
|
+
|
20
|
+
|
21
|
+
load 'rails/tasks/statistics.rake'
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
require 'bundler/gem_tasks'
|
26
|
+
|
27
|
+
require 'rake/testtask'
|
28
|
+
|
29
|
+
Rake::TestTask.new(:test) do |t|
|
30
|
+
t.libs << 'lib'
|
31
|
+
t.libs << 'test'
|
32
|
+
t.pattern = 'test/**/*_test.rb'
|
33
|
+
t.verbose = false
|
34
|
+
end
|
35
|
+
|
36
|
+
|
37
|
+
task default: :test
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Controller for tokens
|
4
|
+
module JanusAdminMonitorToken
|
5
|
+
class TokensController < ApplicationController
|
6
|
+
before_action :authenticate_user!
|
7
|
+
before_action :set_token, only: [:show, :edit, :update, :destroy]
|
8
|
+
|
9
|
+
# GET /tokens
|
10
|
+
def index
|
11
|
+
@tokens = RRJ.message_admin('admin::list_tokens').to_hash
|
12
|
+
@msg_error = if @tokens['error']['code'] == 490
|
13
|
+
t('tokens.error.disabled_html')
|
14
|
+
else
|
15
|
+
@tokens['error']['reason']
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
# GET /tokens/new
|
20
|
+
def new
|
21
|
+
end
|
22
|
+
|
23
|
+
# POST /tokens
|
24
|
+
def create
|
25
|
+
RRJ.message_admin('admin::add_token')
|
26
|
+
|
27
|
+
redirect_to index token
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
.row
|
2
|
+
.small-12.columns
|
3
|
+
%h2= t('tokens.index.title_html')
|
4
|
+
|
5
|
+
.row
|
6
|
+
.small-12.columns
|
7
|
+
- if @tokens.key?('error')
|
8
|
+
%h3
|
9
|
+
- if @tokens['error']['code'] == 490
|
10
|
+
= t('tokens.error.disabled_html')
|
11
|
+
- else
|
12
|
+
= @tokens['error']['reason']
|
13
|
+
- else
|
14
|
+
%table
|
15
|
+
%thead
|
16
|
+
%tr
|
17
|
+
%th= t('tokens.index.table.header.token_id')
|
18
|
+
%th
|
19
|
+
%tbody
|
20
|
+
- if @tokens['tokens'].empty?
|
21
|
+
%tr
|
22
|
+
%td{ colspan: 2 }
|
23
|
+
= t('tokens.index.table.empty.text')
|
24
|
+
= link_to t('tokens.index.table.empty.link'), new_token_path
|
25
|
+
- else
|
26
|
+
- @tokens.each do |token|
|
27
|
+
%tr
|
28
|
+
%td= token
|
29
|
+
%td delete
|
@@ -0,0 +1,12 @@
|
|
1
|
+
.row
|
2
|
+
.small-12.columns
|
3
|
+
%h1= t('tokens.new.title')
|
4
|
+
|
5
|
+
.row
|
6
|
+
.small-12.columns
|
7
|
+
= form_tag tokens_path, method: :post, class: 'input-group' do
|
8
|
+
%label.input-group-label{ for: 'new' }
|
9
|
+
= t('tokens.new.label')
|
10
|
+
= text_field_tag :new, nil, class: 'input-group-field', id: :new
|
11
|
+
%span.input-group-button
|
12
|
+
%input.button{ type: :submit, value: 'Create' }
|
@@ -0,0 +1,13 @@
|
|
1
|
+
%li
|
2
|
+
= link_to janus_admin_monitor_token.tokens_path do
|
3
|
+
%i.fi-key.show-for-medium
|
4
|
+
= t('menu.tokens.button')
|
5
|
+
%ul.menu.vertical
|
6
|
+
%li
|
7
|
+
= link_to janus_admin_monitor_token.tokens_path do
|
8
|
+
%i.fi-list
|
9
|
+
= t('menu.tokens.dropdown.list')
|
10
|
+
%li
|
11
|
+
= link_to janus_admin_monitor_token.new_token_path do
|
12
|
+
%i.fi-plus
|
13
|
+
= t('menu.tokens.dropdown.add')
|
@@ -0,0 +1,26 @@
|
|
1
|
+
---
|
2
|
+
|
3
|
+
en:
|
4
|
+
menu:
|
5
|
+
tokens:
|
6
|
+
button: Tokens
|
7
|
+
dropdown:
|
8
|
+
list: View all tokens
|
9
|
+
add: Add a new token
|
10
|
+
tokens:
|
11
|
+
index:
|
12
|
+
title_html: Tokens
|
13
|
+
table:
|
14
|
+
empty:
|
15
|
+
text: No token yet.
|
16
|
+
link: Add a new token.
|
17
|
+
header:
|
18
|
+
token_id: Token ID
|
19
|
+
new:
|
20
|
+
title: Add a new token
|
21
|
+
label: Id to token (if empty auto generated)
|
22
|
+
error:
|
23
|
+
disabled_html: |
|
24
|
+
Token based authentification disabled.
|
25
|
+
<a href="https://janus.conf.meetecho.com/docs/auth.html">
|
26
|
+
See Janus documentation</a>.
|
@@ -0,0 +1,26 @@
|
|
1
|
+
---
|
2
|
+
|
3
|
+
fr:
|
4
|
+
menu:
|
5
|
+
tokens:
|
6
|
+
button: Tokens
|
7
|
+
dropdown:
|
8
|
+
list: Lister les tokens
|
9
|
+
add: Ajouter un token
|
10
|
+
tokens:
|
11
|
+
index:
|
12
|
+
title_html: Tokens
|
13
|
+
table:
|
14
|
+
empty:
|
15
|
+
text: No token yet.
|
16
|
+
link: Add a new token.
|
17
|
+
header:
|
18
|
+
token_id: Token ID
|
19
|
+
new:
|
20
|
+
title: Add a new token
|
21
|
+
label: Id to token (if empty auto generated)
|
22
|
+
error:
|
23
|
+
disabled_html: |
|
24
|
+
L'authentification par token est désactivé.
|
25
|
+
<a href="https://janus.conf.meetecho.com/docs/auth.html">
|
26
|
+
Consulter la documentation Janus</a>.
|
data/config/routes.rb
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
module JanusAdminMonitorToken
|
2
|
+
VERSION = '0.1.0'
|
3
|
+
SUMMARY = 'This an addon for JanusAdminMonitor services'
|
4
|
+
DESCRIPTION = \
|
5
|
+
'This addon for JanusAdminMonitor services. It provides management for tokens.'
|
6
|
+
HOMEPAGE = 'https://github.com/Dev-Crea/janus-admin-monitor-token.git'
|
7
|
+
end
|
metadata
ADDED
@@ -0,0 +1,127 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: janus_admin_monitor_token
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- VAILLANT Jeremy
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-12-08 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rails
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 5.0.0
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 5.0.0.1
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 5.0.0
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 5.0.0.1
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: ruby_rabbitmq_janus
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '1.1'
|
40
|
+
type: :runtime
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '1.1'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: haml
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '4.0'
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: 4.0.7
|
57
|
+
type: :runtime
|
58
|
+
prerelease: false
|
59
|
+
version_requirements: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - "~>"
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: '4.0'
|
64
|
+
- - ">="
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: 4.0.7
|
67
|
+
- !ruby/object:Gem::Dependency
|
68
|
+
name: haml-rails
|
69
|
+
requirement: !ruby/object:Gem::Requirement
|
70
|
+
requirements:
|
71
|
+
- - "~>"
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: 0.9.0
|
74
|
+
type: :runtime
|
75
|
+
prerelease: false
|
76
|
+
version_requirements: !ruby/object:Gem::Requirement
|
77
|
+
requirements:
|
78
|
+
- - "~>"
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: 0.9.0
|
81
|
+
description: This addon for JanusAdminMonitor services. It provides management for
|
82
|
+
tokens.
|
83
|
+
email:
|
84
|
+
- jeremy.vaillant@dazzl.tv
|
85
|
+
executables: []
|
86
|
+
extensions: []
|
87
|
+
extra_rdoc_files: []
|
88
|
+
files:
|
89
|
+
- MIT-LICENSE
|
90
|
+
- README.md
|
91
|
+
- Rakefile
|
92
|
+
- app/controllers/janus_admin_monitor_token/tokens_controller.rb
|
93
|
+
- app/views/janus_admin_monitor_token/tokens/index.html.haml
|
94
|
+
- app/views/janus_admin_monitor_token/tokens/new.html.haml
|
95
|
+
- app/views/shared/_menu_apps_tokens.html.haml
|
96
|
+
- config/locales/token.en.yml
|
97
|
+
- config/locales/token.fr.yml
|
98
|
+
- config/routes.rb
|
99
|
+
- lib/janus_admin_monitor_token.rb
|
100
|
+
- lib/janus_admin_monitor_token/engine.rb
|
101
|
+
- lib/janus_admin_monitor_token/info.rb
|
102
|
+
- lib/tasks/janus_admin_monitor_token_tasks.rake
|
103
|
+
homepage: https://github.com/Dev-Crea/janus-admin-monitor-token.git
|
104
|
+
licenses:
|
105
|
+
- MIT
|
106
|
+
metadata: {}
|
107
|
+
post_install_message:
|
108
|
+
rdoc_options: []
|
109
|
+
require_paths:
|
110
|
+
- lib
|
111
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
112
|
+
requirements:
|
113
|
+
- - ">="
|
114
|
+
- !ruby/object:Gem::Version
|
115
|
+
version: '0'
|
116
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
117
|
+
requirements:
|
118
|
+
- - ">="
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
version: '0'
|
121
|
+
requirements: []
|
122
|
+
rubyforge_project:
|
123
|
+
rubygems_version: 2.5.1
|
124
|
+
signing_key:
|
125
|
+
specification_version: 4
|
126
|
+
summary: This an addon for JanusAdminMonitor services
|
127
|
+
test_files: []
|