forked from KelvinTegelaar/CIPP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings_notifications.html
152 lines (147 loc) · 8.02 KB
/
settings_notifications.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<main>
<header class="page-header page-header-compact page-header-light border-bottom bg-white mb-4">
<div class="container-xl px-4">
<div class="page-header-content">
<div class="row align-items-center justify-content-between pt-3">
<div class="col-auto mb-3">
<h1 class="page-header-title">
<div class="page-header-icon"><i data-feather="user"></i></div>
Notification Settings
</h1>
</div>
</div>
</div>
</div>
</header>
<!-- Main page content-->
<div class="container-xl px-4 mt-4">
<!-- Account page navigation-->
<nav class="nav nav-borders">
<a class="nav-link" href="index.html?page=settings">Profile</a>
<a class="nav-link" href="index.html?page=settings_tenants">Tenants</a>
<a class="nav-link" href="index.html?page=settings_security">Security</a>
<a class="nav-link active ms-0" href="index.html?page=settings_notifications">Notifications</a>
</nav>
<hr class="mt-0 mb-4" />
<div class="row">
<div class="col-lg-8">
<!-- Email notifications preferences card-->
<div class="card card-header-actions mb-4">
<div class="card-header">
Notifications
</div>
<div class="card-body">
<form id="Notifcations" name="Notifcations">
<!-- Form Group (default email)-->
<div class="mb-3">
<label class="small mb-1" for="Email">Notification
email</label>
<input class="form-control" id="email" type="email" placeholder="leave blank for none"
name="email" />
</div>
<div class="mb-3">
<label class="small mb-1" for="Webhook">Webhook URL (Slack, Teams, Discord)</label>
<input class="form-control" id="Webhook" name="Webhook"
placeholder="leave blank for none" value="" />
</div>
<!-- Form Group (email updates checkboxes)-->
<div class="mb-0">
<label class="small mb-2">Choose which types of updates you want to receive. This
notification will be sent every 30 minutes.</label>
<div class="form-check mb-2">
<input class="form-check-input" value="true" name="AddUser" id="AddUser"
type="checkbox" />
<label class="form-check-label" for="AddUser">New Accounts created via
CIPP</label>
</div>
<div class="form-check mb-2">
<input class="form-check-input" value="true" name="RemoveUser" id="RemoveUser"
type="checkbox" />
<label class="form-check-label" for="RemoveUser">Removed Accounts via CIPP</label>
</div>
<div class="form-check mb-2">
<input class="form-check-input" value="true" name="AddChocoApp" id="AddChocoApp"
type="checkbox" />
<label class="form-check-label" for="AddChocoApp">New applictions added via
CIPP</label>
</div>
<div class="form-check mb-2">
<input class="form-check-input" value="true" name="Addpolicy" id="Addpolicy"
type="checkbox" />
<label class="form-check-label" for="Addpolicy">New Policies added via
CIPP</label>
</div>
<div class="form-check mb-2">
<input class="form-check-input" value="true" name="AddStandardsDeploy"
id="AddStandardsDeploy" type="checkbox" />
<label class="form-check-label" for="AddStandardsDeploy">New Standards added via
CIPP</label>
</div>
<div class="form-check mb-2">
<input class="form-check-input" value="true" name="RemoveStandard"
id="RemoveStandard" type="checkbox" />
<label class="form-check-label" for="RemoveStandard">Removed Standards via
CIPP</label>
</div>
<div class="form-check">
<input class="form-check-input" value="true" name="TokensUpdater" id="TokensUpdater"
type="checkbox" />
<label class="form-check-label" for="TokensUpdater">Token events</label>
</div>
</div>
</form>
<button onclick='PostForm("Notifcations","api/ExecNotificationConfig")' class="btn btn-primary"
type="button">Set Notification settings</button>
</div>
</div>
<!-- SMS push notifications card-->
</div>
</div>
<div class="col-lg-4">
<!-- Notifications preferences card-->
</div>
</div>
</div>
</main>
<button class="btn btn-primary" id="PopModal" type="button" data-bs-toggle="modal" data-bs-target="#exampleModal"
style="display:none;"></button>
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Results</h5>
</div>
<div class="modal-body">
<section id="APIContent">
<div class="spinner-border text-primary" role="status">
<span class="sr-only"></span>
</div></span>
</section>
</div>
<div class="modal-footer"><button class="btn btn-secondary" type="button"
data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
<script>
$.ajax({
'async': true,
'global': false,
'url': 'api/ListNotificationConfig',
'dataType': "json",
'success': function (data) {
//basic fields
$('#email').val(data.email)
$('#Webhook').val(data.Webhook)
if (data.AddUser) { $("#AddUser").prop("checked", true); }
if (data.RemoveUser) { $("#RemoveUser").prop("checked", true); }
if (data.RemoveStandard) { $("#RemoveStandard").prop("checked", true); }
if (data.Addpolicy) { $("#Addpolicy").prop("checked", true); }
if (data.AddChocoApp) { $("#AddChocoApp").prop("checked", true); }
if (data.TokensUpdater) { $("#TokensUpdater").prop("checked", true); }
if (data.AddStandardsDeploy) { $("#AddStandardsDeploy").prop("checked", true); }
}
}
)
</script>