forked from community/device-mgt-plugins
Merge pull request #100 from charithag/IoTS-1.0.0-M1
Update policy section
commit
bfc46c98a0
@ -0,0 +1 @@
|
||||
{{unit "iot.unit.policy.edit"}}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"version": "1.0.0"
|
||||
}
|
@ -0,0 +1 @@
|
||||
{{unit "iot.unit.policy.view"}}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"version": "1.0.0"
|
||||
}
|
@ -0,0 +1 @@
|
||||
{{unit "iot.unit.policy.wizard"}}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"version": "1.0.0"
|
||||
}
|
@ -0,0 +1 @@
|
||||
{{unit "iot.unit.policy.edit"}}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"version": "1.0.0"
|
||||
}
|
@ -0,0 +1 @@
|
||||
{{unit "iot.unit.policy.view"}}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"version": "1.0.0"
|
||||
}
|
@ -0,0 +1 @@
|
||||
{{unit "iot.unit.policy.wizard"}}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"version": "1.0.0"
|
||||
}
|
@ -0,0 +1 @@
|
||||
{{unit "iot.unit.policy.edit"}}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"version": "1.0.0"
|
||||
}
|
@ -0,0 +1 @@
|
||||
{{unit "iot.unit.policy.view"}}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"version": "1.0.0"
|
||||
}
|
@ -0,0 +1 @@
|
||||
{{unit "iot.unit.policy.wizard"}}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"version": "1.0.0"
|
||||
}
|
@ -0,0 +1 @@
|
||||
{{unit "iot.unit.policy.edit"}}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"version": "1.0.0"
|
||||
}
|
@ -0,0 +1 @@
|
||||
{{unit "iot.unit.policy.view"}}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"version": "1.0.0"
|
||||
}
|
@ -0,0 +1 @@
|
||||
{{unit "iot.unit.policy.wizard"}}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"version": "1.0.0"
|
||||
}
|
@ -0,0 +1,244 @@
|
||||
{{#zone "topCss"}}
|
||||
{{css "css/codemirror.css"}}
|
||||
{{/zone}}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="wr-steps hidden">
|
||||
<div class="col-md-3 col-xs-3">
|
||||
<div class="itm-wiz itm-wiz-current" data-step="policy-profile">
|
||||
<div class="wiz-no">1</div>
|
||||
<div class="wiz-lbl hidden-xs"><span>Edit current profile</span></div>
|
||||
</div>
|
||||
<br class="c-both"/>
|
||||
</div>
|
||||
<div class="col-md-3 col-xs-3">
|
||||
<div class="itm-wiz" data-step="policy-criteria">
|
||||
<div class="wiz-no">2</div>
|
||||
<div class="wiz-lbl hidden-xs"><span>Edit assignment groups</span></div>
|
||||
</div>
|
||||
<br class="c-both"/>
|
||||
</div>
|
||||
<div class="col-md-3 col-xs-3">
|
||||
<div class="itm-wiz" data-step="policy-naming">
|
||||
<div class="wiz-no">3</div>
|
||||
<div class="wiz-lbl hidden-xs"><span>Republish to devices</span></div>
|
||||
</div>
|
||||
<br class="c-both"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container col-centered wr-content policy-message hidden">
|
||||
<div class="wr-form">
|
||||
<h1 id="policy-message-page-wizard-title" class="page-sub-title">Policy is
|
||||
successfully
|
||||
re-configured.</h1>
|
||||
<br>Please click <b>"Add Another Policy"</b>, if you wish to add another policy or
|
||||
click
|
||||
<b>"View policy list"</b> to complete the process and go back to the policy list.
|
||||
<hr>
|
||||
<button class="wr-btn wizard-stepper" data-current="policy-message"
|
||||
data-direct="{{@app.context}}/policies/">
|
||||
View policy list
|
||||
</button>
|
||||
<a href="@{{@app.context}}/policies/add-policy" class="cu-btn-inner">
|
||||
<span class="fw-stack">
|
||||
<i class="fw fw-ring fw-stack-2x"></i>
|
||||
<i class="fw fw-add fw-stack-1x"></i>
|
||||
</span>
|
||||
Add another policy
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container col-centered wr-content policy-naming hidden">
|
||||
<div class="wr-form">
|
||||
<h1 id="policy-naming-page-wizard-title" class="page-sub-title">EDIT POLICY</h1>
|
||||
<hr>
|
||||
<div id="policy-naming-wizard-steps" class="row wr-wizard"></div>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h4>Step 3: Republish to devices</h4>
|
||||
<br>
|
||||
|
||||
<div id="policy-naming-main-error-msg" class="alert alert-danger hidden"
|
||||
role="alert">
|
||||
<i class="icon fw fw-error"></i><span></span>
|
||||
</div>
|
||||
<div>
|
||||
<label class="wr-input-label">
|
||||
Set a name * to your policy<br>
|
||||
( should be 1-to-30 characters long )
|
||||
</label>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<div class="cus-col-50">
|
||||
<input id="policy-name-input" class="form-control" type="text"
|
||||
value="" placeholder="[ Required field ]"/>
|
||||
</div>
|
||||
<br class="c-both"/>
|
||||
</div>
|
||||
<label class="wr-input-label">
|
||||
Add a description
|
||||
</label>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<div class="cus-col-50">
|
||||
<textarea id="policy-description-input" class="form-control"
|
||||
rows="10" placeholder="[ Optional field ]"></textarea>
|
||||
</div>
|
||||
<br class="c-both"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wr-input-control wr-btn-grp">
|
||||
<a href="#" class="wr-btn wizard-stepper" data-is-back-btn="true"
|
||||
data-current="policy-naming" data-next="policy-criteria">
|
||||
Back
|
||||
</a>
|
||||
<a href="#" class="wr-btn wizard-stepper"
|
||||
data-current="policy-naming-publish" data-next="policy-message"
|
||||
data-validate="true">
|
||||
Save & Publish
|
||||
</a>
|
||||
<a href="#" class="wr-btn wizard-stepper" data-current="policy-naming"
|
||||
data-next="policy-message" data-validate="true">
|
||||
Save
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container col-centered wr-content policy-criteria hidden">
|
||||
<div class="wr-form">
|
||||
<h1 id="policy-criteria-page-wizard-title" class="page-sub-title">EDIT POLICY</h1>
|
||||
<hr>
|
||||
<div id="policy-criteria-wizard-steps" class="row wr-wizard"></div>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h4>Step 2: Edit assignment groups</h4>
|
||||
<br>
|
||||
|
||||
<div>
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-control radio light">
|
||||
<input id="user-roles-radio-btn" type="radio"
|
||||
name="select-users-radio-btn" class="select-users-radio"
|
||||
checked/>
|
||||
<span class="helper"> Set user role(s)</span>
|
||||
</label>
|
||||
<label class="wr-input-control radio light" rel="assetfilter">
|
||||
<input id="users-radio-btn" type="radio"
|
||||
name="select-users-radio-btn"
|
||||
class="select-users-radio"/>
|
||||
<span class="helper"> Set user(s)</span>
|
||||
</label>
|
||||
</div>
|
||||
<div id="user-roles-select-field" class="select-users">
|
||||
<div class="wr-input-control">
|
||||
<div class="cus-col-50">
|
||||
<select id="user-roles-input" class="form-control select2"
|
||||
multiple="multiple">
|
||||
<option value="ANY" selected>ANY</option>
|
||||
{{#each roles}}
|
||||
<option>{{this}}</option>
|
||||
{{/each}}
|
||||
</select>
|
||||
</div>
|
||||
<br class="c-both"/>
|
||||
</div>
|
||||
</div>
|
||||
<div id="users-select-field" class="select-users">
|
||||
<div class="wr-input-control">
|
||||
<div class="cus-col-50">
|
||||
<select id="users-input" class="form-control select2"
|
||||
multiple="multiple">
|
||||
<option value="ANY" selected>ANY</option>
|
||||
</select>
|
||||
</div>
|
||||
<br class="c-both"/>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<label class="wr-input-label" title="">
|
||||
Set an action upon non-compliance
|
||||
</label>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<div class="cus-col-50">
|
||||
<select id="action-input" class="form-control">
|
||||
<option value="enforce" data-action="enforce" selected>
|
||||
Enforce
|
||||
</option>
|
||||
<option value="warn" data-action="warn">Warn</option>
|
||||
<option value="monitor" data-action="monitor">Monitor
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
<br class="c-both"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wr-input-control wr-btn-grp">
|
||||
<a href="#" class="wr-btn wizard-stepper" data-is-back-btn="true"
|
||||
data-current="policy-criteria" data-next="policy-profile">
|
||||
Back
|
||||
</a>
|
||||
<a href="#" class="wr-btn wizard-stepper" data-current="policy-criteria"
|
||||
data-next="policy-naming" data-validate="false">
|
||||
Continue
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container col-centered wr-content policy-profile">
|
||||
<div class="wr-form">
|
||||
<h1 id="policy-profile-page-wizard-title" class="page-sub-title">EDIT POLICY</h1>
|
||||
<hr>
|
||||
<div id="policy-profile-wizard-steps" class="row wr-wizard"></div>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h4>Step 1: Edit current profile</h4>
|
||||
<br>
|
||||
<div class="add-margin-top-4x">
|
||||
<label class="wr-input-label">
|
||||
Device specific configuration instructions
|
||||
</label>
|
||||
<div class="wr-advance-operations">
|
||||
<div class="wr-input-control">
|
||||
<div class="cus-col-100">
|
||||
<textarea id="policy-definition-input" placeholder="Enter the policy"
|
||||
style="width: 100%;" required></textarea>
|
||||
</div>
|
||||
<br class="c-both"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wr-input-control wr-btn-grp">
|
||||
<a href="#" class="wr-btn wizard-stepper" data-current="policy-profile"
|
||||
data-next="policy-criteria" data-validate="true">
|
||||
Continue
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- content -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{{#zone "bottomJs"}}
|
||||
{{js "js/codemirror.js"}}
|
||||
{{js "js/sql.js"}}
|
||||
{{js "js/policy-edit.js"}}
|
||||
{{/zone}}
|
||||
|
@ -0,0 +1,7 @@
|
||||
function onRequest(context) {
|
||||
var log = new Log("policy-view-edit-unit backend js");
|
||||
log.debug("calling policy-view-edit-unit");
|
||||
var userModule = require("/app/modules/user.js").userModule;
|
||||
context.roles = userModule.getRoles().content;
|
||||
return context;
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"version" : "1.0.0"
|
||||
}
|
@ -0,0 +1,344 @@
|
||||
/*Copyright (C) 2015 by Marijn Haverbeke <marijnh@gmail.com> and others
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.*/
|
||||
|
||||
/* BASICS */
|
||||
|
||||
.CodeMirror {
|
||||
/* Set height, width, borders, and global font properties here */
|
||||
font-family: monospace;
|
||||
height: 300px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
/* PADDING */
|
||||
|
||||
.CodeMirror-lines {
|
||||
padding: 4px 0; /* Vertical padding around content */
|
||||
}
|
||||
.CodeMirror pre {
|
||||
padding: 0 4px; /* Horizontal padding of content */
|
||||
}
|
||||
|
||||
.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
||||
background-color: white; /* The little square between H and V scrollbars */
|
||||
}
|
||||
|
||||
/* GUTTER */
|
||||
|
||||
.CodeMirror-gutters {
|
||||
border-right: 1px solid #ddd;
|
||||
background-color: #f7f7f7;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.CodeMirror-linenumbers {}
|
||||
.CodeMirror-linenumber {
|
||||
padding: 0 3px 0 5px;
|
||||
min-width: 20px;
|
||||
text-align: right;
|
||||
color: #999;
|
||||
white-space: nowrap;
|
||||
left: -30px;
|
||||
}
|
||||
|
||||
.CodeMirror-guttermarker { color: black; }
|
||||
.CodeMirror-guttermarker-subtle { color: #999; }
|
||||
|
||||
/* CURSOR */
|
||||
|
||||
.CodeMirror div.CodeMirror-cursor {
|
||||
border-left: 1px solid black;
|
||||
}
|
||||
/* Shown when moving in bi-directional text */
|
||||
.CodeMirror div.CodeMirror-secondarycursor {
|
||||
border-left: 1px solid silver;
|
||||
}
|
||||
.CodeMirror.cm-fat-cursor div.CodeMirror-cursor {
|
||||
width: auto;
|
||||
border: 0;
|
||||
background: #7e7;
|
||||
}
|
||||
.CodeMirror.cm-fat-cursor div.CodeMirror-cursors {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.cm-animate-fat-cursor {
|
||||
width: auto;
|
||||
border: 0;
|
||||
-webkit-animation: blink 1.06s steps(1) infinite;
|
||||
-moz-animation: blink 1.06s steps(1) infinite;
|
||||
animation: blink 1.06s steps(1) infinite;
|
||||
}
|
||||
@-moz-keyframes blink {
|
||||
0% { background: #7e7; }
|
||||
50% { background: none; }
|
||||
100% { background: #7e7; }
|
||||
}
|
||||
@-webkit-keyframes blink {
|
||||
0% { background: #7e7; }
|
||||
50% { background: none; }
|
||||
100% { background: #7e7; }
|
||||
}
|
||||
@keyframes blink {
|
||||
0% { background: #7e7; }
|
||||
50% { background: none; }
|
||||
100% { background: #7e7; }
|
||||
}
|
||||
|
||||
/* Can style cursor different in overwrite (non-insert) mode */
|
||||
div.CodeMirror-overwrite div.CodeMirror-cursor {}
|
||||
|
||||
.cm-tab { display: inline-block; text-decoration: inherit; }
|
||||
|
||||
.CodeMirror-ruler {
|
||||
border-left: 1px solid #ccc;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
/* DEFAULT THEME */
|
||||
|
||||
.cm-s-default .cm-keyword {color: #708;}
|
||||
.cm-s-default .cm-atom {color: #219;}
|
||||
.cm-s-default .cm-number {color: #164;}
|
||||
.cm-s-default .cm-def {color: #00f;}
|
||||
.cm-s-default .cm-variable,
|
||||
.cm-s-default .cm-punctuation,
|
||||
.cm-s-default .cm-property,
|
||||
.cm-s-default .cm-operator {}
|
||||
.cm-s-default .cm-variable-2 {color: #05a;}
|
||||
.cm-s-default .cm-variable-3 {color: #085;}
|
||||
.cm-s-default .cm-comment {color: #a50;}
|
||||
.cm-s-default .cm-string {color: #a11;}
|
||||
.cm-s-default .cm-string-2 {color: #f50;}
|
||||
.cm-s-default .cm-meta {color: #555;}
|
||||
.cm-s-default .cm-qualifier {color: #555;}
|
||||
.cm-s-default .cm-builtin {color: #30a;}
|
||||
.cm-s-default .cm-bracket {color: #997;}
|
||||
.cm-s-default .cm-tag {color: #170;}
|
||||
.cm-s-default .cm-attribute {color: #00c;}
|
||||
.cm-s-default .cm-header {color: blue;}
|
||||
.cm-s-default .cm-quote {color: #090;}
|
||||
.cm-s-default .cm-hr {color: #999;}
|
||||
.cm-s-default .cm-link {color: #00c;}
|
||||
|
||||
.cm-negative {color: #d44;}
|
||||
.cm-positive {color: #292;}
|
||||
.cm-header, .cm-strong {font-weight: bold;}
|
||||
.cm-em {font-style: italic;}
|
||||
.cm-link {text-decoration: underline;}
|
||||
.cm-strikethrough {text-decoration: line-through;}
|
||||
|
||||
.cm-s-default .cm-error {color: #f00;}
|
||||
.cm-invalidchar {color: #f00;}
|
||||
|
||||
/* Default styles for common addons */
|
||||
|
||||
div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
|
||||
div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
|
||||
.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }
|
||||
.CodeMirror-activeline-background {background: #e8f2ff;}
|
||||
|
||||
/* STOP */
|
||||
|
||||
/* The rest of this file contains styles related to the mechanics of
|
||||
the editor. You probably shouldn't touch them. */
|
||||
|
||||
.CodeMirror {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background: white;
|
||||
}
|
||||
|
||||
.CodeMirror-scroll {
|
||||
overflow: scroll !important; /* Things will break if this is overridden */
|
||||
/* 30px is the magic margin used to hide the element's real scrollbars */
|
||||
/* See overflow: hidden in .CodeMirror */
|
||||
margin-bottom: -30px; margin-right: -30px;
|
||||
padding-bottom: 30px;
|
||||
height: 100%;
|
||||
outline: none; /* Prevent dragging from highlighting the element */
|
||||
position: relative;
|
||||
}
|
||||
.CodeMirror-sizer {
|
||||
position: relative;
|
||||
border-right: 30px solid transparent;
|
||||
}
|
||||
|
||||
/* The fake, visible scrollbars. Used to force redraw during scrolling
|
||||
before actuall scrolling happens, thus preventing shaking and
|
||||
flickering artifacts. */
|
||||
.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
||||
position: absolute;
|
||||
z-index: 6;
|
||||
display: none;
|
||||
}
|
||||
.CodeMirror-vscrollbar {
|
||||
right: 0; top: 0;
|
||||
overflow-x: hidden;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
.CodeMirror-hscrollbar {
|
||||
bottom: 0; left: 0;
|
||||
overflow-y: hidden;
|
||||
overflow-x: scroll;
|
||||
}
|
||||
.CodeMirror-scrollbar-filler {
|
||||
right: 0; bottom: 0;
|
||||
}
|
||||
.CodeMirror-gutter-filler {
|
||||
left: 0; bottom: 0;
|
||||
}
|
||||
|
||||
.CodeMirror-gutters {
|
||||
position: absolute; left: 0; top: 0;
|
||||
z-index: 3;
|
||||
}
|
||||
.CodeMirror-gutter {
|
||||
white-space: normal;
|
||||
height: 100%;
|
||||
display: inline-block;
|
||||
/* Hack to make IE7 behave */
|
||||
*zoom:1;
|
||||
*display:inline;
|
||||
}
|
||||
.CodeMirror-gutter-wrapper {
|
||||
position: absolute;
|
||||
z-index: 4;
|
||||
height: 100%;
|
||||
}
|
||||
.CodeMirror-gutter-elt {
|
||||
position: absolute;
|
||||
cursor: default;
|
||||
z-index: 4;
|
||||
left: -30px;
|
||||
}
|
||||
.CodeMirror-gutter-wrapper {
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.CodeMirror-lines {
|
||||
cursor: text;
|
||||
min-height: 1px; /* prevents collapsing before first draw */
|
||||
}
|
||||
.CodeMirror pre {
|
||||
/* Reset some styles that the rest of the page might have set */
|
||||
-moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
|
||||
border-width: 0;
|
||||
background: transparent;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
margin: 0;
|
||||
white-space: pre;
|
||||
word-wrap: normal;
|
||||
line-height: inherit;
|
||||
color: inherit;
|
||||
z-index: 2;
|
||||
position: relative;
|
||||
overflow: visible;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
.CodeMirror-wrap pre {
|
||||
word-wrap: break-word;
|
||||
white-space: pre-wrap;
|
||||
word-break: normal;
|
||||
}
|
||||
|
||||
.CodeMirror-linebackground {
|
||||
position: absolute;
|
||||
left: 0; right: 0; top: 0; bottom: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.CodeMirror-linewidget {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.CodeMirror-widget {}
|
||||
|
||||
.CodeMirror-code {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/* Force content-box sizing for the elements where we expect it */
|
||||
.CodeMirror-scroll,
|
||||
.CodeMirror-sizer,
|
||||
.CodeMirror-gutter,
|
||||
.CodeMirror-gutters,
|
||||
.CodeMirror-linenumber {
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
.CodeMirror-measure {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
visibility: hidden;
|
||||
}
|
||||
.CodeMirror-measure pre { position: static; }
|
||||
|
||||
.CodeMirror div.CodeMirror-cursor {
|
||||
position: absolute;
|
||||
border-right: none;
|
||||
width: 0;
|
||||
}
|
||||
|
||||
div.CodeMirror-cursors {
|
||||
visibility: hidden;
|
||||
position: relative;
|
||||
z-index: 3;
|
||||
}
|
||||
.CodeMirror-focused div.CodeMirror-cursors {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.CodeMirror-selected { background: #d9d9d9; }
|
||||
.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
|
||||
.CodeMirror-crosshair { cursor: crosshair; }
|
||||
.CodeMirror ::selection { background: #d7d4f0; }
|
||||
.CodeMirror ::-moz-selection { background: #d7d4f0; }
|
||||
|
||||
.cm-searching {
|
||||
background: #ffa;
|
||||
background: rgba(255, 255, 0, .4);
|
||||
}
|
||||
|
||||
/* IE7 hack to prevent it from returning funny offsetTops on the spans */
|
||||
.CodeMirror span { *vertical-align: text-bottom; }
|
||||
|
||||
/* Used to force a border model for a node */
|
||||
.cm-force-border { padding-right: .1px; }
|
||||
|
||||
@media print {
|
||||
/* Hide the cursor when printing */
|
||||
.CodeMirror div.CodeMirror-cursors {
|
||||
visibility: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
/* See issue #2901 */
|
||||
.cm-tab-wrap-hack:after { content: ''; }
|
||||
|
||||
/* Help users use markselection to safely style text background */
|
||||
span.CodeMirror-selectedtext { background: none; }
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,729 @@
|
||||
/*
|
||||
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
|
||||
*
|
||||
* WSO2 Inc. licenses this file to you under the Apache License,
|
||||
* Version 2.0 (the "License"); you may not use this file except
|
||||
* in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
var validateStep = {};
|
||||
var skipStep = {};
|
||||
var stepForwardFrom = {};
|
||||
var stepBackFrom = {};
|
||||
var policy = {};
|
||||
var configuredOperations = [];
|
||||
|
||||
/**
|
||||
* Method to update the visibility (i.e. disabled or enabled view)
|
||||
* of grouped input according to the values
|
||||
* that they currently possess.
|
||||
* @param domElement HTML grouped-input element with class name "grouped-input"
|
||||
*/
|
||||
var updateGroupedInputVisibility = function (domElement) {
|
||||
if ($(".parent-input:first", domElement).is(":checked")) {
|
||||
if ($(".grouped-child-input:first", domElement).hasClass("disabled")) {
|
||||
$(".grouped-child-input:first", domElement).removeClass("disabled");
|
||||
}
|
||||
$(".child-input", domElement).each(function () {
|
||||
$(this).prop('disabled', false);
|
||||
});
|
||||
} else {
|
||||
if (!$(".grouped-child-input:first", domElement).hasClass("disabled")) {
|
||||
$(".grouped-child-input:first", domElement).addClass("disabled");
|
||||
}
|
||||
$(".child-input", domElement).each(function () {
|
||||
$(this).prop('disabled', true);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
skipStep["policy-platform"] = function (policyPayloadObj) {
|
||||
policy["name"] = policyPayloadObj["policyName"];
|
||||
policy["platform"] = policyPayloadObj["profile"]["deviceType"]["name"];
|
||||
policy["platformId"] = policyPayloadObj["profile"]["deviceType"]["id"];
|
||||
var userRoleInput = $("#user-roles-input");
|
||||
var ownershipInput = $("#ownership-input");
|
||||
var userInput = $("#users-input");
|
||||
var actionInput = $("#action-input");
|
||||
var policyNameInput = $("#policy-name-input");
|
||||
var policyDescriptionInput = $("#policy-description-input");
|
||||
userRoleInput.val(policyPayloadObj.roles).trigger("change");
|
||||
userInput.val(policyPayloadObj.users).trigger("change");
|
||||
ownershipInput.val(policyPayloadObj.ownershipType);
|
||||
actionInput.val(policyPayloadObj.compliance);
|
||||
policyNameInput.val(policyPayloadObj["policyName"]);
|
||||
policyDescriptionInput.val(policyPayloadObj["description"]);
|
||||
// updating next-page wizard title with selected platform
|
||||
$("#policy-profile-page-wizard-title").text("EDIT " + policy["platform"] + " POLICY - " + policy["name"]);
|
||||
|
||||
var profileFeaturesList = policyPayloadObj["profile"]["profileFeaturesList"];
|
||||
if (profileFeaturesList.length > 0){
|
||||
var content = profileFeaturesList[0]["content"];
|
||||
var policyDefinitionObj = JSON.parse(content);
|
||||
window.queryEditor.setValue(policyDefinitionObj["policyDefinition"]);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Checks if provided number is valid against a range.
|
||||
*
|
||||
* @param numberInput Number Input
|
||||
* @param min Minimum Limit
|
||||
* @param max Maximum Limit
|
||||
* @returns {boolean} Returns true if input is within the specified range
|
||||
*/
|
||||
var inputIsValidAgainstRange = function (numberInput, min, max) {
|
||||
return (numberInput == min || (numberInput > min && numberInput < max) || numberInput == max);
|
||||
};
|
||||
|
||||
/**
|
||||
* Checks if provided input is valid against RegEx input.
|
||||
*
|
||||
* @param regExp Regular expression
|
||||
* @param input Input string to check
|
||||
* @returns {boolean} Returns true if input matches RegEx
|
||||
*/
|
||||
var inputIsValidAgainstRegExp = function (regExp, input) {
|
||||
return regExp.test(input);
|
||||
};
|
||||
|
||||
validateStep["policy-profile"] = function () {
|
||||
return true;
|
||||
}
|
||||
|
||||
stepForwardFrom["policy-profile"] = function () {
|
||||
policy["profile"] = operationModule.generateProfile(policy["platform"], configuredOperations);
|
||||
// updating next-page wizard title with selected platform
|
||||
$("#policy-criteria-page-wizard-title").text("EDIT " + policy["platform"] + " POLICY - " + policy["name"]);
|
||||
};
|
||||
|
||||
stepForwardFrom["policy-criteria"] = function () {
|
||||
$("input[type='radio'].select-users-radio").each(function () {
|
||||
if ($(this).is(':radio')) {
|
||||
if ($(this).is(":checked")) {
|
||||
if ($(this).attr("id") == "users-radio-btn") {
|
||||
policy["selectedUsers"] = $("#users-input").val();
|
||||
} else if ($(this).attr("id") == "user-roles-radio-btn") {
|
||||
policy["selectedUserRoles"] = $("#user-roles-input").val();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
policy["selectedNonCompliantAction"] = $("#action-input").find(":selected").data("action");
|
||||
policy["selectedOwnership"] = $("#ownership-input").val();
|
||||
// updating next-page wizard title with selected platform
|
||||
$("#policy-naming-page-wizard-title").text("EDIT " + policy["platform"] + " POLICY - " + policy["name"]);
|
||||
};
|
||||
|
||||
/**
|
||||
* Checks if provided input is valid against provided length range.
|
||||
*
|
||||
* @param input Alphanumeric or non-alphanumeric input
|
||||
* @param minLength Minimum Required Length
|
||||
* @param maxLength Maximum Required Length
|
||||
* @returns {boolean} Returns true if input matches the provided minimum length and maximum length
|
||||
*/
|
||||
var inputIsValidAgainstLength = function (input, minLength, maxLength) {
|
||||
var length = input.length;
|
||||
return (length == minLength || (length > minLength && length < maxLength) || length == maxLength);
|
||||
};
|
||||
|
||||
validateStep["policy-naming"] = function () {
|
||||
var validationStatus = {};
|
||||
|
||||
// taking values of inputs to be validated
|
||||
var policyName = $("input#policy-name-input").val();
|
||||
// starting validation process and updating validationStatus
|
||||
if (!policyName) {
|
||||
validationStatus["error"] = true;
|
||||
validationStatus["mainErrorMsg"] = "Policy name is empty. You cannot proceed.";
|
||||
} else if (!inputIsValidAgainstLength(policyName, 1, 30)) {
|
||||
validationStatus["error"] = true;
|
||||
validationStatus["mainErrorMsg"] =
|
||||
"Policy name exceeds maximum allowed length. Please check.";
|
||||
} else {
|
||||
validationStatus["error"] = false;
|
||||
}
|
||||
// ending validation process
|
||||
|
||||
// start taking specific actions upon validation
|
||||
var wizardIsToBeContinued;
|
||||
if (validationStatus["error"]) {
|
||||
wizardIsToBeContinued = false;
|
||||
var mainErrorMsgWrapper = "#policy-naming-main-error-msg";
|
||||
var mainErrorMsg = mainErrorMsgWrapper + " span";
|
||||
$(mainErrorMsg).text(validationStatus["mainErrorMsg"]);
|
||||
$(mainErrorMsgWrapper).removeClass("hidden");
|
||||
} else {
|
||||
wizardIsToBeContinued = true;
|
||||
}
|
||||
|
||||
return wizardIsToBeContinued;
|
||||
};
|
||||
|
||||
validateStep["policy-naming-publish"] = function () {
|
||||
var validationStatus = {};
|
||||
|
||||
// taking values of inputs to be validated
|
||||
var policyName = $("input#policy-name-input").val();
|
||||
// starting validation process and updating validationStatus
|
||||
if (!policyName) {
|
||||
validationStatus["error"] = true;
|
||||
validationStatus["mainErrorMsg"] = "Policy name is empty. You cannot proceed.";
|
||||
} else if (!inputIsValidAgainstLength(policyName, 1, 30)) {
|
||||
validationStatus["error"] = true;
|
||||
validationStatus["mainErrorMsg"] =
|
||||
"Policy name exceeds maximum allowed length. Please check.";
|
||||
} else {
|
||||
validationStatus["error"] = false;
|
||||
}
|
||||
// ending validation process
|
||||
|
||||
// start taking specific actions upon validation
|
||||
var wizardIsToBeContinued;
|
||||
if (validationStatus["error"]) {
|
||||
wizardIsToBeContinued = false;
|
||||
var mainErrorMsgWrapper = "#policy-naming-main-error-msg";
|
||||
var mainErrorMsg = mainErrorMsgWrapper + " span";
|
||||
$(mainErrorMsg).text(validationStatus["mainErrorMsg"]);
|
||||
$(mainErrorMsgWrapper).removeClass("hidden");
|
||||
} else {
|
||||
wizardIsToBeContinued = true;
|
||||
}
|
||||
|
||||
return wizardIsToBeContinued;
|
||||
};
|
||||
|
||||
stepForwardFrom["policy-naming-publish"] = function () {
|
||||
policy["policyName"] = $("#policy-name-input").val();
|
||||
policy["description"] = $("#policy-description-input").val();
|
||||
//All data is collected. Policy can now be updated.
|
||||
updatePolicy(policy, "publish");
|
||||
};
|
||||
stepForwardFrom["policy-naming"] = function () {
|
||||
policy["policyName"] = $("#policy-name-input").val();
|
||||
policy["description"] = $("#policy-description-input").val();
|
||||
//All data is collected. Policy can now be updated.
|
||||
updatePolicy(policy, "save");
|
||||
};
|
||||
|
||||
var updatePolicy = function (policy, state) {
|
||||
var profilePayloads = [{
|
||||
"featureCode": "CONFIG",
|
||||
"deviceTypeId": policy["platformId"],
|
||||
"content": {"policyDefinition": window.queryEditor.getValue()}
|
||||
}];
|
||||
|
||||
var payload = {
|
||||
"policyName": policy["policyName"],
|
||||
"description": policy["description"],
|
||||
"compliance": policy["selectedNonCompliantAction"],
|
||||
"ownershipType": "ANY",
|
||||
"profile": {
|
||||
"profileName": policy["policyName"],
|
||||
"deviceType": {
|
||||
"id": policy["platformId"],
|
||||
"name": policy["platform"]
|
||||
},
|
||||
"profileFeaturesList": profilePayloads
|
||||
}
|
||||
};
|
||||
|
||||
if (policy["selectedUsers"]) {
|
||||
payload["users"] = policy["selectedUsers"];
|
||||
} else if (policy["selectedUserRoles"]) {
|
||||
payload["roles"] = policy["selectedUserRoles"];
|
||||
} else {
|
||||
payload["users"] = [];
|
||||
payload["roles"] = [];
|
||||
}
|
||||
|
||||
var serviceURL = "/devicemgt_admin/policies/" + getParameterByName("id");
|
||||
invokerUtil.put(
|
||||
serviceURL,
|
||||
payload,
|
||||
// on success
|
||||
function () {
|
||||
if (state == "save"){
|
||||
var policyList = [];
|
||||
policyList.push(getParameterByName("id"));
|
||||
serviceURL = "/devicemgt_admin/policies/inactivate";
|
||||
invokerUtil.put(
|
||||
serviceURL,
|
||||
policyList,
|
||||
// on success
|
||||
function () {
|
||||
$(".add-policy").addClass("hidden");
|
||||
$(".policy-message").removeClass("hidden");
|
||||
},
|
||||
// on error
|
||||
function () {
|
||||
|
||||
}
|
||||
);
|
||||
}else if(state == "publish"){
|
||||
var policyList = [];
|
||||
policyList.push(getParameterByName("id"));
|
||||
serviceURL = "/devicemgt_admin/policies/activate";
|
||||
invokerUtil.put(
|
||||
serviceURL,
|
||||
policyList,
|
||||
// on success
|
||||
function () {
|
||||
$(".add-policy").addClass("hidden");
|
||||
$(".policy-naming").addClass("hidden");
|
||||
$(".policy-message").removeClass("hidden");
|
||||
publishToDevice();
|
||||
},
|
||||
// on error
|
||||
function () {
|
||||
|
||||
}
|
||||
);
|
||||
}
|
||||
},
|
||||
// on error
|
||||
function () {
|
||||
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
function publishToDevice() {
|
||||
var payload = {
|
||||
"policyName": policy["policyName"],
|
||||
"description": policy["description"],
|
||||
"compliance": policy["selectedNonCompliantAction"],
|
||||
"ownershipType": "ANY",
|
||||
"profile": {
|
||||
"profileName": policy["policyName"],
|
||||
"deviceType": {
|
||||
"id": policy["platformId"],
|
||||
"name": policy["platform"]
|
||||
},
|
||||
"policyDefinition": window.queryEditor.getValue(),
|
||||
"policyDescription": policy["description"]
|
||||
}
|
||||
};
|
||||
|
||||
var successCallback = function (data, status) {
|
||||
console.log("Data: " + data + "\nStatus: " + status);
|
||||
};
|
||||
|
||||
var data = {
|
||||
url: "/devicemgt/api/policies/add",
|
||||
type: "POST",
|
||||
contentType: "application/json",
|
||||
accept: "application/json",
|
||||
success: successCallback,
|
||||
data: JSON.stringify(payload)
|
||||
};
|
||||
|
||||
$.ajax(data).fail(function (jqXHR) {
|
||||
console.log("Error: " + jqXHR);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
// Start of HTML embedded invoke methods
|
||||
var showAdvanceOperation = function (operation, button) {
|
||||
$(button).addClass('selected');
|
||||
$(button).siblings().removeClass('selected');
|
||||
var hiddenOperation = ".wr-hidden-operations-content > div";
|
||||
$(hiddenOperation + '[data-operation="' + operation + '"]').show();
|
||||
$(hiddenOperation + '[data-operation="' + operation + '"]').siblings().hide();
|
||||
};
|
||||
|
||||
// Start of functions related to grid-input-view
|
||||
|
||||
/**
|
||||
* Method to set count id to cloned elements.
|
||||
* @param {object} addFormContainer
|
||||
*/
|
||||
var setId = function (addFormContainer) {
|
||||
$(addFormContainer).find("[data-add-form-clone]").each(function (i) {
|
||||
$(this).attr("id", $(this).attr("data-add-form-clone").slice(1) + "-" + (i + 1));
|
||||
if ($(this).find(".index").length > 0) {
|
||||
$(this).find(".index").html(i + 1);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Method to set count id to cloned elements.
|
||||
* @param {object} addFormContainer
|
||||
*/
|
||||
var showHideHelpText = function (addFormContainer) {
|
||||
var helpText = "[data-help-text=add-form]";
|
||||
if ($(addFormContainer).find("[data-add-form-clone]").length > 0) {
|
||||
$(addFormContainer).find(helpText).hide();
|
||||
} else {
|
||||
$(addFormContainer).find(helpText).show();
|
||||
}
|
||||
};
|
||||
|
||||
// End of functions related to grid-input-view
|
||||
|
||||
/**
|
||||
* This method will return query parameter value given its name.
|
||||
* @param name Query parameter name
|
||||
* @returns {string} Query parameter value
|
||||
*/
|
||||
var getParameterByName = function (name) {
|
||||
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
|
||||
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
|
||||
results = regex.exec(location.search);
|
||||
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
|
||||
};
|
||||
|
||||
function formatRepo (user) {
|
||||
if (user.loading) {
|
||||
return user.text
|
||||
}
|
||||
if (!user.username){
|
||||
return;
|
||||
}
|
||||
var markup = '<div class="clearfix">' +
|
||||
'<div clas="col-sm-8">' +
|
||||
'<div class="clearfix">' +
|
||||
'<div class="col-sm-3">' + user.username + '</div>';
|
||||
if (user.firstname) {
|
||||
markup += '<div class="col-sm-3"><i class="fa fa-code-fork"></i> ' + user.firstname + '</div>';
|
||||
}
|
||||
if (user.emailAddress) {
|
||||
markup += '<div class="col-sm-2"><i class="fa fa-star"></i> ' + user.emailAddress + '</div></div>';
|
||||
}
|
||||
markup += '</div></div>';
|
||||
return markup;
|
||||
}
|
||||
|
||||
function formatRepoSelection (user) {
|
||||
return user.username || user.text;;
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
window.queryEditor = CodeMirror.fromTextArea(document.getElementById('policy-definition-input'), {
|
||||
mode: MIME_TYPE_SIDDHI_QL,
|
||||
indentWithTabs: true,
|
||||
smartIndent: true,
|
||||
lineNumbers: true,
|
||||
matchBrackets: true,
|
||||
autofocus: true,
|
||||
extraKeys: {
|
||||
"Shift-2": function (cm) {
|
||||
insertStr(cm, cm.getCursor(), '@');
|
||||
CodeMirror.showHint(cm, getAnnotationHints);
|
||||
},
|
||||
"Ctrl-Space": "autocomplete"
|
||||
}
|
||||
});
|
||||
|
||||
// Adding initial state of wizard-steps.
|
||||
$("#policy-profile-wizard-steps").html($(".wr-steps").html());
|
||||
|
||||
$("select.select2[multiple=multiple]").select2({
|
||||
"tags": true
|
||||
});
|
||||
|
||||
$("#users-input").select2({
|
||||
multiple:true,
|
||||
tags: true,
|
||||
ajax: {
|
||||
url: window.location.origin + "/devicemgt/api/invoker/execute/",
|
||||
method: "POST",
|
||||
dataType: 'json',
|
||||
delay: 250,
|
||||
id: function (user) {
|
||||
return user.username;
|
||||
},
|
||||
data: function (params) {
|
||||
var postData = {};
|
||||
postData.actionMethod = "GET";
|
||||
postData.actionUrl = "/devicemgt_admin/users?q=ad";
|
||||
postData.actionPayload = JSON.stringify({
|
||||
q: params.term, // search term
|
||||
page: params.page
|
||||
});
|
||||
|
||||
return JSON.stringify(postData);
|
||||
},
|
||||
processResults: function (data, page) {
|
||||
var newData = [];
|
||||
$.each(data.responseContent, function (index, value) {
|
||||
value.id = value.username;
|
||||
newData.push(value);
|
||||
});
|
||||
return {
|
||||
results: newData
|
||||
};
|
||||
},
|
||||
cache: true
|
||||
},
|
||||
escapeMarkup: function (markup) { return markup; }, // let our custom formatter work
|
||||
minimumInputLength: 1,
|
||||
templateResult: formatRepo, // omitted for brevity, see the source of this page
|
||||
templateSelection: formatRepoSelection // omitted for brevity, see the source of this page
|
||||
});
|
||||
|
||||
var policyPayloadObj;
|
||||
invokerUtil.get(
|
||||
"/devicemgt_admin/policies/" + getParameterByName("id"),
|
||||
// on success
|
||||
function (data) {
|
||||
data = JSON.parse(data);
|
||||
policyPayloadObj = data["responseContent"];
|
||||
skipStep["policy-platform"](policyPayloadObj);
|
||||
},
|
||||
// on error
|
||||
function () {
|
||||
// should be redirected to an error page
|
||||
}
|
||||
);
|
||||
|
||||
$("#users-select-field").hide();
|
||||
$("#user-roles-select-field").show();
|
||||
|
||||
$("input[type='radio'].select-users-radio").change(function () {
|
||||
if ($("#users-radio-btn").is(":checked")) {
|
||||
$("#user-roles-select-field").hide();
|
||||
$("#users-select-field").show();
|
||||
}
|
||||
if ($("#user-roles-radio-btn").is(":checked")) {
|
||||
$("#users-select-field").hide();
|
||||
$("#user-roles-select-field").show();
|
||||
}
|
||||
});
|
||||
|
||||
// Support for special input type "ANY" on user(s) & user-role(s) selection
|
||||
$("#user-roles-input").select2({
|
||||
"tags": true
|
||||
}).on("select2:select", function (e) {
|
||||
if (e.params.data.id == "ANY") {
|
||||
$(this).val("ANY").trigger("change");
|
||||
} else {
|
||||
$("option[value=ANY]", this).prop("selected", false).parent().trigger("change");
|
||||
}
|
||||
});
|
||||
|
||||
// Maintains an array of configured features of the profile
|
||||
var advanceOperations = ".wr-advance-operations";
|
||||
$(advanceOperations).on("click", ".wr-input-control.switch", function (event) {
|
||||
var operationCode = $(this).parents(".operation-data").data("operation-code");
|
||||
var operation = $(this).parents(".operation-data").data("operation");
|
||||
var operationDataWrapper = $(this).data("target");
|
||||
// prevents event bubbling by figuring out what element it's being called from.
|
||||
if (event.target.tagName == "INPUT") {
|
||||
var featureConfiguredIcon;
|
||||
if ($("input[type='checkbox']", this).is(":checked")) {
|
||||
configuredOperations.push(operationCode);
|
||||
// when a feature is enabled, if "zero-configured-features" msg is available, hide that.
|
||||
var zeroConfiguredOperationsErrorMsg = "#policy-profile-main-error-msg";
|
||||
if (!$(zeroConfiguredOperationsErrorMsg).hasClass("hidden")) {
|
||||
$(zeroConfiguredOperationsErrorMsg).addClass("hidden");
|
||||
}
|
||||
// add configured-state-icon to the feature
|
||||
featureConfiguredIcon = "#" + operation + "-configured";
|
||||
if ($(featureConfiguredIcon).hasClass("hidden")) {
|
||||
$(featureConfiguredIcon).removeClass("hidden");
|
||||
}
|
||||
} else {
|
||||
//splicing the array if operation is present.
|
||||
var index = $.inArray(operationCode, configuredOperations);
|
||||
if (index != -1) {
|
||||
configuredOperations.splice(index, 1);
|
||||
}
|
||||
// when a feature is disabled, clearing all its current configured, error or success states
|
||||
var subErrorMsgWrapper = "#" + operation + "-feature-error-msg";
|
||||
var subErrorIcon = "#" + operation + "-error";
|
||||
var subOkIcon = "#" + operation + "-ok";
|
||||
featureConfiguredIcon = "#" + operation + "-configured";
|
||||
|
||||
if (!$(subErrorMsgWrapper).hasClass("hidden")) {
|
||||
$(subErrorMsgWrapper).addClass("hidden");
|
||||
}
|
||||
if (!$(subErrorIcon).hasClass("hidden")) {
|
||||
$(subErrorIcon).addClass("hidden");
|
||||
}
|
||||
if (!$(subOkIcon).hasClass("hidden")) {
|
||||
$(subOkIcon).addClass("hidden");
|
||||
}
|
||||
if (!$(featureConfiguredIcon).hasClass("hidden")) {
|
||||
$(featureConfiguredIcon).addClass("hidden");
|
||||
}
|
||||
// reinitializing input fields into the defaults
|
||||
$(operationDataWrapper + " input").each(
|
||||
function () {
|
||||
if ($(this).is("input:text")) {
|
||||
$(this).val($(this).data("default"));
|
||||
} else if ($(this).is("input:password")) {
|
||||
$(this).val("");
|
||||
} else if ($(this).is("input:checkbox")) {
|
||||
$(this).prop("checked", $(this).data("default"));
|
||||
// if this checkbox is the parent input of a grouped-input
|
||||
if ($(this).hasClass("parent-input")) {
|
||||
var groupedInput = $(this).parent().parent().parent();
|
||||
updateGroupedInputVisibility(groupedInput);
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
// reinitializing select fields into the defaults
|
||||
$(operationDataWrapper + " select").each(
|
||||
function () {
|
||||
var defaultOption = $(this).data("default");
|
||||
$("option:eq(" + defaultOption + ")", this).prop("selected", "selected");
|
||||
}
|
||||
);
|
||||
// collapsing expanded-panes (upon the selection of html-select-options) if any
|
||||
$(operationDataWrapper + " .expanded").each(
|
||||
function () {
|
||||
if ($(this).hasClass("expanded")) {
|
||||
$(this).removeClass("expanded");
|
||||
}
|
||||
$(this).slideUp();
|
||||
}
|
||||
);
|
||||
// removing all entries of grid-input elements if exist
|
||||
$(operationDataWrapper + " .grouped-array-input").each(
|
||||
function () {
|
||||
var gridInputs = $(this).find("[data-add-form-clone]");
|
||||
if (gridInputs.length > 0) {
|
||||
gridInputs.remove();
|
||||
}
|
||||
var helpTexts = $(this).find("[data-help-text=add-form]");
|
||||
if (helpTexts.length > 0) {
|
||||
helpTexts.show();
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// adding support for cloning multiple profiles per feature with cloneable class definitions
|
||||
$(advanceOperations).on("click", ".multi-view.add.enabled", function () {
|
||||
// get a copy of .cloneable and create new .cloned div element
|
||||
var cloned = "<div class='cloned'><hr>" + $(".cloneable", $(this).parent().parent()).html() + "</div>";
|
||||
// append newly created .cloned div element to panel-body
|
||||
$(this).parent().parent().append(cloned);
|
||||
// enable remove action of newly cloned div element
|
||||
$(".cloned", $(this).parent().parent()).each(
|
||||
function () {
|
||||
if ($(".multi-view.remove", this).hasClass("disabled")) {
|
||||
$(".multi-view.remove", this).removeClass("disabled");
|
||||
}
|
||||
if (!$(".multi-view.remove", this).hasClass("enabled")) {
|
||||
$(".multi-view.remove", this).addClass("enabled");
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
$(advanceOperations).on("click", ".multi-view.remove.enabled", function () {
|
||||
$(this).parent().remove();
|
||||
});
|
||||
|
||||
// enabling or disabling grouped-input based on the status of a parent check-box
|
||||
$(advanceOperations).on("click", ".grouped-input", function () {
|
||||
updateGroupedInputVisibility(this);
|
||||
});
|
||||
|
||||
// add form entry click function for grid inputs
|
||||
$(advanceOperations).on("click", "[data-click-event=add-form]", function () {
|
||||
var addFormContainer = $("[data-add-form-container=" + $(this).attr("href") + "]");
|
||||
var clonedForm = $("[data-add-form=" + $(this).attr("href") + "]").clone().
|
||||
find("[data-add-form-element=clone]").attr("data-add-form-clone", $(this).attr("href"));
|
||||
|
||||
// adding class .child-input to capture text-input-array-values
|
||||
$("input, select", clonedForm).addClass("child-input");
|
||||
|
||||
$(addFormContainer).append(clonedForm);
|
||||
setId(addFormContainer);
|
||||
showHideHelpText(addFormContainer);
|
||||
});
|
||||
|
||||
// remove form entry click function for grid inputs
|
||||
$(advanceOperations).on("click", "[data-click-event=remove-form]", function () {
|
||||
var addFormContainer = $("[data-add-form-container=" + $(this).attr("href") + "]");
|
||||
|
||||
$(this).closest("[data-add-form-element=clone]").remove();
|
||||
setId(addFormContainer);
|
||||
showHideHelpText(addFormContainer);
|
||||
});
|
||||
|
||||
$(".wizard-stepper").click(function () {
|
||||
// button clicked here can be either a continue button or a back button.
|
||||
var currentStep = $(this).data("current");
|
||||
var validationIsRequired = $(this).data("validate");
|
||||
var wizardIsToBeContinued;
|
||||
|
||||
if (validationIsRequired) {
|
||||
wizardIsToBeContinued = validateStep[currentStep]();
|
||||
} else {
|
||||
wizardIsToBeContinued = true;
|
||||
}
|
||||
|
||||
if (wizardIsToBeContinued) {
|
||||
// When moving back and forth, following code segment will
|
||||
// remove if there are any visible error-messages.
|
||||
var errorMsgWrappers = ".alert.alert-danger";
|
||||
$(errorMsgWrappers).each(
|
||||
function () {
|
||||
if (!$(this).hasClass("hidden")) {
|
||||
$(this).addClass("hidden");
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
var nextStep = $(this).data("next");
|
||||
var isBackBtn = $(this).data("is-back-btn");
|
||||
|
||||
// if current button is a continuation...
|
||||
if (!isBackBtn) {
|
||||
// initiate stepForwardFrom[*] functions to gather form data.
|
||||
if (stepForwardFrom[currentStep]) {
|
||||
stepForwardFrom[currentStep](this);
|
||||
}
|
||||
} else {
|
||||
// initiate stepBackFrom[*] functions to rollback.
|
||||
if (stepBackFrom[currentStep]) {
|
||||
stepBackFrom[currentStep]();
|
||||
}
|
||||
}
|
||||
|
||||
// following step occurs only at the last stage of the wizard.
|
||||
if (!nextStep) {
|
||||
window.location.href = $(this).data("direct");
|
||||
}
|
||||
|
||||
// updating next wizard step as current.
|
||||
$(".itm-wiz").each(function () {
|
||||
var step = $(this).data("step");
|
||||
if (step == nextStep) {
|
||||
$(this).addClass("itm-wiz-current");
|
||||
} else {
|
||||
$(this).removeClass("itm-wiz-current");
|
||||
}
|
||||
});
|
||||
|
||||
// adding next update of wizard-steps.
|
||||
$("#" + nextStep + "-wizard-steps").html($(".wr-steps").html());
|
||||
|
||||
// hiding current section of the wizard and showing next section.
|
||||
$("." + currentStep).addClass("hidden");
|
||||
$("." + nextStep).removeClass("hidden");
|
||||
}
|
||||
});
|
||||
});
|
@ -0,0 +1,312 @@
|
||||
/*Copyright (C) 2015 by Marijn Haverbeke <marijnh@gmail.com> and others
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.*/
|
||||
|
||||
/*Annotations, Annotation Names and relevant tokens*/
|
||||
var ANNOTATION_IMPORT = "Import";
|
||||
var ANNOTATION_EXPORT = "Export";
|
||||
|
||||
var ANNOTATION_TOKEN_AT = "@";
|
||||
var ANNOTATION_TOKEN_OPENING_BRACKET = "(";
|
||||
var ANNOTATION_TOKEN_CLOSING_BRACKET = ")";
|
||||
|
||||
var REGEX_LINE_STARTING_WITH_PLAN = /^@Plan.*/g;
|
||||
var REGEX_LINE_STARTING_WITH_SINGLE_LINE_COMMENT = /^--.*/g;
|
||||
var REGEX_LINE_STARTING_WITH_MULTI_LINE_COMMENT = /^\/\*.*\*\//g;
|
||||
var REGEX_LINE_STARTING_WITH_IMPORT_STATEMENT = /^@Import.*/g;
|
||||
|
||||
var SIDDHI_STATEMENT_DELIMETER = ";";
|
||||
var SIDDHI_LINE_BREAK = "\n";
|
||||
var SIDDHI_LINE_BREAK_CHARACTER = '\n';
|
||||
var SIDDHI_SINGLE_QUOTE = "'";
|
||||
var SIDDHI_SPACE_LITERAL = " ";
|
||||
|
||||
var SIDDHI_LITERAL_DEFINE_STREAM = "define stream";
|
||||
|
||||
var MIME_TYPE_SIDDHI_QL = "text/siddhi-ql";
|
||||
|
||||
|
||||
CodeMirror.defineMode("sql", function (config, parserConfig) {
|
||||
"use strict";
|
||||
|
||||
var client = parserConfig.client || {},
|
||||
atoms = parserConfig.atoms || {"false":true, "true":true, "null":true},
|
||||
builtin = parserConfig.builtin || {},
|
||||
keywords = parserConfig.keywords || {},
|
||||
operatorChars = parserConfig.operatorChars || /^[*+\-%<>!=&|~^]/,
|
||||
support = parserConfig.support || {},
|
||||
hooks = parserConfig.hooks || {},
|
||||
dateSQL = parserConfig.dateSQL || {"date":true, "time":true, "timestamp":true};
|
||||
|
||||
function tokenBase(stream, state) {
|
||||
var ch = stream.next();
|
||||
|
||||
// call hooks from the mime type
|
||||
if (hooks[ch]) {
|
||||
var result = hooks[ch](stream, state);
|
||||
if (result !== false) return result;
|
||||
}
|
||||
|
||||
if (ch.charCodeAt(0) > 47 && ch.charCodeAt(0) < 58) {
|
||||
// numbers
|
||||
// ref: http://dev.mysql.com/doc/refman/5.5/en/number-literals.html
|
||||
stream.match(/^[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?/);
|
||||
support.decimallessFloat == true && stream.eat('.');
|
||||
return "number";
|
||||
} else if (ch == "'" || (ch == '"' && support.doubleQuote)) {
|
||||
// strings
|
||||
// ref: http://dev.mysql.com/doc/refman/5.5/en/string-literals.html
|
||||
state.tokenize = tokenLiteral(ch);
|
||||
return state.tokenize(stream, state);
|
||||
} else if (/^[\(\),\;\[\]]/.test(ch)) {
|
||||
// no highlightning
|
||||
return null;
|
||||
} else if ((ch == "-" && stream.eat("-") && (!support.commentSpaceRequired || stream.eat(" ")))) {
|
||||
// 1-line comments
|
||||
// ref: https://kb.askmonty.org/en/comment-syntax/
|
||||
stream.skipToEnd();
|
||||
return "comment";
|
||||
} else if (ch == "/" && stream.eat("*")) {
|
||||
// multi-line comments
|
||||
// ref: https://kb.askmonty.org/en/comment-syntax/
|
||||
state.tokenize = tokenComment;
|
||||
return state.tokenize(stream, state);
|
||||
} else if (ch == ".") {
|
||||
// .1 for 0.1
|
||||
if (support.zerolessFloat == true && stream.match(/^(?:\d+(?:e[+-]?\d+)?)/i)) {
|
||||
return "number";
|
||||
}
|
||||
} else {
|
||||
stream.eatWhile(/^[_\-\w\d]/); /* Character '-' will also be eaten, to prevent the highlight happening in keywords being embedded in non-keyword strings. For example, 'all' in 'all-nonkeyword' */
|
||||
var word = stream.current().toLowerCase(); // Added toLowerCase() to highlight keywords in a case insensitive manner.
|
||||
// dates (standard SQL syntax)
|
||||
// ref: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-literals.html
|
||||
if (dateSQL.hasOwnProperty(word) && (stream.match(/^( )+'[^']*'/) || stream.match(/^( )+"[^"]*"/)))
|
||||
return "number";
|
||||
if (atoms.hasOwnProperty(word)) return "atom";
|
||||
if (builtin.hasOwnProperty(word)) return "builtin";
|
||||
if (keywords.hasOwnProperty(word)) return "keyword";
|
||||
if (client.hasOwnProperty(word)) return "string-2";
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// 'string', with char specified in quote escaped by '\'
|
||||
function tokenLiteral(quote) {
|
||||
return function (stream, state) {
|
||||
var escaped = false, ch;
|
||||
while ((ch = stream.next()) != null) {
|
||||
if (ch == quote && !escaped) {
|
||||
state.tokenize = tokenBase;
|
||||
break;
|
||||
}
|
||||
escaped = !escaped && ch == "\\";
|
||||
}
|
||||
return "string";
|
||||
};
|
||||
}
|
||||
|
||||
function tokenComment(stream, state) {
|
||||
while (true) {
|
||||
if (stream.skipTo("*")) {
|
||||
stream.next();
|
||||
if (stream.eat("/")) {
|
||||
state.tokenize = tokenBase;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
stream.skipToEnd();
|
||||
break;
|
||||
}
|
||||
}
|
||||
return "comment";
|
||||
}
|
||||
|
||||
function pushContext(stream, state, type) {
|
||||
state.context = {
|
||||
prev:state.context,
|
||||
indent:stream.indentation(),
|
||||
col:stream.column(),
|
||||
type:type
|
||||
};
|
||||
}
|
||||
|
||||
function popContext(state) {
|
||||
state.indent = state.context.indent;
|
||||
state.context = state.context.prev;
|
||||
}
|
||||
|
||||
return {
|
||||
startState:function () {
|
||||
return {tokenize:tokenBase, context:null};
|
||||
},
|
||||
|
||||
token:function (stream, state) {
|
||||
if (stream.sol()) {
|
||||
if (state.context && state.context.align == null)
|
||||
state.context.align = false;
|
||||
}
|
||||
if (stream.eatSpace()) return null;
|
||||
|
||||
var style = state.tokenize(stream, state);
|
||||
if (style == "comment") return style;
|
||||
|
||||
if (state.context && state.context.align == null)
|
||||
state.context.align = true;
|
||||
|
||||
var tok = stream.current();
|
||||
if (tok == "(")
|
||||
pushContext(stream, state, ")");
|
||||
else if (tok == "[")
|
||||
pushContext(stream, state, "]");
|
||||
else if (state.context && state.context.type == tok)
|
||||
popContext(state);
|
||||
return style;
|
||||
},
|
||||
|
||||
indent:function (state, textAfter) {
|
||||
var cx = state.context;
|
||||
if (!cx) return CodeMirror.Pass;
|
||||
var closing = textAfter.charAt(0) == cx.type;
|
||||
if (cx.align) return cx.col + (closing ? 0 : 1);
|
||||
else return cx.indent + (closing ? 0 : config.indentUnit);
|
||||
},
|
||||
|
||||
blockCommentStart: "/*",
|
||||
blockCommentEnd: "*/",
|
||||
lineComment: "--"
|
||||
};
|
||||
});
|
||||
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
// `identifier`
|
||||
function hookIdentifier(stream) {
|
||||
// MySQL/MariaDB identifiers
|
||||
// ref: http://dev.mysql.com/doc/refman/5.6/en/identifier-qualifiers.html
|
||||
var ch;
|
||||
while ((ch = stream.next()) != null) {
|
||||
if (ch == "`" && !stream.eat("`")) return "variable-2";
|
||||
}
|
||||
stream.backUp(stream.current().length - 1);
|
||||
return stream.eatWhile(/\w/) ? "variable-2" : null;
|
||||
}
|
||||
|
||||
// variable token
|
||||
function hookVar(stream) {
|
||||
// variables
|
||||
// @@prefix.varName @varName
|
||||
// varName can be quoted with ` or ' or "
|
||||
// ref: http://dev.mysql.com/doc/refman/5.5/en/user-variables.html
|
||||
if (stream.eat("@")) {
|
||||
stream.match(/^session\./);
|
||||
stream.match(/^local\./);
|
||||
stream.match(/^global\./);
|
||||
}
|
||||
|
||||
if (stream.eat("'")) {
|
||||
stream.match(/^.*'/);
|
||||
return "variable-2";
|
||||
} else if (stream.eat('"')) {
|
||||
stream.match(/^.*"/);
|
||||
return "variable-2";
|
||||
} else if (stream.eat("`")) {
|
||||
stream.match(/^.*`/);
|
||||
return "variable-2";
|
||||
} else if (stream.match(/^[0-9a-zA-Z$\.\_]+/)) {
|
||||
return "variable-2";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
// short client keyword token
|
||||
function hookClient(stream) {
|
||||
// \N means NULL
|
||||
// ref: http://dev.mysql.com/doc/refman/5.5/en/null-values.html
|
||||
if (stream.eat("N")) {
|
||||
return "atom";
|
||||
}
|
||||
// \g, etc
|
||||
// ref: http://dev.mysql.com/doc/refman/5.5/en/mysql-commands.html
|
||||
return stream.match(/^[a-zA-Z.#!?]/) ? "variable-2" : null;
|
||||
}
|
||||
|
||||
// these keywords are used by all SQL dialects (however, a mode can still overwrite it)
|
||||
var sqlKeywordsWithoutSymbols = "all and as begin by contains define delete end events " +
|
||||
"every first for from full group having inner insert into join last " +
|
||||
"left not of on or outer output partition raw return right select snapshot stream table ";
|
||||
var sqlKeywords = ", : ? # ( ) " + sqlKeywordsWithoutSymbols;
|
||||
var builtIn = "bool double float int long object string ";
|
||||
var atoms = "false true null ";
|
||||
var dateSQL = "days hours milliseconds minutes months seconds ";
|
||||
var allSqlSuggestions = sqlKeywordsWithoutSymbols + builtIn + atoms + dateSQL;
|
||||
|
||||
// turn a space-separated list into an array
|
||||
function set(str) {
|
||||
var obj = {}, words = str.split(" ");
|
||||
for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
|
||||
return obj;
|
||||
}
|
||||
|
||||
// A generic SQL Mode. It's not a standard, it just try to support what is generally supported
|
||||
CodeMirror.defineMIME(MIME_TYPE_SIDDHI_QL, {
|
||||
name:"sql",
|
||||
keywords:set(sqlKeywords),
|
||||
builtin:set(builtIn),
|
||||
atoms:set(atoms),
|
||||
operatorChars:/^[*+%<>!=/]/,
|
||||
dateSQL:set(dateSQL),
|
||||
support:set("doubleQuote "),
|
||||
allSqlSuggestions:set(allSqlSuggestions)
|
||||
});
|
||||
}());
|
||||
|
||||
/*
|
||||
How Properties of Mime Types are used by SQL Mode
|
||||
=================================================
|
||||
|
||||
keywords:
|
||||
A list of keywords you want to be highlighted.
|
||||
functions:
|
||||
A list of function names you want to be highlighted.
|
||||
builtin:
|
||||
A list of builtin types you want to be highlighted (if you want types to be of class "builtin" instead of "keyword").
|
||||
operatorChars:
|
||||
All characters that must be handled as operators.
|
||||
client:
|
||||
Commands parsed and executed by the client (not the server).
|
||||
support:
|
||||
A list of supported syntaxes which are not common, but are supported by more than 1 DBMS.
|
||||
* ODBCdotTable: .tableName
|
||||
* zerolessFloat: .1
|
||||
* doubleQuote
|
||||
* nCharCast: N'string'
|
||||
* charsetCast: _utf8'string'
|
||||
* commentHash: use # char for comments
|
||||
* commentSlashSlash: use // for comments
|
||||
* commentSpaceRequired: require a space after -- for comments
|
||||
atoms:
|
||||
Keywords that must be highlighted as atoms,. Some DBMS's support more atoms than others:
|
||||
UNKNOWN, INFINITY, UNDERFLOW, NaN...
|
||||
dateSQL:
|
||||
Used for date/time SQL standard syntax, because not all DBMS's support same temporal types.
|
||||
*/
|
@ -0,0 +1,344 @@
|
||||
/*Copyright (C) 2015 by Marijn Haverbeke <marijnh@gmail.com> and others
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.*/
|
||||
|
||||
/* BASICS */
|
||||
|
||||
.CodeMirror {
|
||||
/* Set height, width, borders, and global font properties here */
|
||||
font-family: monospace;
|
||||
height: 300px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
/* PADDING */
|
||||
|
||||
.CodeMirror-lines {
|
||||
padding: 4px 0; /* Vertical padding around content */
|
||||
}
|
||||
.CodeMirror pre {
|
||||
padding: 0 4px; /* Horizontal padding of content */
|
||||
}
|
||||
|
||||
.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
||||
background-color: white; /* The little square between H and V scrollbars */
|
||||
}
|
||||
|
||||
/* GUTTER */
|
||||
|
||||
.CodeMirror-gutters {
|
||||
border-right: 1px solid #ddd;
|
||||
background-color: #f7f7f7;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.CodeMirror-linenumbers {}
|
||||
.CodeMirror-linenumber {
|
||||
padding: 0 3px 0 5px;
|
||||
min-width: 20px;
|
||||
text-align: right;
|
||||
color: #999;
|
||||
white-space: nowrap;
|
||||
left: -30px;
|
||||
}
|
||||
|
||||
.CodeMirror-guttermarker { color: black; }
|
||||
.CodeMirror-guttermarker-subtle { color: #999; }
|
||||
|
||||
/* CURSOR */
|
||||
|
||||
.CodeMirror div.CodeMirror-cursor {
|
||||
border-left: 1px solid black;
|
||||
}
|
||||
/* Shown when moving in bi-directional text */
|
||||
.CodeMirror div.CodeMirror-secondarycursor {
|
||||
border-left: 1px solid silver;
|
||||
}
|
||||
.CodeMirror.cm-fat-cursor div.CodeMirror-cursor {
|
||||
width: auto;
|
||||
border: 0;
|
||||
background: #7e7;
|
||||
}
|
||||
.CodeMirror.cm-fat-cursor div.CodeMirror-cursors {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.cm-animate-fat-cursor {
|
||||
width: auto;
|
||||
border: 0;
|
||||
-webkit-animation: blink 1.06s steps(1) infinite;
|
||||
-moz-animation: blink 1.06s steps(1) infinite;
|
||||
animation: blink 1.06s steps(1) infinite;
|
||||
}
|
||||
@-moz-keyframes blink {
|
||||
0% { background: #7e7; }
|
||||
50% { background: none; }
|
||||
100% { background: #7e7; }
|
||||
}
|
||||
@-webkit-keyframes blink {
|
||||
0% { background: #7e7; }
|
||||
50% { background: none; }
|
||||
100% { background: #7e7; }
|
||||
}
|
||||
@keyframes blink {
|
||||
0% { background: #7e7; }
|
||||
50% { background: none; }
|
||||
100% { background: #7e7; }
|
||||
}
|
||||
|
||||
/* Can style cursor different in overwrite (non-insert) mode */
|
||||
div.CodeMirror-overwrite div.CodeMirror-cursor {}
|
||||
|
||||
.cm-tab { display: inline-block; text-decoration: inherit; }
|
||||
|
||||
.CodeMirror-ruler {
|
||||
border-left: 1px solid #ccc;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
/* DEFAULT THEME */
|
||||
|
||||
.cm-s-default .cm-keyword {color: #708;}
|
||||
.cm-s-default .cm-atom {color: #219;}
|
||||
.cm-s-default .cm-number {color: #164;}
|
||||
.cm-s-default .cm-def {color: #00f;}
|
||||
.cm-s-default .cm-variable,
|
||||
.cm-s-default .cm-punctuation,
|
||||
.cm-s-default .cm-property,
|
||||
.cm-s-default .cm-operator {}
|
||||
.cm-s-default .cm-variable-2 {color: #05a;}
|
||||
.cm-s-default .cm-variable-3 {color: #085;}
|
||||
.cm-s-default .cm-comment {color: #a50;}
|
||||
.cm-s-default .cm-string {color: #a11;}
|
||||
.cm-s-default .cm-string-2 {color: #f50;}
|
||||
.cm-s-default .cm-meta {color: #555;}
|
||||
.cm-s-default .cm-qualifier {color: #555;}
|
||||
.cm-s-default .cm-builtin {color: #30a;}
|
||||
.cm-s-default .cm-bracket {color: #997;}
|
||||
.cm-s-default .cm-tag {color: #170;}
|
||||
.cm-s-default .cm-attribute {color: #00c;}
|
||||
.cm-s-default .cm-header {color: blue;}
|
||||
.cm-s-default .cm-quote {color: #090;}
|
||||
.cm-s-default .cm-hr {color: #999;}
|
||||
.cm-s-default .cm-link {color: #00c;}
|
||||
|
||||
.cm-negative {color: #d44;}
|
||||
.cm-positive {color: #292;}
|
||||
.cm-header, .cm-strong {font-weight: bold;}
|
||||
.cm-em {font-style: italic;}
|
||||
.cm-link {text-decoration: underline;}
|
||||
.cm-strikethrough {text-decoration: line-through;}
|
||||
|
||||
.cm-s-default .cm-error {color: #f00;}
|
||||
.cm-invalidchar {color: #f00;}
|
||||
|
||||
/* Default styles for common addons */
|
||||
|
||||
div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
|
||||
div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
|
||||
.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }
|
||||
.CodeMirror-activeline-background {background: #e8f2ff;}
|
||||
|
||||
/* STOP */
|
||||
|
||||
/* The rest of this file contains styles related to the mechanics of
|
||||
the editor. You probably shouldn't touch them. */
|
||||
|
||||
.CodeMirror {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background: white;
|
||||
}
|
||||
|
||||
.CodeMirror-scroll {
|
||||
overflow: scroll !important; /* Things will break if this is overridden */
|
||||
/* 30px is the magic margin used to hide the element's real scrollbars */
|
||||
/* See overflow: hidden in .CodeMirror */
|
||||
margin-bottom: -30px; margin-right: -30px;
|
||||
padding-bottom: 30px;
|
||||
height: 100%;
|
||||
outline: none; /* Prevent dragging from highlighting the element */
|
||||
position: relative;
|
||||
}
|
||||
.CodeMirror-sizer {
|
||||
position: relative;
|
||||
border-right: 30px solid transparent;
|
||||
}
|
||||
|
||||
/* The fake, visible scrollbars. Used to force redraw during scrolling
|
||||
before actuall scrolling happens, thus preventing shaking and
|
||||
flickering artifacts. */
|
||||
.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
||||
position: absolute;
|
||||
z-index: 6;
|
||||
display: none;
|
||||
}
|
||||
.CodeMirror-vscrollbar {
|
||||
right: 0; top: 0;
|
||||
overflow-x: hidden;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
.CodeMirror-hscrollbar {
|
||||
bottom: 0; left: 0;
|
||||
overflow-y: hidden;
|
||||
overflow-x: scroll;
|
||||
}
|
||||
.CodeMirror-scrollbar-filler {
|
||||
right: 0; bottom: 0;
|
||||
}
|
||||
.CodeMirror-gutter-filler {
|
||||
left: 0; bottom: 0;
|
||||
}
|
||||
|
||||
.CodeMirror-gutters {
|
||||
position: absolute; left: 0; top: 0;
|
||||
z-index: 3;
|
||||
}
|
||||
.CodeMirror-gutter {
|
||||
white-space: normal;
|
||||
height: 100%;
|
||||
display: inline-block;
|
||||
/* Hack to make IE7 behave */
|
||||
*zoom:1;
|
||||
*display:inline;
|
||||
}
|
||||
.CodeMirror-gutter-wrapper {
|
||||
position: absolute;
|
||||
z-index: 4;
|
||||
height: 100%;
|
||||
}
|
||||
.CodeMirror-gutter-elt {
|
||||
position: absolute;
|
||||
cursor: default;
|
||||
z-index: 4;
|
||||
left: -30px;
|
||||
}
|
||||
.CodeMirror-gutter-wrapper {
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.CodeMirror-lines {
|
||||
cursor: text;
|
||||
min-height: 1px; /* prevents collapsing before first draw */
|
||||
}
|
||||
.CodeMirror pre {
|
||||
/* Reset some styles that the rest of the page might have set */
|
||||
-moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
|
||||
border-width: 0;
|
||||
background: transparent;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
margin: 0;
|
||||
white-space: pre;
|
||||
word-wrap: normal;
|
||||
line-height: inherit;
|
||||
color: inherit;
|
||||
z-index: 2;
|
||||
position: relative;
|
||||
overflow: visible;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
.CodeMirror-wrap pre {
|
||||
word-wrap: break-word;
|
||||
white-space: pre-wrap;
|
||||
word-break: normal;
|
||||
}
|
||||
|
||||
.CodeMirror-linebackground {
|
||||
position: absolute;
|
||||
left: 0; right: 0; top: 0; bottom: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.CodeMirror-linewidget {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.CodeMirror-widget {}
|
||||
|
||||
.CodeMirror-code {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/* Force content-box sizing for the elements where we expect it */
|
||||
.CodeMirror-scroll,
|
||||
.CodeMirror-sizer,
|
||||
.CodeMirror-gutter,
|
||||
.CodeMirror-gutters,
|
||||
.CodeMirror-linenumber {
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
.CodeMirror-measure {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
visibility: hidden;
|
||||
}
|
||||
.CodeMirror-measure pre { position: static; }
|
||||
|
||||
.CodeMirror div.CodeMirror-cursor {
|
||||
position: absolute;
|
||||
border-right: none;
|
||||
width: 0;
|
||||
}
|
||||
|
||||
div.CodeMirror-cursors {
|
||||
visibility: hidden;
|
||||
position: relative;
|
||||
z-index: 3;
|
||||
}
|
||||
.CodeMirror-focused div.CodeMirror-cursors {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.CodeMirror-selected { background: #d9d9d9; }
|
||||
.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
|
||||
.CodeMirror-crosshair { cursor: crosshair; }
|
||||
.CodeMirror ::selection { background: #d7d4f0; }
|
||||
.CodeMirror ::-moz-selection { background: #d7d4f0; }
|
||||
|
||||
.cm-searching {
|
||||
background: #ffa;
|
||||
background: rgba(255, 255, 0, .4);
|
||||
}
|
||||
|
||||
/* IE7 hack to prevent it from returning funny offsetTops on the spans */
|
||||
.CodeMirror span { *vertical-align: text-bottom; }
|
||||
|
||||
/* Used to force a border model for a node */
|
||||
.cm-force-border { padding-right: .1px; }
|
||||
|
||||
@media print {
|
||||
/* Hide the cursor when printing */
|
||||
.CodeMirror div.CodeMirror-cursors {
|
||||
visibility: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
/* See issue #2901 */
|
||||
.cm-tab-wrap-hack:after { content: ''; }
|
||||
|
||||
/* Help users use markselection to safely style text background */
|
||||
span.CodeMirror-selectedtext { background: none; }
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,128 @@
|
||||
/*
|
||||
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
|
||||
*
|
||||
* WSO2 Inc. licenses this file to you under the Apache License,
|
||||
* Version 2.0 (the "License"); you may not use this file except
|
||||
* in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
var skipStep = {};
|
||||
var policy = {};
|
||||
|
||||
|
||||
skipStep["policy-platform"] = function (policyPayloadObj) {
|
||||
console.log(policyPayloadObj);
|
||||
policy["name"] = policyPayloadObj["policyName"];
|
||||
policy["platform"] = policyPayloadObj["profile"]["deviceType"]["name"];
|
||||
policy["platformId"] = policyPayloadObj["profile"]["deviceType"]["id"];
|
||||
var userRoleInput = $("#user-roles-input");
|
||||
var ownershipInput = $("#ownership-input");
|
||||
var userInput = $("#users-select-field");
|
||||
var actionInput = $("#action-input");
|
||||
var policyNameInput = $("#policy-name-input");
|
||||
var policyDescriptionInput = $("#policy-description-input");
|
||||
userRoleInput.val(policyPayloadObj.roles);
|
||||
userInput.val(policyPayloadObj.users);
|
||||
ownershipInput.val(policyPayloadObj.ownershipType);
|
||||
actionInput.val(policyPayloadObj.compliance);
|
||||
policyNameInput.val(policyPayloadObj["policyName"]);
|
||||
policyDescriptionInput.val(policyPayloadObj["description"]);
|
||||
// updating next-page wizard title with selected platform
|
||||
$("#policy-heading").text(policy["platform"].toUpperCase() + " POLICY - " + policy["name"].toUpperCase());
|
||||
$("#policy-platform").text(policy["platform"].toUpperCase());
|
||||
$("#policy-assignment").text(policyPayloadObj.ownershipType);
|
||||
$("#policy-action").text(policyPayloadObj.compliance.toUpperCase());
|
||||
$("#policy-description").text(policyPayloadObj["description"]);
|
||||
var policyStatus = "Active";
|
||||
if(policyPayloadObj["active"] == true && policyPayloadObj["updated"] == true) {
|
||||
policyStatus = '<i class="fw fw-warning icon-success"></i> Active/Updated</span>';
|
||||
} else if(policyPayloadObj["active"] == true && policyPayloadObj["updated"] == false) {
|
||||
policyStatus = '<i class="fw fw-ok icon-success"></i> Active</span>';
|
||||
} else if(policyPayloadObj["active"] == false && policyPayloadObj["updated"] == true) {
|
||||
policyStatus = '<i class="fw fw-warning icon-warning"></i> Inactive/Updated</span>';
|
||||
} else if(policyPayloadObj["active"] == false && policyPayloadObj["updated"] == false) {
|
||||
policyStatus = '<i class="fw fw-error icon-danger"></i> Inactive</span>';
|
||||
}
|
||||
|
||||
$("#policy-status").html(policyStatus);
|
||||
|
||||
if(policyPayloadObj.users.length > 0) {
|
||||
$("#policy-users").text(policyPayloadObj.users.toString().split(",").join(", "));
|
||||
} else {
|
||||
$("#users-row").addClass("hidden");
|
||||
}
|
||||
|
||||
if(policyPayloadObj.roles.length > 0) {
|
||||
$("#policy-roles").text(policyPayloadObj.roles.toString().split(",").join(", "));
|
||||
} else {
|
||||
$("#roles-row").addClass("hidden");
|
||||
}
|
||||
var profileFeaturesList = policyPayloadObj["profile"]["profileFeaturesList"];
|
||||
if (profileFeaturesList.length > 0){
|
||||
var content = profileFeaturesList[0]["content"];
|
||||
var policyDefinitionObj = JSON.parse(content);
|
||||
window.queryEditor.setValue(policyDefinitionObj["policyDefinition"]);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// End of functions related to grid-input-view
|
||||
|
||||
/**
|
||||
* This method will return query parameter value given its name.
|
||||
* @param name Query parameter name
|
||||
* @returns {string} Query parameter value
|
||||
*/
|
||||
var getParameterByName = function (name) {
|
||||
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
|
||||
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
|
||||
results = regex.exec(location.search);
|
||||
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
|
||||
};
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
window.queryEditor = CodeMirror.fromTextArea(document.getElementById('policy-definition-input'), {
|
||||
mode: MIME_TYPE_SIDDHI_QL,
|
||||
indentWithTabs: true,
|
||||
smartIndent: true,
|
||||
lineNumbers: true,
|
||||
matchBrackets: true,
|
||||
autofocus: true,
|
||||
readOnly: true,
|
||||
extraKeys: {
|
||||
"Shift-2": function (cm) {
|
||||
insertStr(cm, cm.getCursor(), '@');
|
||||
CodeMirror.showHint(cm, getAnnotationHints);
|
||||
},
|
||||
"Ctrl-Space": "autocomplete"
|
||||
}
|
||||
});
|
||||
|
||||
var policyPayloadObj;
|
||||
invokerUtil.get(
|
||||
"/devicemgt_admin/policies/" + getParameterByName("id"),
|
||||
// on success
|
||||
function (data) {
|
||||
// console.log("success: " + JSON.stringify(data));
|
||||
data = JSON.parse(data);
|
||||
policyPayloadObj = data["responseContent"];
|
||||
skipStep["policy-platform"](policyPayloadObj);
|
||||
},
|
||||
// on error
|
||||
function () {
|
||||
// should be redirected to an error page
|
||||
}
|
||||
);
|
||||
|
||||
});
|
@ -0,0 +1,312 @@
|
||||
/*Copyright (C) 2015 by Marijn Haverbeke <marijnh@gmail.com> and others
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.*/
|
||||
|
||||
/*Annotations, Annotation Names and relevant tokens*/
|
||||
var ANNOTATION_IMPORT = "Import";
|
||||
var ANNOTATION_EXPORT = "Export";
|
||||
|
||||
var ANNOTATION_TOKEN_AT = "@";
|
||||
var ANNOTATION_TOKEN_OPENING_BRACKET = "(";
|
||||
var ANNOTATION_TOKEN_CLOSING_BRACKET = ")";
|
||||
|
||||
var REGEX_LINE_STARTING_WITH_PLAN = /^@Plan.*/g;
|
||||
var REGEX_LINE_STARTING_WITH_SINGLE_LINE_COMMENT = /^--.*/g;
|
||||
var REGEX_LINE_STARTING_WITH_MULTI_LINE_COMMENT = /^\/\*.*\*\//g;
|
||||
var REGEX_LINE_STARTING_WITH_IMPORT_STATEMENT = /^@Import.*/g;
|
||||
|
||||
var SIDDHI_STATEMENT_DELIMETER = ";";
|
||||
var SIDDHI_LINE_BREAK = "\n";
|
||||
var SIDDHI_LINE_BREAK_CHARACTER = '\n';
|
||||
var SIDDHI_SINGLE_QUOTE = "'";
|
||||
var SIDDHI_SPACE_LITERAL = " ";
|
||||
|
||||
var SIDDHI_LITERAL_DEFINE_STREAM = "define stream";
|
||||
|
||||
var MIME_TYPE_SIDDHI_QL = "text/siddhi-ql";
|
||||
|
||||
|
||||
CodeMirror.defineMode("sql", function (config, parserConfig) {
|
||||
"use strict";
|
||||
|
||||
var client = parserConfig.client || {},
|
||||
atoms = parserConfig.atoms || {"false":true, "true":true, "null":true},
|
||||
builtin = parserConfig.builtin || {},
|
||||
keywords = parserConfig.keywords || {},
|
||||
operatorChars = parserConfig.operatorChars || /^[*+\-%<>!=&|~^]/,
|
||||
support = parserConfig.support || {},
|
||||
hooks = parserConfig.hooks || {},
|
||||
dateSQL = parserConfig.dateSQL || {"date":true, "time":true, "timestamp":true};
|
||||
|
||||
function tokenBase(stream, state) {
|
||||
var ch = stream.next();
|
||||
|
||||
// call hooks from the mime type
|
||||
if (hooks[ch]) {
|
||||
var result = hooks[ch](stream, state);
|
||||
if (result !== false) return result;
|
||||
}
|
||||
|
||||
if (ch.charCodeAt(0) > 47 && ch.charCodeAt(0) < 58) {
|
||||
// numbers
|
||||
// ref: http://dev.mysql.com/doc/refman/5.5/en/number-literals.html
|
||||
stream.match(/^[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?/);
|
||||
support.decimallessFloat == true && stream.eat('.');
|
||||
return "number";
|
||||
} else if (ch == "'" || (ch == '"' && support.doubleQuote)) {
|
||||
// strings
|
||||
// ref: http://dev.mysql.com/doc/refman/5.5/en/string-literals.html
|
||||
state.tokenize = tokenLiteral(ch);
|
||||
return state.tokenize(stream, state);
|
||||
} else if (/^[\(\),\;\[\]]/.test(ch)) {
|
||||
// no highlightning
|
||||
return null;
|
||||
} else if ((ch == "-" && stream.eat("-") && (!support.commentSpaceRequired || stream.eat(" ")))) {
|
||||
// 1-line comments
|
||||
// ref: https://kb.askmonty.org/en/comment-syntax/
|
||||
stream.skipToEnd();
|
||||
return "comment";
|
||||
} else if (ch == "/" && stream.eat("*")) {
|
||||
// multi-line comments
|
||||
// ref: https://kb.askmonty.org/en/comment-syntax/
|
||||
state.tokenize = tokenComment;
|
||||
return state.tokenize(stream, state);
|
||||
} else if (ch == ".") {
|
||||
// .1 for 0.1
|
||||
if (support.zerolessFloat == true && stream.match(/^(?:\d+(?:e[+-]?\d+)?)/i)) {
|
||||
return "number";
|
||||
}
|
||||
} else {
|
||||
stream.eatWhile(/^[_\-\w\d]/); /* Character '-' will also be eaten, to prevent the highlight happening in keywords being embedded in non-keyword strings. For example, 'all' in 'all-nonkeyword' */
|
||||
var word = stream.current().toLowerCase(); // Added toLowerCase() to highlight keywords in a case insensitive manner.
|
||||
// dates (standard SQL syntax)
|
||||
// ref: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-literals.html
|
||||
if (dateSQL.hasOwnProperty(word) && (stream.match(/^( )+'[^']*'/) || stream.match(/^( )+"[^"]*"/)))
|
||||
return "number";
|
||||
if (atoms.hasOwnProperty(word)) return "atom";
|
||||
if (builtin.hasOwnProperty(word)) return "builtin";
|
||||
if (keywords.hasOwnProperty(word)) return "keyword";
|
||||
if (client.hasOwnProperty(word)) return "string-2";
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// 'string', with char specified in quote escaped by '\'
|
||||
function tokenLiteral(quote) {
|
||||
return function (stream, state) {
|
||||
var escaped = false, ch;
|
||||
while ((ch = stream.next()) != null) {
|
||||
if (ch == quote && !escaped) {
|
||||
state.tokenize = tokenBase;
|
||||
break;
|
||||
}
|
||||
escaped = !escaped && ch == "\\";
|
||||
}
|
||||
return "string";
|
||||
};
|
||||
}
|
||||
|
||||
function tokenComment(stream, state) {
|
||||
while (true) {
|
||||
if (stream.skipTo("*")) {
|
||||
stream.next();
|
||||
if (stream.eat("/")) {
|
||||
state.tokenize = tokenBase;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
stream.skipToEnd();
|
||||
break;
|
||||
}
|
||||
}
|
||||
return "comment";
|
||||
}
|
||||
|
||||
function pushContext(stream, state, type) {
|
||||
state.context = {
|
||||
prev:state.context,
|
||||
indent:stream.indentation(),
|
||||
col:stream.column(),
|
||||
type:type
|
||||
};
|
||||
}
|
||||
|
||||
function popContext(state) {
|
||||
state.indent = state.context.indent;
|
||||
state.context = state.context.prev;
|
||||
}
|
||||
|
||||
return {
|
||||
startState:function () {
|
||||
return {tokenize:tokenBase, context:null};
|
||||
},
|
||||
|
||||
token:function (stream, state) {
|
||||
if (stream.sol()) {
|
||||
if (state.context && state.context.align == null)
|
||||
state.context.align = false;
|
||||
}
|
||||
if (stream.eatSpace()) return null;
|
||||
|
||||
var style = state.tokenize(stream, state);
|
||||
if (style == "comment") return style;
|
||||
|
||||
if (state.context && state.context.align == null)
|
||||
state.context.align = true;
|
||||
|
||||
var tok = stream.current();
|
||||
if (tok == "(")
|
||||
pushContext(stream, state, ")");
|
||||
else if (tok == "[")
|
||||
pushContext(stream, state, "]");
|
||||
else if (state.context && state.context.type == tok)
|
||||
popContext(state);
|
||||
return style;
|
||||
},
|
||||
|
||||
indent:function (state, textAfter) {
|
||||
var cx = state.context;
|
||||
if (!cx) return CodeMirror.Pass;
|
||||
var closing = textAfter.charAt(0) == cx.type;
|
||||
if (cx.align) return cx.col + (closing ? 0 : 1);
|
||||
else return cx.indent + (closing ? 0 : config.indentUnit);
|
||||
},
|
||||
|
||||
blockCommentStart: "/*",
|
||||
blockCommentEnd: "*/",
|
||||
lineComment: "--"
|
||||
};
|
||||
});
|
||||
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
// `identifier`
|
||||
function hookIdentifier(stream) {
|
||||
// MySQL/MariaDB identifiers
|
||||
// ref: http://dev.mysql.com/doc/refman/5.6/en/identifier-qualifiers.html
|
||||
var ch;
|
||||
while ((ch = stream.next()) != null) {
|
||||
if (ch == "`" && !stream.eat("`")) return "variable-2";
|
||||
}
|
||||
stream.backUp(stream.current().length - 1);
|
||||
return stream.eatWhile(/\w/) ? "variable-2" : null;
|
||||
}
|
||||
|
||||
// variable token
|
||||
function hookVar(stream) {
|
||||
// variables
|
||||
// @@prefix.varName @varName
|
||||
// varName can be quoted with ` or ' or "
|
||||
// ref: http://dev.mysql.com/doc/refman/5.5/en/user-variables.html
|
||||
if (stream.eat("@")) {
|
||||
stream.match(/^session\./);
|
||||
stream.match(/^local\./);
|
||||
stream.match(/^global\./);
|
||||
}
|
||||
|
||||
if (stream.eat("'")) {
|
||||
stream.match(/^.*'/);
|
||||
return "variable-2";
|
||||
} else if (stream.eat('"')) {
|
||||
stream.match(/^.*"/);
|
||||
return "variable-2";
|
||||
} else if (stream.eat("`")) {
|
||||
stream.match(/^.*`/);
|
||||
return "variable-2";
|
||||
} else if (stream.match(/^[0-9a-zA-Z$\.\_]+/)) {
|
||||
return "variable-2";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
// short client keyword token
|
||||
function hookClient(stream) {
|
||||
// \N means NULL
|
||||
// ref: http://dev.mysql.com/doc/refman/5.5/en/null-values.html
|
||||
if (stream.eat("N")) {
|
||||
return "atom";
|
||||
}
|
||||
// \g, etc
|
||||
// ref: http://dev.mysql.com/doc/refman/5.5/en/mysql-commands.html
|
||||
return stream.match(/^[a-zA-Z.#!?]/) ? "variable-2" : null;
|
||||
}
|
||||
|
||||
// these keywords are used by all SQL dialects (however, a mode can still overwrite it)
|
||||
var sqlKeywordsWithoutSymbols = "all and as begin by contains define delete end events " +
|
||||
"every first for from full group having inner insert into join last " +
|
||||
"left not of on or outer output partition raw return right select snapshot stream table ";
|
||||
var sqlKeywords = ", : ? # ( ) " + sqlKeywordsWithoutSymbols;
|
||||
var builtIn = "bool double float int long object string ";
|
||||
var atoms = "false true null ";
|
||||
var dateSQL = "days hours milliseconds minutes months seconds ";
|
||||
var allSqlSuggestions = sqlKeywordsWithoutSymbols + builtIn + atoms + dateSQL;
|
||||
|
||||
// turn a space-separated list into an array
|
||||
function set(str) {
|
||||
var obj = {}, words = str.split(" ");
|
||||
for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
|
||||
return obj;
|
||||
}
|
||||
|
||||
// A generic SQL Mode. It's not a standard, it just try to support what is generally supported
|
||||
CodeMirror.defineMIME(MIME_TYPE_SIDDHI_QL, {
|
||||
name:"sql",
|
||||
keywords:set(sqlKeywords),
|
||||
builtin:set(builtIn),
|
||||
atoms:set(atoms),
|
||||
operatorChars:/^[*+%<>!=/]/,
|
||||
dateSQL:set(dateSQL),
|
||||
support:set("doubleQuote "),
|
||||
allSqlSuggestions:set(allSqlSuggestions)
|
||||
});
|
||||
}());
|
||||
|
||||
/*
|
||||
How Properties of Mime Types are used by SQL Mode
|
||||
=================================================
|
||||
|
||||
keywords:
|
||||
A list of keywords you want to be highlighted.
|
||||
functions:
|
||||
A list of function names you want to be highlighted.
|
||||
builtin:
|
||||
A list of builtin types you want to be highlighted (if you want types to be of class "builtin" instead of "keyword").
|
||||
operatorChars:
|
||||
All characters that must be handled as operators.
|
||||
client:
|
||||
Commands parsed and executed by the client (not the server).
|
||||
support:
|
||||
A list of supported syntaxes which are not common, but are supported by more than 1 DBMS.
|
||||
* ODBCdotTable: .tableName
|
||||
* zerolessFloat: .1
|
||||
* doubleQuote
|
||||
* nCharCast: N'string'
|
||||
* charsetCast: _utf8'string'
|
||||
* commentHash: use # char for comments
|
||||
* commentSlashSlash: use // for comments
|
||||
* commentSpaceRequired: require a space after -- for comments
|
||||
atoms:
|
||||
Keywords that must be highlighted as atoms,. Some DBMS's support more atoms than others:
|
||||
UNKNOWN, INFINITY, UNDERFLOW, NaN...
|
||||
dateSQL:
|
||||
Used for date/time SQL standard syntax, because not all DBMS's support same temporal types.
|
||||
*/
|
@ -0,0 +1,95 @@
|
||||
{{#zone "topCss"}}
|
||||
{{css "css/codemirror.css"}}
|
||||
{{/zone}}
|
||||
{{#zone "contentTitle"}}
|
||||
<div class="row wr-device-board">
|
||||
<div class="col-lg-12 wr-secondary-bar">
|
||||
<label id="policy-heading" class="device-id device-select">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
{{/zone}}
|
||||
|
||||
<!-- #page-content-wrapper -->
|
||||
<div class="page-content-wrapper">
|
||||
<!-- content/body -->
|
||||
<div class="container-fluid body-wrapper">
|
||||
<div class="row no-gutter add-padding-5x add-margin-top-5x"
|
||||
style="border: 1px solid #e4e4e4;">
|
||||
<div class="media">
|
||||
<div class="media-body asset-desc add-padding-left-5x">
|
||||
<div style="background: #11375B; color: #fff; padding: 10px; margin-bottom: 5px">
|
||||
Policy Overview
|
||||
</div>
|
||||
{{#defineZone "policy-detail-properties"}}
|
||||
<table class="table table-responsive table-striped" id="members">
|
||||
<tbody>
|
||||
<tr role="row" class="even">
|
||||
<td class="sorting_1" style="padding:10px 15px; width: 14%;">
|
||||
Platform
|
||||
</td>
|
||||
<td id="policy-platform" style="padding:10px 15px;"></td>
|
||||
</tr>
|
||||
<tr role="row" class="odd">
|
||||
<td class="sorting_1" style="padding:10px 15px;">Assignment Group
|
||||
</td>
|
||||
<td id="policy-assignment" style="padding:10px 15px;"></td>
|
||||
</tr>
|
||||
<tr role="row" class="even">
|
||||
<td class="sorting_1" style="padding:10px 15px;">Action upon
|
||||
non-compliance
|
||||
</td>
|
||||
<td id="policy-action" style="padding:10px 15px;"></td>
|
||||
</tr>
|
||||
<tr role="row" class="even">
|
||||
<td class="sorting_1" style="padding:10px 15px;">Status</td>
|
||||
<td id="policy-status" style="padding:10px 15px;"></td>
|
||||
</tr>
|
||||
<tr role="row" id="users-row" class="even">
|
||||
<td class="sorting_1" style="padding:10px 15px;">Assigned Users</td>
|
||||
<td id="policy-users" style="padding:10px 15px;"></td>
|
||||
</tr>
|
||||
<tr role="row" id="roles-row" class="even">
|
||||
<td class="sorting_1" style="padding:10px 15px;">Assigned Roles</td>
|
||||
<td id="policy-roles" style="padding:10px 15px;"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{{/defineZone}}
|
||||
<div style="background: #11375B; color: #fff; padding: 10px; margin-bottom: 5px">
|
||||
Description
|
||||
</div>
|
||||
<div class="add-margin-top-4x">
|
||||
<div id="policy-description" class="panel-title-description"></div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<div style="background: #11375B; color: #fff; padding: 10px; margin-bottom: 5px">
|
||||
Profile Information
|
||||
</div>
|
||||
<div class="add-margin-top-4x">
|
||||
<label class="wr-input-label">
|
||||
Device specific configuration instructions
|
||||
</label>
|
||||
<div class="wr-advance-operations">
|
||||
<div class="wr-input-control">
|
||||
<div class="cus-col-100">
|
||||
<textarea id="policy-definition-input" placeholder="Enter the policy"
|
||||
style="width: 100%;" required></textarea>
|
||||
</div>
|
||||
<br class="c-both"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- /content/body -->
|
||||
</div>
|
||||
{{#zone "bottomJs"}}
|
||||
{{js "js/codemirror.js"}}
|
||||
{{js "js/sql.js"}}
|
||||
{{js "js/policy-view.js"}}
|
||||
{{/zone}}
|
@ -0,0 +1,7 @@
|
||||
function onRequest(context) {
|
||||
var log = new Log("policy-view-edit-unit backend js");
|
||||
log.debug("calling policy-view-edit-unit");
|
||||
var userModule = require("/app/modules/user.js").userModule;
|
||||
context.roles = userModule.getRoles().content;
|
||||
return context;
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"version" : "1.0.0"
|
||||
}
|
@ -0,0 +1,344 @@
|
||||
/*Copyright (C) 2015 by Marijn Haverbeke <marijnh@gmail.com> and others
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.*/
|
||||
|
||||
/* BASICS */
|
||||
|
||||
.CodeMirror {
|
||||
/* Set height, width, borders, and global font properties here */
|
||||
font-family: monospace;
|
||||
height: 300px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
/* PADDING */
|
||||
|
||||
.CodeMirror-lines {
|
||||
padding: 4px 0; /* Vertical padding around content */
|
||||
}
|
||||
.CodeMirror pre {
|
||||
padding: 0 4px; /* Horizontal padding of content */
|
||||
}
|
||||
|
||||
.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
||||
background-color: white; /* The little square between H and V scrollbars */
|
||||
}
|
||||
|
||||
/* GUTTER */
|
||||
|
||||
.CodeMirror-gutters {
|
||||
border-right: 1px solid #ddd;
|
||||
background-color: #f7f7f7;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.CodeMirror-linenumbers {}
|
||||
.CodeMirror-linenumber {
|
||||
padding: 0 3px 0 5px;
|
||||
min-width: 20px;
|
||||
text-align: right;
|
||||
color: #999;
|
||||
white-space: nowrap;
|
||||
left: -30px;
|
||||
}
|
||||
|
||||
.CodeMirror-guttermarker { color: black; }
|
||||
.CodeMirror-guttermarker-subtle { color: #999; }
|
||||
|
||||
/* CURSOR */
|
||||
|
||||
.CodeMirror div.CodeMirror-cursor {
|
||||
border-left: 1px solid black;
|
||||
}
|
||||
/* Shown when moving in bi-directional text */
|
||||
.CodeMirror div.CodeMirror-secondarycursor {
|
||||
border-left: 1px solid silver;
|
||||
}
|
||||
.CodeMirror.cm-fat-cursor div.CodeMirror-cursor {
|
||||
width: auto;
|
||||
border: 0;
|
||||
background: #7e7;
|
||||
}
|
||||
.CodeMirror.cm-fat-cursor div.CodeMirror-cursors {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.cm-animate-fat-cursor {
|
||||
width: auto;
|
||||
border: 0;
|
||||
-webkit-animation: blink 1.06s steps(1) infinite;
|
||||
-moz-animation: blink 1.06s steps(1) infinite;
|
||||
animation: blink 1.06s steps(1) infinite;
|
||||
}
|
||||
@-moz-keyframes blink {
|
||||
0% { background: #7e7; }
|
||||
50% { background: none; }
|
||||
100% { background: #7e7; }
|
||||
}
|
||||
@-webkit-keyframes blink {
|
||||
0% { background: #7e7; }
|
||||
50% { background: none; }
|
||||
100% { background: #7e7; }
|
||||
}
|
||||
@keyframes blink {
|
||||
0% { background: #7e7; }
|
||||
50% { background: none; }
|
||||
100% { background: #7e7; }
|
||||
}
|
||||
|
||||
/* Can style cursor different in overwrite (non-insert) mode */
|
||||
div.CodeMirror-overwrite div.CodeMirror-cursor {}
|
||||
|
||||
.cm-tab { display: inline-block; text-decoration: inherit; }
|
||||
|
||||
.CodeMirror-ruler {
|
||||
border-left: 1px solid #ccc;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
/* DEFAULT THEME */
|
||||
|
||||
.cm-s-default .cm-keyword {color: #708;}
|
||||
.cm-s-default .cm-atom {color: #219;}
|
||||
.cm-s-default .cm-number {color: #164;}
|
||||
.cm-s-default .cm-def {color: #00f;}
|
||||
.cm-s-default .cm-variable,
|
||||
.cm-s-default .cm-punctuation,
|
||||
.cm-s-default .cm-property,
|
||||
.cm-s-default .cm-operator {}
|
||||
.cm-s-default .cm-variable-2 {color: #05a;}
|
||||
.cm-s-default .cm-variable-3 {color: #085;}
|
||||
.cm-s-default .cm-comment {color: #a50;}
|
||||
.cm-s-default .cm-string {color: #a11;}
|
||||
.cm-s-default .cm-string-2 {color: #f50;}
|
||||
.cm-s-default .cm-meta {color: #555;}
|
||||
.cm-s-default .cm-qualifier {color: #555;}
|
||||
.cm-s-default .cm-builtin {color: #30a;}
|
||||
.cm-s-default .cm-bracket {color: #997;}
|
||||
.cm-s-default .cm-tag {color: #170;}
|
||||
.cm-s-default .cm-attribute {color: #00c;}
|
||||
.cm-s-default .cm-header {color: blue;}
|
||||
.cm-s-default .cm-quote {color: #090;}
|
||||
.cm-s-default .cm-hr {color: #999;}
|
||||
.cm-s-default .cm-link {color: #00c;}
|
||||
|
||||
.cm-negative {color: #d44;}
|
||||
.cm-positive {color: #292;}
|
||||
.cm-header, .cm-strong {font-weight: bold;}
|
||||
.cm-em {font-style: italic;}
|
||||
.cm-link {text-decoration: underline;}
|
||||
.cm-strikethrough {text-decoration: line-through;}
|
||||
|
||||
.cm-s-default .cm-error {color: #f00;}
|
||||
.cm-invalidchar {color: #f00;}
|
||||
|
||||
/* Default styles for common addons */
|
||||
|
||||
div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
|
||||
div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
|
||||
.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }
|
||||
.CodeMirror-activeline-background {background: #e8f2ff;}
|
||||
|
||||
/* STOP */
|
||||
|
||||
/* The rest of this file contains styles related to the mechanics of
|
||||
the editor. You probably shouldn't touch them. */
|
||||
|
||||
.CodeMirror {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background: white;
|
||||
}
|
||||
|
||||
.CodeMirror-scroll {
|
||||
overflow: scroll !important; /* Things will break if this is overridden */
|
||||
/* 30px is the magic margin used to hide the element's real scrollbars */
|
||||
/* See overflow: hidden in .CodeMirror */
|
||||
margin-bottom: -30px; margin-right: -30px;
|
||||
padding-bottom: 30px;
|
||||
height: 100%;
|
||||
outline: none; /* Prevent dragging from highlighting the element */
|
||||
position: relative;
|
||||
}
|
||||
.CodeMirror-sizer {
|
||||
position: relative;
|
||||
border-right: 30px solid transparent;
|
||||
}
|
||||
|
||||
/* The fake, visible scrollbars. Used to force redraw during scrolling
|
||||
before actuall scrolling happens, thus preventing shaking and
|
||||
flickering artifacts. */
|
||||
.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
||||
position: absolute;
|
||||
z-index: 6;
|
||||
display: none;
|
||||
}
|
||||
.CodeMirror-vscrollbar {
|
||||
right: 0; top: 0;
|
||||
overflow-x: hidden;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
.CodeMirror-hscrollbar {
|
||||
bottom: 0; left: 0;
|
||||
overflow-y: hidden;
|
||||
overflow-x: scroll;
|
||||
}
|
||||
.CodeMirror-scrollbar-filler {
|
||||
right: 0; bottom: 0;
|
||||
}
|
||||
.CodeMirror-gutter-filler {
|
||||
left: 0; bottom: 0;
|
||||
}
|
||||
|
||||
.CodeMirror-gutters {
|
||||
position: absolute; left: 0; top: 0;
|
||||
z-index: 3;
|
||||
}
|
||||
.CodeMirror-gutter {
|
||||
white-space: normal;
|
||||
height: 100%;
|
||||
display: inline-block;
|
||||
/* Hack to make IE7 behave */
|
||||
*zoom:1;
|
||||
*display:inline;
|
||||
}
|
||||
.CodeMirror-gutter-wrapper {
|
||||
position: absolute;
|
||||
z-index: 4;
|
||||
height: 100%;
|
||||
}
|
||||
.CodeMirror-gutter-elt {
|
||||
position: absolute;
|
||||
cursor: default;
|
||||
z-index: 4;
|
||||
left: -30px;
|
||||
}
|
||||
.CodeMirror-gutter-wrapper {
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.CodeMirror-lines {
|
||||
cursor: text;
|
||||
min-height: 1px; /* prevents collapsing before first draw */
|
||||
}
|
||||
.CodeMirror pre {
|
||||
/* Reset some styles that the rest of the page might have set */
|
||||
-moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
|
||||
border-width: 0;
|
||||
background: transparent;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
margin: 0;
|
||||
white-space: pre;
|
||||
word-wrap: normal;
|
||||
line-height: inherit;
|
||||
color: inherit;
|
||||
z-index: 2;
|
||||
position: relative;
|
||||
overflow: visible;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
.CodeMirror-wrap pre {
|
||||
word-wrap: break-word;
|
||||
white-space: pre-wrap;
|
||||
word-break: normal;
|
||||
}
|
||||
|
||||
.CodeMirror-linebackground {
|
||||
position: absolute;
|
||||
left: 0; right: 0; top: 0; bottom: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.CodeMirror-linewidget {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.CodeMirror-widget {}
|
||||
|
||||
.CodeMirror-code {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/* Force content-box sizing for the elements where we expect it */
|
||||
.CodeMirror-scroll,
|
||||
.CodeMirror-sizer,
|
||||
.CodeMirror-gutter,
|
||||
.CodeMirror-gutters,
|
||||
.CodeMirror-linenumber {
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
.CodeMirror-measure {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
visibility: hidden;
|
||||
}
|
||||
.CodeMirror-measure pre { position: static; }
|
||||
|
||||
.CodeMirror div.CodeMirror-cursor {
|
||||
position: absolute;
|
||||
border-right: none;
|
||||
width: 0;
|
||||
}
|
||||
|
||||
div.CodeMirror-cursors {
|
||||
visibility: hidden;
|
||||
position: relative;
|
||||
z-index: 3;
|
||||
}
|
||||
.CodeMirror-focused div.CodeMirror-cursors {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.CodeMirror-selected { background: #d9d9d9; }
|
||||
.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
|
||||
.CodeMirror-crosshair { cursor: crosshair; }
|
||||
.CodeMirror ::selection { background: #d7d4f0; }
|
||||
.CodeMirror ::-moz-selection { background: #d7d4f0; }
|
||||
|
||||
.cm-searching {
|
||||
background: #ffa;
|
||||
background: rgba(255, 255, 0, .4);
|
||||
}
|
||||
|
||||
/* IE7 hack to prevent it from returning funny offsetTops on the spans */
|
||||
.CodeMirror span { *vertical-align: text-bottom; }
|
||||
|
||||
/* Used to force a border model for a node */
|
||||
.cm-force-border { padding-right: .1px; }
|
||||
|
||||
@media print {
|
||||
/* Hide the cursor when printing */
|
||||
.CodeMirror div.CodeMirror-cursors {
|
||||
visibility: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
/* See issue #2901 */
|
||||
.cm-tab-wrap-hack:after { content: ''; }
|
||||
|
||||
/* Help users use markselection to safely style text background */
|
||||
span.CodeMirror-selectedtext { background: none; }
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,662 @@
|
||||
/*
|
||||
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
|
||||
*
|
||||
* WSO2 Inc. licenses this file to you under the Apache License,
|
||||
* Version 2.0 (the "License"); you may not use this file except
|
||||
* in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
var validateStep = {};
|
||||
var stepForwardFrom = {};
|
||||
var stepBackFrom = {};
|
||||
var policy = {};
|
||||
var configuredOperations = [];
|
||||
|
||||
/**
|
||||
* Method to update the visibility of grouped input.
|
||||
* @param domElement HTML grouped-input element with class name "grouped-input"
|
||||
*/
|
||||
var updateGroupedInputVisibility = function (domElement) {
|
||||
if ($(".parent-input:first", domElement).is(":checked")) {
|
||||
if ($(".grouped-child-input:first", domElement).hasClass("disabled")) {
|
||||
$(".grouped-child-input:first", domElement).removeClass("disabled");
|
||||
}
|
||||
$(".child-input", domElement).each(function () {
|
||||
$(this).prop('disabled', false);
|
||||
});
|
||||
} else {
|
||||
if (!$(".grouped-child-input:first", domElement).hasClass("disabled")) {
|
||||
$(".grouped-child-input:first", domElement).addClass("disabled");
|
||||
}
|
||||
$(".child-input", domElement).each(function () {
|
||||
$(this).prop('disabled', true);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Checks if provided number is valid against a range.
|
||||
*
|
||||
* @param numberInput Number Input
|
||||
* @param min Minimum Limit
|
||||
* @param max Maximum Limit
|
||||
* @returns {boolean} Returns true if input is within the specified range
|
||||
*/
|
||||
var inputIsValidAgainstRange = function (numberInput, min, max) {
|
||||
return (numberInput == min || (numberInput > min && numberInput < max) || numberInput == max);
|
||||
};
|
||||
|
||||
/**
|
||||
* Checks if provided input is valid against RegEx input.
|
||||
*
|
||||
* @param regExp Regular expression
|
||||
* @param input Input string to check
|
||||
* @returns {boolean} Returns true if input matches RegEx
|
||||
*/
|
||||
var inputIsValidAgainstRegExp = function (regExp, input) {
|
||||
return regExp.test(input);
|
||||
};
|
||||
|
||||
validateStep["policy-profile"] = function () {
|
||||
return true;
|
||||
};
|
||||
|
||||
stepForwardFrom["policy-profile"] = function () {
|
||||
policy["profile"] = operationModule.generateProfile(policy["platform"], configuredOperations);
|
||||
// updating next-page wizard title with selected platform
|
||||
$("#policy-criteria-page-wizard-title").text("ADD " + policy["platform"] + " POLICY");
|
||||
};
|
||||
|
||||
stepBackFrom["policy-profile"] = function () {
|
||||
// reinitialize configuredOperations
|
||||
configuredOperations = [];
|
||||
// clearing already-loaded platform specific hidden-operations html content from the relevant div
|
||||
// so that, the wrong content would not be shown at the first glance, in case
|
||||
// the user selects a different platform
|
||||
$(".wr-advance-operations").html(
|
||||
"<div class='wr-advance-operations-init'>" +
|
||||
"<br>" +
|
||||
" " +
|
||||
"<i class='fw fw-settings fw-spin fw-2x'></i>" +
|
||||
" " +
|
||||
"Loading Platform Features . . ." +
|
||||
"<br>" +
|
||||
"<br>" +
|
||||
"</div>"
|
||||
);
|
||||
};
|
||||
|
||||
stepForwardFrom["policy-criteria"] = function () {
|
||||
$("input[type='radio'].select-users-radio").each(function () {
|
||||
if ($(this).is(':radio')) {
|
||||
if ($(this).is(":checked")) {
|
||||
if ($(this).attr("id") == "users-radio-btn") {
|
||||
policy["selectedUsers"] = $("#users-input").val();
|
||||
} else if ($(this).attr("id") == "user-roles-radio-btn") {
|
||||
policy["selectedUserRoles"] = $("#user-roles-input").val();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
policy["selectedNonCompliantAction"] = $("#action-input").find(":selected").data("action");
|
||||
policy["selectedOwnership"] = $("#ownership-input").val();
|
||||
// updating next-page wizard title with selected platform
|
||||
$("#policy-naming-page-wizard-title").text("ADD " + policy["platform"] + " POLICY");
|
||||
};
|
||||
|
||||
/**
|
||||
* Checks if provided input is valid against provided length range.
|
||||
*
|
||||
* @param input Alphanumeric or non-alphanumeric input
|
||||
* @param minLength Minimum Required Length
|
||||
* @param maxLength Maximum Required Length
|
||||
* @returns {boolean} Returns true if input matches the provided minimum length and maximum length
|
||||
*/
|
||||
var inputIsValidAgainstLength = function (input, minLength, maxLength) {
|
||||
var length = input.length;
|
||||
return (length == minLength || (length > minLength && length < maxLength) || length == maxLength);
|
||||
};
|
||||
|
||||
validateStep["policy-naming"] = function () {
|
||||
var validationStatus = {};
|
||||
|
||||
// taking values of inputs to be validated
|
||||
var policyName = $("input#policy-name-input").val();
|
||||
// starting validation process and updating validationStatus
|
||||
if (!policyName) {
|
||||
validationStatus["error"] = true;
|
||||
validationStatus["mainErrorMsg"] = "Policy name is empty. You cannot proceed.";
|
||||
} else if (!inputIsValidAgainstLength(policyName, 1, 30)) {
|
||||
validationStatus["error"] = true;
|
||||
validationStatus["mainErrorMsg"] =
|
||||
"Policy name exceeds maximum allowed length. Please check.";
|
||||
} else {
|
||||
validationStatus["error"] = false;
|
||||
}
|
||||
// ending validation process
|
||||
|
||||
// start taking specific actions upon validation
|
||||
var wizardIsToBeContinued;
|
||||
if (validationStatus["error"]) {
|
||||
wizardIsToBeContinued = false;
|
||||
var mainErrorMsgWrapper = "#policy-naming-main-error-msg";
|
||||
var mainErrorMsg = mainErrorMsgWrapper + " span";
|
||||
$(mainErrorMsg).text(validationStatus["mainErrorMsg"]);
|
||||
$(mainErrorMsgWrapper).removeClass("hidden");
|
||||
} else {
|
||||
wizardIsToBeContinued = true;
|
||||
}
|
||||
|
||||
return wizardIsToBeContinued;
|
||||
};
|
||||
|
||||
validateStep["policy-naming-publish"] = function () {
|
||||
var validationStatus = {};
|
||||
|
||||
// taking values of inputs to be validated
|
||||
var policyName = $("input#policy-name-input").val();
|
||||
// starting validation process and updating validationStatus
|
||||
if (!policyName) {
|
||||
validationStatus["error"] = true;
|
||||
validationStatus["mainErrorMsg"] = "Policy name is empty. You cannot proceed.";
|
||||
} else if (!inputIsValidAgainstLength(policyName, 1, 30)) {
|
||||
validationStatus["error"] = true;
|
||||
validationStatus["mainErrorMsg"] =
|
||||
"Policy name exceeds maximum allowed length. Please check.";
|
||||
} else {
|
||||
validationStatus["error"] = false;
|
||||
}
|
||||
// ending validation process
|
||||
|
||||
// start taking specific actions upon validation
|
||||
var wizardIsToBeContinued;
|
||||
if (validationStatus["error"]) {
|
||||
wizardIsToBeContinued = false;
|
||||
var mainErrorMsgWrapper = "#policy-naming-main-error-msg";
|
||||
var mainErrorMsg = mainErrorMsgWrapper + " span";
|
||||
$(mainErrorMsg).text(validationStatus["mainErrorMsg"]);
|
||||
$(mainErrorMsgWrapper).removeClass("hidden");
|
||||
} else {
|
||||
wizardIsToBeContinued = true;
|
||||
}
|
||||
|
||||
return wizardIsToBeContinued;
|
||||
};
|
||||
|
||||
stepForwardFrom["policy-naming-publish"] = function () {
|
||||
policy["policyName"] = $("#policy-name-input").val();
|
||||
policy["description"] = $("#policy-description-input").val();
|
||||
//All data is collected. Policy can now be updated.
|
||||
savePolicy(policy, "publish");
|
||||
};
|
||||
stepForwardFrom["policy-naming"] = function () {
|
||||
policy["policyName"] = $("#policy-name-input").val();
|
||||
policy["description"] = $("#policy-description-input").val();
|
||||
//All data is collected. Policy can now be updated.
|
||||
savePolicy(policy, "save");
|
||||
};
|
||||
|
||||
var savePolicy = function (policy, state) {
|
||||
var profilePayloads = [{
|
||||
"featureCode": "CONFIG",
|
||||
"deviceTypeId": policy["platformId"],
|
||||
"content": {"policyDefinition": window.queryEditor.getValue()}
|
||||
}];
|
||||
|
||||
var payload = {
|
||||
"policyName": policy["policyName"],
|
||||
"description": policy["description"],
|
||||
"compliance": policy["selectedNonCompliantAction"],
|
||||
"ownershipType": "ANY",
|
||||
"profile": {
|
||||
"profileName": policy["policyName"],
|
||||
"deviceType": {
|
||||
"id": policy["platformId"],
|
||||
"name": policy["platform"]
|
||||
},
|
||||
"profileFeaturesList": profilePayloads
|
||||
}
|
||||
};
|
||||
|
||||
if (policy["selectedUsers"]) {
|
||||
payload["users"] = policy["selectedUsers"];
|
||||
} else if (policy["selectedUserRoles"]) {
|
||||
payload["roles"] = policy["selectedUserRoles"];
|
||||
} else {
|
||||
payload["users"] = [];
|
||||
payload["roles"] = [];
|
||||
}
|
||||
|
||||
var serviceURL;
|
||||
if (state == "save") {
|
||||
serviceURL = "/devicemgt_admin/policies/inactive-policy"
|
||||
} else if (state == "publish") {
|
||||
serviceURL = "/devicemgt_admin/policies/active-policy"
|
||||
}
|
||||
invokerUtil.post(
|
||||
serviceURL,
|
||||
payload,
|
||||
function () {
|
||||
$(".add-policy").addClass("hidden");
|
||||
$(".policy-naming").addClass("hidden");
|
||||
$(".policy-message").removeClass("hidden");
|
||||
if (state == "publish") {
|
||||
publishToDevice();
|
||||
}
|
||||
},
|
||||
function (err) {
|
||||
console.log(err);
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
function publishToDevice() {
|
||||
var payload = {
|
||||
"policyName": policy["policyName"],
|
||||
"description": policy["description"],
|
||||
"compliance": policy["selectedNonCompliantAction"],
|
||||
"ownershipType": "ANY",
|
||||
"profile": {
|
||||
"profileName": policy["policyName"],
|
||||
"deviceType": {
|
||||
"id": policy["platformId"],
|
||||
"name": policy["platform"]
|
||||
},
|
||||
"policyDefinition": window.queryEditor.getValue(),
|
||||
"policyDescription": policy["description"]
|
||||
}
|
||||
};
|
||||
|
||||
var successCallback = function (data, status) {
|
||||
console.log("Data: " + data + "\nStatus: " + status);
|
||||
};
|
||||
|
||||
var data = {
|
||||
url: "/devicemgt/api/policies/add",
|
||||
type: "POST",
|
||||
contentType: "application/json",
|
||||
accept: "application/json",
|
||||
success: successCallback,
|
||||
data: JSON.stringify(payload)
|
||||
};
|
||||
|
||||
$.ajax(data).fail(function (jqXHR) {
|
||||
console.log("Error: " + jqXHR);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
// Start of functions related to grid-input-view
|
||||
|
||||
/**
|
||||
* Method to set count id to cloned elements.
|
||||
* @param {object} addFormContainer
|
||||
*/
|
||||
var setId = function (addFormContainer) {
|
||||
$(addFormContainer).find("[data-add-form-clone]").each(function (i) {
|
||||
$(this).attr("id", $(this).attr("data-add-form-clone").slice(1) + "-" + (i + 1));
|
||||
if ($(this).find(".index").length > 0) {
|
||||
$(this).find(".index").html(i + 1);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Method to set count id to cloned elements.
|
||||
* @param {object} addFormContainer
|
||||
*/
|
||||
var showHideHelpText = function (addFormContainer) {
|
||||
var helpText = "[data-help-text=add-form]";
|
||||
if ($(addFormContainer).find("[data-add-form-clone]").length > 0) {
|
||||
$(addFormContainer).find(helpText).hide();
|
||||
} else {
|
||||
$(addFormContainer).find(helpText).show();
|
||||
}
|
||||
};
|
||||
|
||||
function formatRepo(user) {
|
||||
if (user.loading) {
|
||||
return user.text
|
||||
}
|
||||
if (!user.username) {
|
||||
return;
|
||||
}
|
||||
var markup = '<div class="clearfix">' +
|
||||
'<div clas="col-sm-8">' +
|
||||
'<div class="clearfix">' +
|
||||
'<div class="col-sm-3">' + user.username + '</div>';
|
||||
if (user.firstname) {
|
||||
markup += '<div class="col-sm-3"><i class="fa fa-code-fork"></i> ' + user.firstname + '</div>';
|
||||
}
|
||||
if (user.emailAddress) {
|
||||
markup += '<div class="col-sm-2"><i class="fa fa-star"></i> ' + user.emailAddress + '</div></div>';
|
||||
}
|
||||
markup += '</div></div>';
|
||||
return markup;
|
||||
}
|
||||
|
||||
function formatRepoSelection(user) {
|
||||
return user.username || user.text;
|
||||
}
|
||||
|
||||
// End of functions related to grid-input-view
|
||||
|
||||
|
||||
$(document).ready(function () {
|
||||
window.queryEditor = CodeMirror.fromTextArea(document.getElementById('policy-definition-input'), {
|
||||
mode: MIME_TYPE_SIDDHI_QL,
|
||||
indentWithTabs: true,
|
||||
smartIndent: true,
|
||||
lineNumbers: true,
|
||||
matchBrackets: true,
|
||||
autofocus: true,
|
||||
extraKeys: {
|
||||
"Shift-2": function (cm) {
|
||||
insertStr(cm, cm.getCursor(), '@');
|
||||
CodeMirror.showHint(cm, getAnnotationHints);
|
||||
},
|
||||
"Ctrl-Space": "autocomplete"
|
||||
}
|
||||
});
|
||||
|
||||
$("#users-input").select2({
|
||||
multiple: true,
|
||||
tags: true,
|
||||
ajax: {
|
||||
url: window.location.origin + "/devicemgt/api/invoker/execute/",
|
||||
method: "POST",
|
||||
dataType: 'json',
|
||||
delay: 250,
|
||||
id: function (user) {
|
||||
return user.username;
|
||||
},
|
||||
data: function (params) {
|
||||
var postData = {};
|
||||
postData.actionMethod = "GET";
|
||||
postData.actionUrl = "/devicemgt_admin/users";
|
||||
postData.actionPayload = JSON.stringify({
|
||||
q: params.term, // search term
|
||||
page: params.page
|
||||
});
|
||||
|
||||
return JSON.stringify(postData);
|
||||
},
|
||||
processResults: function (data, page) {
|
||||
var newData = [];
|
||||
$.each(data.responseContent, function (index, value) {
|
||||
value.id = value.username;
|
||||
newData.push(value);
|
||||
});
|
||||
return {
|
||||
results: newData
|
||||
};
|
||||
},
|
||||
cache: true
|
||||
},
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // let our custom formatter work
|
||||
minimumInputLength: 1,
|
||||
templateResult: formatRepo, // omitted for brevity, see the source of this page
|
||||
templateSelection: formatRepoSelection // omitted for brevity, see the source of this page
|
||||
});
|
||||
|
||||
// Adding initial state of wizard-steps.
|
||||
$("#policy-profile-wizard-steps").html($(".wr-steps").html());
|
||||
|
||||
policy["platform"] = $("#platform").data("platform");
|
||||
policy["platformId"] = $("#platform").data("platform-id");
|
||||
// updating next-page wizard title with selected platform
|
||||
$("#policy-profile-page-wizard-title").text("ADD " + policy["platform"] + " POLICY");
|
||||
|
||||
var deviceType = policy["platform"];
|
||||
|
||||
$("select.select2[multiple=multiple]").select2({
|
||||
"tags": true
|
||||
});
|
||||
|
||||
$("#users-select-field").hide();
|
||||
$("#user-roles-select-field").show();
|
||||
|
||||
$("input[type='radio'].select-users-radio").change(function () {
|
||||
if ($("#users-radio-btn").is(":checked")) {
|
||||
$("#user-roles-select-field").hide();
|
||||
$("#users-select-field").show();
|
||||
}
|
||||
if ($("#user-roles-radio-btn").is(":checked")) {
|
||||
$("#users-select-field").hide();
|
||||
$("#user-roles-select-field").show();
|
||||
}
|
||||
});
|
||||
|
||||
// Support for special input type "ANY" on user(s) & user-role(s) selection
|
||||
$("#user-roles-input").select2({
|
||||
"tags": true
|
||||
}).on("select2:select", function (e) {
|
||||
if (e.params.data.id == "ANY") {
|
||||
$(this).val("ANY").trigger("change");
|
||||
} else {
|
||||
$("option[value=ANY]", this).prop("selected", false).parent().trigger("change");
|
||||
}
|
||||
});
|
||||
|
||||
// Maintains an array of configured features of the profile
|
||||
var advanceOperations = ".wr-advance-operations";
|
||||
$(advanceOperations).on("click", ".wr-input-control.switch", function (event) {
|
||||
var operationCode = $(this).parents(".operation-data").data("operation-code");
|
||||
var operation = $(this).parents(".operation-data").data("operation");
|
||||
var operationDataWrapper = $(this).data("target");
|
||||
// prevents event bubbling by figuring out what element it's being called from.
|
||||
if (event.target.tagName == "INPUT") {
|
||||
var featureConfiguredIcon;
|
||||
if ($("input[type='checkbox']", this).is(":checked")) {
|
||||
configuredOperations.push(operationCode);
|
||||
// when a feature is enabled, if "zero-configured-features" msg is available, hide that.
|
||||
var zeroConfiguredOperationsErrorMsg = "#policy-profile-main-error-msg";
|
||||
if (!$(zeroConfiguredOperationsErrorMsg).hasClass("hidden")) {
|
||||
$(zeroConfiguredOperationsErrorMsg).addClass("hidden");
|
||||
}
|
||||
// add configured-state-icon to the feature
|
||||
featureConfiguredIcon = "#" + operation + "-configured";
|
||||
if ($(featureConfiguredIcon).hasClass("hidden")) {
|
||||
$(featureConfiguredIcon).removeClass("hidden");
|
||||
}
|
||||
} else {
|
||||
//splicing the array if operation is present.
|
||||
var index = $.inArray(operationCode, configuredOperations);
|
||||
if (index != -1) {
|
||||
configuredOperations.splice(index, 1);
|
||||
}
|
||||
// when a feature is disabled, clearing all its current configured, error or success states
|
||||
var subErrorMsgWrapper = "#" + operation + "-feature-error-msg";
|
||||
var subErrorIcon = "#" + operation + "-error";
|
||||
var subOkIcon = "#" + operation + "-ok";
|
||||
featureConfiguredIcon = "#" + operation + "-configured";
|
||||
|
||||
if (!$(subErrorMsgWrapper).hasClass("hidden")) {
|
||||
$(subErrorMsgWrapper).addClass("hidden");
|
||||
}
|
||||
if (!$(subErrorIcon).hasClass("hidden")) {
|
||||
$(subErrorIcon).addClass("hidden");
|
||||
}
|
||||
if (!$(subOkIcon).hasClass("hidden")) {
|
||||
$(subOkIcon).addClass("hidden");
|
||||
}
|
||||
if (!$(featureConfiguredIcon).hasClass("hidden")) {
|
||||
$(featureConfiguredIcon).addClass("hidden");
|
||||
}
|
||||
// reinitializing input fields into the defaults
|
||||
$(operationDataWrapper + " input").each(
|
||||
function () {
|
||||
if ($(this).is("input:text")) {
|
||||
$(this).val($(this).data("default"));
|
||||
} else if ($(this).is("input:password")) {
|
||||
$(this).val("");
|
||||
} else if ($(this).is("input:checkbox")) {
|
||||
$(this).prop("checked", $(this).data("default"));
|
||||
// if this checkbox is the parent input of a grouped-input
|
||||
if ($(this).hasClass("parent-input")) {
|
||||
var groupedInput = $(this).parent().parent().parent();
|
||||
updateGroupedInputVisibility(groupedInput);
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
// reinitializing select fields into the defaults
|
||||
$(operationDataWrapper + " select").each(
|
||||
function () {
|
||||
var defaultOption = $(this).data("default");
|
||||
$("option:eq(" + defaultOption + ")", this).prop("selected", "selected");
|
||||
}
|
||||
);
|
||||
// collapsing expanded-panes (upon the selection of html-select-options) if any
|
||||
$(operationDataWrapper + " .expanded").each(
|
||||
function () {
|
||||
if ($(this).hasClass("expanded")) {
|
||||
$(this).removeClass("expanded");
|
||||
}
|
||||
$(this).slideUp();
|
||||
}
|
||||
);
|
||||
// removing all entries of grid-input elements if exist
|
||||
$(operationDataWrapper + " .grouped-array-input").each(
|
||||
function () {
|
||||
var gridInputs = $(this).find("[data-add-form-clone]");
|
||||
if (gridInputs.length > 0) {
|
||||
gridInputs.remove();
|
||||
}
|
||||
var helpTexts = $(this).find("[data-help-text=add-form]");
|
||||
if (helpTexts.length > 0) {
|
||||
helpTexts.show();
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// adding support for cloning multiple profiles per feature with cloneable class definitions
|
||||
$(advanceOperations).on("click", ".multi-view.add.enabled", function () {
|
||||
// get a copy of .cloneable and create new .cloned div element
|
||||
var cloned = "<div class='cloned'><hr>" + $(".cloneable", $(this).parent().parent()).html() + "</div>";
|
||||
// append newly created .cloned div element to panel-body
|
||||
$(this).parent().parent().append(cloned);
|
||||
// enable remove action of newly cloned div element
|
||||
$(".cloned", $(this).parent().parent()).each(
|
||||
function () {
|
||||
if ($(".multi-view.remove", this).hasClass("disabled")) {
|
||||
$(".multi-view.remove", this).removeClass("disabled");
|
||||
}
|
||||
if (!$(".multi-view.remove", this).hasClass("enabled")) {
|
||||
$(".multi-view.remove", this).addClass("enabled");
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
$(advanceOperations).on("click", ".multi-view.remove.enabled", function () {
|
||||
$(this).parent().remove();
|
||||
});
|
||||
|
||||
// enabling or disabling grouped-input based on the status of a parent check-box
|
||||
$(advanceOperations).on("click", ".grouped-input", function () {
|
||||
updateGroupedInputVisibility(this);
|
||||
});
|
||||
|
||||
// add form entry click function for grid inputs
|
||||
$(advanceOperations).on("click", "[data-click-event=add-form]", function () {
|
||||
var addFormContainer = $("[data-add-form-container=" + $(this).attr("href") + "]");
|
||||
var clonedForm = $("[data-add-form=" + $(this).attr("href") + "]").clone().
|
||||
find("[data-add-form-element=clone]").attr("data-add-form-clone", $(this).attr("href"));
|
||||
|
||||
// adding class .child-input to capture text-input-array-values
|
||||
$("input, select", clonedForm).addClass("child-input");
|
||||
|
||||
$(addFormContainer).append(clonedForm);
|
||||
setId(addFormContainer);
|
||||
showHideHelpText(addFormContainer);
|
||||
});
|
||||
|
||||
// remove form entry click function for grid inputs
|
||||
$(advanceOperations).on("click", "[data-click-event=remove-form]", function () {
|
||||
var addFormContainer = $("[data-add-form-container=" + $(this).attr("href") + "]");
|
||||
|
||||
$(this).closest("[data-add-form-element=clone]").remove();
|
||||
setId(addFormContainer);
|
||||
showHideHelpText(addFormContainer);
|
||||
});
|
||||
|
||||
$(".wizard-stepper").click(function () {
|
||||
// button clicked here can be either a continue button or a back button.
|
||||
var currentStep = $(this).data("current");
|
||||
var validationIsRequired = $(this).data("validate");
|
||||
var wizardIsToBeContinued;
|
||||
|
||||
if (validationIsRequired) {
|
||||
wizardIsToBeContinued = validateStep[currentStep]();
|
||||
} else {
|
||||
wizardIsToBeContinued = true;
|
||||
}
|
||||
|
||||
if (wizardIsToBeContinued) {
|
||||
// When moving back and forth, following code segment will
|
||||
// remove if there are any visible error-messages.
|
||||
var errorMsgWrappers = ".alert.alert-danger";
|
||||
$(errorMsgWrappers).each(
|
||||
function () {
|
||||
if (!$(this).hasClass("hidden")) {
|
||||
$(this).addClass("hidden");
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
var nextStep = $(this).data("next");
|
||||
var isBackBtn = $(this).data("is-back-btn");
|
||||
|
||||
// if current button is a continuation...
|
||||
if (!isBackBtn) {
|
||||
// initiate stepForwardFrom[*] functions to gather form data.
|
||||
if (stepForwardFrom[currentStep]) {
|
||||
stepForwardFrom[currentStep](this);
|
||||
}
|
||||
} else {
|
||||
// initiate stepBackFrom[*] functions to rollback.
|
||||
if (stepBackFrom[currentStep]) {
|
||||
stepBackFrom[currentStep]();
|
||||
}
|
||||
}
|
||||
|
||||
// following step occurs only at the last stage of the wizard.
|
||||
if (!nextStep) {
|
||||
window.location.href = $(this).data("direct");
|
||||
}
|
||||
|
||||
// updating next wizard step as current.
|
||||
$(".itm-wiz").each(function () {
|
||||
var step = $(this).data("step");
|
||||
if (step == nextStep) {
|
||||
$(this).addClass("itm-wiz-current");
|
||||
} else {
|
||||
$(this).removeClass("itm-wiz-current");
|
||||
}
|
||||
});
|
||||
|
||||
// adding next update of wizard-steps.
|
||||
$("#" + nextStep + "-wizard-steps").html($(".wr-steps").html());
|
||||
|
||||
// hiding current section of the wizard and showing next section.
|
||||
$("." + currentStep).addClass("hidden");
|
||||
$("." + nextStep).removeClass("hidden");
|
||||
}
|
||||
});
|
||||
});
|
@ -0,0 +1,312 @@
|
||||
/*Copyright (C) 2015 by Marijn Haverbeke <marijnh@gmail.com> and others
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.*/
|
||||
|
||||
/*Annotations, Annotation Names and relevant tokens*/
|
||||
var ANNOTATION_IMPORT = "Import";
|
||||
var ANNOTATION_EXPORT = "Export";
|
||||
|
||||
var ANNOTATION_TOKEN_AT = "@";
|
||||
var ANNOTATION_TOKEN_OPENING_BRACKET = "(";
|
||||
var ANNOTATION_TOKEN_CLOSING_BRACKET = ")";
|
||||
|
||||
var REGEX_LINE_STARTING_WITH_PLAN = /^@Plan.*/g;
|
||||
var REGEX_LINE_STARTING_WITH_SINGLE_LINE_COMMENT = /^--.*/g;
|
||||
var REGEX_LINE_STARTING_WITH_MULTI_LINE_COMMENT = /^\/\*.*\*\//g;
|
||||
var REGEX_LINE_STARTING_WITH_IMPORT_STATEMENT = /^@Import.*/g;
|
||||
|
||||
var SIDDHI_STATEMENT_DELIMETER = ";";
|
||||
var SIDDHI_LINE_BREAK = "\n";
|
||||
var SIDDHI_LINE_BREAK_CHARACTER = '\n';
|
||||
var SIDDHI_SINGLE_QUOTE = "'";
|
||||
var SIDDHI_SPACE_LITERAL = " ";
|
||||
|
||||
var SIDDHI_LITERAL_DEFINE_STREAM = "define stream";
|
||||
|
||||
var MIME_TYPE_SIDDHI_QL = "text/siddhi-ql";
|
||||
|
||||
|
||||
CodeMirror.defineMode("sql", function (config, parserConfig) {
|
||||
"use strict";
|
||||
|
||||
var client = parserConfig.client || {},
|
||||
atoms = parserConfig.atoms || {"false":true, "true":true, "null":true},
|
||||
builtin = parserConfig.builtin || {},
|
||||
keywords = parserConfig.keywords || {},
|
||||
operatorChars = parserConfig.operatorChars || /^[*+\-%<>!=&|~^]/,
|
||||
support = parserConfig.support || {},
|
||||
hooks = parserConfig.hooks || {},
|
||||
dateSQL = parserConfig.dateSQL || {"date":true, "time":true, "timestamp":true};
|
||||
|
||||
function tokenBase(stream, state) {
|
||||
var ch = stream.next();
|
||||
|
||||
// call hooks from the mime type
|
||||
if (hooks[ch]) {
|
||||
var result = hooks[ch](stream, state);
|
||||
if (result !== false) return result;
|
||||
}
|
||||
|
||||
if (ch.charCodeAt(0) > 47 && ch.charCodeAt(0) < 58) {
|
||||
// numbers
|
||||
// ref: http://dev.mysql.com/doc/refman/5.5/en/number-literals.html
|
||||
stream.match(/^[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?/);
|
||||
support.decimallessFloat == true && stream.eat('.');
|
||||
return "number";
|
||||
} else if (ch == "'" || (ch == '"' && support.doubleQuote)) {
|
||||
// strings
|
||||
// ref: http://dev.mysql.com/doc/refman/5.5/en/string-literals.html
|
||||
state.tokenize = tokenLiteral(ch);
|
||||
return state.tokenize(stream, state);
|
||||
} else if (/^[\(\),\;\[\]]/.test(ch)) {
|
||||
// no highlightning
|
||||
return null;
|
||||
} else if ((ch == "-" && stream.eat("-") && (!support.commentSpaceRequired || stream.eat(" ")))) {
|
||||
// 1-line comments
|
||||
// ref: https://kb.askmonty.org/en/comment-syntax/
|
||||
stream.skipToEnd();
|
||||
return "comment";
|
||||
} else if (ch == "/" && stream.eat("*")) {
|
||||
// multi-line comments
|
||||
// ref: https://kb.askmonty.org/en/comment-syntax/
|
||||
state.tokenize = tokenComment;
|
||||
return state.tokenize(stream, state);
|
||||
} else if (ch == ".") {
|
||||
// .1 for 0.1
|
||||
if (support.zerolessFloat == true && stream.match(/^(?:\d+(?:e[+-]?\d+)?)/i)) {
|
||||
return "number";
|
||||
}
|
||||
} else {
|
||||
stream.eatWhile(/^[_\-\w\d]/); /* Character '-' will also be eaten, to prevent the highlight happening in keywords being embedded in non-keyword strings. For example, 'all' in 'all-nonkeyword' */
|
||||
var word = stream.current().toLowerCase(); // Added toLowerCase() to highlight keywords in a case insensitive manner.
|
||||
// dates (standard SQL syntax)
|
||||
// ref: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-literals.html
|
||||
if (dateSQL.hasOwnProperty(word) && (stream.match(/^( )+'[^']*'/) || stream.match(/^( )+"[^"]*"/)))
|
||||
return "number";
|
||||
if (atoms.hasOwnProperty(word)) return "atom";
|
||||
if (builtin.hasOwnProperty(word)) return "builtin";
|
||||
if (keywords.hasOwnProperty(word)) return "keyword";
|
||||
if (client.hasOwnProperty(word)) return "string-2";
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// 'string', with char specified in quote escaped by '\'
|
||||
function tokenLiteral(quote) {
|
||||
return function (stream, state) {
|
||||
var escaped = false, ch;
|
||||
while ((ch = stream.next()) != null) {
|
||||
if (ch == quote && !escaped) {
|
||||
state.tokenize = tokenBase;
|
||||
break;
|
||||
}
|
||||
escaped = !escaped && ch == "\\";
|
||||
}
|
||||
return "string";
|
||||
};
|
||||
}
|
||||
|
||||
function tokenComment(stream, state) {
|
||||
while (true) {
|
||||
if (stream.skipTo("*")) {
|
||||
stream.next();
|
||||
if (stream.eat("/")) {
|
||||
state.tokenize = tokenBase;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
stream.skipToEnd();
|
||||
break;
|
||||
}
|
||||
}
|
||||
return "comment";
|
||||
}
|
||||
|
||||
function pushContext(stream, state, type) {
|
||||
state.context = {
|
||||
prev:state.context,
|
||||
indent:stream.indentation(),
|
||||
col:stream.column(),
|
||||
type:type
|
||||
};
|
||||
}
|
||||
|
||||
function popContext(state) {
|
||||
state.indent = state.context.indent;
|
||||
state.context = state.context.prev;
|
||||
}
|
||||
|
||||
return {
|
||||
startState:function () {
|
||||
return {tokenize:tokenBase, context:null};
|
||||
},
|
||||
|
||||
token:function (stream, state) {
|
||||
if (stream.sol()) {
|
||||
if (state.context && state.context.align == null)
|
||||
state.context.align = false;
|
||||
}
|
||||
if (stream.eatSpace()) return null;
|
||||
|
||||
var style = state.tokenize(stream, state);
|
||||
if (style == "comment") return style;
|
||||
|
||||
if (state.context && state.context.align == null)
|
||||
state.context.align = true;
|
||||
|
||||
var tok = stream.current();
|
||||
if (tok == "(")
|
||||
pushContext(stream, state, ")");
|
||||
else if (tok == "[")
|
||||
pushContext(stream, state, "]");
|
||||
else if (state.context && state.context.type == tok)
|
||||
popContext(state);
|
||||
return style;
|
||||
},
|
||||
|
||||
indent:function (state, textAfter) {
|
||||
var cx = state.context;
|
||||
if (!cx) return CodeMirror.Pass;
|
||||
var closing = textAfter.charAt(0) == cx.type;
|
||||
if (cx.align) return cx.col + (closing ? 0 : 1);
|
||||
else return cx.indent + (closing ? 0 : config.indentUnit);
|
||||
},
|
||||
|
||||
blockCommentStart: "/*",
|
||||
blockCommentEnd: "*/",
|
||||
lineComment: "--"
|
||||
};
|
||||
});
|
||||
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
// `identifier`
|
||||
function hookIdentifier(stream) {
|
||||
// MySQL/MariaDB identifiers
|
||||
// ref: http://dev.mysql.com/doc/refman/5.6/en/identifier-qualifiers.html
|
||||
var ch;
|
||||
while ((ch = stream.next()) != null) {
|
||||
if (ch == "`" && !stream.eat("`")) return "variable-2";
|
||||
}
|
||||
stream.backUp(stream.current().length - 1);
|
||||
return stream.eatWhile(/\w/) ? "variable-2" : null;
|
||||
}
|
||||
|
||||
// variable token
|
||||
function hookVar(stream) {
|
||||
// variables
|
||||
// @@prefix.varName @varName
|
||||
// varName can be quoted with ` or ' or "
|
||||
// ref: http://dev.mysql.com/doc/refman/5.5/en/user-variables.html
|
||||
if (stream.eat("@")) {
|
||||
stream.match(/^session\./);
|
||||
stream.match(/^local\./);
|
||||
stream.match(/^global\./);
|
||||
}
|
||||
|
||||
if (stream.eat("'")) {
|
||||
stream.match(/^.*'/);
|
||||
return "variable-2";
|
||||
} else if (stream.eat('"')) {
|
||||
stream.match(/^.*"/);
|
||||
return "variable-2";
|
||||
} else if (stream.eat("`")) {
|
||||
stream.match(/^.*`/);
|
||||
return "variable-2";
|
||||
} else if (stream.match(/^[0-9a-zA-Z$\.\_]+/)) {
|
||||
return "variable-2";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
// short client keyword token
|
||||
function hookClient(stream) {
|
||||
// \N means NULL
|
||||
// ref: http://dev.mysql.com/doc/refman/5.5/en/null-values.html
|
||||
if (stream.eat("N")) {
|
||||
return "atom";
|
||||
}
|
||||
// \g, etc
|
||||
// ref: http://dev.mysql.com/doc/refman/5.5/en/mysql-commands.html
|
||||
return stream.match(/^[a-zA-Z.#!?]/) ? "variable-2" : null;
|
||||
}
|
||||
|
||||
// these keywords are used by all SQL dialects (however, a mode can still overwrite it)
|
||||
var sqlKeywordsWithoutSymbols = "all and as begin by contains define delete end events " +
|
||||
"every first for from full group having inner insert into join last " +
|
||||
"left not of on or outer output partition raw return right select snapshot stream table ";
|
||||
var sqlKeywords = ", : ? # ( ) " + sqlKeywordsWithoutSymbols;
|
||||
var builtIn = "bool double float int long object string ";
|
||||
var atoms = "false true null ";
|
||||
var dateSQL = "days hours milliseconds minutes months seconds ";
|
||||
var allSqlSuggestions = sqlKeywordsWithoutSymbols + builtIn + atoms + dateSQL;
|
||||
|
||||
// turn a space-separated list into an array
|
||||
function set(str) {
|
||||
var obj = {}, words = str.split(" ");
|
||||
for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
|
||||
return obj;
|
||||
}
|
||||
|
||||
// A generic SQL Mode. It's not a standard, it just try to support what is generally supported
|
||||
CodeMirror.defineMIME(MIME_TYPE_SIDDHI_QL, {
|
||||
name:"sql",
|
||||
keywords:set(sqlKeywords),
|
||||
builtin:set(builtIn),
|
||||
atoms:set(atoms),
|
||||
operatorChars:/^[*+%<>!=/]/,
|
||||
dateSQL:set(dateSQL),
|
||||
support:set("doubleQuote "),
|
||||
allSqlSuggestions:set(allSqlSuggestions)
|
||||
});
|
||||
}());
|
||||
|
||||
/*
|
||||
How Properties of Mime Types are used by SQL Mode
|
||||
=================================================
|
||||
|
||||
keywords:
|
||||
A list of keywords you want to be highlighted.
|
||||
functions:
|
||||
A list of function names you want to be highlighted.
|
||||
builtin:
|
||||
A list of builtin types you want to be highlighted (if you want types to be of class "builtin" instead of "keyword").
|
||||
operatorChars:
|
||||
All characters that must be handled as operators.
|
||||
client:
|
||||
Commands parsed and executed by the client (not the server).
|
||||
support:
|
||||
A list of supported syntaxes which are not common, but are supported by more than 1 DBMS.
|
||||
* ODBCdotTable: .tableName
|
||||
* zerolessFloat: .1
|
||||
* doubleQuote
|
||||
* nCharCast: N'string'
|
||||
* charsetCast: _utf8'string'
|
||||
* commentHash: use # char for comments
|
||||
* commentSlashSlash: use // for comments
|
||||
* commentSpaceRequired: require a space after -- for comments
|
||||
atoms:
|
||||
Keywords that must be highlighted as atoms,. Some DBMS's support more atoms than others:
|
||||
UNKNOWN, INFINITY, UNDERFLOW, NaN...
|
||||
dateSQL:
|
||||
Used for date/time SQL standard syntax, because not all DBMS's support same temporal types.
|
||||
*/
|
@ -0,0 +1,252 @@
|
||||
{{#zone "topCss"}}
|
||||
{{css "css/codemirror.css"}}
|
||||
{{/zone}}
|
||||
<span id="platform" class="hidden" data-platform="{{type.name}}" data-platform-id="{{type.id}}"></span>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="wr-steps hidden">
|
||||
<div class="col-md-3 col-xs-3">
|
||||
<div class="itm-wiz" data-step="policy-platform">
|
||||
<div class="wiz-no">1</div>
|
||||
<div class="wiz-lbl hidden-xs"><span>Select a platform</span></div>
|
||||
</div>
|
||||
<br class="c-both"/>
|
||||
</div>
|
||||
<div class="col-md-3 col-xs-3">
|
||||
<div class="itm-wiz itm-wiz-current" data-step="policy-profile">
|
||||
<div class="wiz-no">2</div>
|
||||
<div class="wiz-lbl hidden-xs"><span>Configure profile</span></div>
|
||||
</div>
|
||||
<br class="c-both"/>
|
||||
</div>
|
||||
<div class="col-md-3 col-xs-3">
|
||||
<div class="itm-wiz" data-step="policy-criteria">
|
||||
<div class="wiz-no">3</div>
|
||||
<div class="wiz-lbl hidden-xs"><span>Assign to groups</span></div>
|
||||
</div>
|
||||
<br class="c-both"/>
|
||||
</div>
|
||||
<div class="col-md-3 col-xs-3">
|
||||
<div class="itm-wiz" data-step="policy-naming">
|
||||
<div class="wiz-no">4</div>
|
||||
<div class="wiz-lbl hidden-xs"><span>Publish to devices</span></div>
|
||||
</div>
|
||||
<br class="c-both"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container col-centered wr-content policy-message hidden">
|
||||
<div class="wr-form">
|
||||
<h1 id="policy-message-page-wizard-title" class="page-sub-title">Policy creation is
|
||||
successful.</h1>
|
||||
<br>Please click <b>"Add Another Policy"</b>, if you wish to add another policy or
|
||||
click
|
||||
<b>"View policy list"</b> to complete the process and go back to the policy list.
|
||||
<hr>
|
||||
<button class="wr-btn wizard-stepper" data-current="policy-message"
|
||||
data-direct="{{@app.context}}/policies">
|
||||
View policy list
|
||||
</button>
|
||||
<a href="{{@app.context}}/policies/add-policy" class="cu-btn-inner">
|
||||
<span class="fw-stack">
|
||||
<i class="fw fw-ring fw-stack-2x"></i>
|
||||
<i class="fw fw-add fw-stack-1x"></i>
|
||||
</span>
|
||||
Add another policy
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container col-centered wr-content policy-naming hidden">
|
||||
<div class="wr-form">
|
||||
<h1 id="policy-naming-page-wizard-title" class="page-sub-title">ADD POLICY</h1>
|
||||
<hr>
|
||||
<div id="policy-naming-wizard-steps" class="row wr-wizard"></div>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h4>Step 4: Publish to devices</h4>
|
||||
<br>
|
||||
|
||||
<div id="policy-naming-main-error-msg" class="alert alert-danger hidden"
|
||||
role="alert">
|
||||
<i class="icon fw fw-error"></i><span></span>
|
||||
</div>
|
||||
<div>
|
||||
<label class="wr-input-label">
|
||||
Set a Name to your Policy *<br>
|
||||
( should be 1-to-30 characters long )
|
||||
</label>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<div class="cus-col-50">
|
||||
<input id="policy-name-input" class="form-control" type="text"
|
||||
value="" placeholder="[ Required field ]"/>
|
||||
</div>
|
||||
<br class="c-both"/>
|
||||
</div>
|
||||
<label class="wr-input-label">
|
||||
Add a description
|
||||
</label>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<div class="cus-col-50">
|
||||
<textarea id="policy-description-input" class="form-control"
|
||||
rows="10" placeholder="[ Optional field ]"></textarea>
|
||||
</div>
|
||||
<br class="c-both"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wr-input-control wr-btn-grp">
|
||||
<a href="javascript:void(0)" class="wr-btn wizard-stepper"
|
||||
data-is-back-btn="true" data-current="policy-naming"
|
||||
data-next="policy-criteria">
|
||||
Back
|
||||
</a>
|
||||
<a href="javascript:void(0)" class="wr-btn wizard-stepper"
|
||||
data-current="policy-naming-publish" data-next="policy-message"
|
||||
data-validate="true">
|
||||
Save & Publish
|
||||
</a>
|
||||
<a href="javascript:void(0)" class="wr-btn wizard-stepper"
|
||||
data-current="policy-naming" data-next="policy-message"
|
||||
data-validate="true">
|
||||
Save
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container col-centered wr-content policy-criteria hidden">
|
||||
<div class="wr-form">
|
||||
<h1 id="policy-criteria-page-wizard-title" class="page-sub-title">ADD POLICY</h1>
|
||||
<hr>
|
||||
<div id="policy-criteria-wizard-steps" class="row wr-wizard"></div>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h4>Step 3: Assign to groups</h4>
|
||||
<br>
|
||||
|
||||
<div>
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-control radio light">
|
||||
<input id="user-roles-radio-btn" type="radio"
|
||||
name="select-users-radio-btn" class="select-users-radio"
|
||||
checked/>
|
||||
<span class="helper"> Set user role(s)</span>
|
||||
</label>
|
||||
<label class="wr-input-control radio light" rel="assetfilter">
|
||||
<input id="users-radio-btn" type="radio"
|
||||
name="select-users-radio-btn"
|
||||
class="select-users-radio"/>
|
||||
<span class="helper"> Set user(s)</span>
|
||||
</label>
|
||||
</div>
|
||||
<div id="user-roles-select-field" class="select-users">
|
||||
<div class="wr-input-control">
|
||||
<div class="cus-col-50">
|
||||
<select id="user-roles-input" class="form-control select2"
|
||||
multiple="multiple">
|
||||
<option value="ANY" selected>ANY</option>
|
||||
{{#each roles}}
|
||||
<option>{{this}}</option>
|
||||
{{/each}}
|
||||
</select>
|
||||
</div>
|
||||
<br class="c-both"/>
|
||||
</div>
|
||||
</div>
|
||||
<div id="users-select-field" class="select-users">
|
||||
<div class="wr-input-control">
|
||||
<div class="cus-col-50">
|
||||
<select id="users-input" class="form-control select2"
|
||||
multiple="multiple">
|
||||
</select>
|
||||
</div>
|
||||
<br class="c-both"/>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<label class="wr-input-label" title="">
|
||||
Set an action upon non-compliance
|
||||
</label>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<div class="cus-col-50">
|
||||
<select id="action-input" class="form-control">
|
||||
<option data-action="enforce" selected>Enforce</option>
|
||||
<option data-action="warn">Warn</option>
|
||||
<option data-action="monitor">Monitor</option>
|
||||
</select>
|
||||
</div>
|
||||
<br class="c-both"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wr-input-control wr-btn-grp">
|
||||
<a href="javascript:void(0)" class="wr-btn wizard-stepper"
|
||||
data-is-back-btn="true" data-current="policy-criteria"
|
||||
data-next="policy-profile">
|
||||
Back
|
||||
</a>
|
||||
<a href="javascript:void(0)" class="wr-btn wizard-stepper"
|
||||
data-current="policy-criteria" data-next="policy-naming"
|
||||
data-validate="false">
|
||||
Continue
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container col-centered wr-content policy-profile">
|
||||
<div class="wr-form">
|
||||
<h1 id="policy-profile-page-wizard-title" class="page-sub-title">ADD POLICY</h1>
|
||||
<hr>
|
||||
<div id="policy-profile-wizard-steps" class="row wr-wizard"></div>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h4>Step 2: Configure profile</h4>
|
||||
<br>
|
||||
|
||||
<label class="wr-input-label">
|
||||
Set device specific configuration instructions
|
||||
</label>
|
||||
<div class="wr-advance-operations">
|
||||
<div class="wr-input-control">
|
||||
<div class="cus-col-100">
|
||||
<textarea id="policy-definition-input" placeholder="Enter the policy"
|
||||
style="width: 100%;" required></textarea>
|
||||
</div>
|
||||
<br class="c-both"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wr-input-control wr-btn-grp">
|
||||
<a href="{{@app.context}}/policies/add-policy"
|
||||
class="wr-btn wizard-stepper" data-is-back-btn="true"
|
||||
data-current="policy-profile" data-next="policy-platform">
|
||||
Back
|
||||
</a>
|
||||
<a href="javascript:void(0)" class="wr-btn wizard-stepper"
|
||||
data-current="policy-profile" data-next="policy-criteria"
|
||||
data-validate="true">
|
||||
Continue
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- content -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{{#zone "bottomJs"}}
|
||||
{{js "js/codemirror.js"}}
|
||||
{{js "js/sql.js"}}
|
||||
{{js "js/policy-create.js"}}
|
||||
{{/zone}}
|
@ -0,0 +1,19 @@
|
||||
function onRequest(context) {
|
||||
var userModule = require("/app/modules/user.js")["userModule"];
|
||||
var utility = require('/app/modules/utility.js').utility;
|
||||
var response = userModule.getRoles();
|
||||
var wizardPage = {};
|
||||
if (response["status"] == "success") {
|
||||
wizardPage["roles"] = response["content"];
|
||||
}
|
||||
var deviceType = context.uriParams.deviceType;
|
||||
var typesListResponse = userModule.getPlatforms();
|
||||
if (typesListResponse["status"] == "success") {
|
||||
for (var type in typesListResponse["content"]) {
|
||||
if (deviceType == typesListResponse["content"][type]["name"]){
|
||||
wizardPage["type"] = typesListResponse["content"][type];
|
||||
}
|
||||
}
|
||||
}
|
||||
return wizardPage;
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"version" : "1.0.0"
|
||||
}
|
@ -0,0 +1 @@
|
||||
{{unit "iot.unit.policy.edit"}}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"version": "1.0.0"
|
||||
}
|
@ -0,0 +1 @@
|
||||
{{unit "iot.unit.policy.view"}}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"version": "1.0.0"
|
||||
}
|
@ -0,0 +1 @@
|
||||
{{unit "iot.unit.policy.wizard"}}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"version": "1.0.0"
|
||||
}
|
@ -0,0 +1 @@
|
||||
{{unit "iot.unit.policy.edit"}}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"version": "1.0.0"
|
||||
}
|
@ -0,0 +1 @@
|
||||
{{unit "iot.unit.policy.view"}}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"version": "1.0.0"
|
||||
}
|
@ -0,0 +1 @@
|
||||
{{unit "iot.unit.policy.wizard"}}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"version": "1.0.0"
|
||||
}
|
@ -0,0 +1 @@
|
||||
{{unit "mdm.unit.policy.edit"}}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"version": "1.0.0"
|
||||
}
|
@ -0,0 +1 @@
|
||||
{{unit "mdm.unit.policy.view"}}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"version": "1.0.0"
|
||||
}
|
@ -0,0 +1 @@
|
||||
{{unit "mdm.unit.policy.wizard"}}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"version": "1.0.0"
|
||||
}
|
@ -0,0 +1,219 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="wr-steps hidden">
|
||||
<div class="col-md-3 col-xs-3">
|
||||
<div class="itm-wiz itm-wiz-current" data-step="policy-profile"><div class="wiz-no">1</div><div class="wiz-lbl hidden-xs"><span>Edit current profile</span></div></div>
|
||||
<br class="c-both" />
|
||||
</div>
|
||||
<div class="col-md-3 col-xs-3">
|
||||
<div class="itm-wiz" data-step="policy-criteria"><div class="wiz-no">2</div><div class="wiz-lbl hidden-xs"><span>Edit assignment groups</span></div></div>
|
||||
<br class="c-both" />
|
||||
</div>
|
||||
<div class="col-md-3 col-xs-3">
|
||||
<div class="itm-wiz" data-step="policy-naming"><div class="wiz-no">3</div><div class="wiz-lbl hidden-xs"><span>Republish to devices</span></div></div>
|
||||
<br class="c-both" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container col-centered wr-content policy-message hidden">
|
||||
<div class="wr-form">
|
||||
<h1 id="policy-message-page-wizard-title" class="page-sub-title">Policy is successfully re-configured.</h1>
|
||||
<br>Please click <b>"Add Another Policy"</b>, if you wish to add another policy or click
|
||||
<b>"View policy list"</b> to complete the process and go back to the policy list.
|
||||
<hr>
|
||||
<button class="wr-btn wizard-stepper" data-current="policy-message"
|
||||
data-direct="{{@app.context}}/policies/">
|
||||
View policy list
|
||||
</button>
|
||||
<a href="@{{@app.context}}/policies/add-policy" class="cu-btn-inner">
|
||||
<span class="fw-stack">
|
||||
<i class="fw fw-ring fw-stack-2x"></i>
|
||||
<i class="fw fw-add fw-stack-1x"></i>
|
||||
</span>
|
||||
Add another policy
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container col-centered wr-content policy-naming hidden">
|
||||
<div class="wr-form">
|
||||
<h1 id="policy-naming-page-wizard-title" class="page-sub-title">EDIT POLICY</h1>
|
||||
<hr>
|
||||
<div id="policy-naming-wizard-steps" class="row wr-wizard"></div>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h4>Step 3: Republish to devices</h4>
|
||||
<br>
|
||||
<div id="policy-naming-main-error-msg" class="alert alert-danger hidden" role="alert">
|
||||
<i class="icon fw fw-error"></i><span></span>
|
||||
</div>
|
||||
<div>
|
||||
<label class="wr-input-label">
|
||||
Set a name * to your policy<br>
|
||||
( should be 1-to-30 characters long )
|
||||
</label>
|
||||
<div class="wr-input-control">
|
||||
<div class="cus-col-50">
|
||||
<input id="policy-name-input" class="form-control" type="text" value="" placeholder="[ Required field ]"/>
|
||||
</div>
|
||||
<br class="c-both" />
|
||||
</div>
|
||||
<label class="wr-input-label">
|
||||
Add a description
|
||||
</label>
|
||||
<div class="wr-input-control">
|
||||
<div class="cus-col-50">
|
||||
<textarea id="policy-description-input" class="form-control" rows="10" placeholder="[ Optional field ]"></textarea>
|
||||
</div>
|
||||
<br class="c-both" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="wr-input-control wr-btn-grp">
|
||||
<a href="#" class="wr-btn wizard-stepper" data-is-back-btn="true" data-current="policy-naming" data-next="policy-criteria">
|
||||
Back
|
||||
</a>
|
||||
<a href="#" class="wr-btn wizard-stepper" data-current="policy-naming-publish" data-next="policy-message" data-validate="true">
|
||||
Save & Publish
|
||||
</a>
|
||||
<a href="#" class="wr-btn wizard-stepper" data-current="policy-naming" data-next="policy-message" data-validate="true">
|
||||
Save
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container col-centered wr-content policy-criteria hidden">
|
||||
<div class="wr-form">
|
||||
<h1 id="policy-criteria-page-wizard-title" class="page-sub-title">EDIT POLICY</h1>
|
||||
<hr>
|
||||
<div id="policy-criteria-wizard-steps" class="row wr-wizard"></div>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h4>Step 2: Edit assignment groups</h4>
|
||||
<br>
|
||||
<div>
|
||||
<label class="wr-input-label">
|
||||
Set device ownership type
|
||||
</label>
|
||||
<div class="wr-input-control">
|
||||
<div class="cus-col-50">
|
||||
<select id="ownership-input" class="form-control">
|
||||
<option value="ANY" selected>ANY</option>
|
||||
<option value="BYOD">BYOD (Bring Your Own Device) </option>
|
||||
<option value="COPE">COPE (Corporate-Owned, Personally Enabled)</option>
|
||||
</select>
|
||||
</div>
|
||||
<br class="c-both" />
|
||||
</div>
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-control radio light">
|
||||
<input id="user-roles-radio-btn" type="radio" name="select-users-radio-btn" class="select-users-radio" checked/>
|
||||
<span class="helper"> Set user role(s)</span>
|
||||
</label>
|
||||
<label class="wr-input-control radio light" rel="assetfilter">
|
||||
<input id="users-radio-btn" type="radio" name="select-users-radio-btn" class="select-users-radio" />
|
||||
<span class="helper"> Set user(s)</span>
|
||||
</label>
|
||||
</div>
|
||||
<div id="user-roles-select-field" class="select-users">
|
||||
<div class="wr-input-control">
|
||||
<div class="cus-col-50">
|
||||
<select id="user-roles-input" class="form-control select2" multiple="multiple">
|
||||
<option value="ANY" selected>ANY</option>
|
||||
{{#each roles}}
|
||||
<option>{{this}}</option>
|
||||
{{/each}}
|
||||
</select>
|
||||
</div>
|
||||
<br class="c-both" />
|
||||
</div>
|
||||
</div>
|
||||
<div id="users-select-field" class="select-users">
|
||||
<div class="wr-input-control">
|
||||
<div class="cus-col-50">
|
||||
<select id="users-input" class="form-control select2" multiple="multiple">
|
||||
<option value="ANY" selected>ANY</option>
|
||||
</select>
|
||||
</div>
|
||||
<br class="c-both" />
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<label class="wr-input-label" title="">
|
||||
Set an action upon non-compliance
|
||||
</label>
|
||||
<div class="wr-input-control">
|
||||
<div class="cus-col-50">
|
||||
<select id="action-input" class="form-control">
|
||||
<option value="enforce" data-action="enforce" selected>Enforce</option>
|
||||
<option value="warn" data-action="warn">Warn</option>
|
||||
<option value="monitor" data-action="monitor">Monitor</option>
|
||||
</select>
|
||||
</div>
|
||||
<br class="c-both" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="wr-input-control wr-btn-grp">
|
||||
<a href="#" class="wr-btn wizard-stepper" data-is-back-btn="true" data-current="policy-criteria" data-next="policy-profile">
|
||||
Back
|
||||
</a>
|
||||
<a href="#" class="wr-btn wizard-stepper" data-current="policy-criteria" data-next="policy-naming" data-validate="false">
|
||||
Continue
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container col-centered wr-content policy-profile">
|
||||
<div class="wr-form">
|
||||
<h1 id="policy-profile-page-wizard-title" class="page-sub-title">EDIT POLICY</h1>
|
||||
<hr>
|
||||
<div id="policy-profile-wizard-steps" class="row wr-wizard"></div>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h4>Step 1: Edit current profile</h4>
|
||||
<br>
|
||||
<div id="policy-profile-main-error-msg" class="alert alert-danger hidden" role="alert">
|
||||
<i class="icon fw fw-error"></i><span></span>
|
||||
</div>
|
||||
<div class="wr-advance-operations">
|
||||
<div class="wr-advance-operations-init">
|
||||
<br>
|
||||
|
||||
<i class="fw fw-settings fw-spin fw-2x"></i>
|
||||
|
||||
Loading platform features . . .
|
||||
<br>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wr-input-control wr-btn-grp">
|
||||
<a href="#" class="wr-btn wizard-stepper" data-current="policy-profile" data-next="policy-criteria" data-validate="true">
|
||||
Continue
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- content -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{{#zone "bottomJs"}}
|
||||
<script id="hidden-operations-ios" src="{{@unit.publicUri}}/templates/hidden-operations-ios.hbs" type="text/x-handlebars-template" ></script>
|
||||
<script id="hidden-operations-android" src="{{@unit.publicUri}}/templates/hidden-operations-android.hbs" type="text/x-handlebars-template" ></script>
|
||||
<script id="hidden-operations-windows" src="{{@unit.publicUri}}/templates/hidden-operations-windows.hbs" type="text/x-handlebars-template" ></script>
|
||||
{{js "js/policy-create.js"}}
|
||||
{{/zone}}
|
||||
|
@ -0,0 +1,7 @@
|
||||
function onRequest(context) {
|
||||
var log = new Log("policy-view-edit-unit backend js");
|
||||
log.debug("calling policy-view-edit-unit");
|
||||
var userModule = require("/app/modules/user.js").userModule;
|
||||
context.roles = userModule.getRoles().content;
|
||||
return context;
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"version" : "1.0.0"
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,460 @@
|
||||
<div class="row no-gutter">
|
||||
<div class="wr-hidden-operations-nav col-lg-4">
|
||||
<a href="javascript:void(0)" onclick="showAdvanceOperation('passcode-policy', this)" class="selected">
|
||||
<span class="wr-hidden-operations-icon fw-stack">
|
||||
<i class="fw fw-key fw-stack-2x"></i>
|
||||
</span>
|
||||
Passcode Policy
|
||||
<span id="passcode-policy-configured" class="has-configured status-icon hidden"><i class="fw fw-ok"></i></span>
|
||||
<span id="passcode-policy-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></i></span>
|
||||
<span id="passcode-policy-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span>
|
||||
</a>
|
||||
<a href="javascript:void(0)" onclick="showAdvanceOperation('camera', this)">
|
||||
<span class="wr-hidden-operations-icon fw-stack">
|
||||
<i class="fw fw-block fw-stack-2x"></i>
|
||||
</span>
|
||||
Restrictions on Camera
|
||||
<span id="camera-configured" class="has-configured status-icon hidden"><i class="fw fw-ok"></i></span>
|
||||
<span id="camera-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></i></span>
|
||||
<span class="camera-error status-icon hidden"><i class="fw fw-error"></i></span>
|
||||
</a>
|
||||
<a href="javascript:void(0)" onclick="showAdvanceOperation('encrypt-storage', this)">
|
||||
<span class="wr-hidden-operations-icon fw-stack">
|
||||
<i class="fw fw-security fw-stack-2x"></i>
|
||||
</span>
|
||||
Encryption Settings
|
||||
<span id="encrypt-storage-configured" class="has-configured status-icon hidden"><i class="fw fw-ok"></i></span>
|
||||
<span id="encrypt-storage-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></i></span>
|
||||
<span id="encrypt-storage-error" class="encryption-error status-icon hidden"><i class="fw fw-error"></i></span>
|
||||
</a>
|
||||
<a href="javascript:void(0)" onclick="showAdvanceOperation('wifi', this)">
|
||||
<span class="wr-hidden-operations-icon fw-stack">
|
||||
<i class="fw fw-wifi fw-stack-2x"></i>
|
||||
</span>
|
||||
Wi-Fi Settings
|
||||
<span id="wifi-configured" class="has-configured status-icon hidden"><i class="fw fw-ok"></i></span>
|
||||
<span id="wifi-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></i></span>
|
||||
<span id="wifi-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span>
|
||||
</a>
|
||||
<!--<a href="javascript:void(0)" onclick="showAdvanceOperation('install-apps', this)">-->
|
||||
<!--<span class="wr-hidden-operations-icon fw-stack">-->
|
||||
<!--<i class="fw fw-application fw-stack-2x"></i>-->
|
||||
<!--</span>-->
|
||||
<!--App Installations-->
|
||||
<!--</a>-->
|
||||
<!--<a href="javascript:void(0)" onclick="showAdvanceOperation('blacklist-apps', this)">-->
|
||||
<!--<span class="wr-hidden-operations-icon fw-stack">-->
|
||||
<!--<i class="fw fw-block fw-stack-2x"></i>-->
|
||||
<!--</span>-->
|
||||
<!--App Blacklisting-->
|
||||
<!--</a>-->
|
||||
<!--<a href="javascript:void(0)" onclick="showAdvanceOperation('web-clips', this)">-->
|
||||
<!--<span class="wr-hidden-operations-icon fw-stack">-->
|
||||
<!--<i class="fw fw-website fw-stack-2x"></i>-->
|
||||
<!--</span>-->
|
||||
<!--Web clips-->
|
||||
<!--</a>-->
|
||||
</div>
|
||||
|
||||
<div class="wr-hidden-operations-content col-lg-8">
|
||||
<!-- passcode-policy -->
|
||||
<div class="wr-hidden-operation" data-operation="passcode-policy" style="display: block">
|
||||
<div class="panel panel-default operation-data" data-operation="passcode-policy" data-operation-code="PASSCODE_POLICY">
|
||||
<div id="passcode-policy-heading" class="panel-heading" role="tab">
|
||||
<h2 class="sub-title panel-title">
|
||||
Passcode Policy
|
||||
<label id="passcode-policy-lbl" class="wr-input-control switch" data-toggle="collapse" data-target="#passcode-policy-body">
|
||||
<input type="checkbox" />
|
||||
<span class="helper"></span>
|
||||
<span class="text"></span>
|
||||
</label>
|
||||
<hr>
|
||||
<div class="panel-title-description">
|
||||
This configuration can be used to set a passcode policy to an Android Device.
|
||||
Once this configuration profile is installed on a device, corresponding users will not be able
|
||||
to modify these settings on their devices.
|
||||
</div>
|
||||
</h2>
|
||||
</div>
|
||||
<div id="passcode-policy-body" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="passcode-policy-body">
|
||||
|
||||
<div id="passcode-policy-feature-error-msg" class="alert alert-danger hidden" role="alert">
|
||||
<i class="icon fw fw-error"></i><span></span>
|
||||
</div>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-control checkbox">
|
||||
<input id="passcode-policy-allow-simple" type="checkbox" class="form-control operationDataKeys" data-key="passcodePolicyAllowSimple" checked="checked" />
|
||||
<span class="helper" title="Permit the use of repeating, ascending and descending character sequences">
|
||||
Allow simple value
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-control checkbox">
|
||||
<input id="passcode-policy-require-alphanumeric" type="checkbox" class="form-control operationDataKeys" data-key="passcodePolicyRequireAlphanumeric" checked="checked" />
|
||||
<span class="helper" title="Require passcode to contain both letters and numbers">
|
||||
Require alphanumeric value
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-label" for="passcode-policy-min-length">
|
||||
Minimum passcode length
|
||||
<span class="helper" title="Minimum number of characters allowed in a passcode">
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
<select id="passcode-policy-min-length" class="form-control operationDataKeys" data-key="passcodePolicyMinLength" data-default="0">
|
||||
<option value="" selected="selected">
|
||||
None
|
||||
</option>
|
||||
<option value="1">01</option>
|
||||
<option value="2">02</option>
|
||||
<option value="3">03</option>
|
||||
<option value="4">04</option>
|
||||
<option value="5">05</option>
|
||||
<option value="6">06</option>
|
||||
<option value="7">07</option>
|
||||
<option value="8">08</option>
|
||||
<option value="9">09</option>
|
||||
<option value="10">10</option>
|
||||
<option value="11">11</option>
|
||||
<option value="12">12</option>
|
||||
<option value="13">13</option>
|
||||
<option value="14">14</option>
|
||||
<option value="15">15</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-label" for="passcode-policy-min-complex-chars">
|
||||
Minimum number of complex characters
|
||||
<span class="helper" title="Minimum number of complex or non-alphanumeric characters allowed in a passcode">
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
<select id="passcode-policy-min-complex-chars" class="form-control operationDataKeys" data-key="passcodePolicyMinComplexChars" data-default="0">
|
||||
<option value="" selected="selected">
|
||||
None
|
||||
</option>
|
||||
<option value="1">01</option>
|
||||
<option value="2">02</option>
|
||||
<option value="3">03</option>
|
||||
<option value="4">04</option>
|
||||
<option value="5">05</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-label" for="passcode-policy-max-passcode-age-in-days">
|
||||
Maximum passcode age in days
|
||||
<span class="helper" title="Number of days after which a passcode must be changed">
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
<br>
|
||||
( Should be in between 1-to-730 days or none )
|
||||
</label>
|
||||
<input id="passcode-policy-max-passcode-age-in-days" type="text" class="form-control operationDataKeys" data-key="passcodePolicyMaxPasscodeAgeInDays" maxlength="3" placeholder="[ Requires Number Input ]">
|
||||
</div>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-label" for="passcode-policy-passcode-history">
|
||||
Passcode history
|
||||
<span class="helper" title="Number of consequent unique passcodes to be used before reuse">
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
<br>
|
||||
( Should be in between 1-to-50 passcodes or none )
|
||||
</label>
|
||||
<input id="passcode-policy-passcode-history" type="text" class="form-control operationDataKeys" data-key="passcodePolicyPasscodeHistory" maxlength="2" placeholder="[ Requires Number Input ]">
|
||||
</div>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-label" for="passcodePolicyMaxFailedAttempts">
|
||||
Maximum number of failed attempts
|
||||
<span class="helper" title="Maximum number of passcode entry attempts allowed before all data on a device will be erased">
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
<select id="passcode-policy-max-failed-attempts" class="form-control operationDataKeys" data-key="passcodePolicyMaxFailedAttempts" data-default="0">
|
||||
<option value="" selected="selected">
|
||||
None
|
||||
</option>
|
||||
<option value="3">03</option>
|
||||
<option value="4">04</option>
|
||||
<option value="5">05</option>
|
||||
<option value="6">06</option>
|
||||
<option value="7">07</option>
|
||||
<option value="8">08</option>
|
||||
<option value="9">09</option>
|
||||
<option value="10">10</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /passcode-policy -->
|
||||
|
||||
<!-- camera -->
|
||||
<div class="wr-hidden-operation" data-operation="camera">
|
||||
<div class="panel panel-default operation-data" data-operation="camera" data-operation-code="CAMERA">
|
||||
<div id="camera-heading" class="panel-heading" role="tab">
|
||||
<h2 class="sub-title panel-title">
|
||||
Restrictions on Camera
|
||||
<label class="wr-input-control switch" data-toggle="collapse" data-target="#camera-body">
|
||||
<input type="checkbox" />
|
||||
<span class="helper"></span>
|
||||
<span class="text"></span>
|
||||
</label>
|
||||
<hr>
|
||||
<div class="panel-title-description">
|
||||
This configuration can be used to restrict the usage of camera on an Android device together with all the applications using the camera.
|
||||
Once this configuration profile is installed on a device, corresponding users will not be able
|
||||
to modify these settings on their devices.
|
||||
</div>
|
||||
</h2>
|
||||
</div>
|
||||
<div id="camera-body" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="camera-body">
|
||||
<div id="camera-feature-error-msg" class="alert alert-danger hidden" role="alert">
|
||||
<i class="icon fw fw-error"></i><span></span>
|
||||
</div>
|
||||
Un-check following checkbox in case you need to disable camera.
|
||||
<br>
|
||||
<br>
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-control checkbox">
|
||||
<input id="camera-enabled" type="checkbox" class="operationDataKeys" data-key="cameraEnabled" checked="checked" />
|
||||
<span class="helper" title="Having this checked would enable Usage of phone camera in the device.">
|
||||
Allow use of camera
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /camera -->
|
||||
|
||||
<!-- encrypt-storage -->
|
||||
<div class="wr-hidden-operation" data-operation="encrypt-storage">
|
||||
<div class="panel panel-default operation-data" data-operation="encrypt-storage" data-operation-code="ENCRYPT_STORAGE">
|
||||
<div id="encrypt-storage-heading" class="panel-heading" role="tab">
|
||||
<h2 class="sub-title panel-title">
|
||||
Encryption Settings
|
||||
<label class="wr-input-control switch" data-toggle="collapse" data-target="#encrypt-storage-body">
|
||||
<input type="checkbox" />
|
||||
<span class="helper"></span>
|
||||
<span class="text"></span>
|
||||
</label>
|
||||
<hr>
|
||||
<div class="panel-title-description">
|
||||
This configuration can be used to encrypt data on an Android device, when the device is locked and
|
||||
make it readable when the passcode is entered. Once this configuration profile is installed on a device,
|
||||
corresponding users will not be able to modify these settings on their devices.
|
||||
</div>
|
||||
</h2>
|
||||
</div>
|
||||
<div id="encrypt-storage-body" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="encrypt-storage-body">
|
||||
<div id="encrypt-storage-feature-error-msg" class="alert alert-danger hidden" role="alert">
|
||||
<i class="icon fw fw-error"></i><span></span>
|
||||
</div>
|
||||
Un-check following checkbox in case you need to disable storage-encryption.
|
||||
<br>
|
||||
<br>
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-control checkbox">
|
||||
<input id="encrypt-storage-enabled" type="checkbox" class="operationDataKeys" data-key="encryptStorageEnabled" checked="checked" />
|
||||
<span class="helper" title="Having this checked would enable Storage-encryption in the device">
|
||||
Enable storage-encryption
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /encrypt-storage -->
|
||||
|
||||
<!-- wi-fi -->
|
||||
<div class="wr-hidden-operation" data-operation="wifi">
|
||||
<div class="panel panel-default operation-data" data-operation="wifi" data-operation-code="WIFI">
|
||||
<div id="wifi-heading" class="panel-heading" role="tab">
|
||||
<h2 class="sub-title panel-title">
|
||||
Wi-Fi Settings
|
||||
<label class="wr-input-control switch" data-toggle="collapse" data-target="#wifi-body">
|
||||
<input type="checkbox" />
|
||||
<span class="helper"></span>
|
||||
<span class="text"></span>
|
||||
</label>
|
||||
<hr>
|
||||
<div class="panel-title-description">
|
||||
This configurations can be used to configure Wi-Fi access on an Android device.
|
||||
Once this configuration profile is installed on a device, corresponding users will not be able
|
||||
to modify these settings on their devices.
|
||||
</div>
|
||||
</h2>
|
||||
</div>
|
||||
<div id="wifi-body" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="wifi-body">
|
||||
<!--<div class="cloneable">-->
|
||||
<!--<a href="#" class="multi-view add enabled">-->
|
||||
<!--<span class="icon fw-stack">-->
|
||||
<!--<i class="fw fw-add fw-stack-1x"></i>-->
|
||||
<!--<i class="fw fw-ring fw-stack-2x"></i>-->
|
||||
<!--</span>-->
|
||||
<!--</a>-->
|
||||
<!--<a href="#" class="multi-view remove disabled">-->
|
||||
<!--<span class="icon fw-stack">-->
|
||||
<!--<i class="fw fw-minus fw-stack-1x"></i>-->
|
||||
<!--<i class="fw fw-ring fw-stack-2x"></i>-->
|
||||
<!--</span>-->
|
||||
<!--</a>-->
|
||||
<!--Wi-Fi Setting :-->
|
||||
<!--<br>-->
|
||||
<!--<br>-->
|
||||
Please note that * sign represents required fields of data.
|
||||
<br>
|
||||
<br>
|
||||
<div id="wifi-feature-error-msg" class="alert alert-danger hidden" role="alert">
|
||||
<i class="icon fw fw-error"></i><span></span>
|
||||
</div>
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-label" for="wifi-ssid">
|
||||
Service Set Identifier (SSID) *
|
||||
<span class="helper" title="Identification of the wireless network to be configured.">
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
<br>
|
||||
( should be 1-to-30 characters long )
|
||||
</label>
|
||||
<input id="wifi-ssid" type="text" class="form-control operationDataKeys" data-key="wifiSSID" maxlength="100" placeholder="[ Required field ]"/>
|
||||
</div>
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-label" for="wifi-password">
|
||||
Password
|
||||
<span class="helper" title="Password for the wireless network.">
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
<input id="wifi-password" type="text" class="form-control operationDataKeys" data-key="wifiPassword" maxlength="100" placeholder="[ Optional field ]"/>
|
||||
</div>
|
||||
<!--</div>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /wi-fi -->
|
||||
|
||||
<!-- install-applications -->
|
||||
<!--<div class="wr-hidden-operation" data-operation="install-apps">-->
|
||||
<!--<div class="panel panel-default operation-data" data-operation="INSTALL_APPLICATION">-->
|
||||
<!--<div class="panel-heading" role="tab">-->
|
||||
<!--<h2 class="sub-title panel-title">-->
|
||||
<!--<br>-->
|
||||
<!-- App Installations-->
|
||||
<!--<label class="wr-input-control switch" data-toggle="collapse" data-target="#installApp">-->
|
||||
<!--<input type="checkbox" />-->
|
||||
<!--<span class="helper"></span>-->
|
||||
<!--<span class="text"></span>-->
|
||||
<!--</label>-->
|
||||
<!--<br>-->
|
||||
<!--<br>-->
|
||||
<!--</h2>-->
|
||||
<!--</div>-->
|
||||
<!--<div id="installApp" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="installApp">-->
|
||||
<!--<div id="install-app-feature-error-msg" class="alert alert-danger hidden" role="alert">-->
|
||||
<!--<i class="icon fw fw-error"></i><span></span>-->
|
||||
<!--</div>-->
|
||||
<!--<label class="wr-input-label" title="Application Identifier">App Identifier<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>-->
|
||||
|
||||
<!--<div class="wr-input-control">-->
|
||||
<!--<input type="text" class="form-control operationDataKeys" id="package-name" data-key="packageName" placeholder="Enter App Identifier"/>-->
|
||||
<!--</div>-->
|
||||
<!--<div class="wr-input-control">-->
|
||||
<!--<label class="wr-input-control dropdown">-->
|
||||
<!--<span class="helper" title="App Type">App Type<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></span>-->
|
||||
<!--<select class="form-control col-sm-8 operationDataKeys appTypesInput" id="type" data-key="type">-->
|
||||
<!--<option>Public</option>-->
|
||||
<!--<option>Enterprise</option>-->
|
||||
<!--</select>-->
|
||||
<!--</label>-->
|
||||
<!--</div>-->
|
||||
<!--<label class="wr-input-label" title="URL">URL<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>-->
|
||||
|
||||
<!--<div class="wr-input-control">-->
|
||||
<!--<input type="text" class="form-control operationDataKeys" id="url" data-key="url" placeholder="Enter URL"/>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!-- /install-applications -->
|
||||
|
||||
<!-- /uninstall-applications -->
|
||||
<!--<div class="wr-hidden-operation" data-operation="uninstall-apps">-->
|
||||
<!--<div class="panel panel-default operation-data" data-operation="UNINSTALL_APPLICATION">-->
|
||||
<!--<div class="panel-heading" role="tab">-->
|
||||
<!--<h2 class="sub-title panel-title">-->
|
||||
<!--<br>-->
|
||||
<!-- App Uninstallations-->
|
||||
<!--<label class="wr-input-control switch" data-toggle="collapse" data-target="#uninstallApp">-->
|
||||
<!--<input type="checkbox" />-->
|
||||
<!--<span class="helper"></span>-->
|
||||
<!--<span class="text"></span>-->
|
||||
<!--</label>-->
|
||||
<!--<br>-->
|
||||
<!--<br>-->
|
||||
<!--</h2>-->
|
||||
<!--</div>-->
|
||||
<!--<div id="uninstallApp" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="uninstallApp">-->
|
||||
<!--<div id="uninstall-app-feature-error-msg" class="alert alert-danger hidden" role="alert">-->
|
||||
<!--<i class="icon fw fw-error"></i><span></span>-->
|
||||
<!--</div>-->
|
||||
<!--<label class="wr-input-label" title="Application Identifier">App Identifier<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>-->
|
||||
<!--<!--span>Identification of the wireless network to connect to</span-->
|
||||
<!--<div class="wr-input-control">-->
|
||||
<!--<input type="text" class="form-control operationDataKeys" id="package-name" data-key="packageName" placeholder="Enter App Identifier"/>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!-- /uninstall-applications -->
|
||||
|
||||
<!-- /web-clips -->
|
||||
<!--<div class="wr-hidden-operation" data-operation="web-clips">-->
|
||||
<!--<div class="panel panel-default operation-data" data-operation="WEBCLIP">-->
|
||||
<!--<div class="panel-heading" role="tab">-->
|
||||
<!--<h2 class="sub-title panel-title">-->
|
||||
<!--<br>-->
|
||||
<!-- Web clips-->
|
||||
<!--<label class="wr-input-control switch" data-toggle="collapse" data-target="#installWebClip">-->
|
||||
<!--<input type="checkbox" />-->
|
||||
<!--<span class="helper"></span>-->
|
||||
<!--<span class="text"></span>-->
|
||||
<!--</label>-->
|
||||
<!--<br>-->
|
||||
<!--<br>-->
|
||||
<!--</h2>-->
|
||||
<!--</div>-->
|
||||
<!--<div id="installWebClip" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="installWebClip">-->
|
||||
<!--<div id="install-webclip-feature-error-msg" class="alert alert-danger hidden" role="alert">-->
|
||||
<!--<i class="icon fw fw-error"></i><span></span>-->
|
||||
<!--</div>-->
|
||||
<!--<label class="wr-input-label" title="Title of the web clip">Title<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>-->
|
||||
<!--<div class="wr-input-control">-->
|
||||
<!--<input type="text" class="form-control operationDataKeys" id="title" data-key="title" placeholder="Enter Title"/>-->
|
||||
<!--</div>-->
|
||||
<!--<label class="wr-input-label" title="URL">URL<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>-->
|
||||
<!--<div class="wr-input-control">-->
|
||||
<!--<input type="text" class="form-control operationDataKeys" id="url" data-key="url" placeholder="Enter URL"/>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!-- /web-clips -->
|
||||
</div>
|
||||
</div>
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,460 @@
|
||||
<div class="row no-gutter">
|
||||
<div class="wr-hidden-operations-nav col-lg-4">
|
||||
<a href="javascript:void(0)" onclick="showAdvanceOperation('passcode-policy', this)" class="selected">
|
||||
<span class="wr-hidden-operations-icon fw-stack">
|
||||
<i class="fw fw-key fw-stack-2x"></i>
|
||||
</span>
|
||||
Passcode Policy
|
||||
<span id="passcode-policy-configured" class="has-configured status-icon hidden"><i class="fw fw-ok"></i></span>
|
||||
<span id="passcode-policy-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></i></span>
|
||||
<span id="passcode-policy-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span>
|
||||
</a>
|
||||
<a href="javascript:void(0)" onclick="showAdvanceOperation('camera', this)">
|
||||
<span class="wr-hidden-operations-icon fw-stack">
|
||||
<i class="fw fw-block fw-stack-2x"></i>
|
||||
</span>
|
||||
Restrictions on Camera
|
||||
<span id="camera-configured" class="has-configured status-icon hidden"><i class="fw fw-ok"></i></span>
|
||||
<span id="camera-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></i></span>
|
||||
<span class="camera-error status-icon hidden"><i class="fw fw-error"></i></span>
|
||||
</a>
|
||||
<a href="javascript:void(0)" onclick="showAdvanceOperation('encrypt-storage', this)">
|
||||
<span class="wr-hidden-operations-icon fw-stack">
|
||||
<i class="fw fw-security fw-stack-2x"></i>
|
||||
</span>
|
||||
Encryption Settings
|
||||
<span id="encrypt-storage-configured" class="has-configured status-icon hidden"><i class="fw fw-ok"></i></span>
|
||||
<span id="encrypt-storage-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></i></span>
|
||||
<span id="encrypt-storage-error" class="encryption-error status-icon hidden"><i class="fw fw-error"></i></span>
|
||||
</a>
|
||||
<!--<a href="javascript:void(0)" onclick="showAdvanceOperation('wifi', this)">-->
|
||||
<!--<span class="wr-hidden-operations-icon fw-stack">-->
|
||||
<!--<i class="fw fw-wifi fw-stack-2x"></i>-->
|
||||
<!--</span>-->
|
||||
<!--Wi-Fi Settings-->
|
||||
<!--<span id="wifi-configured" class="has-configured status-icon hidden"><i class="fw fw-ok"></i></span>-->
|
||||
<!--<span id="wifi-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></i></span>-->
|
||||
<!--<span id="wifi-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span>-->
|
||||
<!--</a>-->
|
||||
<!--<a href="javascript:void(0)" onclick="showAdvanceOperation('install-apps', this)">-->
|
||||
<!--<span class="wr-hidden-operations-icon fw-stack">-->
|
||||
<!--<i class="fw fw-application fw-stack-2x"></i>-->
|
||||
<!--</span>-->
|
||||
<!--App Installations-->
|
||||
<!--</a>-->
|
||||
<!--<a href="javascript:void(0)" onclick="showAdvanceOperation('blacklist-apps', this)">-->
|
||||
<!--<span class="wr-hidden-operations-icon fw-stack">-->
|
||||
<!--<i class="fw fw-block fw-stack-2x"></i>-->
|
||||
<!--</span>-->
|
||||
<!--App Blacklisting-->
|
||||
<!--</a>-->
|
||||
<!--<a href="javascript:void(0)" onclick="showAdvanceOperation('web-clips', this)">-->
|
||||
<!--<span class="wr-hidden-operations-icon fw-stack">-->
|
||||
<!--<i class="fw fw-website fw-stack-2x"></i>-->
|
||||
<!--</span>-->
|
||||
<!--Web clips-->
|
||||
<!--</a>-->
|
||||
</div>
|
||||
|
||||
<div class="wr-hidden-operations-content col-lg-8">
|
||||
<!-- passcode-policy -->
|
||||
<div class="wr-hidden-operation" data-operation="passcode-policy" style="display: block">
|
||||
<div class="panel panel-default operation-data" data-operation="passcode-policy" data-operation-code="PASSCODE_POLICY">
|
||||
<div id="passcode-policy-heading" class="panel-heading" role="tab">
|
||||
<h2 class="sub-title panel-title">
|
||||
Passcode Policy
|
||||
<label id="passcode-policy-lbl" class="wr-input-control switch" data-toggle="collapse" data-target="#passcode-policy-body">
|
||||
<input type="checkbox" />
|
||||
<span class="helper"></span>
|
||||
<span class="text"></span>
|
||||
</label>
|
||||
<hr>
|
||||
<div class="panel-title-description">
|
||||
This configuration can be used to set a passcode policy to an Windows Device.
|
||||
Once this configuration profile is installed on a device, corresponding users will not be able
|
||||
to modify these settings on their devices.
|
||||
</div>
|
||||
</h2>
|
||||
</div>
|
||||
<div id="passcode-policy-body" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="passcode-policy-body">
|
||||
|
||||
<div id="passcode-policy-feature-error-msg" class="alert alert-danger hidden" role="alert">
|
||||
<i class="icon fw fw-error"></i><span></span>
|
||||
</div>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-control checkbox">
|
||||
<input id="passcode-policy-allow-simple" type="checkbox" class="form-control operationDataKeys" data-key="passcodePolicyAllowSimple" checked="checked" />
|
||||
<span class="helper" title="Permit the use of repeating, ascending and descending character sequences">
|
||||
Allow simple value
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-control checkbox">
|
||||
<input id="passcode-policy-require-alphanumeric" type="checkbox" class="form-control operationDataKeys" data-key="passcodePolicyRequireAlphanumeric" checked="checked" />
|
||||
<span class="helper" title="Require passcode to contain both letters and numbers">
|
||||
Require alphanumeric value
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-label" for="passcode-policy-min-length">
|
||||
Minimum passcode length
|
||||
<span class="helper" title="Minimum number of characters allowed in a passcode">
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
<select id="passcode-policy-min-length" class="form-control operationDataKeys" data-key="passcodePolicyMinLength" data-default="0">
|
||||
<option value="" selected="selected">
|
||||
None
|
||||
</option>
|
||||
<option value="1">01</option>
|
||||
<option value="2">02</option>
|
||||
<option value="3">03</option>
|
||||
<option value="4">04</option>
|
||||
<option value="5">05</option>
|
||||
<option value="6">06</option>
|
||||
<option value="7">07</option>
|
||||
<option value="8">08</option>
|
||||
<option value="9">09</option>
|
||||
<option value="10">10</option>
|
||||
<option value="11">11</option>
|
||||
<option value="12">12</option>
|
||||
<option value="13">13</option>
|
||||
<option value="14">14</option>
|
||||
<option value="15">15</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-label" for="passcode-policy-min-complex-chars">
|
||||
Minimum number of complex characters
|
||||
<span class="helper" title="Minimum number of complex or non-alphanumeric characters allowed in a passcode">
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
<select id="passcode-policy-min-complex-chars" class="form-control operationDataKeys" data-key="passcodePolicyMinComplexChars" data-default="0">
|
||||
<option value="" selected="selected">
|
||||
None
|
||||
</option>
|
||||
<option value="1">01</option>
|
||||
<option value="2">02</option>
|
||||
<option value="3">03</option>
|
||||
<option value="4">04</option>
|
||||
<option value="5">05</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-label" for="passcode-policy-max-passcode-age-in-days">
|
||||
Maximum passcode age in days
|
||||
<span class="helper" title="Number of days after which a passcode must be changed">
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
<br>
|
||||
( Should be in between 1-to-730 days or none )
|
||||
</label>
|
||||
<input id="passcode-policy-max-passcode-age-in-days" type="text" class="form-control operationDataKeys" data-key="passcodePolicyMaxPasscodeAgeInDays" maxlength="3" placeholder="[ Requires Number Input ]">
|
||||
</div>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-label" for="passcode-policy-passcode-history">
|
||||
Passcode history
|
||||
<span class="helper" title="Number of consequent unique passcodes to be used before reuse">
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
<br>
|
||||
( Should be in between 1-to-50 passcodes or none )
|
||||
</label>
|
||||
<input id="passcode-policy-passcode-history" type="text" class="form-control operationDataKeys" data-key="passcodePolicyPasscodeHistory" maxlength="2" placeholder="[ Requires Number Input ]">
|
||||
</div>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-label" for="passcodePolicyMaxFailedAttempts">
|
||||
Maximum number of failed attempts
|
||||
<span class="helper" title="Maximum number of passcode entry attempts allowed before all data on a device will be erased">
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
<select id="passcode-policy-max-failed-attempts" class="form-control operationDataKeys" data-key="passcodePolicyMaxFailedAttempts" data-default="0">
|
||||
<option value="" selected="selected">
|
||||
None
|
||||
</option>
|
||||
<option value="3">03</option>
|
||||
<option value="4">04</option>
|
||||
<option value="5">05</option>
|
||||
<option value="6">06</option>
|
||||
<option value="7">07</option>
|
||||
<option value="8">08</option>
|
||||
<option value="9">09</option>
|
||||
<option value="10">10</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /passcode-policy -->
|
||||
|
||||
<!-- camera -->
|
||||
<div class="wr-hidden-operation" data-operation="camera">
|
||||
<div class="panel panel-default operation-data" data-operation="camera" data-operation-code="CAMERA">
|
||||
<div id="camera-heading" class="panel-heading" role="tab">
|
||||
<h2 class="sub-title panel-title">
|
||||
Restrictions on Camera
|
||||
<label class="wr-input-control switch" data-toggle="collapse" data-target="#camera-body">
|
||||
<input type="checkbox" />
|
||||
<span class="helper"></span>
|
||||
<span class="text"></span>
|
||||
</label>
|
||||
<hr>
|
||||
<div class="panel-title-description">
|
||||
This configuration can be used to restrict the usage of camera on an Windows device together with all the applications using the camera.
|
||||
Once this configuration profile is installed on a device, corresponding users will not be able
|
||||
to modify these settings on their devices.
|
||||
</div>
|
||||
</h2>
|
||||
</div>
|
||||
<div id="camera-body" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="camera-body">
|
||||
<div id="camera-feature-error-msg" class="alert alert-danger hidden" role="alert">
|
||||
<i class="icon fw fw-error"></i><span></span>
|
||||
</div>
|
||||
Un-check following checkbox in case you need to disable camera.
|
||||
<br>
|
||||
<br>
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-control checkbox">
|
||||
<input id="camera-enabled" type="checkbox" class="operationDataKeys" data-key="cameraEnabled" checked="checked" />
|
||||
<span class="helper" title="Having this checked would enable Usage of phone camera in the device.">
|
||||
Allow use of camera
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /camera -->
|
||||
|
||||
<!-- encrypt-storage -->
|
||||
<div class="wr-hidden-operation" data-operation="encrypt-storage">
|
||||
<div class="panel panel-default operation-data" data-operation="encrypt-storage" data-operation-code="ENCRYPT_STORAGE">
|
||||
<div id="encrypt-storage-heading" class="panel-heading" role="tab">
|
||||
<h2 class="sub-title panel-title">
|
||||
Encryption Settings
|
||||
<label class="wr-input-control switch" data-toggle="collapse" data-target="#encrypt-storage-body">
|
||||
<input type="checkbox" />
|
||||
<span class="helper"></span>
|
||||
<span class="text"></span>
|
||||
</label>
|
||||
<hr>
|
||||
<div class="panel-title-description">
|
||||
This configuration can be used to encrypt data on an Windows device, when the device is locked and
|
||||
make it readable when the passcode is entered. Once this configuration profile is installed on a device,
|
||||
corresponding users will not be able to modify these settings on their devices.
|
||||
</div>
|
||||
</h2>
|
||||
</div>
|
||||
<div id="encrypt-storage-body" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="encrypt-storage-body">
|
||||
<div id="encrypt-storage-feature-error-msg" class="alert alert-danger hidden" role="alert">
|
||||
<i class="icon fw fw-error"></i><span></span>
|
||||
</div>
|
||||
Un-check following checkbox in case you need to disable storage-encryption.
|
||||
<br>
|
||||
<br>
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-control checkbox">
|
||||
<input id="encrypt-storage-enabled" type="checkbox" class="operationDataKeys" data-key="encryptStorageEnabled" checked="checked" />
|
||||
<span class="helper" title="Having this checked would enable Storage-encryption in the device">
|
||||
Enable storage-encryption
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /encrypt-storage -->
|
||||
|
||||
<!-- wi-fi -->
|
||||
<!--<div class="wr-hidden-operation" data-operation="wifi">-->
|
||||
<!--<div class="panel panel-default operation-data" data-operation="wifi" data-operation-code="WIFI">-->
|
||||
<!--<div id="wifi-heading" class="panel-heading" role="tab">-->
|
||||
<!--<h2 class="sub-title panel-title">-->
|
||||
<!--Wi-Fi Settings-->
|
||||
<!--<label class="wr-input-control switch" data-toggle="collapse" data-target="#wifi-body">-->
|
||||
<!--<input type="checkbox" />-->
|
||||
<!--<span class="helper"></span>-->
|
||||
<!--<span class="text"></span>-->
|
||||
<!--</label>-->
|
||||
<!--<hr>-->
|
||||
<!--<div class="panel-title-description">-->
|
||||
<!--This configurations can be used to configure Wi-Fi access on an Android device.-->
|
||||
<!--Once this configuration profile is installed on a device, corresponding users will not be able-->
|
||||
<!--to modify these settings on their devices.-->
|
||||
<!--</div>-->
|
||||
<!--</h2>-->
|
||||
<!--</div>-->
|
||||
<!--<div id="wifi-body" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="wifi-body">-->
|
||||
<!--<!–<div class="cloneable">–>-->
|
||||
<!--<!–<a href="#" class="multi-view add enabled">–>-->
|
||||
<!--<!–<span class="icon fw-stack">–>-->
|
||||
<!--<!–<i class="fw fw-add fw-stack-1x"></i>–>-->
|
||||
<!--<!–<i class="fw fw-ring fw-stack-2x"></i>–>-->
|
||||
<!--<!–</span>–>-->
|
||||
<!--<!–</a>–>-->
|
||||
<!--<!–<a href="#" class="multi-view remove disabled">–>-->
|
||||
<!--<!–<span class="icon fw-stack">–>-->
|
||||
<!--<!–<i class="fw fw-minus fw-stack-1x"></i>–>-->
|
||||
<!--<!–<i class="fw fw-ring fw-stack-2x"></i>–>-->
|
||||
<!--<!–</span>–>-->
|
||||
<!--<!–</a>–>-->
|
||||
<!--<!–Wi-Fi Setting :–>-->
|
||||
<!--<!–<br>–>-->
|
||||
<!--<!–<br>–>-->
|
||||
<!--Please note that * sign represents required fields of data.-->
|
||||
<!--<br>-->
|
||||
<!--<br>-->
|
||||
<!--<div id="wifi-feature-error-msg" class="alert alert-danger hidden" role="alert">-->
|
||||
<!--<i class="icon fw fw-error"></i><span></span>-->
|
||||
<!--</div>-->
|
||||
<!--<div class="wr-input-control">-->
|
||||
<!--<label class="wr-input-label" for="wifi-ssid">-->
|
||||
<!--Service Set Identifier (SSID) *-->
|
||||
<!--<span class="helper" title="Identification of the wireless network to be configured.">-->
|
||||
<!--<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>-->
|
||||
<!--</span>-->
|
||||
<!--<br>-->
|
||||
<!--( should be 1-to-30 characters long )-->
|
||||
<!--</label>-->
|
||||
<!--<input id="wifi-ssid" type="text" class="form-control operationDataKeys" data-key="wifiSSID" maxlength="100" placeholder="[ Required field ]"/>-->
|
||||
<!--</div>-->
|
||||
<!--<div class="wr-input-control">-->
|
||||
<!--<label class="wr-input-label" for="wifi-password">-->
|
||||
<!--Password-->
|
||||
<!--<span class="helper" title="Password for the wireless network.">-->
|
||||
<!--<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>-->
|
||||
<!--</span>-->
|
||||
<!--</label>-->
|
||||
<!--<input id="wifi-password" type="text" class="form-control operationDataKeys" data-key="wifiPassword" maxlength="100" placeholder="[ Optional field ]"/>-->
|
||||
<!--</div>-->
|
||||
<!--<!–</div>–>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!-- /wi-fi -->
|
||||
|
||||
<!-- install-applications -->
|
||||
<!--<div class="wr-hidden-operation" data-operation="install-apps">-->
|
||||
<!--<div class="panel panel-default operation-data" data-operation="INSTALL_APPLICATION">-->
|
||||
<!--<div class="panel-heading" role="tab">-->
|
||||
<!--<h2 class="sub-title panel-title">-->
|
||||
<!--<br>-->
|
||||
<!-- App Installations-->
|
||||
<!--<label class="wr-input-control switch" data-toggle="collapse" data-target="#installApp">-->
|
||||
<!--<input type="checkbox" />-->
|
||||
<!--<span class="helper"></span>-->
|
||||
<!--<span class="text"></span>-->
|
||||
<!--</label>-->
|
||||
<!--<br>-->
|
||||
<!--<br>-->
|
||||
<!--</h2>-->
|
||||
<!--</div>-->
|
||||
<!--<div id="installApp" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="installApp">-->
|
||||
<!--<div id="install-app-feature-error-msg" class="alert alert-danger hidden" role="alert">-->
|
||||
<!--<i class="icon fw fw-error"></i><span></span>-->
|
||||
<!--</div>-->
|
||||
<!--<label class="wr-input-label" title="Application Identifier">App Identifier<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>-->
|
||||
|
||||
<!--<div class="wr-input-control">-->
|
||||
<!--<input type="text" class="form-control operationDataKeys" id="package-name" data-key="packageName" placeholder="Enter App Identifier"/>-->
|
||||
<!--</div>-->
|
||||
<!--<div class="wr-input-control">-->
|
||||
<!--<label class="wr-input-control dropdown">-->
|
||||
<!--<span class="helper" title="App Type">App Type<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></span>-->
|
||||
<!--<select class="form-control col-sm-8 operationDataKeys appTypesInput" id="type" data-key="type">-->
|
||||
<!--<option>Public</option>-->
|
||||
<!--<option>Enterprise</option>-->
|
||||
<!--</select>-->
|
||||
<!--</label>-->
|
||||
<!--</div>-->
|
||||
<!--<label class="wr-input-label" title="URL">URL<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>-->
|
||||
|
||||
<!--<div class="wr-input-control">-->
|
||||
<!--<input type="text" class="form-control operationDataKeys" id="url" data-key="url" placeholder="Enter URL"/>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!-- /install-applications -->
|
||||
|
||||
<!-- /uninstall-applications -->
|
||||
<!--<div class="wr-hidden-operation" data-operation="uninstall-apps">-->
|
||||
<!--<div class="panel panel-default operation-data" data-operation="UNINSTALL_APPLICATION">-->
|
||||
<!--<div class="panel-heading" role="tab">-->
|
||||
<!--<h2 class="sub-title panel-title">-->
|
||||
<!--<br>-->
|
||||
<!-- App Uninstallations-->
|
||||
<!--<label class="wr-input-control switch" data-toggle="collapse" data-target="#uninstallApp">-->
|
||||
<!--<input type="checkbox" />-->
|
||||
<!--<span class="helper"></span>-->
|
||||
<!--<span class="text"></span>-->
|
||||
<!--</label>-->
|
||||
<!--<br>-->
|
||||
<!--<br>-->
|
||||
<!--</h2>-->
|
||||
<!--</div>-->
|
||||
<!--<div id="uninstallApp" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="uninstallApp">-->
|
||||
<!--<div id="uninstall-app-feature-error-msg" class="alert alert-danger hidden" role="alert">-->
|
||||
<!--<i class="icon fw fw-error"></i><span></span>-->
|
||||
<!--</div>-->
|
||||
<!--<label class="wr-input-label" title="Application Identifier">App Identifier<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>-->
|
||||
<!--<!--span>Identification of the wireless network to connect to</span-->
|
||||
<!--<div class="wr-input-control">-->
|
||||
<!--<input type="text" class="form-control operationDataKeys" id="package-name" data-key="packageName" placeholder="Enter App Identifier"/>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!-- /uninstall-applications -->
|
||||
|
||||
<!-- /web-clips -->
|
||||
<!--<div class="wr-hidden-operation" data-operation="web-clips">-->
|
||||
<!--<div class="panel panel-default operation-data" data-operation="WEBCLIP">-->
|
||||
<!--<div class="panel-heading" role="tab">-->
|
||||
<!--<h2 class="sub-title panel-title">-->
|
||||
<!--<br>-->
|
||||
<!-- Web clips-->
|
||||
<!--<label class="wr-input-control switch" data-toggle="collapse" data-target="#installWebClip">-->
|
||||
<!--<input type="checkbox" />-->
|
||||
<!--<span class="helper"></span>-->
|
||||
<!--<span class="text"></span>-->
|
||||
<!--</label>-->
|
||||
<!--<br>-->
|
||||
<!--<br>-->
|
||||
<!--</h2>-->
|
||||
<!--</div>-->
|
||||
<!--<div id="installWebClip" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="installWebClip">-->
|
||||
<!--<div id="install-webclip-feature-error-msg" class="alert alert-danger hidden" role="alert">-->
|
||||
<!--<i class="icon fw fw-error"></i><span></span>-->
|
||||
<!--</div>-->
|
||||
<!--<label class="wr-input-label" title="Title of the web clip">Title<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>-->
|
||||
<!--<div class="wr-input-control">-->
|
||||
<!--<input type="text" class="form-control operationDataKeys" id="title" data-key="title" placeholder="Enter Title"/>-->
|
||||
<!--</div>-->
|
||||
<!--<label class="wr-input-label" title="URL">URL<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>-->
|
||||
<!--<div class="wr-input-control">-->
|
||||
<!--<input type="text" class="form-control operationDataKeys" id="url" data-key="url" placeholder="Enter URL"/>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!-- /web-clips -->
|
||||
</div>
|
||||
</div>
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,442 @@
|
||||
<div class="row no-gutter">
|
||||
<div class="wr-hidden-operations-nav col-lg-4">
|
||||
<a href="javascript:void(0)" onclick="showAdvanceOperation('passcode-policy', this)" class="selected">
|
||||
<span class="wr-hidden-operations-icon fw-stack">
|
||||
<i class="fw fw-key fw-stack-2x"></i>
|
||||
</span>
|
||||
Passcode Policy
|
||||
<span id="passcode-policy-configured" class="has-configured status-icon hidden"><i class="fw fw-ok"></i></span>
|
||||
<span id="passcode-policy-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></i></span>
|
||||
<span id="passcode-policy-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span>
|
||||
</a>
|
||||
<a href="javascript:void(0)" onclick="showAdvanceOperation('camera', this)">
|
||||
<span class="wr-hidden-operations-icon fw-stack">
|
||||
<i class="fw fw-block fw-stack-2x"></i>
|
||||
</span>
|
||||
Restrictions on Camera
|
||||
<span id="camera-configured" class="has-configured status-icon hidden"><i class="fw fw-ok"></i></span>
|
||||
<span id="camera-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></i></span>
|
||||
<span class="camera-error status-icon hidden"><i class="fw fw-error"></i></span>
|
||||
</a>
|
||||
<a href="javascript:void(0)" onclick="showAdvanceOperation('encrypt-storage', this)">
|
||||
<span class="wr-hidden-operations-icon fw-stack">
|
||||
<i class="fw fw-security fw-stack-2x"></i>
|
||||
</span>
|
||||
Encryption Settings
|
||||
<span id="encrypt-storage-configured" class="has-configured status-icon hidden"><i class="fw fw-ok"></i></span>
|
||||
<span id="encrypt-storage-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></i></span>
|
||||
<span id="encrypt-storage-error" class="encryption-error status-icon hidden"><i class="fw fw-error"></i></span>
|
||||
</a>
|
||||
<a href="javascript:void(0)" onclick="showAdvanceOperation('wifi', this)">
|
||||
<span class="wr-hidden-operations-icon fw-stack">
|
||||
<i class="fw fw-wifi fw-stack-2x"></i>
|
||||
</span>
|
||||
Wi-Fi Settings
|
||||
<span id="wifi-configured" class="has-configured status-icon hidden"><i class="fw fw-ok"></i></span>
|
||||
<span id="wifi-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></i></span>
|
||||
<span id="wifi-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="wr-hidden-operations-content col-lg-8">
|
||||
<!-- passcode-policy -->
|
||||
<div class="wr-hidden-operation" data-operation="passcode-policy" style="display: block">
|
||||
<div class="panel panel-default operation-data" data-operation="passcode-policy" data-operation-code="PASSCODE_POLICY">
|
||||
<div id="passcode-policy-heading" class="panel-heading" role="tab">
|
||||
<h2 class="sub-title panel-title">
|
||||
Passcode Policy
|
||||
<label id="passcode-policy-lbl" class="wr-input-control switch hidden" data-toggle="collapse" data-target="#passcode-policy-body">
|
||||
<input type="checkbox" />
|
||||
<span class="helper"></span>
|
||||
<span class="text"></span>
|
||||
</label>
|
||||
<hr>
|
||||
<div class="panel-title-description">
|
||||
This configuration can be used to set a passcode policy to an Android Device.
|
||||
Once this configuration profile is installed on a device, corresponding users will not be able
|
||||
to modify these settings on their devices.
|
||||
</div>
|
||||
</h2>
|
||||
</div>
|
||||
<div id="passcode-policy-body" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="passcode-policy-body">
|
||||
|
||||
<div id="passcode-policy-feature-error-msg" class="alert alert-danger hidden" role="alert">
|
||||
<i class="icon fw fw-error"></i><span></span>
|
||||
</div>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-control checkbox">
|
||||
<input id="passcode-policy-allow-simple" type="checkbox" class="form-control operationDataKeys" data-key="passcodePolicyAllowSimple" checked="checked" disabled/>
|
||||
<span class="helper" title="Permit the use of repeating, ascending and descending character sequences">
|
||||
Allow simple value
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-control checkbox">
|
||||
<input id="passcode-policy-require-alphanumeric" type="checkbox" class="form-control operationDataKeys" data-key="passcodePolicyRequireAlphanumeric" checked="checked" disabled/>
|
||||
<span class="helper" title="Require passcode to contain both letters and numbers">
|
||||
Require alphanumeric value
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-label" for="passcode-policy-min-length">
|
||||
Minimum passcode length
|
||||
<span class="helper" title="Minimum number of characters allowed in a passcode">
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
<select id="passcode-policy-min-length" class="form-control operationDataKeys" data-key="passcodePolicyMinLength" data-default="0" disabled>
|
||||
<option value="" selected="selected">
|
||||
None
|
||||
</option>
|
||||
<option value="1">01</option>
|
||||
<option value="2">02</option>
|
||||
<option value="3">03</option>
|
||||
<option value="4">04</option>
|
||||
<option value="5">05</option>
|
||||
<option value="6">06</option>
|
||||
<option value="7">07</option>
|
||||
<option value="8">08</option>
|
||||
<option value="9">09</option>
|
||||
<option value="10">10</option>
|
||||
<option value="11">11</option>
|
||||
<option value="12">12</option>
|
||||
<option value="13">13</option>
|
||||
<option value="14">14</option>
|
||||
<option value="15">15</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-label" for="passcode-policy-min-complex-chars">
|
||||
Minimum number of complex characters
|
||||
<span class="helper" title="Minimum number of complex or non-alphanumeric characters allowed in a passcode">
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
<select id="passcode-policy-min-complex-chars" class="form-control operationDataKeys" data-key="passcodePolicyMinComplexChars" data-default="0" disabled>
|
||||
<option value="" selected="selected">
|
||||
None
|
||||
</option>
|
||||
<option value="1">01</option>
|
||||
<option value="2">02</option>
|
||||
<option value="3">03</option>
|
||||
<option value="4">04</option>
|
||||
<option value="5">05</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-label" for="passcode-policy-max-passcode-age-in-days">
|
||||
Maximum passcode age in days
|
||||
<span class="helper" title="Number of days after which a passcode must be changed">
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
<br>
|
||||
( Should be in between 1-to-730 days or none )
|
||||
</label>
|
||||
<input id="passcode-policy-max-passcode-age-in-days" type="text" class="form-control operationDataKeys" data-key="passcodePolicyMaxPasscodeAgeInDays" maxlength="3" placeholder="[ Requires Number Input ]" disabled>
|
||||
</div>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-label" for="passcode-policy-passcode-history">
|
||||
Passcode history
|
||||
<span class="helper" title="Number of consequent unique passcodes to be used before reuse">
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
<br>
|
||||
( Should be in between 1-to-50 passcodes or none )
|
||||
</label>
|
||||
<input id="passcode-policy-passcode-history" type="text" class="form-control operationDataKeys" data-key="passcodePolicyPasscodeHistory" maxlength="2" placeholder="[ Requires Number Input ]" disabled>
|
||||
</div>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-label" for="passcodePolicyMaxFailedAttempts">
|
||||
Maximum number of failed attempts
|
||||
<span class="helper" title="Maximum number of passcode entry attempts allowed before all data on a device will be erased">
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
<select id="passcode-policy-max-failed-attempts" class="form-control operationDataKeys" data-key="passcodePolicyMaxFailedAttempts" data-default="0" disabled>
|
||||
<option value="" selected="selected">
|
||||
None
|
||||
</option>
|
||||
<option value="3">03</option>
|
||||
<option value="4">04</option>
|
||||
<option value="5">05</option>
|
||||
<option value="6">06</option>
|
||||
<option value="7">07</option>
|
||||
<option value="8">08</option>
|
||||
<option value="9">09</option>
|
||||
<option value="10">10</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /passcode-policy -->
|
||||
|
||||
<!-- camera -->
|
||||
<div class="wr-hidden-operation" data-operation="camera">
|
||||
<div class="panel panel-default operation-data" data-operation="camera" data-operation-code="CAMERA">
|
||||
<div id="camera-heading" class="panel-heading" role="tab">
|
||||
<h2 class="sub-title panel-title">
|
||||
Restrictions on Camera
|
||||
<label class="wr-input-control switch hidden" data-toggle="collapse" data-target="#camera-body">
|
||||
<input type="checkbox" />
|
||||
<span class="helper"></span>
|
||||
<span class="text"></span>
|
||||
</label>
|
||||
<hr>
|
||||
<div class="panel-title-description">
|
||||
This configuration can be used to restrict the usage of camera on an Android device together with all the applications using the camera.
|
||||
Once this configuration profile is installed on a device, corresponding users will not be able
|
||||
to modify these settings on their devices.
|
||||
</div>
|
||||
</h2>
|
||||
</div>
|
||||
<div id="camera-body" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="camera-body">
|
||||
<div id="camera-feature-error-msg" class="alert alert-danger hidden" role="alert">
|
||||
<i class="icon fw fw-error"></i><span></span>
|
||||
</div>
|
||||
Un-check following checkbox in case you need to disable camera.
|
||||
<br>
|
||||
<br>
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-control checkbox">
|
||||
<input id="camera-enabled" type="checkbox" class="operationDataKeys" data-key="cameraEnabled" checked="checked" disabled/>
|
||||
<span class="helper" title="Having this checked would enable Usage of phone camera in the device.">
|
||||
Allow use of camera
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /camera -->
|
||||
|
||||
<!-- encrypt-storage -->
|
||||
<div class="wr-hidden-operation" data-operation="encrypt-storage">
|
||||
<div class="panel panel-default operation-data" data-operation="encrypt-storage" data-operation-code="ENCRYPT_STORAGE">
|
||||
<div id="encrypt-storage-heading" class="panel-heading" role="tab">
|
||||
<h2 class="sub-title panel-title">
|
||||
Encryption Settings
|
||||
<label class="wr-input-control switch hidden" data-toggle="collapse" data-target="#encrypt-storage-body">
|
||||
<input type="checkbox" />
|
||||
<span class="helper"></span>
|
||||
<span class="text"></span>
|
||||
</label>
|
||||
<hr>
|
||||
<div class="panel-title-description">
|
||||
This configuration can be used to encrypt data on an Android device, when the device is locked and
|
||||
make it readable when the passcode is entered. Once this configuration profile is installed on a device,
|
||||
corresponding users will not be able to modify these settings on their devices.
|
||||
</div>
|
||||
</h2>
|
||||
</div>
|
||||
<div id="encrypt-storage-body" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="encrypt-storage-body">
|
||||
<div id="encrypt-storage-feature-error-msg" class="alert alert-danger hidden" role="alert">
|
||||
<i class="icon fw fw-error"></i><span></span>
|
||||
</div>
|
||||
Un-check following checkbox in case you need to disable storage-encryption.
|
||||
<br>
|
||||
<br>
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-control checkbox">
|
||||
<input id="encrypt-storage-enabled" type="checkbox" class="operationDataKeys" data-key="encryptStorageEnabled" checked="checked" disabled/>
|
||||
<span class="helper" title="Having this checked would enable Storage-encryption in the device">
|
||||
Enable storage-encryption
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /encrypt-storage -->
|
||||
|
||||
<!-- wi-fi -->
|
||||
<div class="wr-hidden-operation" data-operation="wifi">
|
||||
<div class="panel panel-default operation-data" data-operation="wifi" data-operation-code="WIFI">
|
||||
<div id="wifi-heading" class="panel-heading" role="tab">
|
||||
<h2 class="sub-title panel-title">
|
||||
Wi-Fi Settings
|
||||
<label class="wr-input-control switch hidden" data-toggle="collapse" data-target="#wifi-body">
|
||||
<input type="checkbox" />
|
||||
<span class="helper"></span>
|
||||
<span class="text"></span>
|
||||
</label>
|
||||
<hr>
|
||||
<div class="panel-title-description">
|
||||
This configurations can be used to configure Wi-Fi access on an Android device.
|
||||
Once this configuration profile is installed on a device, corresponding users will not be able
|
||||
to modify these settings on their devices.
|
||||
</div>
|
||||
</h2>
|
||||
</div>
|
||||
<div id="wifi-body" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="wifi-body">
|
||||
<!--<div class="cloneable">-->
|
||||
<!--<a href="#" class="multi-view add enabled">-->
|
||||
<!--<span class="icon fw-stack">-->
|
||||
<!--<i class="fw fw-add fw-stack-1x"></i>-->
|
||||
<!--<i class="fw fw-ring fw-stack-2x"></i>-->
|
||||
<!--</span>-->
|
||||
<!--</a>-->
|
||||
<!--<a href="#" class="multi-view remove disabled">-->
|
||||
<!--<span class="icon fw-stack">-->
|
||||
<!--<i class="fw fw-minus fw-stack-1x"></i>-->
|
||||
<!--<i class="fw fw-ring fw-stack-2x"></i>-->
|
||||
<!--</span>-->
|
||||
<!--</a>-->
|
||||
<!--Wi-Fi Setting :-->
|
||||
<!--<br>-->
|
||||
<!--<br>-->
|
||||
Please note that * sign represents required fields of data.
|
||||
<br>
|
||||
<br>
|
||||
<div id="wifi-feature-error-msg" class="alert alert-danger hidden" role="alert">
|
||||
<i class="icon fw fw-error"></i><span></span>
|
||||
</div>
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-label" for="wifi-ssid">
|
||||
Service Set Identifier (SSID) *
|
||||
<span class="helper" title="Identification of the wireless network to be configured.">
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
<br>
|
||||
( should be 1-to-30 characters long )
|
||||
</label>
|
||||
<input id="wifi-ssid" type="text" class="form-control operationDataKeys" data-key="wifiSSID" maxlength="100" placeholder="[ Required field ]" disabled/>
|
||||
</div>
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-label" for="wifi-password">
|
||||
Password
|
||||
<span class="helper" title="Password for the wireless network.">
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
<input id="wifi-password" type="text" class="form-control operationDataKeys" data-key="wifiPassword" maxlength="100" placeholder="[ Optional field ]" disabled/>
|
||||
</div>
|
||||
<!--</div>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /wi-fi -->
|
||||
|
||||
<!-- install-applications -->
|
||||
<!--<div class="wr-hidden-operation" data-operation="install-apps">-->
|
||||
<!--<div class="panel panel-default operation-data" data-operation="INSTALL_APPLICATION">-->
|
||||
<!--<div class="panel-heading" role="tab">-->
|
||||
<!--<h2 class="sub-title panel-title">-->
|
||||
<!--<br>-->
|
||||
<!-- App Installations-->
|
||||
<!--<label class="wr-input-control switch" data-toggle="collapse" data-target="#installApp">-->
|
||||
<!--<input type="checkbox" />-->
|
||||
<!--<span class="helper"></span>-->
|
||||
<!--<span class="text"></span>-->
|
||||
<!--</label>-->
|
||||
<!--<br>-->
|
||||
<!--<br>-->
|
||||
<!--</h2>-->
|
||||
<!--</div>-->
|
||||
<!--<div id="installApp" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="installApp">-->
|
||||
<!--<div id="install-app-feature-error-msg" class="alert alert-danger hidden" role="alert">-->
|
||||
<!--<i class="icon fw fw-error"></i><span></span>-->
|
||||
<!--</div>-->
|
||||
<!--<label class="wr-input-label" title="Application Identifier">App Identifier<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>-->
|
||||
|
||||
<!--<div class="wr-input-control">-->
|
||||
<!--<input type="text" class="form-control operationDataKeys" id="package-name" data-key="packageName" placeholder="Enter App Identifier"/>-->
|
||||
<!--</div>-->
|
||||
<!--<div class="wr-input-control">-->
|
||||
<!--<label class="wr-input-control dropdown">-->
|
||||
<!--<span class="helper" title="App Type">App Type<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></span>-->
|
||||
<!--<select class="form-control col-sm-8 operationDataKeys appTypesInput" id="type" data-key="type">-->
|
||||
<!--<option>Public</option>-->
|
||||
<!--<option>Enterprise</option>-->
|
||||
<!--</select>-->
|
||||
<!--</label>-->
|
||||
<!--</div>-->
|
||||
<!--<label class="wr-input-label" title="URL">URL<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>-->
|
||||
|
||||
<!--<div class="wr-input-control">-->
|
||||
<!--<input type="text" class="form-control operationDataKeys" id="url" data-key="url" placeholder="Enter URL"/>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!-- /install-applications -->
|
||||
|
||||
<!-- /uninstall-applications -->
|
||||
<!--<div class="wr-hidden-operation" data-operation="uninstall-apps">-->
|
||||
<!--<div class="panel panel-default operation-data" data-operation="UNINSTALL_APPLICATION">-->
|
||||
<!--<div class="panel-heading" role="tab">-->
|
||||
<!--<h2 class="sub-title panel-title">-->
|
||||
<!--<br>-->
|
||||
<!-- App Uninstallations-->
|
||||
<!--<label class="wr-input-control switch" data-toggle="collapse" data-target="#uninstallApp">-->
|
||||
<!--<input type="checkbox" />-->
|
||||
<!--<span class="helper"></span>-->
|
||||
<!--<span class="text"></span>-->
|
||||
<!--</label>-->
|
||||
<!--<br>-->
|
||||
<!--<br>-->
|
||||
<!--</h2>-->
|
||||
<!--</div>-->
|
||||
<!--<div id="uninstallApp" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="uninstallApp">-->
|
||||
<!--<div id="uninstall-app-feature-error-msg" class="alert alert-danger hidden" role="alert">-->
|
||||
<!--<i class="icon fw fw-error"></i><span></span>-->
|
||||
<!--</div>-->
|
||||
<!--<label class="wr-input-label" title="Application Identifier">App Identifier<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>-->
|
||||
<!--<!--span>Identification of the wireless network to connect to</span-->
|
||||
<!--<div class="wr-input-control">-->
|
||||
<!--<input type="text" class="form-control operationDataKeys" id="package-name" data-key="packageName" placeholder="Enter App Identifier"/>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!-- /uninstall-applications -->
|
||||
|
||||
<!-- /web-clips -->
|
||||
<!--<div class="wr-hidden-operation" data-operation="web-clips">-->
|
||||
<!--<div class="panel panel-default operation-data" data-operation="WEBCLIP">-->
|
||||
<!--<div class="panel-heading" role="tab">-->
|
||||
<!--<h2 class="sub-title panel-title">-->
|
||||
<!--<br>-->
|
||||
<!-- Web clips-->
|
||||
<!--<label class="wr-input-control switch" data-toggle="collapse" data-target="#installWebClip">-->
|
||||
<!--<input type="checkbox" />-->
|
||||
<!--<span class="helper"></span>-->
|
||||
<!--<span class="text"></span>-->
|
||||
<!--</label>-->
|
||||
<!--<br>-->
|
||||
<!--<br>-->
|
||||
<!--</h2>-->
|
||||
<!--</div>-->
|
||||
<!--<div id="installWebClip" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="installWebClip">-->
|
||||
<!--<div id="install-webclip-feature-error-msg" class="alert alert-danger hidden" role="alert">-->
|
||||
<!--<i class="icon fw fw-error"></i><span></span>-->
|
||||
<!--</div>-->
|
||||
<!--<label class="wr-input-label" title="Title of the web clip">Title<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>-->
|
||||
<!--<div class="wr-input-control">-->
|
||||
<!--<input type="text" class="form-control operationDataKeys" id="title" data-key="title" placeholder="Enter Title"/>-->
|
||||
<!--</div>-->
|
||||
<!--<label class="wr-input-label" title="URL">URL<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>-->
|
||||
<!--<div class="wr-input-control">-->
|
||||
<!--<input type="text" class="form-control operationDataKeys" id="url" data-key="url" placeholder="Enter URL"/>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!-- /web-clips -->
|
||||
</div>
|
||||
</div>
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,460 @@
|
||||
<div class="row no-gutter">
|
||||
<div class="wr-hidden-operations-nav col-lg-4">
|
||||
<a href="javascript:void(0)" onclick="showAdvanceOperation('passcode-policy', this)" class="selected">
|
||||
<span class="wr-hidden-operations-icon fw-stack">
|
||||
<i class="fw fw-key fw-stack-2x"></i>
|
||||
</span>
|
||||
Passcode Policy
|
||||
<span id="passcode-policy-configured" class="has-configured status-icon hidden"><i class="fw fw-ok"></i></span>
|
||||
<span id="passcode-policy-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></i></span>
|
||||
<span id="passcode-policy-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span>
|
||||
</a>
|
||||
<a href="javascript:void(0)" onclick="showAdvanceOperation('camera', this)">
|
||||
<span class="wr-hidden-operations-icon fw-stack">
|
||||
<i class="fw fw-block fw-stack-2x"></i>
|
||||
</span>
|
||||
Restrictions on Camera
|
||||
<span id="camera-configured" class="has-configured status-icon hidden"><i class="fw fw-ok"></i></span>
|
||||
<span id="camera-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></i></span>
|
||||
<span class="camera-error status-icon hidden"><i class="fw fw-error"></i></span>
|
||||
</a>
|
||||
<a href="javascript:void(0)" onclick="showAdvanceOperation('encrypt-storage', this)">
|
||||
<span class="wr-hidden-operations-icon fw-stack">
|
||||
<i class="fw fw-security fw-stack-2x"></i>
|
||||
</span>
|
||||
Encryption Settings
|
||||
<span id="encrypt-storage-configured" class="has-configured status-icon hidden"><i class="fw fw-ok"></i></span>
|
||||
<span id="encrypt-storage-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></i></span>
|
||||
<span id="encrypt-storage-error" class="encryption-error status-icon hidden"><i class="fw fw-error"></i></span>
|
||||
</a>
|
||||
<!--<a href="javascript:void(0)" onclick="showAdvanceOperation('wifi', this)">-->
|
||||
<!--<span class="wr-hidden-operations-icon fw-stack">-->
|
||||
<!--<i class="fw fw-wifi fw-stack-2x"></i>-->
|
||||
<!--</span>-->
|
||||
<!--Wi-Fi Settings-->
|
||||
<!--<span id="wifi-configured" class="has-configured status-icon hidden"><i class="fw fw-ok"></i></span>-->
|
||||
<!--<span id="wifi-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></i></span>-->
|
||||
<!--<span id="wifi-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span>-->
|
||||
<!--</a>-->
|
||||
<!--<a href="javascript:void(0)" onclick="showAdvanceOperation('install-apps', this)">-->
|
||||
<!--<span class="wr-hidden-operations-icon fw-stack">-->
|
||||
<!--<i class="fw fw-application fw-stack-2x"></i>-->
|
||||
<!--</span>-->
|
||||
<!--App Installations-->
|
||||
<!--</a>-->
|
||||
<!--<a href="javascript:void(0)" onclick="showAdvanceOperation('blacklist-apps', this)">-->
|
||||
<!--<span class="wr-hidden-operations-icon fw-stack">-->
|
||||
<!--<i class="fw fw-block fw-stack-2x"></i>-->
|
||||
<!--</span>-->
|
||||
<!--App Blacklisting-->
|
||||
<!--</a>-->
|
||||
<!--<a href="javascript:void(0)" onclick="showAdvanceOperation('web-clips', this)">-->
|
||||
<!--<span class="wr-hidden-operations-icon fw-stack">-->
|
||||
<!--<i class="fw fw-website fw-stack-2x"></i>-->
|
||||
<!--</span>-->
|
||||
<!--Web clips-->
|
||||
<!--</a>-->
|
||||
</div>
|
||||
|
||||
<div class="wr-hidden-operations-content col-lg-8">
|
||||
<!-- passcode-policy -->
|
||||
<div class="wr-hidden-operation" data-operation="passcode-policy" style="display: block">
|
||||
<div class="panel panel-default operation-data" data-operation="passcode-policy" data-operation-code="PASSCODE_POLICY">
|
||||
<div id="passcode-policy-heading" class="panel-heading" role="tab">
|
||||
<h2 class="sub-title panel-title">
|
||||
Passcode Policy
|
||||
<label id="passcode-policy-lbl" class="wr-input-control switch hidden" data-toggle="collapse" data-target="#passcode-policy-body">
|
||||
<input type="checkbox" />
|
||||
<span class="helper"></span>
|
||||
<span class="text"></span>
|
||||
</label>
|
||||
<hr>
|
||||
<div class="panel-title-description">
|
||||
This configuration can be used to set a passcode policy to an Windows Device.
|
||||
Once this configuration profile is installed on a device, corresponding users will not be able
|
||||
to modify these settings on their devices.
|
||||
</div>
|
||||
</h2>
|
||||
</div>
|
||||
<div id="passcode-policy-body" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="passcode-policy-body">
|
||||
|
||||
<div id="passcode-policy-feature-error-msg" class="alert alert-danger hidden" role="alert">
|
||||
<i class="icon fw fw-error"></i><span></span>
|
||||
</div>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-control checkbox">
|
||||
<input id="passcode-policy-allow-simple" type="checkbox" class="form-control operationDataKeys" data-key="passcodePolicyAllowSimple" checked="checked" disabled/>
|
||||
<span class="helper" title="Permit the use of repeating, ascending and descending character sequences">
|
||||
Allow simple value
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-control checkbox">
|
||||
<input id="passcode-policy-require-alphanumeric" type="checkbox" class="form-control operationDataKeys" data-key="passcodePolicyRequireAlphanumeric" checked="checked" disabled/>
|
||||
<span class="helper" title="Require passcode to contain both letters and numbers">
|
||||
Require alphanumeric value
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-label" for="passcode-policy-min-length">
|
||||
Minimum passcode length
|
||||
<span class="helper" title="Minimum number of characters allowed in a passcode">
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
<select id="passcode-policy-min-length" class="form-control operationDataKeys" data-key="passcodePolicyMinLength" data-default="0" disabled>
|
||||
<option value="" selected="selected">
|
||||
None
|
||||
</option>
|
||||
<option value="1">01</option>
|
||||
<option value="2">02</option>
|
||||
<option value="3">03</option>
|
||||
<option value="4">04</option>
|
||||
<option value="5">05</option>
|
||||
<option value="6">06</option>
|
||||
<option value="7">07</option>
|
||||
<option value="8">08</option>
|
||||
<option value="9">09</option>
|
||||
<option value="10">10</option>
|
||||
<option value="11">11</option>
|
||||
<option value="12">12</option>
|
||||
<option value="13">13</option>
|
||||
<option value="14">14</option>
|
||||
<option value="15">15</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-label" for="passcode-policy-min-complex-chars">
|
||||
Minimum number of complex characters
|
||||
<span class="helper" title="Minimum number of complex or non-alphanumeric characters allowed in a passcode">
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
<select id="passcode-policy-min-complex-chars" class="form-control operationDataKeys" data-key="passcodePolicyMinComplexChars" data-default="0" disabled>
|
||||
<option value="" selected="selected">
|
||||
None
|
||||
</option>
|
||||
<option value="1">01</option>
|
||||
<option value="2">02</option>
|
||||
<option value="3">03</option>
|
||||
<option value="4">04</option>
|
||||
<option value="5">05</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-label" for="passcode-policy-max-passcode-age-in-days">
|
||||
Maximum passcode age in days
|
||||
<span class="helper" title="Number of days after which a passcode must be changed">
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
<br>
|
||||
( Should be in between 1-to-730 days or none )
|
||||
</label>
|
||||
<input id="passcode-policy-max-passcode-age-in-days" type="text" class="form-control operationDataKeys" data-key="passcodePolicyMaxPasscodeAgeInDays" maxlength="3" placeholder="[ Requires Number Input ]" disabled>
|
||||
</div>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-label" for="passcode-policy-passcode-history">
|
||||
Passcode history
|
||||
<span class="helper" title="Number of consequent unique passcodes to be used before reuse">
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
<br>
|
||||
( Should be in between 1-to-50 passcodes or none )
|
||||
</label>
|
||||
<input id="passcode-policy-passcode-history" type="text" class="form-control operationDataKeys" data-key="passcodePolicyPasscodeHistory" maxlength="2" placeholder="[ Requires Number Input ]" disabled>
|
||||
</div>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-label" for="passcodePolicyMaxFailedAttempts">
|
||||
Maximum number of failed attempts
|
||||
<span class="helper" title="Maximum number of passcode entry attempts allowed before all data on a device will be erased">
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
<select id="passcode-policy-max-failed-attempts" class="form-control operationDataKeys" data-key="passcodePolicyMaxFailedAttempts" data-default="0" disabled>
|
||||
<option value="" selected="selected">
|
||||
None
|
||||
</option>
|
||||
<option value="3">03</option>
|
||||
<option value="4">04</option>
|
||||
<option value="5">05</option>
|
||||
<option value="6">06</option>
|
||||
<option value="7">07</option>
|
||||
<option value="8">08</option>
|
||||
<option value="9">09</option>
|
||||
<option value="10">10</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /passcode-policy -->
|
||||
|
||||
<!-- camera -->
|
||||
<div class="wr-hidden-operation" data-operation="camera">
|
||||
<div class="panel panel-default operation-data" data-operation="camera" data-operation-code="CAMERA">
|
||||
<div id="camera-heading" class="panel-heading" role="tab">
|
||||
<h2 class="sub-title panel-title">
|
||||
Restrictions on Camera
|
||||
<label class="wr-input-control switch hidden" data-toggle="collapse" data-target="#camera-body">
|
||||
<input type="checkbox" />
|
||||
<span class="helper"></span>
|
||||
<span class="text"></span>
|
||||
</label>
|
||||
<hr>
|
||||
<div class="panel-title-description">
|
||||
This configuration can be used to restrict the usage of camera on an Windows device together with all the applications using the camera.
|
||||
Once this configuration profile is installed on a device, corresponding users will not be able
|
||||
to modify these settings on their devices.
|
||||
</div>
|
||||
</h2>
|
||||
</div>
|
||||
<div id="camera-body" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="camera-body">
|
||||
<div id="camera-feature-error-msg" class="alert alert-danger hidden" role="alert">
|
||||
<i class="icon fw fw-error"></i><span></span>
|
||||
</div>
|
||||
Un-check following checkbox in case you need to disable camera.
|
||||
<br>
|
||||
<br>
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-control checkbox">
|
||||
<input id="camera-enabled" type="checkbox" class="operationDataKeys" data-key="cameraEnabled" checked="checked" disabled/>
|
||||
<span class="helper" title="Having this checked would enable Usage of phone camera in the device.">
|
||||
Allow use of camera
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /camera -->
|
||||
|
||||
<!-- encrypt-storage -->
|
||||
<div class="wr-hidden-operation" data-operation="encrypt-storage">
|
||||
<div class="panel panel-default operation-data" data-operation="encrypt-storage" data-operation-code="ENCRYPT_STORAGE">
|
||||
<div id="encrypt-storage-heading" class="panel-heading" role="tab">
|
||||
<h2 class="sub-title panel-title">
|
||||
Encryption Settings
|
||||
<label class="wr-input-control switch hidden" data-toggle="collapse" data-target="#encrypt-storage-body">
|
||||
<input type="checkbox" />
|
||||
<span class="helper"></span>
|
||||
<span class="text"></span>
|
||||
</label>
|
||||
<hr>
|
||||
<div class="panel-title-description">
|
||||
This configuration can be used to encrypt data on an Windows device, when the device is locked and
|
||||
make it readable when the passcode is entered. Once this configuration profile is installed on a device,
|
||||
corresponding users will not be able to modify these settings on their devices.
|
||||
</div>
|
||||
</h2>
|
||||
</div>
|
||||
<div id="encrypt-storage-body" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="encrypt-storage-body">
|
||||
<div id="encrypt-storage-feature-error-msg" class="alert alert-danger hidden" role="alert">
|
||||
<i class="icon fw fw-error"></i><span></span>
|
||||
</div>
|
||||
Un-check following checkbox in case you need to disable storage-encryption.
|
||||
<br>
|
||||
<br>
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-control checkbox">
|
||||
<input id="encrypt-storage-enabled" type="checkbox" class="operationDataKeys" data-key="encryptStorageEnabled" checked="checked" disabled/>
|
||||
<span class="helper" title="Having this checked would enable Storage-encryption in the device">
|
||||
Enable storage-encryption
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /encrypt-storage -->
|
||||
|
||||
<!-- wi-fi -->
|
||||
<!--<div class="wr-hidden-operation" data-operation="wifi">-->
|
||||
<!--<div class="panel panel-default operation-data" data-operation="wifi" data-operation-code="WIFI">-->
|
||||
<!--<div id="wifi-heading" class="panel-heading" role="tab">-->
|
||||
<!--<h2 class="sub-title panel-title">-->
|
||||
<!--Wi-Fi Settings-->
|
||||
<!--<label class="wr-input-control switch" data-toggle="collapse" data-target="#wifi-body">-->
|
||||
<!--<input type="checkbox" />-->
|
||||
<!--<span class="helper"></span>-->
|
||||
<!--<span class="text"></span>-->
|
||||
<!--</label>-->
|
||||
<!--<hr>-->
|
||||
<!--<div class="panel-title-description">-->
|
||||
<!--This configurations can be used to configure Wi-Fi access on an Android device.-->
|
||||
<!--Once this configuration profile is installed on a device, corresponding users will not be able-->
|
||||
<!--to modify these settings on their devices.-->
|
||||
<!--</div>-->
|
||||
<!--</h2>-->
|
||||
<!--</div>-->
|
||||
<!--<div id="wifi-body" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="wifi-body">-->
|
||||
<!--<!–<div class="cloneable">–>-->
|
||||
<!--<!–<a href="#" class="multi-view add enabled">–>-->
|
||||
<!--<!–<span class="icon fw-stack">–>-->
|
||||
<!--<!–<i class="fw fw-add fw-stack-1x"></i>–>-->
|
||||
<!--<!–<i class="fw fw-ring fw-stack-2x"></i>–>-->
|
||||
<!--<!–</span>–>-->
|
||||
<!--<!–</a>–>-->
|
||||
<!--<!–<a href="#" class="multi-view remove disabled">–>-->
|
||||
<!--<!–<span class="icon fw-stack">–>-->
|
||||
<!--<!–<i class="fw fw-minus fw-stack-1x"></i>–>-->
|
||||
<!--<!–<i class="fw fw-ring fw-stack-2x"></i>–>-->
|
||||
<!--<!–</span>–>-->
|
||||
<!--<!–</a>–>-->
|
||||
<!--<!–Wi-Fi Setting :–>-->
|
||||
<!--<!–<br>–>-->
|
||||
<!--<!–<br>–>-->
|
||||
<!--Please note that * sign represents required fields of data.-->
|
||||
<!--<br>-->
|
||||
<!--<br>-->
|
||||
<!--<div id="wifi-feature-error-msg" class="alert alert-danger hidden" role="alert">-->
|
||||
<!--<i class="icon fw fw-error"></i><span></span>-->
|
||||
<!--</div>-->
|
||||
<!--<div class="wr-input-control">-->
|
||||
<!--<label class="wr-input-label" for="wifi-ssid">-->
|
||||
<!--Service Set Identifier (SSID) *-->
|
||||
<!--<span class="helper" title="Identification of the wireless network to be configured.">-->
|
||||
<!--<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>-->
|
||||
<!--</span>-->
|
||||
<!--<br>-->
|
||||
<!--( should be 1-to-30 characters long )-->
|
||||
<!--</label>-->
|
||||
<!--<input id="wifi-ssid" type="text" class="form-control operationDataKeys" data-key="wifiSSID" maxlength="100" placeholder="[ Required field ]"/>-->
|
||||
<!--</div>-->
|
||||
<!--<div class="wr-input-control">-->
|
||||
<!--<label class="wr-input-label" for="wifi-password">-->
|
||||
<!--Password-->
|
||||
<!--<span class="helper" title="Password for the wireless network.">-->
|
||||
<!--<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>-->
|
||||
<!--</span>-->
|
||||
<!--</label>-->
|
||||
<!--<input id="wifi-password" type="text" class="form-control operationDataKeys" data-key="wifiPassword" maxlength="100" placeholder="[ Optional field ]"/>-->
|
||||
<!--</div>-->
|
||||
<!--<!–</div>–>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!-- /wi-fi -->
|
||||
|
||||
<!-- install-applications -->
|
||||
<!--<div class="wr-hidden-operation" data-operation="install-apps">-->
|
||||
<!--<div class="panel panel-default operation-data" data-operation="INSTALL_APPLICATION">-->
|
||||
<!--<div class="panel-heading" role="tab">-->
|
||||
<!--<h2 class="sub-title panel-title">-->
|
||||
<!--<br>-->
|
||||
<!-- App Installations-->
|
||||
<!--<label class="wr-input-control switch" data-toggle="collapse" data-target="#installApp">-->
|
||||
<!--<input type="checkbox" />-->
|
||||
<!--<span class="helper"></span>-->
|
||||
<!--<span class="text"></span>-->
|
||||
<!--</label>-->
|
||||
<!--<br>-->
|
||||
<!--<br>-->
|
||||
<!--</h2>-->
|
||||
<!--</div>-->
|
||||
<!--<div id="installApp" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="installApp">-->
|
||||
<!--<div id="install-app-feature-error-msg" class="alert alert-danger hidden" role="alert">-->
|
||||
<!--<i class="icon fw fw-error"></i><span></span>-->
|
||||
<!--</div>-->
|
||||
<!--<label class="wr-input-label" title="Application Identifier">App Identifier<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>-->
|
||||
|
||||
<!--<div class="wr-input-control">-->
|
||||
<!--<input type="text" class="form-control operationDataKeys" id="package-name" data-key="packageName" placeholder="Enter App Identifier"/>-->
|
||||
<!--</div>-->
|
||||
<!--<div class="wr-input-control">-->
|
||||
<!--<label class="wr-input-control dropdown">-->
|
||||
<!--<span class="helper" title="App Type">App Type<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></span>-->
|
||||
<!--<select class="form-control col-sm-8 operationDataKeys appTypesInput" id="type" data-key="type">-->
|
||||
<!--<option>Public</option>-->
|
||||
<!--<option>Enterprise</option>-->
|
||||
<!--</select>-->
|
||||
<!--</label>-->
|
||||
<!--</div>-->
|
||||
<!--<label class="wr-input-label" title="URL">URL<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>-->
|
||||
|
||||
<!--<div class="wr-input-control">-->
|
||||
<!--<input type="text" class="form-control operationDataKeys" id="url" data-key="url" placeholder="Enter URL"/>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!-- /install-applications -->
|
||||
|
||||
<!-- /uninstall-applications -->
|
||||
<!--<div class="wr-hidden-operation" data-operation="uninstall-apps">-->
|
||||
<!--<div class="panel panel-default operation-data" data-operation="UNINSTALL_APPLICATION">-->
|
||||
<!--<div class="panel-heading" role="tab">-->
|
||||
<!--<h2 class="sub-title panel-title">-->
|
||||
<!--<br>-->
|
||||
<!-- App Uninstallations-->
|
||||
<!--<label class="wr-input-control switch" data-toggle="collapse" data-target="#uninstallApp">-->
|
||||
<!--<input type="checkbox" />-->
|
||||
<!--<span class="helper"></span>-->
|
||||
<!--<span class="text"></span>-->
|
||||
<!--</label>-->
|
||||
<!--<br>-->
|
||||
<!--<br>-->
|
||||
<!--</h2>-->
|
||||
<!--</div>-->
|
||||
<!--<div id="uninstallApp" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="uninstallApp">-->
|
||||
<!--<div id="uninstall-app-feature-error-msg" class="alert alert-danger hidden" role="alert">-->
|
||||
<!--<i class="icon fw fw-error"></i><span></span>-->
|
||||
<!--</div>-->
|
||||
<!--<label class="wr-input-label" title="Application Identifier">App Identifier<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>-->
|
||||
<!--<!--span>Identification of the wireless network to connect to</span-->
|
||||
<!--<div class="wr-input-control">-->
|
||||
<!--<input type="text" class="form-control operationDataKeys" id="package-name" data-key="packageName" placeholder="Enter App Identifier"/>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!-- /uninstall-applications -->
|
||||
|
||||
<!-- /web-clips -->
|
||||
<!--<div class="wr-hidden-operation" data-operation="web-clips">-->
|
||||
<!--<div class="panel panel-default operation-data" data-operation="WEBCLIP">-->
|
||||
<!--<div class="panel-heading" role="tab">-->
|
||||
<!--<h2 class="sub-title panel-title">-->
|
||||
<!--<br>-->
|
||||
<!-- Web clips-->
|
||||
<!--<label class="wr-input-control switch" data-toggle="collapse" data-target="#installWebClip">-->
|
||||
<!--<input type="checkbox" />-->
|
||||
<!--<span class="helper"></span>-->
|
||||
<!--<span class="text"></span>-->
|
||||
<!--</label>-->
|
||||
<!--<br>-->
|
||||
<!--<br>-->
|
||||
<!--</h2>-->
|
||||
<!--</div>-->
|
||||
<!--<div id="installWebClip" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="installWebClip">-->
|
||||
<!--<div id="install-webclip-feature-error-msg" class="alert alert-danger hidden" role="alert">-->
|
||||
<!--<i class="icon fw fw-error"></i><span></span>-->
|
||||
<!--</div>-->
|
||||
<!--<label class="wr-input-label" title="Title of the web clip">Title<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>-->
|
||||
<!--<div class="wr-input-control">-->
|
||||
<!--<input type="text" class="form-control operationDataKeys" id="title" data-key="title" placeholder="Enter Title"/>-->
|
||||
<!--</div>-->
|
||||
<!--<label class="wr-input-label" title="URL">URL<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>-->
|
||||
<!--<div class="wr-input-control">-->
|
||||
<!--<input type="text" class="form-control operationDataKeys" id="url" data-key="url" placeholder="Enter URL"/>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!-- /web-clips -->
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,101 @@
|
||||
{{#zone "contentTitle"}}
|
||||
<div class="row wr-device-board">
|
||||
<div class="col-lg-12 wr-secondary-bar">
|
||||
<label id="policy-heading" class="device-id device-select">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
{{/zone}}
|
||||
|
||||
<!-- #page-content-wrapper -->
|
||||
<div class="page-content-wrapper">
|
||||
<!-- content/body -->
|
||||
<div class="container-fluid body-wrapper">
|
||||
<div class="row no-gutter add-padding-5x add-margin-top-5x"
|
||||
style="border: 1px solid #e4e4e4;">
|
||||
<div class="media">
|
||||
<div class="media-body asset-desc add-padding-left-5x">
|
||||
<div style="background: #11375B; color: #fff; padding: 10px; margin-bottom: 5px">
|
||||
Policy Overview
|
||||
</div>
|
||||
{{#defineZone "policy-detail-properties"}}
|
||||
<table class="table table-responsive table-striped" id="members">
|
||||
<tbody>
|
||||
<tr role="row" class="even">
|
||||
<td class="sorting_1" style="padding:10px 15px; width: 14%;">
|
||||
Platform
|
||||
</td>
|
||||
<td id="policy-platform" style="padding:10px 15px;"></td>
|
||||
</tr>
|
||||
<tr role="row" class="odd">
|
||||
<td class="sorting_1" style="padding:10px 15px;">Assignment Group
|
||||
</td>
|
||||
<td id="policy-assignment" style="padding:10px 15px;"></td>
|
||||
</tr>
|
||||
<tr role="row" class="even">
|
||||
<td class="sorting_1" style="padding:10px 15px;">Action upon
|
||||
non-compliance
|
||||
</td>
|
||||
<td id="policy-action" style="padding:10px 15px;"></td>
|
||||
</tr>
|
||||
<tr role="row" class="even">
|
||||
<td class="sorting_1" style="padding:10px 15px;">Status</td>
|
||||
<td id="policy-status" style="padding:10px 15px;"></td>
|
||||
</tr>
|
||||
<tr role="row" id="users-row" class="even">
|
||||
<td class="sorting_1" style="padding:10px 15px;">Assigned Users</td>
|
||||
<td id="policy-users" style="padding:10px 15px;"></td>
|
||||
</tr>
|
||||
<tr role="row" id="roles-row" class="even">
|
||||
<td class="sorting_1" style="padding:10px 15px;">Assigned Roles</td>
|
||||
<td id="policy-roles" style="padding:10px 15px;"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{{/defineZone}}
|
||||
<div style="background: #11375B; color: #fff; padding: 10px; margin-bottom: 5px">
|
||||
Description
|
||||
</div>
|
||||
<div class="add-margin-top-4x">
|
||||
<div id="policy-description" class="panel-title-description"></div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<div style="background: #11375B; color: #fff; padding: 10px; margin-bottom: 5px">
|
||||
Profile Information
|
||||
</div>
|
||||
<div class="add-margin-top-4x">
|
||||
<div id="policy-profile-main-error-msg" class="alert alert-danger hidden"
|
||||
role="alert">
|
||||
<i class="icon fw fw-error"></i><span></span>
|
||||
</div>
|
||||
<div class="wr-advance-operations">
|
||||
<div class="wr-advance-operations-init">
|
||||
<br>
|
||||
|
||||
<i class="fw fw-settings fw-spin fw-2x"></i>
|
||||
|
||||
Loading platform features . . .
|
||||
<br>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- /content/body -->
|
||||
</div>
|
||||
{{#zone "bottomJs"}}
|
||||
<script id="hidden-operations-ios" src="{{@unit.publicUri}}/templates/hidden-operations-ios.hbs"
|
||||
type="text/x-handlebars-template"></script>
|
||||
<script id="hidden-operations-android"
|
||||
src="{{@unit.publicUri}}/templates/hidden-operations-android.hbs"
|
||||
type="text/x-handlebars-template"></script>
|
||||
<script id="hidden-operations-windows"
|
||||
src="{{@unit.publicUri}}/templates/hidden-operations-windows.hbs"
|
||||
type="text/x-handlebars-template"></script>
|
||||
{{js "/js/policy-view.js"}}
|
||||
{{/zone}}
|
@ -0,0 +1,7 @@
|
||||
function onRequest(context) {
|
||||
var log = new Log("policy-view-edit-unit backend js");
|
||||
log.debug("calling policy-view-edit-unit");
|
||||
var userModule = require("/app/modules/user.js").userModule;
|
||||
context.roles = userModule.getRoles().content;
|
||||
return context;
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"version" : "1.0.0"
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,460 @@
|
||||
<div class="row no-gutter">
|
||||
<div class="wr-hidden-operations-nav col-lg-4">
|
||||
<a href="javascript:void(0)" onclick="showAdvanceOperation('passcode-policy', this)" class="selected">
|
||||
<span class="wr-hidden-operations-icon fw-stack">
|
||||
<i class="fw fw-key fw-stack-2x"></i>
|
||||
</span>
|
||||
Passcode Policy
|
||||
<span id="passcode-policy-configured" class="has-configured status-icon hidden"><i class="fw fw-ok"></i></span>
|
||||
<span id="passcode-policy-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></i></span>
|
||||
<span id="passcode-policy-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span>
|
||||
</a>
|
||||
<a href="javascript:void(0)" onclick="showAdvanceOperation('camera', this)">
|
||||
<span class="wr-hidden-operations-icon fw-stack">
|
||||
<i class="fw fw-block fw-stack-2x"></i>
|
||||
</span>
|
||||
Restrictions on Camera
|
||||
<span id="camera-configured" class="has-configured status-icon hidden"><i class="fw fw-ok"></i></span>
|
||||
<span id="camera-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></i></span>
|
||||
<span class="camera-error status-icon hidden"><i class="fw fw-error"></i></span>
|
||||
</a>
|
||||
<a href="javascript:void(0)" onclick="showAdvanceOperation('encrypt-storage', this)">
|
||||
<span class="wr-hidden-operations-icon fw-stack">
|
||||
<i class="fw fw-security fw-stack-2x"></i>
|
||||
</span>
|
||||
Encryption Settings
|
||||
<span id="encrypt-storage-configured" class="has-configured status-icon hidden"><i class="fw fw-ok"></i></span>
|
||||
<span id="encrypt-storage-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></i></span>
|
||||
<span id="encrypt-storage-error" class="encryption-error status-icon hidden"><i class="fw fw-error"></i></span>
|
||||
</a>
|
||||
<a href="javascript:void(0)" onclick="showAdvanceOperation('wifi', this)">
|
||||
<span class="wr-hidden-operations-icon fw-stack">
|
||||
<i class="fw fw-wifi fw-stack-2x"></i>
|
||||
</span>
|
||||
Wi-Fi Settings
|
||||
<span id="wifi-configured" class="has-configured status-icon hidden"><i class="fw fw-ok"></i></span>
|
||||
<span id="wifi-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></i></span>
|
||||
<span id="wifi-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span>
|
||||
</a>
|
||||
<!--<a href="javascript:void(0)" onclick="showAdvanceOperation('install-apps', this)">-->
|
||||
<!--<span class="wr-hidden-operations-icon fw-stack">-->
|
||||
<!--<i class="fw fw-application fw-stack-2x"></i>-->
|
||||
<!--</span>-->
|
||||
<!--App Installations-->
|
||||
<!--</a>-->
|
||||
<!--<a href="javascript:void(0)" onclick="showAdvanceOperation('blacklist-apps', this)">-->
|
||||
<!--<span class="wr-hidden-operations-icon fw-stack">-->
|
||||
<!--<i class="fw fw-block fw-stack-2x"></i>-->
|
||||
<!--</span>-->
|
||||
<!--App Blacklisting-->
|
||||
<!--</a>-->
|
||||
<!--<a href="javascript:void(0)" onclick="showAdvanceOperation('web-clips', this)">-->
|
||||
<!--<span class="wr-hidden-operations-icon fw-stack">-->
|
||||
<!--<i class="fw fw-website fw-stack-2x"></i>-->
|
||||
<!--</span>-->
|
||||
<!--Web clips-->
|
||||
<!--</a>-->
|
||||
</div>
|
||||
|
||||
<div class="wr-hidden-operations-content col-lg-8">
|
||||
<!-- passcode-policy -->
|
||||
<div class="wr-hidden-operation" data-operation="passcode-policy" style="display: block">
|
||||
<div class="panel panel-default operation-data" data-operation="passcode-policy" data-operation-code="PASSCODE_POLICY">
|
||||
<div id="passcode-policy-heading" class="panel-heading" role="tab">
|
||||
<h2 class="sub-title panel-title">
|
||||
Passcode Policy
|
||||
<label id="passcode-policy-lbl" class="wr-input-control switch" data-toggle="collapse" data-target="#passcode-policy-body">
|
||||
<input type="checkbox" />
|
||||
<span class="helper"></span>
|
||||
<span class="text"></span>
|
||||
</label>
|
||||
<hr>
|
||||
<div class="panel-title-description">
|
||||
This configuration can be used to set a passcode policy to an Android Device.
|
||||
Once this configuration profile is installed on a device, corresponding users will not be able
|
||||
to modify these settings on their devices.
|
||||
</div>
|
||||
</h2>
|
||||
</div>
|
||||
<div id="passcode-policy-body" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="passcode-policy-body">
|
||||
|
||||
<div id="passcode-policy-feature-error-msg" class="alert alert-danger hidden" role="alert">
|
||||
<i class="icon fw fw-error"></i><span></span>
|
||||
</div>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-control checkbox">
|
||||
<input id="passcode-policy-allow-simple" type="checkbox" class="form-control operationDataKeys" data-key="passcodePolicyAllowSimple" checked="checked" />
|
||||
<span class="helper" title="Permit the use of repeating, ascending and descending character sequences">
|
||||
Allow simple value
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-control checkbox">
|
||||
<input id="passcode-policy-require-alphanumeric" type="checkbox" class="form-control operationDataKeys" data-key="passcodePolicyRequireAlphanumeric" checked="checked" />
|
||||
<span class="helper" title="Require passcode to contain both letters and numbers">
|
||||
Require alphanumeric value
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-label" for="passcode-policy-min-length">
|
||||
Minimum passcode length
|
||||
<span class="helper" title="Minimum number of characters allowed in a passcode">
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
<select id="passcode-policy-min-length" class="form-control operationDataKeys" data-key="passcodePolicyMinLength" data-default="0">
|
||||
<option value="" selected="selected">
|
||||
None
|
||||
</option>
|
||||
<option value="1">01</option>
|
||||
<option value="2">02</option>
|
||||
<option value="3">03</option>
|
||||
<option value="4">04</option>
|
||||
<option value="5">05</option>
|
||||
<option value="6">06</option>
|
||||
<option value="7">07</option>
|
||||
<option value="8">08</option>
|
||||
<option value="9">09</option>
|
||||
<option value="10">10</option>
|
||||
<option value="11">11</option>
|
||||
<option value="12">12</option>
|
||||
<option value="13">13</option>
|
||||
<option value="14">14</option>
|
||||
<option value="15">15</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-label" for="passcode-policy-min-complex-chars">
|
||||
Minimum number of complex characters
|
||||
<span class="helper" title="Minimum number of complex or non-alphanumeric characters allowed in a passcode">
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
<select id="passcode-policy-min-complex-chars" class="form-control operationDataKeys" data-key="passcodePolicyMinComplexChars" data-default="0">
|
||||
<option value="" selected="selected">
|
||||
None
|
||||
</option>
|
||||
<option value="1">01</option>
|
||||
<option value="2">02</option>
|
||||
<option value="3">03</option>
|
||||
<option value="4">04</option>
|
||||
<option value="5">05</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-label" for="passcode-policy-max-passcode-age-in-days">
|
||||
Maximum passcode age in days
|
||||
<span class="helper" title="Number of days after which a passcode must be changed">
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
<br>
|
||||
( Should be in between 1-to-730 days or none )
|
||||
</label>
|
||||
<input id="passcode-policy-max-passcode-age-in-days" type="text" class="form-control operationDataKeys" data-key="passcodePolicyMaxPasscodeAgeInDays" maxlength="3" placeholder="[ Requires Number Input ]">
|
||||
</div>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-label" for="passcode-policy-passcode-history">
|
||||
Passcode history
|
||||
<span class="helper" title="Number of consequent unique passcodes to be used before reuse">
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
<br>
|
||||
( Should be in between 1-to-50 passcodes or none )
|
||||
</label>
|
||||
<input id="passcode-policy-passcode-history" type="text" class="form-control operationDataKeys" data-key="passcodePolicyPasscodeHistory" maxlength="2" placeholder="[ Requires Number Input ]">
|
||||
</div>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-label" for="passcodePolicyMaxFailedAttempts">
|
||||
Maximum number of failed attempts
|
||||
<span class="helper" title="Maximum number of passcode entry attempts allowed before all data on a device will be erased">
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
<select id="passcode-policy-max-failed-attempts" class="form-control operationDataKeys" data-key="passcodePolicyMaxFailedAttempts" data-default="0">
|
||||
<option value="" selected="selected">
|
||||
None
|
||||
</option>
|
||||
<option value="3">03</option>
|
||||
<option value="4">04</option>
|
||||
<option value="5">05</option>
|
||||
<option value="6">06</option>
|
||||
<option value="7">07</option>
|
||||
<option value="8">08</option>
|
||||
<option value="9">09</option>
|
||||
<option value="10">10</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /passcode-policy -->
|
||||
|
||||
<!-- camera -->
|
||||
<div class="wr-hidden-operation" data-operation="camera">
|
||||
<div class="panel panel-default operation-data" data-operation="camera" data-operation-code="CAMERA">
|
||||
<div id="camera-heading" class="panel-heading" role="tab">
|
||||
<h2 class="sub-title panel-title">
|
||||
Restrictions on Camera
|
||||
<label class="wr-input-control switch" data-toggle="collapse" data-target="#camera-body">
|
||||
<input type="checkbox" />
|
||||
<span class="helper"></span>
|
||||
<span class="text"></span>
|
||||
</label>
|
||||
<hr>
|
||||
<div class="panel-title-description">
|
||||
This configuration can be used to restrict the usage of camera on an Android device together with all the applications using the camera.
|
||||
Once this configuration profile is installed on a device, corresponding users will not be able
|
||||
to modify these settings on their devices.
|
||||
</div>
|
||||
</h2>
|
||||
</div>
|
||||
<div id="camera-body" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="camera-body">
|
||||
<div id="camera-feature-error-msg" class="alert alert-danger hidden" role="alert">
|
||||
<i class="icon fw fw-error"></i><span></span>
|
||||
</div>
|
||||
Un-check following checkbox in case you need to disable camera.
|
||||
<br>
|
||||
<br>
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-control checkbox">
|
||||
<input id="camera-enabled" type="checkbox" class="operationDataKeys" data-key="cameraEnabled" checked="checked" />
|
||||
<span class="helper" title="Having this checked would enable Usage of phone camera in the device.">
|
||||
Allow use of camera
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /camera -->
|
||||
|
||||
<!-- encrypt-storage -->
|
||||
<div class="wr-hidden-operation" data-operation="encrypt-storage">
|
||||
<div class="panel panel-default operation-data" data-operation="encrypt-storage" data-operation-code="ENCRYPT_STORAGE">
|
||||
<div id="encrypt-storage-heading" class="panel-heading" role="tab">
|
||||
<h2 class="sub-title panel-title">
|
||||
Encryption Settings
|
||||
<label class="wr-input-control switch" data-toggle="collapse" data-target="#encrypt-storage-body">
|
||||
<input type="checkbox" />
|
||||
<span class="helper"></span>
|
||||
<span class="text"></span>
|
||||
</label>
|
||||
<hr>
|
||||
<div class="panel-title-description">
|
||||
This configuration can be used to encrypt data on an Android device, when the device is locked and
|
||||
make it readable when the passcode is entered. Once this configuration profile is installed on a device,
|
||||
corresponding users will not be able to modify these settings on their devices.
|
||||
</div>
|
||||
</h2>
|
||||
</div>
|
||||
<div id="encrypt-storage-body" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="encrypt-storage-body">
|
||||
<div id="encrypt-storage-feature-error-msg" class="alert alert-danger hidden" role="alert">
|
||||
<i class="icon fw fw-error"></i><span></span>
|
||||
</div>
|
||||
Un-check following checkbox in case you need to disable storage-encryption.
|
||||
<br>
|
||||
<br>
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-control checkbox">
|
||||
<input id="encrypt-storage-enabled" type="checkbox" class="operationDataKeys" data-key="encryptStorageEnabled" checked="checked" />
|
||||
<span class="helper" title="Having this checked would enable Storage-encryption in the device">
|
||||
Enable storage-encryption
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /encrypt-storage -->
|
||||
|
||||
<!-- wi-fi -->
|
||||
<div class="wr-hidden-operation" data-operation="wifi">
|
||||
<div class="panel panel-default operation-data" data-operation="wifi" data-operation-code="WIFI">
|
||||
<div id="wifi-heading" class="panel-heading" role="tab">
|
||||
<h2 class="sub-title panel-title">
|
||||
Wi-Fi Settings
|
||||
<label class="wr-input-control switch" data-toggle="collapse" data-target="#wifi-body">
|
||||
<input type="checkbox" />
|
||||
<span class="helper"></span>
|
||||
<span class="text"></span>
|
||||
</label>
|
||||
<hr>
|
||||
<div class="panel-title-description">
|
||||
This configurations can be used to configure Wi-Fi access on an Android device.
|
||||
Once this configuration profile is installed on a device, corresponding users will not be able
|
||||
to modify these settings on their devices.
|
||||
</div>
|
||||
</h2>
|
||||
</div>
|
||||
<div id="wifi-body" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="wifi-body">
|
||||
<!--<div class="cloneable">-->
|
||||
<!--<a href="#" class="multi-view add enabled">-->
|
||||
<!--<span class="icon fw-stack">-->
|
||||
<!--<i class="fw fw-add fw-stack-1x"></i>-->
|
||||
<!--<i class="fw fw-ring fw-stack-2x"></i>-->
|
||||
<!--</span>-->
|
||||
<!--</a>-->
|
||||
<!--<a href="#" class="multi-view remove disabled">-->
|
||||
<!--<span class="icon fw-stack">-->
|
||||
<!--<i class="fw fw-minus fw-stack-1x"></i>-->
|
||||
<!--<i class="fw fw-ring fw-stack-2x"></i>-->
|
||||
<!--</span>-->
|
||||
<!--</a>-->
|
||||
<!--Wi-Fi Setting :-->
|
||||
<!--<br>-->
|
||||
<!--<br>-->
|
||||
Please note that * sign represents required fields of data.
|
||||
<br>
|
||||
<br>
|
||||
<div id="wifi-feature-error-msg" class="alert alert-danger hidden" role="alert">
|
||||
<i class="icon fw fw-error"></i><span></span>
|
||||
</div>
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-label" for="wifi-ssid">
|
||||
Service Set Identifier (SSID) *
|
||||
<span class="helper" title="Identification of the wireless network to be configured.">
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
<br>
|
||||
( should be 1-to-30 characters long )
|
||||
</label>
|
||||
<input id="wifi-ssid" type="text" class="form-control operationDataKeys" data-key="wifiSSID" maxlength="100" placeholder="[ Required field ]"/>
|
||||
</div>
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-label" for="wifi-password">
|
||||
Password
|
||||
<span class="helper" title="Password for the wireless network.">
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
<input id="wifi-password" type="text" class="form-control operationDataKeys" data-key="wifiPassword" maxlength="100" placeholder="[ Optional field ]"/>
|
||||
</div>
|
||||
<!--</div>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /wi-fi -->
|
||||
|
||||
<!-- install-applications -->
|
||||
<!--<div class="wr-hidden-operation" data-operation="install-apps">-->
|
||||
<!--<div class="panel panel-default operation-data" data-operation="INSTALL_APPLICATION">-->
|
||||
<!--<div class="panel-heading" role="tab">-->
|
||||
<!--<h2 class="sub-title panel-title">-->
|
||||
<!--<br>-->
|
||||
<!-- App Installations-->
|
||||
<!--<label class="wr-input-control switch" data-toggle="collapse" data-target="#installApp">-->
|
||||
<!--<input type="checkbox" />-->
|
||||
<!--<span class="helper"></span>-->
|
||||
<!--<span class="text"></span>-->
|
||||
<!--</label>-->
|
||||
<!--<br>-->
|
||||
<!--<br>-->
|
||||
<!--</h2>-->
|
||||
<!--</div>-->
|
||||
<!--<div id="installApp" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="installApp">-->
|
||||
<!--<div id="install-app-feature-error-msg" class="alert alert-danger hidden" role="alert">-->
|
||||
<!--<i class="icon fw fw-error"></i><span></span>-->
|
||||
<!--</div>-->
|
||||
<!--<label class="wr-input-label" title="Application Identifier">App Identifier<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>-->
|
||||
|
||||
<!--<div class="wr-input-control">-->
|
||||
<!--<input type="text" class="form-control operationDataKeys" id="package-name" data-key="packageName" placeholder="Enter App Identifier"/>-->
|
||||
<!--</div>-->
|
||||
<!--<div class="wr-input-control">-->
|
||||
<!--<label class="wr-input-control dropdown">-->
|
||||
<!--<span class="helper" title="App Type">App Type<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></span>-->
|
||||
<!--<select class="form-control col-sm-8 operationDataKeys appTypesInput" id="type" data-key="type">-->
|
||||
<!--<option>Public</option>-->
|
||||
<!--<option>Enterprise</option>-->
|
||||
<!--</select>-->
|
||||
<!--</label>-->
|
||||
<!--</div>-->
|
||||
<!--<label class="wr-input-label" title="URL">URL<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>-->
|
||||
|
||||
<!--<div class="wr-input-control">-->
|
||||
<!--<input type="text" class="form-control operationDataKeys" id="url" data-key="url" placeholder="Enter URL"/>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!-- /install-applications -->
|
||||
|
||||
<!-- /uninstall-applications -->
|
||||
<!--<div class="wr-hidden-operation" data-operation="uninstall-apps">-->
|
||||
<!--<div class="panel panel-default operation-data" data-operation="UNINSTALL_APPLICATION">-->
|
||||
<!--<div class="panel-heading" role="tab">-->
|
||||
<!--<h2 class="sub-title panel-title">-->
|
||||
<!--<br>-->
|
||||
<!-- App Uninstallations-->
|
||||
<!--<label class="wr-input-control switch" data-toggle="collapse" data-target="#uninstallApp">-->
|
||||
<!--<input type="checkbox" />-->
|
||||
<!--<span class="helper"></span>-->
|
||||
<!--<span class="text"></span>-->
|
||||
<!--</label>-->
|
||||
<!--<br>-->
|
||||
<!--<br>-->
|
||||
<!--</h2>-->
|
||||
<!--</div>-->
|
||||
<!--<div id="uninstallApp" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="uninstallApp">-->
|
||||
<!--<div id="uninstall-app-feature-error-msg" class="alert alert-danger hidden" role="alert">-->
|
||||
<!--<i class="icon fw fw-error"></i><span></span>-->
|
||||
<!--</div>-->
|
||||
<!--<label class="wr-input-label" title="Application Identifier">App Identifier<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>-->
|
||||
<!--<!--span>Identification of the wireless network to connect to</span-->
|
||||
<!--<div class="wr-input-control">-->
|
||||
<!--<input type="text" class="form-control operationDataKeys" id="package-name" data-key="packageName" placeholder="Enter App Identifier"/>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!-- /uninstall-applications -->
|
||||
|
||||
<!-- /web-clips -->
|
||||
<!--<div class="wr-hidden-operation" data-operation="web-clips">-->
|
||||
<!--<div class="panel panel-default operation-data" data-operation="WEBCLIP">-->
|
||||
<!--<div class="panel-heading" role="tab">-->
|
||||
<!--<h2 class="sub-title panel-title">-->
|
||||
<!--<br>-->
|
||||
<!-- Web clips-->
|
||||
<!--<label class="wr-input-control switch" data-toggle="collapse" data-target="#installWebClip">-->
|
||||
<!--<input type="checkbox" />-->
|
||||
<!--<span class="helper"></span>-->
|
||||
<!--<span class="text"></span>-->
|
||||
<!--</label>-->
|
||||
<!--<br>-->
|
||||
<!--<br>-->
|
||||
<!--</h2>-->
|
||||
<!--</div>-->
|
||||
<!--<div id="installWebClip" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="installWebClip">-->
|
||||
<!--<div id="install-webclip-feature-error-msg" class="alert alert-danger hidden" role="alert">-->
|
||||
<!--<i class="icon fw fw-error"></i><span></span>-->
|
||||
<!--</div>-->
|
||||
<!--<label class="wr-input-label" title="Title of the web clip">Title<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>-->
|
||||
<!--<div class="wr-input-control">-->
|
||||
<!--<input type="text" class="form-control operationDataKeys" id="title" data-key="title" placeholder="Enter Title"/>-->
|
||||
<!--</div>-->
|
||||
<!--<label class="wr-input-label" title="URL">URL<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>-->
|
||||
<!--<div class="wr-input-control">-->
|
||||
<!--<input type="text" class="form-control operationDataKeys" id="url" data-key="url" placeholder="Enter URL"/>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!-- /web-clips -->
|
||||
</div>
|
||||
</div>
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,460 @@
|
||||
<div class="row no-gutter">
|
||||
<div class="wr-hidden-operations-nav col-lg-4">
|
||||
<a href="javascript:void(0)" onclick="showAdvanceOperation('passcode-policy', this)" class="selected">
|
||||
<span class="wr-hidden-operations-icon fw-stack">
|
||||
<i class="fw fw-key fw-stack-2x"></i>
|
||||
</span>
|
||||
Passcode Policy
|
||||
<span id="passcode-policy-configured" class="has-configured status-icon hidden"><i class="fw fw-ok"></i></span>
|
||||
<span id="passcode-policy-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></i></span>
|
||||
<span id="passcode-policy-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span>
|
||||
</a>
|
||||
<a href="javascript:void(0)" onclick="showAdvanceOperation('camera', this)">
|
||||
<span class="wr-hidden-operations-icon fw-stack">
|
||||
<i class="fw fw-block fw-stack-2x"></i>
|
||||
</span>
|
||||
Restrictions on Camera
|
||||
<span id="camera-configured" class="has-configured status-icon hidden"><i class="fw fw-ok"></i></span>
|
||||
<span id="camera-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></i></span>
|
||||
<span class="camera-error status-icon hidden"><i class="fw fw-error"></i></span>
|
||||
</a>
|
||||
<a href="javascript:void(0)" onclick="showAdvanceOperation('encrypt-storage', this)">
|
||||
<span class="wr-hidden-operations-icon fw-stack">
|
||||
<i class="fw fw-security fw-stack-2x"></i>
|
||||
</span>
|
||||
Encryption Settings
|
||||
<span id="encrypt-storage-configured" class="has-configured status-icon hidden"><i class="fw fw-ok"></i></span>
|
||||
<span id="encrypt-storage-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></i></span>
|
||||
<span id="encrypt-storage-error" class="encryption-error status-icon hidden"><i class="fw fw-error"></i></span>
|
||||
</a>
|
||||
<!--<a href="javascript:void(0)" onclick="showAdvanceOperation('wifi', this)">-->
|
||||
<!--<span class="wr-hidden-operations-icon fw-stack">-->
|
||||
<!--<i class="fw fw-wifi fw-stack-2x"></i>-->
|
||||
<!--</span>-->
|
||||
<!--Wi-Fi Settings-->
|
||||
<!--<span id="wifi-configured" class="has-configured status-icon hidden"><i class="fw fw-ok"></i></span>-->
|
||||
<!--<span id="wifi-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></i></span>-->
|
||||
<!--<span id="wifi-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span>-->
|
||||
<!--</a>-->
|
||||
<!--<a href="javascript:void(0)" onclick="showAdvanceOperation('install-apps', this)">-->
|
||||
<!--<span class="wr-hidden-operations-icon fw-stack">-->
|
||||
<!--<i class="fw fw-application fw-stack-2x"></i>-->
|
||||
<!--</span>-->
|
||||
<!--App Installations-->
|
||||
<!--</a>-->
|
||||
<!--<a href="javascript:void(0)" onclick="showAdvanceOperation('blacklist-apps', this)">-->
|
||||
<!--<span class="wr-hidden-operations-icon fw-stack">-->
|
||||
<!--<i class="fw fw-block fw-stack-2x"></i>-->
|
||||
<!--</span>-->
|
||||
<!--App Blacklisting-->
|
||||
<!--</a>-->
|
||||
<!--<a href="javascript:void(0)" onclick="showAdvanceOperation('web-clips', this)">-->
|
||||
<!--<span class="wr-hidden-operations-icon fw-stack">-->
|
||||
<!--<i class="fw fw-website fw-stack-2x"></i>-->
|
||||
<!--</span>-->
|
||||
<!--Web clips-->
|
||||
<!--</a>-->
|
||||
</div>
|
||||
|
||||
<div class="wr-hidden-operations-content col-lg-8">
|
||||
<!-- passcode-policy -->
|
||||
<div class="wr-hidden-operation" data-operation="passcode-policy" style="display: block">
|
||||
<div class="panel panel-default operation-data" data-operation="passcode-policy" data-operation-code="PASSCODE_POLICY">
|
||||
<div id="passcode-policy-heading" class="panel-heading" role="tab">
|
||||
<h2 class="sub-title panel-title">
|
||||
Passcode Policy
|
||||
<label id="passcode-policy-lbl" class="wr-input-control switch" data-toggle="collapse" data-target="#passcode-policy-body">
|
||||
<input type="checkbox" />
|
||||
<span class="helper"></span>
|
||||
<span class="text"></span>
|
||||
</label>
|
||||
<hr>
|
||||
<div class="panel-title-description">
|
||||
This configuration can be used to set a passcode policy to an Windows Device.
|
||||
Once this configuration profile is installed on a device, corresponding users will not be able
|
||||
to modify these settings on their devices.
|
||||
</div>
|
||||
</h2>
|
||||
</div>
|
||||
<div id="passcode-policy-body" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="passcode-policy-body">
|
||||
|
||||
<div id="passcode-policy-feature-error-msg" class="alert alert-danger hidden" role="alert">
|
||||
<i class="icon fw fw-error"></i><span></span>
|
||||
</div>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-control checkbox">
|
||||
<input id="passcode-policy-allow-simple" type="checkbox" class="form-control operationDataKeys" data-key="passcodePolicyAllowSimple" checked="checked" />
|
||||
<span class="helper" title="Permit the use of repeating, ascending and descending character sequences">
|
||||
Allow simple value
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-control checkbox">
|
||||
<input id="passcode-policy-require-alphanumeric" type="checkbox" class="form-control operationDataKeys" data-key="passcodePolicyRequireAlphanumeric" checked="checked" />
|
||||
<span class="helper" title="Require passcode to contain both letters and numbers">
|
||||
Require alphanumeric value
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-label" for="passcode-policy-min-length">
|
||||
Minimum passcode length
|
||||
<span class="helper" title="Minimum number of characters allowed in a passcode">
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
<select id="passcode-policy-min-length" class="form-control operationDataKeys" data-key="passcodePolicyMinLength" data-default="0">
|
||||
<option value="" selected="selected">
|
||||
None
|
||||
</option>
|
||||
<option value="1">01</option>
|
||||
<option value="2">02</option>
|
||||
<option value="3">03</option>
|
||||
<option value="4">04</option>
|
||||
<option value="5">05</option>
|
||||
<option value="6">06</option>
|
||||
<option value="7">07</option>
|
||||
<option value="8">08</option>
|
||||
<option value="9">09</option>
|
||||
<option value="10">10</option>
|
||||
<option value="11">11</option>
|
||||
<option value="12">12</option>
|
||||
<option value="13">13</option>
|
||||
<option value="14">14</option>
|
||||
<option value="15">15</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-label" for="passcode-policy-min-complex-chars">
|
||||
Minimum number of complex characters
|
||||
<span class="helper" title="Minimum number of complex or non-alphanumeric characters allowed in a passcode">
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
<select id="passcode-policy-min-complex-chars" class="form-control operationDataKeys" data-key="passcodePolicyMinComplexChars" data-default="0">
|
||||
<option value="" selected="selected">
|
||||
None
|
||||
</option>
|
||||
<option value="1">01</option>
|
||||
<option value="2">02</option>
|
||||
<option value="3">03</option>
|
||||
<option value="4">04</option>
|
||||
<option value="5">05</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-label" for="passcode-policy-max-passcode-age-in-days">
|
||||
Maximum passcode age in days
|
||||
<span class="helper" title="Number of days after which a passcode must be changed">
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
<br>
|
||||
( Should be in between 1-to-730 days or none )
|
||||
</label>
|
||||
<input id="passcode-policy-max-passcode-age-in-days" type="text" class="form-control operationDataKeys" data-key="passcodePolicyMaxPasscodeAgeInDays" maxlength="3" placeholder="[ Requires Number Input ]">
|
||||
</div>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-label" for="passcode-policy-passcode-history">
|
||||
Passcode history
|
||||
<span class="helper" title="Number of consequent unique passcodes to be used before reuse">
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
<br>
|
||||
( Should be in between 1-to-50 passcodes or none )
|
||||
</label>
|
||||
<input id="passcode-policy-passcode-history" type="text" class="form-control operationDataKeys" data-key="passcodePolicyPasscodeHistory" maxlength="2" placeholder="[ Requires Number Input ]">
|
||||
</div>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-label" for="passcodePolicyMaxFailedAttempts">
|
||||
Maximum number of failed attempts
|
||||
<span class="helper" title="Maximum number of passcode entry attempts allowed before all data on a device will be erased">
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
<select id="passcode-policy-max-failed-attempts" class="form-control operationDataKeys" data-key="passcodePolicyMaxFailedAttempts" data-default="0">
|
||||
<option value="" selected="selected">
|
||||
None
|
||||
</option>
|
||||
<option value="3">03</option>
|
||||
<option value="4">04</option>
|
||||
<option value="5">05</option>
|
||||
<option value="6">06</option>
|
||||
<option value="7">07</option>
|
||||
<option value="8">08</option>
|
||||
<option value="9">09</option>
|
||||
<option value="10">10</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /passcode-policy -->
|
||||
|
||||
<!-- camera -->
|
||||
<div class="wr-hidden-operation" data-operation="camera">
|
||||
<div class="panel panel-default operation-data" data-operation="camera" data-operation-code="CAMERA">
|
||||
<div id="camera-heading" class="panel-heading" role="tab">
|
||||
<h2 class="sub-title panel-title">
|
||||
Restrictions on Camera
|
||||
<label class="wr-input-control switch" data-toggle="collapse" data-target="#camera-body">
|
||||
<input type="checkbox" />
|
||||
<span class="helper"></span>
|
||||
<span class="text"></span>
|
||||
</label>
|
||||
<hr>
|
||||
<div class="panel-title-description">
|
||||
This configuration can be used to restrict the usage of camera on an Windows device together with all the applications using the camera.
|
||||
Once this configuration profile is installed on a device, corresponding users will not be able
|
||||
to modify these settings on their devices.
|
||||
</div>
|
||||
</h2>
|
||||
</div>
|
||||
<div id="camera-body" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="camera-body">
|
||||
<div id="camera-feature-error-msg" class="alert alert-danger hidden" role="alert">
|
||||
<i class="icon fw fw-error"></i><span></span>
|
||||
</div>
|
||||
Un-check following checkbox in case you need to disable camera.
|
||||
<br>
|
||||
<br>
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-control checkbox">
|
||||
<input id="camera-enabled" type="checkbox" class="operationDataKeys" data-key="cameraEnabled" checked="checked" />
|
||||
<span class="helper" title="Having this checked would enable Usage of phone camera in the device.">
|
||||
Allow use of camera
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /camera -->
|
||||
|
||||
<!-- encrypt-storage -->
|
||||
<div class="wr-hidden-operation" data-operation="encrypt-storage">
|
||||
<div class="panel panel-default operation-data" data-operation="encrypt-storage" data-operation-code="ENCRYPT_STORAGE">
|
||||
<div id="encrypt-storage-heading" class="panel-heading" role="tab">
|
||||
<h2 class="sub-title panel-title">
|
||||
Encryption Settings
|
||||
<label class="wr-input-control switch" data-toggle="collapse" data-target="#encrypt-storage-body">
|
||||
<input type="checkbox" />
|
||||
<span class="helper"></span>
|
||||
<span class="text"></span>
|
||||
</label>
|
||||
<hr>
|
||||
<div class="panel-title-description">
|
||||
This configuration can be used to encrypt data on an Windows device, when the device is locked and
|
||||
make it readable when the passcode is entered. Once this configuration profile is installed on a device,
|
||||
corresponding users will not be able to modify these settings on their devices.
|
||||
</div>
|
||||
</h2>
|
||||
</div>
|
||||
<div id="encrypt-storage-body" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="encrypt-storage-body">
|
||||
<div id="encrypt-storage-feature-error-msg" class="alert alert-danger hidden" role="alert">
|
||||
<i class="icon fw fw-error"></i><span></span>
|
||||
</div>
|
||||
Un-check following checkbox in case you need to disable storage-encryption.
|
||||
<br>
|
||||
<br>
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-control checkbox">
|
||||
<input id="encrypt-storage-enabled" type="checkbox" class="operationDataKeys" data-key="encryptStorageEnabled" checked="checked" />
|
||||
<span class="helper" title="Having this checked would enable Storage-encryption in the device">
|
||||
Enable storage-encryption
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /encrypt-storage -->
|
||||
|
||||
<!-- wi-fi -->
|
||||
<!--<div class="wr-hidden-operation" data-operation="wifi">-->
|
||||
<!--<div class="panel panel-default operation-data" data-operation="wifi" data-operation-code="WIFI">-->
|
||||
<!--<div id="wifi-heading" class="panel-heading" role="tab">-->
|
||||
<!--<h2 class="sub-title panel-title">-->
|
||||
<!--Wi-Fi Settings-->
|
||||
<!--<label class="wr-input-control switch" data-toggle="collapse" data-target="#wifi-body">-->
|
||||
<!--<input type="checkbox" />-->
|
||||
<!--<span class="helper"></span>-->
|
||||
<!--<span class="text"></span>-->
|
||||
<!--</label>-->
|
||||
<!--<hr>-->
|
||||
<!--<div class="panel-title-description">-->
|
||||
<!--This configurations can be used to configure Wi-Fi access on an Android device.-->
|
||||
<!--Once this configuration profile is installed on a device, corresponding users will not be able-->
|
||||
<!--to modify these settings on their devices.-->
|
||||
<!--</div>-->
|
||||
<!--</h2>-->
|
||||
<!--</div>-->
|
||||
<!--<div id="wifi-body" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="wifi-body">-->
|
||||
<!--<!–<div class="cloneable">–>-->
|
||||
<!--<!–<a href="#" class="multi-view add enabled">–>-->
|
||||
<!--<!–<span class="icon fw-stack">–>-->
|
||||
<!--<!–<i class="fw fw-add fw-stack-1x"></i>–>-->
|
||||
<!--<!–<i class="fw fw-ring fw-stack-2x"></i>–>-->
|
||||
<!--<!–</span>–>-->
|
||||
<!--<!–</a>–>-->
|
||||
<!--<!–<a href="#" class="multi-view remove disabled">–>-->
|
||||
<!--<!–<span class="icon fw-stack">–>-->
|
||||
<!--<!–<i class="fw fw-minus fw-stack-1x"></i>–>-->
|
||||
<!--<!–<i class="fw fw-ring fw-stack-2x"></i>–>-->
|
||||
<!--<!–</span>–>-->
|
||||
<!--<!–</a>–>-->
|
||||
<!--<!–Wi-Fi Setting :–>-->
|
||||
<!--<!–<br>–>-->
|
||||
<!--<!–<br>–>-->
|
||||
<!--Please note that * sign represents required fields of data.-->
|
||||
<!--<br>-->
|
||||
<!--<br>-->
|
||||
<!--<div id="wifi-feature-error-msg" class="alert alert-danger hidden" role="alert">-->
|
||||
<!--<i class="icon fw fw-error"></i><span></span>-->
|
||||
<!--</div>-->
|
||||
<!--<div class="wr-input-control">-->
|
||||
<!--<label class="wr-input-label" for="wifi-ssid">-->
|
||||
<!--Service Set Identifier (SSID) *-->
|
||||
<!--<span class="helper" title="Identification of the wireless network to be configured.">-->
|
||||
<!--<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>-->
|
||||
<!--</span>-->
|
||||
<!--<br>-->
|
||||
<!--( should be 1-to-30 characters long )-->
|
||||
<!--</label>-->
|
||||
<!--<input id="wifi-ssid" type="text" class="form-control operationDataKeys" data-key="wifiSSID" maxlength="100" placeholder="[ Required field ]"/>-->
|
||||
<!--</div>-->
|
||||
<!--<div class="wr-input-control">-->
|
||||
<!--<label class="wr-input-label" for="wifi-password">-->
|
||||
<!--Password-->
|
||||
<!--<span class="helper" title="Password for the wireless network.">-->
|
||||
<!--<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>-->
|
||||
<!--</span>-->
|
||||
<!--</label>-->
|
||||
<!--<input id="wifi-password" type="text" class="form-control operationDataKeys" data-key="wifiPassword" maxlength="100" placeholder="[ Optional field ]"/>-->
|
||||
<!--</div>-->
|
||||
<!--<!–</div>–>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!-- /wi-fi -->
|
||||
|
||||
<!-- install-applications -->
|
||||
<!--<div class="wr-hidden-operation" data-operation="install-apps">-->
|
||||
<!--<div class="panel panel-default operation-data" data-operation="INSTALL_APPLICATION">-->
|
||||
<!--<div class="panel-heading" role="tab">-->
|
||||
<!--<h2 class="sub-title panel-title">-->
|
||||
<!--<br>-->
|
||||
<!-- App Installations-->
|
||||
<!--<label class="wr-input-control switch" data-toggle="collapse" data-target="#installApp">-->
|
||||
<!--<input type="checkbox" />-->
|
||||
<!--<span class="helper"></span>-->
|
||||
<!--<span class="text"></span>-->
|
||||
<!--</label>-->
|
||||
<!--<br>-->
|
||||
<!--<br>-->
|
||||
<!--</h2>-->
|
||||
<!--</div>-->
|
||||
<!--<div id="installApp" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="installApp">-->
|
||||
<!--<div id="install-app-feature-error-msg" class="alert alert-danger hidden" role="alert">-->
|
||||
<!--<i class="icon fw fw-error"></i><span></span>-->
|
||||
<!--</div>-->
|
||||
<!--<label class="wr-input-label" title="Application Identifier">App Identifier<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>-->
|
||||
|
||||
<!--<div class="wr-input-control">-->
|
||||
<!--<input type="text" class="form-control operationDataKeys" id="package-name" data-key="packageName" placeholder="Enter App Identifier"/>-->
|
||||
<!--</div>-->
|
||||
<!--<div class="wr-input-control">-->
|
||||
<!--<label class="wr-input-control dropdown">-->
|
||||
<!--<span class="helper" title="App Type">App Type<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></span>-->
|
||||
<!--<select class="form-control col-sm-8 operationDataKeys appTypesInput" id="type" data-key="type">-->
|
||||
<!--<option>Public</option>-->
|
||||
<!--<option>Enterprise</option>-->
|
||||
<!--</select>-->
|
||||
<!--</label>-->
|
||||
<!--</div>-->
|
||||
<!--<label class="wr-input-label" title="URL">URL<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>-->
|
||||
|
||||
<!--<div class="wr-input-control">-->
|
||||
<!--<input type="text" class="form-control operationDataKeys" id="url" data-key="url" placeholder="Enter URL"/>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!-- /install-applications -->
|
||||
|
||||
<!-- /uninstall-applications -->
|
||||
<!--<div class="wr-hidden-operation" data-operation="uninstall-apps">-->
|
||||
<!--<div class="panel panel-default operation-data" data-operation="UNINSTALL_APPLICATION">-->
|
||||
<!--<div class="panel-heading" role="tab">-->
|
||||
<!--<h2 class="sub-title panel-title">-->
|
||||
<!--<br>-->
|
||||
<!-- App Uninstallations-->
|
||||
<!--<label class="wr-input-control switch" data-toggle="collapse" data-target="#uninstallApp">-->
|
||||
<!--<input type="checkbox" />-->
|
||||
<!--<span class="helper"></span>-->
|
||||
<!--<span class="text"></span>-->
|
||||
<!--</label>-->
|
||||
<!--<br>-->
|
||||
<!--<br>-->
|
||||
<!--</h2>-->
|
||||
<!--</div>-->
|
||||
<!--<div id="uninstallApp" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="uninstallApp">-->
|
||||
<!--<div id="uninstall-app-feature-error-msg" class="alert alert-danger hidden" role="alert">-->
|
||||
<!--<i class="icon fw fw-error"></i><span></span>-->
|
||||
<!--</div>-->
|
||||
<!--<label class="wr-input-label" title="Application Identifier">App Identifier<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>-->
|
||||
<!--<!--span>Identification of the wireless network to connect to</span-->
|
||||
<!--<div class="wr-input-control">-->
|
||||
<!--<input type="text" class="form-control operationDataKeys" id="package-name" data-key="packageName" placeholder="Enter App Identifier"/>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!-- /uninstall-applications -->
|
||||
|
||||
<!-- /web-clips -->
|
||||
<!--<div class="wr-hidden-operation" data-operation="web-clips">-->
|
||||
<!--<div class="panel panel-default operation-data" data-operation="WEBCLIP">-->
|
||||
<!--<div class="panel-heading" role="tab">-->
|
||||
<!--<h2 class="sub-title panel-title">-->
|
||||
<!--<br>-->
|
||||
<!-- Web clips-->
|
||||
<!--<label class="wr-input-control switch" data-toggle="collapse" data-target="#installWebClip">-->
|
||||
<!--<input type="checkbox" />-->
|
||||
<!--<span class="helper"></span>-->
|
||||
<!--<span class="text"></span>-->
|
||||
<!--</label>-->
|
||||
<!--<br>-->
|
||||
<!--<br>-->
|
||||
<!--</h2>-->
|
||||
<!--</div>-->
|
||||
<!--<div id="installWebClip" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="installWebClip">-->
|
||||
<!--<div id="install-webclip-feature-error-msg" class="alert alert-danger hidden" role="alert">-->
|
||||
<!--<i class="icon fw fw-error"></i><span></span>-->
|
||||
<!--</div>-->
|
||||
<!--<label class="wr-input-label" title="Title of the web clip">Title<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>-->
|
||||
<!--<div class="wr-input-control">-->
|
||||
<!--<input type="text" class="form-control operationDataKeys" id="title" data-key="title" placeholder="Enter Title"/>-->
|
||||
<!--</div>-->
|
||||
<!--<label class="wr-input-label" title="URL">URL<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>-->
|
||||
<!--<div class="wr-input-control">-->
|
||||
<!--<input type="text" class="form-control operationDataKeys" id="url" data-key="url" placeholder="Enter URL"/>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!-- /web-clips -->
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,275 @@
|
||||
<span id="platform" class="hidden" data-platform="{{type.name}}" data-platform-id="{{type.id}}"></span>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="wr-steps hidden">
|
||||
<div class="col-md-3 col-xs-3">
|
||||
<div class="itm-wiz" data-step="policy-platform">
|
||||
<div class="wiz-no">1</div>
|
||||
<div class="wiz-lbl hidden-xs"><span>Select a platform</span></div>
|
||||
</div>
|
||||
<br class="c-both"/>
|
||||
</div>
|
||||
<div class="col-md-3 col-xs-3">
|
||||
<div class="itm-wiz itm-wiz-current" data-step="policy-profile">
|
||||
<div class="wiz-no">2</div>
|
||||
<div class="wiz-lbl hidden-xs"><span>Configure profile</span></div>
|
||||
</div>
|
||||
<br class="c-both"/>
|
||||
</div>
|
||||
<div class="col-md-3 col-xs-3">
|
||||
<div class="itm-wiz" data-step="policy-criteria">
|
||||
<div class="wiz-no">3</div>
|
||||
<div class="wiz-lbl hidden-xs"><span>Assign to groups</span></div>
|
||||
</div>
|
||||
<br class="c-both"/>
|
||||
</div>
|
||||
<div class="col-md-3 col-xs-3">
|
||||
<div class="itm-wiz" data-step="policy-naming">
|
||||
<div class="wiz-no">4</div>
|
||||
<div class="wiz-lbl hidden-xs"><span>Publish to devices</span></div>
|
||||
</div>
|
||||
<br class="c-both"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container col-centered wr-content policy-message hidden">
|
||||
<div class="wr-form">
|
||||
<h1 id="policy-message-page-wizard-title" class="page-sub-title">Policy creation is
|
||||
successful.</h1>
|
||||
<br>Please click <b>"Add Another Policy"</b>, if you wish to add another policy or
|
||||
click
|
||||
<b>"View policy list"</b> to complete the process and go back to the policy list.
|
||||
<hr>
|
||||
<button class="wr-btn wizard-stepper" data-current="policy-message"
|
||||
data-direct="{{@app.context}}/policies">
|
||||
View policy list
|
||||
</button>
|
||||
<a href="{{@app.context}}/policies/add-policy" class="cu-btn-inner">
|
||||
<span class="fw-stack">
|
||||
<i class="fw fw-ring fw-stack-2x"></i>
|
||||
<i class="fw fw-add fw-stack-1x"></i>
|
||||
</span>
|
||||
Add another policy
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container col-centered wr-content policy-naming hidden">
|
||||
<div class="wr-form">
|
||||
<h1 id="policy-naming-page-wizard-title" class="page-sub-title">ADD POLICY</h1>
|
||||
<hr>
|
||||
<div id="policy-naming-wizard-steps" class="row wr-wizard"></div>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h4>Step 4: Publish to devices</h4>
|
||||
<br>
|
||||
|
||||
<div id="policy-naming-main-error-msg" class="alert alert-danger hidden"
|
||||
role="alert">
|
||||
<i class="icon fw fw-error"></i><span></span>
|
||||
</div>
|
||||
<div>
|
||||
<label class="wr-input-label">
|
||||
Set a Name to your Policy *<br>
|
||||
( should be 1-to-30 characters long )
|
||||
</label>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<div class="cus-col-50">
|
||||
<input id="policy-name-input" class="form-control" type="text"
|
||||
value="" placeholder="[ Required field ]"/>
|
||||
</div>
|
||||
<br class="c-both"/>
|
||||
</div>
|
||||
<label class="wr-input-label">
|
||||
Add a description
|
||||
</label>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<div class="cus-col-50">
|
||||
<textarea id="policy-description-input" class="form-control"
|
||||
rows="10" placeholder="[ Optional field ]"></textarea>
|
||||
</div>
|
||||
<br class="c-both"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wr-input-control wr-btn-grp">
|
||||
<a href="javascript:void(0)" class="wr-btn wizard-stepper"
|
||||
data-is-back-btn="true" data-current="policy-naming"
|
||||
data-next="policy-criteria">
|
||||
Back
|
||||
</a>
|
||||
<a href="javascript:void(0)" class="wr-btn wizard-stepper"
|
||||
data-current="policy-naming-publish" data-next="policy-message"
|
||||
data-validate="true">
|
||||
Save & Publish
|
||||
</a>
|
||||
<a href="javascript:void(0)" class="wr-btn wizard-stepper"
|
||||
data-current="policy-naming" data-next="policy-message"
|
||||
data-validate="true">
|
||||
Save
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container col-centered wr-content policy-criteria hidden">
|
||||
<div class="wr-form">
|
||||
<h1 id="policy-criteria-page-wizard-title" class="page-sub-title">ADD POLICY</h1>
|
||||
<hr>
|
||||
<div id="policy-criteria-wizard-steps" class="row wr-wizard"></div>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h4>Step 3: Assign to groups</h4>
|
||||
<br>
|
||||
|
||||
<div>
|
||||
<label class="wr-input-label">
|
||||
Set device ownership type
|
||||
</label>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<div class="cus-col-50">
|
||||
<select id="ownership-input" class="form-control">
|
||||
<option value="ANY" selected>ANY</option>
|
||||
<option value="BYOD">BYOD (Bring Your Own Device)</option>
|
||||
<option value="COPE">COPE (Corporate-Owned, Personally
|
||||
Enabled)
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
<br class="c-both"/>
|
||||
</div>
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-control radio light">
|
||||
<input id="user-roles-radio-btn" type="radio"
|
||||
name="select-users-radio-btn" class="select-users-radio"
|
||||
checked/>
|
||||
<span class="helper"> Set user role(s)</span>
|
||||
</label>
|
||||
<label class="wr-input-control radio light" rel="assetfilter">
|
||||
<input id="users-radio-btn" type="radio"
|
||||
name="select-users-radio-btn"
|
||||
class="select-users-radio"/>
|
||||
<span class="helper"> Set user(s)</span>
|
||||
</label>
|
||||
</div>
|
||||
<div id="user-roles-select-field" class="select-users">
|
||||
<div class="wr-input-control">
|
||||
<div class="cus-col-50">
|
||||
<select id="user-roles-input" class="form-control select2"
|
||||
multiple="multiple">
|
||||
<option value="ANY" selected>ANY</option>
|
||||
{{#each roles}}
|
||||
<option>{{this}}</option>
|
||||
{{/each}}
|
||||
</select>
|
||||
</div>
|
||||
<br class="c-both"/>
|
||||
</div>
|
||||
</div>
|
||||
<div id="users-select-field" class="select-users">
|
||||
<div class="wr-input-control">
|
||||
<div class="cus-col-50">
|
||||
<select id="users-input" class="form-control select2"
|
||||
multiple="multiple">
|
||||
</select>
|
||||
</div>
|
||||
<br class="c-both"/>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<label class="wr-input-label" title="">
|
||||
Set an action upon non-compliance
|
||||
</label>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<div class="cus-col-50">
|
||||
<select id="action-input" class="form-control">
|
||||
<option data-action="enforce" selected>Enforce</option>
|
||||
<option data-action="warn">Warn</option>
|
||||
<option data-action="monitor">Monitor</option>
|
||||
</select>
|
||||
</div>
|
||||
<br class="c-both"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wr-input-control wr-btn-grp">
|
||||
<a href="javascript:void(0)" class="wr-btn wizard-stepper"
|
||||
data-is-back-btn="true" data-current="policy-criteria"
|
||||
data-next="policy-profile">
|
||||
Back
|
||||
</a>
|
||||
<a href="javascript:void(0)" class="wr-btn wizard-stepper"
|
||||
data-current="policy-criteria" data-next="policy-naming"
|
||||
data-validate="false">
|
||||
Continue
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container col-centered wr-content policy-profile">
|
||||
<div class="wr-form">
|
||||
<h1 id="policy-profile-page-wizard-title" class="page-sub-title">ADD POLICY</h1>
|
||||
<hr>
|
||||
<div id="policy-profile-wizard-steps" class="row wr-wizard"></div>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h4>Step 2: Configure profile</h4>
|
||||
<br>
|
||||
|
||||
<div id="policy-profile-main-error-msg" class="alert alert-danger hidden"
|
||||
role="alert">
|
||||
<i class="icon fw fw-error"></i><span></span>
|
||||
</div>
|
||||
<div class="wr-advance-operations">
|
||||
<div class="wr-advance-operations-init">
|
||||
<br>
|
||||
|
||||
<i class="fw fw-settings fw-spin fw-2x"></i>
|
||||
|
||||
Loading platform features . . .
|
||||
<br>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wr-input-control wr-btn-grp">
|
||||
<a href="{{@app.context}}/policies/add-policy"
|
||||
class="wr-btn wizard-stepper" data-is-back-btn="true"
|
||||
data-current="policy-profile" data-next="policy-platform">
|
||||
Back
|
||||
</a>
|
||||
<a href="javascript:void(0)" class="wr-btn wizard-stepper"
|
||||
data-current="policy-profile" data-next="policy-criteria"
|
||||
data-validate="true">
|
||||
Continue
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- content -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{{#zone "bottomJs"}}
|
||||
<script id="hidden-operations-ios" src="{{@unit.publicUri}}/templates/hidden-operations-ios.hbs"
|
||||
type="text/x-handlebars-template"></script>
|
||||
<script id="hidden-operations-android"
|
||||
src="{{@unit.publicUri}}/templates/hidden-operations-android.hbs"
|
||||
type="text/x-handlebars-template"></script>
|
||||
<script id="hidden-operations-windows"
|
||||
src="{{@unit.publicUri}}/templates/hidden-operations-windows.hbs"
|
||||
type="text/x-handlebars-template"></script>
|
||||
{{js "js/policy-create.js"}}
|
||||
{{/zone}}
|
@ -0,0 +1,19 @@
|
||||
function onRequest(context) {
|
||||
var userModule = require("/app/modules/user.js")["userModule"];
|
||||
var utility = require('/app/modules/utility.js').utility;
|
||||
var response = userModule.getRoles();
|
||||
var wizardPage = {};
|
||||
if (response["status"] == "success") {
|
||||
wizardPage["roles"] = response["content"];
|
||||
}
|
||||
var deviceType = context.uriParams.deviceType;
|
||||
var typesListResponse = userModule.getPlatforms();
|
||||
if (typesListResponse["status"] == "success") {
|
||||
for (var type in typesListResponse["content"]) {
|
||||
if (deviceType == typesListResponse["content"][type]["name"]){
|
||||
wizardPage["type"] = typesListResponse["content"][type];
|
||||
}
|
||||
}
|
||||
}
|
||||
return wizardPage;
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"version" : "1.0.0"
|
||||
}
|
@ -0,0 +1 @@
|
||||
{{unit "mdm.unit.policy.edit"}}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"version": "1.0.0"
|
||||
}
|
@ -0,0 +1 @@
|
||||
{{unit "mdm.unit.policy.view"}}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"version": "1.0.0"
|
||||
}
|
Loading…
Reference in new issue