2 id="integrations-servicenowAccount"
3 class="page-layout simple tabbed"
7 <div class="header md-accent-bg" layout="row" layout-align="start center">
8 <div class="white-fg" layout="row" layout-align="start center" flex>
10 class="goto-servicenowAccounts-button md-icon-button"
11 aria-label="Go to servicenowAccounts"
12 ng-click="vm.gotoServicenowAccounts()"
14 translate-attr-aria-label="INTEGRATIONS.GO_TO_SERVICENOWACCOUNTS"
16 <md-icon md-font-icon="icon-arrow-left"></md-icon>
19 <div layout="row" layout-align="start center">
20 <div class="servicenowAccount-image" hide-xs>
21 <img ng-src="assets/images/business/servicenowAccounts.jpg" />
24 <div layout="column" layout-align="start start">
26 #{{vm.servicenowAccount.id}}
27 <span ng-if="vm.servicenowAccount.name"
28 >{{vm.servicenowAccount.name}}</span
31 <div class="subtitle secondary-text">
32 <span translate="INTEGRATIONS.CREATED_AT"></span>
33 <span>{{vm.servicenowAccount.createdAt | date:'medium'}}</span>
41 ng-click="vm.saveServicenowAccount()"
42 ng-if="vm.crudPermissions.canEdit"
43 class="send-button md-accent md-raised"
44 ng-disabled="(generalForm.$invalid) || (configurationsForm.$invalid)"
45 translate="INTEGRATIONS.SAVE"
46 translate-attr-aria-label="INTEGRATIONS.SAVE"
57 md-selected="vm.selectedTab"
58 md-stretch-tabs="always"
65 <span translate="INTEGRATIONS.ACCOUNT">ACCOUNT</span>
69 class="servicenowAccount-detail-form-container general md-background-bg md-whiteframe-1dp"
71 <div class="pb-16" layout="row" layout-align="start center">
72 <div class="h2 secondary-text" translate="INTEGRATIONS.GENERAL">
76 <form name="generalForm" novalidate>
77 <md-input-container class="md-block">
78 <label translate="INTEGRATIONS.NAME">Name</label>
82 ng-model="vm.servicenowAccount.name"
85 ng-disabled="!vm.crudPermissions.canEdit"
89 ng-messages="generalForm['name'].$error"
90 ng-show="generalForm['name'].$touched"
93 <div ng-message="required">
94 <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED"
95 >Name field is required</span
100 <md-input-container class="md-block">
101 <label translate="INTEGRATIONS.USERNAME">Username</label>
105 ng-model="vm.servicenowAccount.username"
107 ng-disabled="!vm.crudPermissions.canEdit"
111 ng-messages="generalForm['username'].$error"
112 ng-show="generalForm['username'].$touched"
115 <div ng-message="required">
116 <span translate="INTEGRATIONS.ERRORS.USERNAME_REQUIRED"
117 >Username field is required</span
121 </md-input-container>
122 <md-input-container class="md-block">
123 <label translate="INTEGRATIONS.PASSWORD">Password</label>
127 ng-model="vm.servicenowAccount.password"
128 placeholder="Password"
130 translate-attr-placeholder="INTEGRATIONS.PASSWORD"
133 <div ng-messages="generalForm['password'].$error" role="alert">
134 <div ng-message="required">
135 <span translate="INTEGRATIONS.ERRORS.PASSWORD_REQUIRED"
136 >Password field is required</span
139 <div ng-message="pattern">
141 translate="INTEGRATIONS.ERRORS.SECURE_PASSWORD_PATTERN"
142 >Must contain at least 8 characters, with a minimum of 1
143 lowercase letter, 1 uppercase letter, 1 numeric character
144 and 1 special character ~!?*@#$%^&-_=+[{]}.</span
148 </md-input-container>
150 <md-input-container class="md-block">
151 <label translate="INTEGRATIONS.EMAIL">Email</label>
155 ng-model="vm.servicenowAccount.email"
157 ng-disabled="!vm.crudPermissions.canEdit"
161 ng-messages="generalForm['email'].$error"
162 ng-show="generalForm['email'].$touched"
165 <div ng-message="required">
166 <span translate="INTEGRATIONS.ERRORS.EMAIL_REQUIRED"
167 >Email field is required</span
170 <div ng-message="email">
171 <span translate="INTEGRATIONS.ERRORS.EMAIL_MUST_VALID"
172 >Email must be a valid e-mail address</span
176 </md-input-container>
177 <md-input-container class="md-block">
178 <label translate="INTEGRATIONS.HOST">Host</label>
182 ng-model="vm.servicenowAccount.remoteUri"
184 ng-disabled="!vm.crudPermissions.canEdit"
188 ng-messages="generalForm['remoteUri'].$error"
189 ng-show="generalForm['remoteUri'].$touched"
192 <div ng-message="required">
193 <span translate="INTEGRATIONS.ERRORS.HOST_REQUIRED"
194 >Host field is required</span
197 <div ng-message="url">
198 <span translate="INTEGRATIONS.ERRORS.HOST_MUST_VALID_URL"
199 >Host must be a valid url http://www.xcally.com</span
203 </md-input-container>
204 <md-input-container class="md-block">
205 <label translate="INTEGRATIONS.MOTIONPROXYADDRESS"
206 >MotionProxyAddress</label
211 ng-model="vm.servicenowAccount.serverUrl"
212 ng-disabled="!vm.crudPermissions.canEdit"
216 <span translate="INTEGRATIONS.HELP.MOTIONPROXYADDRESS"></span>
219 ng-messages="generalForm['serverUrl'].$error"
220 ng-show="generalForm['serverUrl'].$touched"
223 <div ng-message="required">
225 translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_REQUIRED"
226 >MotionProxyAddress field is required</span
229 <div ng-message="url">
231 translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_MUST_VALID_URL"
232 >MotionProxyAddress must be a valid url
233 http://www.xcally.com</span
237 </md-input-container>
238 <md-input-container class="md-block">
239 <label translate="INTEGRATIONS.DESCRIPTION">Description</label>
243 ng-model="vm.servicenowAccount.description"
244 ng-disabled="!vm.crudPermissions.canEdit"
248 ng-messages="generalForm['description'].$error"
249 ng-show="generalForm['description'].$touched"
252 <div ng-message="required">
253 <span translate="INTEGRATIONS.ERRORS.DESCRIPTION_REQUIRED"
254 >Description field is required</span
258 </md-input-container>
265 <span translate="INTEGRATIONS.CONFIGURATIONS">CONFIGURATIONS</span>
269 class="servicenowAccount-detail-form-container configurations md-background-bg md-whiteframe-1dp"
271 <div class="pb-16" layout="row" layout-align="start center">
273 class="h2 secondary-text"
274 translate="INTEGRATIONS.CONFIGURATIONS"
280 ng-controller="ServicenowAccountConfigurationsController as vm_cc"
281 ng-init="vm_cc.init(vm.servicenowAccount, vm.crudPermissions)"
284 <md-card class="md-whiteframe-1dp" flex="30">
285 <div layout="row" layout-align="center center">
286 <md-subheader flex="75" class="md-no-sticky"
287 >{{ 'INTEGRATIONS.CONFIGURATIONS' | translate
292 ng-if="vm_cc.crudPermissions.canEdit"
293 ng-click="vm_cc.createOrEditServicenowConfiguration($event)"
294 class="md-icon-button"
295 aria-label="create servicenowConfiguration"
297 <md-icon md-font-icon="icon-plus"></md-icon>
303 layout-align="center center"
304 ng-repeat="servicenowConfiguration in vm_cc.configurations"
306 md-colors="{background: (vm_cc.selectedServicenowConfiguration == $index ? 'accent' : 'grey-A100')}"
307 ng-click="vm_cc.getServicenowConfiguration($index)"
309 <span class="text-truncate" flex="80"
310 >{{ servicenowConfiguration.name }}</span
312 <md-menu ng-if="vm_cc.crudPermissions.canDelete">
314 class="md-icon-button"
317 translate-attr-aria-label="INTEGRATIONS.MORE"
318 ng-click="$mdOpenMenu($event)"
320 <md-icon md-font-icon="icon-dots-vertical"></md-icon>
322 <md-menu-content width="3">
323 <md-menu-item ng-if="vm_cc.crudPermissions.canDelete">
325 ng-click="vm_cc.deleteServicenowConfiguration($event, servicenowConfiguration)"
326 translate="INTEGRATIONS.DELETE_SERVICENOWCONFIGURATION"
328 Delete ServicenowConfiguration
337 <md-card class="md-whiteframe-1dp" flex="65">
338 <md-tabs ng-if="vm_cc.configurations.length" md-dynamic-height>
341 <span translate="INTEGRATIONS.SUBJECTS">SUBJECTS</span>
345 class="md-table-toolbar md-default no-padding"
346 ng-hide="vm_cc.selectedSubjects.length"
348 <div class="md-toolbar-tools">
351 on-search="vm_cc.query.subject = query"
352 on-collapse="vm_cc.query.subject = undefined"
356 ng-if="vm_cc.crudPermissions.canEdit"
357 class="md-icon-button"
358 ng-click="vm_cc.createOrEditSubject($event)"
359 aria-label="add subject"
361 translate-attr-label="INTEGRATIONS.ADD_SUBJECT"
363 <md-icon md-font-icon="icon-plus"></md-icon>
368 class="md-table-toolbar md-accent"
369 ng-show="vm_cc.selectedSubjects.length"
371 <div class="md-toolbar-tools">
372 <span class="md-subhead"
373 >{{vm_cc.selectedSubjects.length}}
374 {{vm_cc.selectedSubjects.length > 1 ? 'items' :
375 'item'}} selected</span
379 ng-if="vm_cc.crudPermissions.canDelete"
380 class="md-icon-button"
381 ng-click="vm_cc.deleteSelectedSubjects($event)"
382 aria-label="delete selected"
384 translate-attr-label="INTEGRATIONS.DELETE_SELECTED"
386 <md-icon md-font-icon="icon-delete"></md-icon>
391 class="md-whiteframe-1dp padding-horizontal"
397 ng-model="vm_cc.selectedSubjects"
402 {{ 'INTEGRATIONS.ID' | translate }}
405 {{ 'INTEGRATIONS.TYPE' | translate }}
408 {{ 'INTEGRATIONS.CONTENT' | translate }}
410 <th md-column width="10px"></th>
418 ng-repeat="subject in vm_cc.subjects | filter: vm_cc.query.subject"
421 ng-click="vm_cc.createOrEditSubject($event, subject)"
428 ng-click="vm_cc.createOrEditSubject($event, subject)"
432 <span ng-if="subject.FieldId"
433 >{{subject.nameField ||
434 subject.idField}}</span
436 <span ng-if="!subject.FieldId"
437 >{{subject.type}}</span
441 ng-switch="subject.type"
442 ng-click="vm_cc.createOrEditSubject($event, subject)"
445 <span ng-switch-when="string"
446 >{{subject.content}}</span
449 ng-switch-when="variable"
451 >{{subject.variableName}}</span
454 ng-switch-when="customVariable"
457 vm_cc.variablesById[subject.VariableId].name
460 <span ng-switch-when="keyValue">
462 <span ng-switch="description.keyType">
463 <span ng-switch-when="string"
464 >{{subject.keyContent}}</span
467 ng-switch-when="variable"
469 >{{subject.variableName}}</span
472 ng-switch-when="customVariable"
475 vm_cc.variablesById[subject.VariableId].name
480 <span ng-switch-default
481 >{{subject.content}}</span
487 ng-if="!vm_cc.crudPermissions.readOnly"
491 class="md-icon-button"
494 translate-attr-aria-label="INTEGRATIONS.MORE"
495 ng-click="$mdOpenMenu($event)"
498 md-font-icon="icon-dots-vertical"
502 <md-menu-content width="3">
504 ng-if="vm_cc.crudPermissions.canEdit"
507 ng-click="vm_cc.createOrEditSubject($event, subject)"
508 translate="INTEGRATIONS.EDIT_SUBJECT"
514 ng-if="vm_cc.crudPermissions.canDelete"
517 ng-click="vm_cc.deleteSubjectConfirm($event, subject)"
518 translate="INTEGRATIONS.DELETE_SUBJECT"
529 </md-table-container>
535 <span translate="INTEGRATIONS.DESCRIPTIONS"
541 class="md-table-toolbar md-default no-padding"
542 ng-hide="vm_cc.selectedDescriptions.length"
544 <div class="md-toolbar-tools">
547 on-search="vm_cc.query.description = query"
548 on-collapse="vm_cc.query.description = undefined"
552 ng-if="vm_cc.crudPermissions.canEdit"
553 class="md-icon-button"
554 ng-click="vm_cc.createOrEditDescription($event)"
555 aria-label="add description"
557 translate-attr-label="INTEGRATIONS.ADD_DESCRIPTION"
559 <md-icon md-font-icon="icon-plus"></md-icon>
564 class="md-table-toolbar md-accent"
565 ng-show="vm_cc.selectedDescriptions.length"
567 <div class="md-toolbar-tools">
568 <span class="md-subhead"
569 >{{vm_cc.selectedDescriptions.length}}
570 {{vm_cc.selectedDescriptions.length > 1 ? 'items' :
571 'item'}} selected</span
575 ng-if="vm_cc.crudPermissions.canDelete"
576 class="md-icon-button"
577 ng-click="vm_cc.deleteSelectedDescriptions($event)"
578 aria-label="delete selected"
580 translate-attr-label="INTEGRATIONS.DELETE_SELECTED"
582 <md-icon md-font-icon="icon-delete"></md-icon>
587 class="md-whiteframe-1dp padding-horizontal"
593 ng-model="vm_cc.selectedDescriptions"
598 {{ 'INTEGRATIONS.ID' | translate }}
601 {{ 'INTEGRATIONS.TYPE' | translate }}
604 {{ 'INTEGRATIONS.CONTENT' | translate }}
606 <th md-column width="10px"></th>
612 md-select="description"
614 ng-repeat="description in vm_cc.descriptions | filter: vm_cc.query.description"
617 ng-click="vm_cc.createOrEditDescription($event, description)"
624 ng-click="vm_cc.createOrEditDescription($event, description)"
628 <span ng-if="description.FieldId"
629 >{{description.nameField ||
630 description.idField}}</span
632 <span ng-if="!description.FieldId"
633 >{{description.type}}</span
637 ng-switch="description.type"
638 ng-click="vm_cc.createOrEditDescription($event, description)"
641 <span ng-switch-when="string"
642 >{{description.content}}</span
645 ng-switch-when="variable"
647 >{{description.variableName}}</span
650 ng-switch-when="customVariable"
653 vm_cc.variablesById[description.VariableId].name
656 <span ng-switch-when="keyValue">
658 <span ng-switch="description.keyType">
659 <span ng-switch-when="string"
660 >{{description.keyContent}}</span
663 ng-switch-when="variable"
665 >{{description.variableName}}</span
668 ng-switch-when="customVariable"
671 vm_cc.variablesById[description.VariableId].name
676 <span ng-switch-default
677 >{{description.content}}</span
683 ng-if="!vm_cc.crudPermissions.readOnly"
687 class="md-icon-button"
690 translate-attr-aria-label="INTEGRATIONS.MORE"
691 ng-click="$mdOpenMenu($event)"
694 md-font-icon="icon-dots-vertical"
698 <md-menu-content width="3">
700 ng-if="vm_cc.crudPermissions.canEdit"
703 ng-click="vm_cc.createOrEditDescription($event, description)"
704 translate="INTEGRATIONS.EDIT_DESCRIPTION"
710 ng-if="vm_cc.crudPermissions.canDelete"
713 ng-click="vm_cc.deleteDescriptionConfirm($event, description)"
714 translate="INTEGRATIONS.DELETE_DESCRIPTION"
725 </md-table-container>
731 ng-if="!vm_cc.configurations.length && vm_cc.crudPermissions.canEdit"
732 ng-click="vm_cc.createOrEditServicenowConfiguration($event)"
735 layout-align="center center"
739 class="padding-20 md-whiteframe-3dp md-accent-bg"
741 layout-align="center center"
743 <md-button class="md-icon-button">
744 <md-icon md-font-icon="icon-plus"></md-icon>
747 aria-label="add configuration"
749 translate-attr-label="INTEGRATIONS.ADD_CONFIGURATION"
750 >ADD CONFIGURATION</span