diff --git a/gui/app/components/section/gemini/type-editor.js b/gui/app/components/section/gemini/type-editor.js index 787cb3a7..3d0b93ca 100644 --- a/gui/app/components/section/gemini/type-editor.js +++ b/gui/app/components/section/gemini/type-editor.js @@ -10,15 +10,12 @@ // https://documize.com import { set } from '@ember/object'; - import { schedule } from '@ember/runloop'; import { inject as service } from '@ember/service'; import Component from '@ember/component'; -import NotifierMixin from '../../../mixins/notifier'; -import TooltipMixin from '../../../mixins/tooltip'; import SectionMixin from '../../../mixins/section'; -export default Component.extend(SectionMixin, NotifierMixin, TooltipMixin, { +export default Component.extend(SectionMixin, { sectionService: service('section'), isDirty: false, waiting: false, @@ -69,10 +66,6 @@ export default Component.extend(SectionMixin, NotifierMixin, TooltipMixin, { }); }, - willDestroyElement() { - this.destroyTooltips(); - }, - getWorkspaces() { let page = this.get('page'); let self = this; @@ -155,15 +148,15 @@ export default Component.extend(SectionMixin, NotifierMixin, TooltipMixin, { auth() { // missing data? if (is.empty(this.get('config.url'))) { - $("#gemini-url").addClass("error").focus(); + $("#gemini-url").addClass("is-invalid").focus(); return; } if (is.empty(this.get('config.username'))) { - $("#gemini-username").addClass("error").focus(); + $("#gemini-username").addClass("is-invalid").focus(); return; } if (is.empty(this.get('config.APIKey'))) { - $("#gemini-apikey").addClass("error").focus(); + $("#gemini-apikey").addClass("is-invalid").focus(); return; } @@ -195,17 +188,6 @@ export default Component.extend(SectionMixin, NotifierMixin, TooltipMixin, { self.set('user', null); self.set('config.userId', 0); self.set('waiting', false); - - switch (reason.status) { - case 400: - self.showNotification(`Unable to connect to Gemini URL`); - break; - case 403: - self.showNotification(`Unable to authenticate`); - break; - default: - self.showNotification(`Something went wrong, try again!`); - } }); }, diff --git a/gui/app/components/section/papertrail/type-editor.js b/gui/app/components/section/papertrail/type-editor.js index bf45bb20..103cbc17 100644 --- a/gui/app/components/section/papertrail/type-editor.js +++ b/gui/app/components/section/papertrail/type-editor.js @@ -10,15 +10,13 @@ // https://documize.com import { set } from '@ember/object'; - import { inject as service } from '@ember/service'; import Component from '@ember/component'; import NotifierMixin from '../../../mixins/notifier'; -import TooltipMixin from '../../../mixins/tooltip'; import SectionMixin from '../../../mixins/section'; import netUtil from '../../../utils/net'; -export default Component.extend(SectionMixin, NotifierMixin, TooltipMixin, { +export default Component.extend(SectionMixin, NotifierMixin, { sectionService: service('section'), isDirty: false, waiting: false, @@ -48,10 +46,6 @@ export default Component.extend(SectionMixin, NotifierMixin, TooltipMixin, { this.send('auth'); }, - willDestroyElement() { - this.destroyTooltips(); - }, - displayError(reason) { if (netUtil.isAjaxAccessError(reason)) { this.showNotification(`Unable to authenticate`); @@ -93,17 +87,17 @@ export default Component.extend(SectionMixin, NotifierMixin, TooltipMixin, { if (is.not.undefined(group)) { set(config, 'group', group); } - }, function (reason) { + }, function (reason) { self.set('authenticated', false); self.set('waiting', false); - self.set('config.APIToken', ''); // clear the api token + self.set('config.APIToken', ''); // clear the api token self.displayError(reason); console.log("get options call failed"); // eslint-disable-line no-console }); - }, function (reason) { + }, function (reason) { self.set('authenticated', false); self.set('waiting', false); - self.set('config.APIToken', ''); // clear the api token + self.set('config.APIToken', ''); // clear the api token self.displayError(reason); console.log("auth token invalid"); // eslint-disable-line no-console }); @@ -186,4 +180,4 @@ export default Component.extend(SectionMixin, NotifierMixin, TooltipMixin, { }); } } -}); \ No newline at end of file +}); diff --git a/gui/app/templates/components/section/gemini/type-editor.hbs b/gui/app/templates/components/section/gemini/type-editor.hbs index 3dde7c69..0b13645b 100644 --- a/gui/app/templates/components/section/gemini/type-editor.hbs +++ b/gui/app/templates/components/section/gemini/type-editor.hbs @@ -1,42 +1,42 @@ {{#section/base-editor document=document folder=folder page=page busy=waiting tip="Gemini enterprise issue and ticketing software (https://www.countersoft.com)" isDirty=(action 'isDirty') onCancel=(action 'onCancel') onAction=(action 'onAction')}} -
-
- -
e.g. http://helpdesk.countersoft.com
- {{focus-input id="gemini-url" type="text" value=config.url readonly=isReadonly}} -
-
- -
Gemini username
- {{input id="gemini-username" type="text" value=config.username readonly=isReadonly}} -
-
- -
Gemini user API key (from user profile)
- {{input id="gemini-apikey" type="password" value=config.APIKey readonly=isReadonly}} -
-
Authenticate
-
- -
- {{#if authenticated}} -
- -
Select Gemini workspace for source of items to be displayed
- +
+
+
+ + {{focus-input id="gemini-url" type="text" value=config.url class="form-control"}} + e.g. http://helpdesk.countersoft.com
-
- {{/if}} +
+ +
Gemini Username
+ {{input id="gemini-username" type="text" value=config.username class="form-control"}} +
+
+ + {{input id="gemini-apikey" type="password" value=config.APIKey class="form-control"}} + Gemini user API key (from user profile) +
+
Authenticate
+
+ +
+ {{#if authenticated}} +
+ +
    + {{#each workspaces as |card|}} +
  • +
    {{card.Key}}
    + {{#if card.selected}} +
    + {{/if}} +
  • + {{/each}} +
+
+ {{/if}} +
{{/section/base-editor}} diff --git a/gui/app/templates/components/section/papertrail/type-editor.hbs b/gui/app/templates/components/section/papertrail/type-editor.hbs index fb4e61f6..a49c41f8 100644 --- a/gui/app/templates/components/section/papertrail/type-editor.hbs +++ b/gui/app/templates/components/section/papertrail/type-editor.hbs @@ -1,13 +1,14 @@ {{#section/base-editor document=document folder=folder page=page busy=waiting tip="Papertrail cloud logging service (https://papertrailapp.com)" isDirty=(action 'isDirty') onCancel=(action 'onCancel') onAction=(action 'onAction')}} -
+
+
-
+
-
API Token (from your profile)
- {{focus-input id="papertrail-apitoken" type="password" value=config.APIToken }} + {{focus-input id="papertrail-apitoken" type="password" value=config.APIToken class="form-control"}} + API Token (from your profile)
-
+
{{#if authenticated}} Re-Authenticate {{else}} @@ -18,28 +19,26 @@
{{#if authenticated}} -
 
-
+
-
- -
Determine which log entries you want to display e.g. bob OR ("some phrase" AND sally)
- {{input id="papertrail-query" type="text" class="mousetrap" value=config.query}} +
+ + {{input id="papertrail-query" type="text" class="form-control mousetrap" value=config.query}} + Determine which log entries you want to display e.g. bob OR ("some phrase" AND sally)
-
- -
How many log entries do you want?
- {{input id="papertrail-max" type="number" class="mousetrap" value=config.max}} +
+ + {{input id="papertrail-max" type="number" class="form-control mousetrap" value=config.max}} + How many log entries do you want?
-
- -
Optional Papertrail group
+
+ {{ui-select id="group-dropdown" prompt="" content=options.groups action=(action 'onGroupsChange') optionValuePath="id" optionLabelPath="name" selection=config.group}} + Optional Papertrail group
{{/if}} - -
+
{{/section/base-editor}} diff --git a/gui/app/templates/components/section/trello/type-editor.hbs b/gui/app/templates/components/section/trello/type-editor.hbs index ed249fd9..d9ccc4e4 100644 --- a/gui/app/templates/components/section/trello/type-editor.hbs +++ b/gui/app/templates/components/section/trello/type-editor.hbs @@ -29,7 +29,7 @@
{{/if}} {{else}} -
Authenticate
+
Authenticate
{{/if}} {{/section/base-editor}} \ No newline at end of file diff --git a/gui/app/templates/components/ui-select.hbs b/gui/app/templates/components/ui-select.hbs index 65a77c4e..6973129a 100644 --- a/gui/app/templates/components/ui-select.hbs +++ b/gui/app/templates/components/ui-select.hbs @@ -1,4 +1,4 @@ - {{#if prompt}}