mno-enterprise-api 3.1.4 → 3.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/mno_enterprise/config.js.coffee.erb +7 -1
- data/app/controllers/mno_enterprise/auth/omniauth_callbacks_controller.rb +3 -27
- data/app/controllers/mno_enterprise/auth/sessions_controller.rb +1 -3
- data/app/controllers/mno_enterprise/jpi/v1/admin/app_answers_controller.rb +26 -0
- data/app/controllers/mno_enterprise/jpi/v1/admin/app_comments_controller.rb +28 -0
- data/app/controllers/mno_enterprise/jpi/v1/admin/app_instances_controller.rb +16 -0
- data/app/controllers/mno_enterprise/jpi/v1/admin/app_reviews_controller.rb +30 -0
- data/app/controllers/mno_enterprise/jpi/v1/admin/invites_controller.rb +1 -1
- data/app/controllers/mno_enterprise/jpi/v1/admin/organizations_controller.rb +55 -37
- data/app/controllers/mno_enterprise/jpi/v1/app_answers_controller.rb +22 -0
- data/app/controllers/mno_enterprise/jpi/v1/app_comments_controller.rb +22 -0
- data/app/controllers/mno_enterprise/jpi/v1/app_feedbacks_controller.rb +14 -0
- data/app/controllers/mno_enterprise/jpi/v1/app_instances_controller.rb +1 -20
- data/app/controllers/mno_enterprise/jpi/v1/app_questions_controller.rb +25 -0
- data/app/controllers/mno_enterprise/jpi/v1/app_reviews_controller.rb +94 -0
- data/app/controllers/mno_enterprise/jpi/v1/base_resource_controller.rb +12 -0
- data/app/controllers/mno_enterprise/jpi/v1/impac/alerts_controller.rb +5 -0
- data/app/controllers/mno_enterprise/jpi/v1/impac/kpis_controller.rb +1 -76
- data/app/controllers/mno_enterprise/jpi/v1/marketplace_controller.rb +1 -18
- data/app/controllers/mno_enterprise/jpi/v1/teams_controller.rb +1 -83
- data/app/jobs/mno_enterprise/event_logger_job.rb +10 -0
- data/app/views/mno_enterprise/auth/confirmations/new.html.haml +6 -6
- data/app/views/mno_enterprise/auth/passwords/new.html.haml +8 -8
- data/app/views/mno_enterprise/auth/registrations/new.html.haml +1 -0
- data/app/views/mno_enterprise/auth/sessions/new.html.haml +1 -0
- data/app/views/mno_enterprise/auth/shared/_links.html.haml +0 -5
- data/app/views/mno_enterprise/auth/shared/_omniauth.html.haml +10 -0
- data/app/views/mno_enterprise/jpi/v1/admin/app_answers/show.json.jbuilder +15 -0
- data/app/views/mno_enterprise/jpi/v1/admin/app_comments/show.json.jbuilder +15 -0
- data/app/views/mno_enterprise/jpi/v1/admin/app_reviews/_app_review.json.jbuilder +13 -0
- data/app/views/mno_enterprise/jpi/v1/admin/app_reviews/index.json.jbuilder +1 -0
- data/app/views/mno_enterprise/jpi/v1/admin/app_reviews/show.json.jbuilder +3 -0
- data/app/views/mno_enterprise/jpi/v1/admin/organizations/show.json.jbuilder +1 -0
- data/app/views/mno_enterprise/jpi/v1/admin/users/_user.json.jbuilder +1 -1
- data/app/views/mno_enterprise/jpi/v1/app_answers/_resource.json.jbuilder +4 -0
- data/app/views/mno_enterprise/jpi/v1/app_answers/index.json.jbuilder +5 -0
- data/app/views/mno_enterprise/jpi/v1/app_answers/show.json.jbuilder +3 -0
- data/app/views/mno_enterprise/jpi/v1/app_comments/_resource.json.jbuilder +3 -0
- data/app/views/mno_enterprise/jpi/v1/app_comments/index.json.jbuilder +5 -0
- data/app/views/mno_enterprise/jpi/v1/app_comments/show.json.jbuilder +3 -0
- data/app/views/mno_enterprise/jpi/v1/app_feedbacks/_comment.json.jbuilder +10 -0
- data/app/views/mno_enterprise/jpi/v1/app_feedbacks/_resource.json.jbuilder +7 -0
- data/app/views/mno_enterprise/jpi/v1/app_feedbacks/index.json.jbuilder +5 -0
- data/app/views/mno_enterprise/jpi/v1/app_feedbacks/show.json.jbuilder +4 -0
- data/app/views/mno_enterprise/jpi/v1/app_instances/_resource.json.jbuilder +9 -0
- data/app/views/mno_enterprise/jpi/v1/app_questions/_answer.json.jbuilder +3 -0
- data/app/views/mno_enterprise/jpi/v1/app_questions/_resource.json.jbuilder +8 -0
- data/app/views/mno_enterprise/jpi/v1/app_questions/index.json.jbuilder +5 -0
- data/app/views/mno_enterprise/jpi/v1/app_questions/show.json.jbuilder +3 -0
- data/app/views/mno_enterprise/jpi/v1/app_reviews/_resource.json.jbuilder +13 -0
- data/app/views/mno_enterprise/jpi/v1/app_reviews/index.json.jbuilder +5 -0
- data/app/views/mno_enterprise/jpi/v1/app_reviews/show.json.jbuilder +4 -0
- data/app/views/mno_enterprise/jpi/v1/base_resource/_app_review.json.jbuilder +17 -0
- data/app/views/mno_enterprise/jpi/v1/current_users/show.json.jbuilder +9 -1
- data/app/views/mno_enterprise/jpi/v1/impac/alerts/_alert.json.jbuilder +7 -0
- data/app/views/mno_enterprise/jpi/v1/impac/alerts/index.json.jbuilder +1 -0
- data/app/views/mno_enterprise/jpi/v1/impac/alerts/show.json.jbuilder +1 -0
- data/app/views/mno_enterprise/jpi/v1/impac/dashboards/_dashboard.json.jbuilder +8 -3
- data/app/views/mno_enterprise/jpi/v1/impac/kpis/_kpi.json.jbuilder +4 -1
- data/app/views/mno_enterprise/jpi/v1/impac/widgets/_widget.json.jbuilder +1 -1
- data/app/views/mno_enterprise/jpi/v1/impac/widgets/index.json.jbuilder +3 -0
- data/app/views/mno_enterprise/jpi/v1/marketplace/_app.json.jbuilder +4 -0
- data/app/views/mno_enterprise/jpi/v1/marketplace/index.json.jbuilder +1 -2
- data/app/views/mno_enterprise/jpi/v1/marketplace/show.json.jbuilder +1 -1
- data/app/views/mno_enterprise/jpi/v1/organizations/_current_user.json.jbuilder +1 -1
- data/app/views/mno_enterprise/jpi/v1/organizations/_invoices.json.jbuilder +3 -2
- data/app/views/mno_enterprise/jpi/v1/organizations/_member.json.jbuilder +2 -2
- data/app/views/mno_enterprise/jpi/v1/organizations/_organization.json.jbuilder +2 -2
- data/app/views/mno_enterprise/jpi/v1/teams/_team.json.jbuilder +11 -5
- data/app/views/mno_enterprise/pages/terms.html.haml +219 -0
- data/app/views/mno_enterprise/provision/_select_organization.html.haml +6 -2
- data/config/initializers/devise.rb +31 -9
- data/config/initializers/devise_log.rb +4 -4
- data/config/routes.rb +41 -6
- data/lib/mno_enterprise/api.rb +1 -0
- data/lib/mno_enterprise/audit_events_listener.rb +28 -0
- data/lib/mno_enterprise/concerns/controllers/jpi/v1/app_instances_controller.rb +45 -0
- data/lib/mno_enterprise/concerns/controllers/jpi/v1/current_users_controller.rb +14 -4
- data/lib/mno_enterprise/concerns/controllers/jpi/v1/impac/alerts_controller.rb +76 -0
- data/lib/mno_enterprise/concerns/controllers/jpi/v1/impac/dashboards_controller.rb +49 -23
- data/lib/mno_enterprise/concerns/controllers/jpi/v1/impac/kpis_controller.rb +167 -0
- data/lib/mno_enterprise/concerns/controllers/jpi/v1/impac/widgets_controller.rb +33 -17
- data/lib/mno_enterprise/concerns/controllers/jpi/v1/marketplace_controller.rb +32 -0
- data/lib/mno_enterprise/concerns/controllers/jpi/v1/organizations_controller.rb +68 -28
- data/lib/mno_enterprise/concerns/controllers/jpi/v1/teams_controller.rb +92 -0
- data/lib/mno_enterprise/concerns/controllers/pages_controller.rb +17 -3
- data/lib/mno_enterprise/concerns/controllers/provision_controller.rb +17 -2
- data/lib/mno_enterprise/concerns/mailers/system_notification_mailer.rb +27 -3
- data/lib/mno_enterprise/event_logger.rb +34 -16
- data/lib/mno_enterprise/intercom_events_listener.rb +96 -0
- data/spec/controllers/mno_enterprise/auth/confirmation_controller_spec.rb +28 -0
- data/spec/controllers/mno_enterprise/auth/omniauth_callback_controller_spec.rb +34 -0
- data/spec/controllers/mno_enterprise/jpi/v1/admin/app_answers_controller_spec.rb +45 -0
- data/spec/controllers/mno_enterprise/jpi/v1/admin/app_comments_controller_spec.rb +45 -0
- data/spec/controllers/mno_enterprise/jpi/v1/admin/app_instances_controller_spec.rb +31 -0
- data/spec/controllers/mno_enterprise/jpi/v1/admin/app_reviews_controller_spec.rb +103 -0
- data/spec/controllers/mno_enterprise/jpi/v1/admin/audit_events_controller_spec.rb +4 -15
- data/spec/controllers/mno_enterprise/jpi/v1/admin/cloud_apps_controller_spec.rb +12 -3
- data/spec/controllers/mno_enterprise/jpi/v1/admin/invites_controller_spec.rb +4 -0
- data/spec/controllers/mno_enterprise/jpi/v1/admin/invoices_controller_spec.rb +15 -0
- data/spec/controllers/mno_enterprise/jpi/v1/admin/organizations_controller_spec.rb +17 -1
- data/spec/controllers/mno_enterprise/jpi/v1/admin/tenant_invoices_controller_spec.rb +5 -0
- data/spec/controllers/mno_enterprise/jpi/v1/admin/users_controller_spec.rb +30 -16
- data/spec/controllers/mno_enterprise/jpi/v1/app_answers_controller_spec.rb +74 -0
- data/spec/controllers/mno_enterprise/jpi/v1/app_comments_controller_spec.rb +74 -0
- data/spec/controllers/mno_enterprise/jpi/v1/app_feedbacks_controller_spec.rb +84 -0
- data/spec/controllers/mno_enterprise/jpi/v1/app_instances_controller_spec.rb +36 -22
- data/spec/controllers/mno_enterprise/jpi/v1/app_questions_controller_spec.rb +80 -0
- data/spec/controllers/mno_enterprise/jpi/v1/app_reviews_controller_spec.rb +107 -0
- data/spec/controllers/mno_enterprise/jpi/v1/current_users_controller_spec.rb +16 -1
- data/spec/controllers/mno_enterprise/jpi/v1/impac/alerts_controller_spec.rb +82 -0
- data/spec/controllers/mno_enterprise/jpi/v1/impac/kpis_controller_spec.rb +147 -10
- data/spec/controllers/mno_enterprise/jpi/v1/impac/widgets_controller_spec.rb +39 -0
- data/spec/controllers/mno_enterprise/jpi/v1/marketplace_controller_spec.rb +19 -26
- data/spec/controllers/mno_enterprise/jpi/v1/organizations_controller_spec.rb +248 -303
- data/spec/controllers/mno_enterprise/jpi/v1/team_controller_spec.rb +4 -1
- data/spec/controllers/mno_enterprise/pages_controller_spec.rb +21 -0
- data/spec/controllers/mno_enterprise/provision_controller_spec.rb +65 -22
- data/spec/controllers/mno_enterprise/webhook/o_auth_controller_spec.rb +1 -1
- data/spec/jobs/mno_enterprise/event_logger_job_spec.rb +11 -0
- data/spec/lib/mno_enterprise/audit_events_listener_spec.rb +28 -0
- data/spec/lib/mno_enterprise/intercom_events_listener_spec.rb +110 -0
- data/spec/mailer/mno_enterprise/system_notification_mailer_spec.rb +81 -46
- data/spec/routing/mno_enterprise/jpi/v1/admin/app_instances_controller_routing_spec.rb +11 -0
- data/spec/routing/mno_enterprise/jpi/v1/admin/app_reviews_controller_routing_spec.rb +19 -0
- data/spec/routing/mno_enterprise/jpi/v1/app_instances_controller_routing_spec.rb +9 -2
- data/spec/routing/mno_enterprise/jpi/v1/app_reviews_controller_routing_spec.rb +15 -0
- data/spec/routing/mno_enterprise/jpi/v1/current_users_controller_routing_spec.rb +5 -0
- data/spec/routing/mno_enterprise/jpi/v1/impac/alerts_controller_routing_spec.rb +24 -0
- data/spec/routing/mno_enterprise/jpi/v1/impac/dashboards_controller_routing_spec.rb +28 -0
- data/spec/routing/mno_enterprise/jpi/v1/impac/kpis_controller_routing_spec.rb +17 -11
- data/spec/routing/mno_enterprise/jpi/v1/impac/widgets_controller_routing_spec.rb +24 -0
- data/spec/routing/mno_enterprise/jpi/v1/marketplace_controller_routing_spec.rb +2 -2
- data/spec/routing/mno_enterprise/pages_controller_routing_spec.rb +4 -0
- metadata +178 -9
- data/app/controllers/mno_enterprise/jpi/v1/industry_bundle_controller.rb +0 -25
- data/app/controllers/mno_enterprise/jpi/v1/shopping_cart_controller.rb +0 -93
- data/spec/lib/mno_enterprise/event_logger_spec.rb +0 -28
@@ -28,5 +28,17 @@ module MnoEnterprise
|
|
28
28
|
end
|
29
29
|
true
|
30
30
|
end
|
31
|
+
|
32
|
+
def render_not_found(resource)
|
33
|
+
render json: { errors: {message: "#{resource.titleize} not found (id=#{params[:id]})", code: 404, params: params} }, status: :not_found
|
34
|
+
end
|
35
|
+
|
36
|
+
def render_bad_request(attempted_action, issue)
|
37
|
+
render json: { errors: {message: "Error while trying to #{attempted_action}: #{issue}", code: 400, params: params} }, status: :bad_request
|
38
|
+
end
|
39
|
+
|
40
|
+
def render_forbidden_request(attempted_action)
|
41
|
+
render json: { errors: {message: "Error while trying to #{attempted_action}: you do not have permission", code: 403} }, status: :forbidden
|
42
|
+
end
|
31
43
|
end
|
32
44
|
end
|
@@ -1,80 +1,5 @@
|
|
1
1
|
module MnoEnterprise
|
2
2
|
class Jpi::V1::Impac::KpisController < Jpi::V1::BaseResourceController
|
3
|
-
|
4
|
-
|
5
|
-
# POST /jpi/v1/impac/dashboards/:dashboard_id/kpis
|
6
|
-
def create
|
7
|
-
whitelist = %w(name endpoint source element_watched targets metadata extra_params)
|
8
|
-
attrs = (params[:kpi] || {}).select { |k,v| whitelist.include?(k.to_s) }
|
9
|
-
|
10
|
-
if dashboard
|
11
|
-
authorize! :manage_impac, dashboard
|
12
|
-
|
13
|
-
# TODO: Her will perform a request there which could be avoided
|
14
|
-
@kpi = dashboard.kpis.create(attrs)
|
15
|
-
if @kpi
|
16
|
-
render 'show'
|
17
|
-
else
|
18
|
-
render json: @kpi.errors, status: :bad_request
|
19
|
-
end
|
20
|
-
else
|
21
|
-
render json: { errors: "Dashboard id #{params[:dashboard_id]} doesn't exist" }, status: :not_found
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
# PUT /jpi/v1/impac/kpis/:id
|
26
|
-
def update
|
27
|
-
whitelist = %w(name element_watched targets extra_params)
|
28
|
-
attrs = (params[:kpi] || {}).select { |k,v| whitelist.include?(k.to_s) }.symbolize_keys
|
29
|
-
|
30
|
-
# Find kpi and assign
|
31
|
-
# Will call GET kpi route on Maestrano
|
32
|
-
@kpi = Impac::Kpi.find(params[:id])
|
33
|
-
authorize! :manage_impac, @kpi.dashboard
|
34
|
-
if @kpi
|
35
|
-
# metadata will be merged instead of replaced
|
36
|
-
p = HashWithIndifferentAccess.new(params[:kpi])
|
37
|
-
if p[:metadata] && p[:metadata].is_a?(Hash)
|
38
|
-
attrs[:metadata] = @kpi.settings.merge(p[:metadata])
|
39
|
-
end
|
40
|
-
|
41
|
-
if @kpi.update(attrs)
|
42
|
-
render 'show'
|
43
|
-
else
|
44
|
-
render json: @kpi.errors, status: :bad_request
|
45
|
-
end
|
46
|
-
else
|
47
|
-
render json: { errors: "Kpi id #{params[:id]} doesn't exist" }, status: :not_found
|
48
|
-
end
|
49
|
-
end
|
50
|
-
|
51
|
-
# DELETE /jpi/v1/impac/kpis/:id
|
52
|
-
def destroy
|
53
|
-
# Will call GET kpi route on Maestrano
|
54
|
-
@kpi = MnoEnterprise::Impac::Kpi.find(params[:id])
|
55
|
-
|
56
|
-
if @kpi
|
57
|
-
authorize! :manage_impac, @kpi.dashboard
|
58
|
-
if @kpi.destroy
|
59
|
-
head status: :ok
|
60
|
-
else
|
61
|
-
render json: { errors: 'Unable to delete this widget' }, status: :bad_request
|
62
|
-
end
|
63
|
-
else
|
64
|
-
render json: {errors: "Kpi id #{params[:id]} doesn't exist" }, status: :not_found
|
65
|
-
end
|
66
|
-
end
|
67
|
-
|
68
|
-
|
69
|
-
#=================================================
|
70
|
-
# Private methods
|
71
|
-
#=================================================
|
72
|
-
private
|
73
|
-
|
74
|
-
def dashboard
|
75
|
-
return false unless params[:dashboard_id]
|
76
|
-
@dashboard ||= MnoEnterprise::Impac::Dashboard.find(params[:dashboard_id])
|
77
|
-
end
|
78
|
-
|
3
|
+
include MnoEnterprise::Concerns::Controllers::Jpi::V1::Impac::KpisController
|
79
4
|
end
|
80
5
|
end
|
@@ -1,22 +1,5 @@
|
|
1
1
|
module MnoEnterprise
|
2
2
|
class Jpi::V1::MarketplaceController < ApplicationController
|
3
|
-
|
4
|
-
|
5
|
-
# GET /mnoe/mnoe/jpi/v1/marketplace
|
6
|
-
def index
|
7
|
-
@apps = if MnoEnterprise.marketplace_listing
|
8
|
-
MnoEnterprise::App.where('nid.in' => MnoEnterprise.marketplace_listing).to_a
|
9
|
-
else
|
10
|
-
MnoEnterprise::App.all.to_a
|
11
|
-
end
|
12
|
-
@apps.sort_by! { |app| [app.rank ? 0 : 1 , app.rank] } # the nil ranks will appear at the end
|
13
|
-
@categories = MnoEnterprise::App.categories(@apps)
|
14
|
-
@categories.delete('Most Popular')
|
15
|
-
end
|
16
|
-
|
17
|
-
# GET /mnoe/jpi/v1/marketplace/1
|
18
|
-
def show
|
19
|
-
@app = MnoEnterprise::App.find(params[:id])
|
20
|
-
end
|
3
|
+
include MnoEnterprise::Concerns::Controllers::Jpi::V1::MarketplaceController
|
21
4
|
end
|
22
5
|
end
|
@@ -1,88 +1,6 @@
|
|
1
1
|
# This controller uses nesting (under organizations) and shallow routes
|
2
2
|
module MnoEnterprise
|
3
3
|
class Jpi::V1::TeamsController < Jpi::V1::BaseResourceController
|
4
|
-
|
5
|
-
|
6
|
-
# GET /mnoe/jpi/v1/organizations/:organization_id/teams
|
7
|
-
def index
|
8
|
-
authorize! :read, parent_organization
|
9
|
-
@teams = parent_organization.teams
|
10
|
-
end
|
11
|
-
|
12
|
-
# GET /mnoe/jpi/v1/teams/:id
|
13
|
-
def show
|
14
|
-
@team = MnoEnterprise::Team.find(params[:id])
|
15
|
-
authorize! :read, @team.organization
|
16
|
-
end
|
17
|
-
|
18
|
-
# POST /mnoe/jpi/v1/organizations/:organization_id/teams
|
19
|
-
def create
|
20
|
-
authorize! :manage_teams, parent_organization
|
21
|
-
@team = parent_organization.teams.create(team_params)
|
22
|
-
|
23
|
-
render 'show'
|
24
|
-
end
|
25
|
-
|
26
|
-
# PUT /mnoe/jpi/v1/teams/:id
|
27
|
-
def update
|
28
|
-
@team = MnoEnterprise::Team.find(params[:id])
|
29
|
-
authorize! :manage_teams, @team.organization
|
30
|
-
|
31
|
-
# Update regular attributes
|
32
|
-
@team.update_attributes(team_params)
|
33
|
-
|
34
|
-
# # Update permissions
|
35
|
-
if params[:team] && params[:team][:app_instances]
|
36
|
-
list = params[:team][:app_instances].select { |e| e != {} }
|
37
|
-
@team.set_access_to(list)
|
38
|
-
end
|
39
|
-
|
40
|
-
render 'show'
|
41
|
-
end
|
42
|
-
|
43
|
-
# PUT /mnoe/jpi/v1/teams/:id/add_users
|
44
|
-
def add_users
|
45
|
-
@team = MnoEnterprise::Team.find(params[:id])
|
46
|
-
authorize! :manage_teams, @team.organization
|
47
|
-
|
48
|
-
# Add users
|
49
|
-
if params[:team] && params[:team][:users]
|
50
|
-
id_list = params[:team][:users].map { |h| h[:id] }.compact
|
51
|
-
users = @team.organization.users.where('id.in' => id_list)
|
52
|
-
users.each { |u| @team.add_user(u) }
|
53
|
-
end
|
54
|
-
|
55
|
-
render 'show'
|
56
|
-
end
|
57
|
-
|
58
|
-
# PUT /mnoe/jpi/v1/teams/:id/remove_users
|
59
|
-
def remove_users
|
60
|
-
@team = MnoEnterprise::Team.find(params[:id])
|
61
|
-
authorize! :manage_teams, @team.organization
|
62
|
-
|
63
|
-
# Add users
|
64
|
-
if params[:team] && params[:team][:users]
|
65
|
-
id_list = params[:team][:users].map { |h| h[:id] }.compact
|
66
|
-
users = @team.organization.users.where('id.in' => id_list)
|
67
|
-
users.each { |u| @team.remove_user(u) }
|
68
|
-
end
|
69
|
-
|
70
|
-
render 'show'
|
71
|
-
end
|
72
|
-
|
73
|
-
# DELETE /mnoe/jpi/v1/teams/:id
|
74
|
-
def destroy
|
75
|
-
@team = MnoEnterprise::Team.find(params[:id])
|
76
|
-
authorize! :manage_teams, @team.organization
|
77
|
-
@team.destroy
|
78
|
-
|
79
|
-
head :no_content
|
80
|
-
end
|
81
|
-
|
82
|
-
private
|
83
|
-
|
84
|
-
def team_params
|
85
|
-
params.require(:team).permit(:name)
|
86
|
-
end
|
4
|
+
include MnoEnterprise::Concerns::Controllers::Jpi::V1::TeamsController
|
87
5
|
end
|
88
6
|
end
|
@@ -8,24 +8,24 @@
|
|
8
8
|
%h2= t('.title')
|
9
9
|
.login-box
|
10
10
|
.brand-logo
|
11
|
-
= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post, class: 'form-horizontal autofill-detect' }) do |f|
|
12
|
-
|
11
|
+
= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post, name: 'form', class: 'form-horizontal autofill-detect' }) do |f|
|
12
|
+
|
13
13
|
- unless devise_error_messages!.empty?
|
14
14
|
.row
|
15
15
|
.alert.alert-error
|
16
16
|
%button.close ×
|
17
17
|
= devise_error_messages!
|
18
|
-
|
18
|
+
|
19
19
|
.row
|
20
20
|
.col-sm-12
|
21
21
|
= f.email_field :email, placeholder: "*Email", autofocus: true, required: true, 'ng-model' => 'user.email', :class => 'form-control'
|
22
|
-
|
22
|
+
|
23
23
|
%br
|
24
|
-
|
24
|
+
|
25
25
|
.row
|
26
26
|
.col-sm-12
|
27
27
|
.text-center
|
28
28
|
%button{ :class => "btn btn-warning", :type => "submit", 'ng-click' => 'hasClicked = true', 'ng-disabled' => 'form.$invalid', 'ng-hide' => 'hasClicked' }= t('.resend')
|
29
29
|
%img.ng-hide{ 'ng-src' => asset_path('mno_enterprise/loader-32x32-bg-inverse.gif'), 'ng-show' => 'hasClicked' }
|
30
30
|
%hr
|
31
|
-
= render "
|
31
|
+
= render "mno_enterprise/auth/shared/links"
|
@@ -8,27 +8,27 @@
|
|
8
8
|
%h2= t('.title')
|
9
9
|
.login-box
|
10
10
|
.brand-logo
|
11
|
-
|
11
|
+
|
12
12
|
= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post, class: 'form-horizontal autofill-detect' }) do |f|
|
13
|
-
|
13
|
+
|
14
14
|
- unless devise_error_messages!.empty?
|
15
15
|
.row
|
16
16
|
.alert.alert-error
|
17
17
|
%button.close ×
|
18
18
|
= devise_error_messages!
|
19
|
-
|
19
|
+
|
20
20
|
.row
|
21
21
|
.col-sm-12
|
22
22
|
= f.email_field :email, placeholder: "*Email", required: true, 'ng-model' => 'user.email', :class => 'form-control'
|
23
|
-
|
23
|
+
|
24
24
|
%br
|
25
|
-
|
25
|
+
|
26
26
|
.row
|
27
27
|
.col-sm-12
|
28
28
|
.text-center
|
29
29
|
%button{ :class => "btn btn-warning", :type => "submit", 'ng-click' => 'hasClicked = true', 'ng-disabled' => 'form.$invalid', 'ng-hide' => 'hasClicked' }= t('.title')
|
30
30
|
%img.ng-hide{ 'ng-src' => asset_path('mno_enterprise/loader-32x32-bg-inverse.gif'), 'ng-show' => 'hasClicked' }
|
31
|
-
|
31
|
+
|
32
32
|
%hr
|
33
|
-
|
34
|
-
= render "
|
33
|
+
|
34
|
+
= render "mno_enterprise/auth/shared/links"
|
@@ -17,8 +17,3 @@
|
|
17
17
|
- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' && MnoEnterprise.style.devise.unlock_link_shown
|
18
18
|
= link_to t('mno_enterprise.auth.shared.links.unlock'), new_unlock_path(resource_name)
|
19
19
|
%br/
|
20
|
-
|
21
|
-
- if devise_mapping.omniauthable? && MnoEnterprise.style.devise.omniauth_link_shown
|
22
|
-
- resource_class.omniauth_providers.each do |provider|
|
23
|
-
= link_to t('mno_enterprise.auth.shared.links.omni_login', provider: provider.to_s.titleize), omniauth_authorize_path(resource_name, provider)
|
24
|
-
%br/
|
@@ -0,0 +1,10 @@
|
|
1
|
+
- if devise_mapping.omniauthable? && MnoEnterprise.style.devise.omniauth_link_shown && resource_class.omniauth_providers.any?
|
2
|
+
.sign-in-using
|
3
|
+
= t('mno_enterprise.auth.shared.links.or_sign_in_using')
|
4
|
+
.oauth-sso
|
5
|
+
- resource_class.omniauth_providers.each do |provider|
|
6
|
+
- if provider.to_s == 'intuit'
|
7
|
+
= link_to "", omniauth_authorize_path(resource_name, provider), class: "omniauth intuit"
|
8
|
+
- else
|
9
|
+
= link_to(omniauth_authorize_path(resource_name, provider), class: "omniauth") do
|
10
|
+
%i{class: "fa fa-#{provider}"}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
json.app_answer do
|
2
|
+
json.id @app_review[:id]
|
3
|
+
json.description @app_review[:description]
|
4
|
+
json.status @app_review[:status]
|
5
|
+
json.user_id @app_review[:user_id]
|
6
|
+
json.user_name @app_review[:user_name]
|
7
|
+
json.organization_id @app_review[:organization_id]
|
8
|
+
json.organization_name @app_review[:organization_name]
|
9
|
+
json.type @app_review[:type]
|
10
|
+
json.app_id @app_review[:app_id]
|
11
|
+
json.question_id @app_review[:question_id]
|
12
|
+
json.app_name @app_review[:app_name]
|
13
|
+
json.created_at @app_review[:created_at]
|
14
|
+
json.updated_at @app_review[:updated_at]
|
15
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
json.app_comment do
|
2
|
+
json.id @app_review[:id]
|
3
|
+
json.description @app_review[:description]
|
4
|
+
json.status @app_review[:status]
|
5
|
+
json.user_id @app_review[:user_id]
|
6
|
+
json.user_name @app_review[:user_name]
|
7
|
+
json.organization_id @app_review[:organization_id]
|
8
|
+
json.organization_name @app_review[:organization_name]
|
9
|
+
json.type @app_review[:type]
|
10
|
+
json.app_id @app_review[:app_id]
|
11
|
+
json.feedback_id @app_review[:feedback_id]
|
12
|
+
json.app_name @app_review[:app_name]
|
13
|
+
json.created_at @app_review[:created_at]
|
14
|
+
json.updated_at @app_review[:updated_at]
|
15
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
json.id app_review.id
|
2
|
+
json.rating app_review.rating
|
3
|
+
json.description app_review.description
|
4
|
+
json.status app_review.status
|
5
|
+
json.app_id app_review.app_id
|
6
|
+
json.app_name app_review.app_name
|
7
|
+
json.user_id app_review.user_id
|
8
|
+
json.user_name app_review.user_name
|
9
|
+
json.organization_id app_review.organization_id
|
10
|
+
json.organization_name app_review.organization_name
|
11
|
+
json.type app_review.type
|
12
|
+
json.created_at app_review.created_at
|
13
|
+
json.updated_at app_review.updated_at
|
@@ -0,0 +1 @@
|
|
1
|
+
json.app_reviews @app_reviews, partial: 'app_review', as: :app_review
|
@@ -1 +1 @@
|
|
1
|
-
json.extract! user, :id, :uid, :email, :phone, :name, :surname, :admin_role, :created_at, :confirmed_at, :last_sign_in_at
|
1
|
+
json.extract! user, :id, :uid, :email, :phone, :name, :surname, :admin_role, :created_at, :confirmed_at, :last_sign_in_at, :sign_in_count
|