123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- "use strict";
- /**
- * Licensed Materials - Property of IBM
- * IBM Cognos Products: Cognos Analytics
- * Copyright IBM Corp. 2017
- * US Government Users Restricted Rights - Use, duplication or disclosure
- * restricted by GSA ADP Schedule Contract with IBM Corp.
- */
- define(['bi/admin/datasource/slideout/ConnectionStringEditorPane', 'bi/admin/nls/StringResource'], function (ConnectionStringEditorPane, StringResource) {
- /**
- * Sample content view that extends the glass View class
- */
- var PlanAnalyticsConnectionStringPane = ConnectionStringEditorPane.extend({
- init: function init(options) {
- PlanAnalyticsConnectionStringPane.inherited('init', this, arguments);
- $.extend(this, options);
- },
- renderBody: function renderBody($body) {
- return this._renderBody({
- 'el': this.$el.find(".bi-admin-pane-body"),
- 'glassContext': this.glassContext,
- 'name': 'TM1ConnectionSettings',
- 'items': [{
- 'name': 'TM1AdminHost',
- 'label': StringResource.get('datasourceTM1AdminHost'),
- 'value': this.parseInfo.tm1Params.tm1AdminHost,
- 'type': 'TextArea',
- 'multiline': true,
- 'disabled': false,
- 'ellipses': true,
- 'editable': this.isEditable(),
- 'onChange': function (name, value) {
- this.parseInfo.tm1Params.tm1AdminHost = value;
- }.bind(this)
- }, {
- 'name': 'TM1ServerPort',
- 'label': StringResource.get('datasourceTM1ServerPort'),
- 'value': this.parseInfo.tm1Params.tm1Port,
- 'type': 'SingleLineValue',
- 'id': 'TM1ServerPort',
- 'multiline': true,
- 'disabled': false,
- 'ellipses': true,
- 'editable': this.isEditable(),
- 'validator': {
- 'maxLength': '8',
- 'isNumber': true,
- 'numericRange': {
- 'min': 0
- }
- },
- 'onChange': function (name, value) {
- this.parseInfo.tm1Params.tm1Port = value;
- }.bind(this)
- }, {
- 'type': 'CheckBox',
- 'controlOnLeft': true,
- 'label': StringResource.get('useSSL'),
- 'ariaLabel': StringResource.get('useSSL'),
- 'name': 'Protocol',
- 'disabled': !this.isEditable(),
- 'checked': this.parseInfo.tm1Params.tm1UseSSL,
- 'onChange': function (name, value) {
- this.parseInfo.tm1Params.tm1UseSSL = value;
- }.bind(this)
- }]
- });
- },
- _postRender: function _postRender() {
- return this.$el;
- },
- setFocus: function setFocus() {
- $('textarea.v_TM1AdminHost').focus();
- }
- });
- return PlanAnalyticsConnectionStringPane;
- });
|