12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- 'use strict';
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
- /*
- *+------------------------------------------------------------------------+
- *| Licensed Materials - Property of IBM
- *| IBM Cognos Products: BI Dashboard
- *| (C) Copyright IBM Corp. 2018
- *|
- *| US Government Users Restricted Rights - Use, duplication or disclosure
- *| restricted by GSA ADP Schedule Contract with IBM Corp.
- *+------------------------------------------------------------------------+
- */
- define(['underscore', '../../../lib/@waca/upgrades/UpgradeBase'], function (_, UpgradeBase) {
- /**
- * Upgrade fredIsRed prop, set the value to false for upgraded prop.
- **/
- var FredIsRedUpgrade = function (_UpgradeBase) {
- _inherits(FredIsRedUpgrade, _UpgradeBase);
- function FredIsRedUpgrade() {
- _classCallCheck(this, FredIsRedUpgrade);
- var _this = _possibleConstructorReturn(this, _UpgradeBase.call(this));
- _this.VERSION = 1017;
- return _this;
- }
- /**
- * Perform upgrade
- *
- * @param {object} spec - spec to perform upgrade on
- *
- * @return {Promise} Promise to be resolved when upgrade performed
- */
- FredIsRedUpgrade.prototype.up = function up(spec) {
- if (!spec) {
- return Promise.resolve(spec);
- }
- this._fredIsRedUpgrade(spec);
- return Promise.resolve(spec);
- };
- // Downgrades are not available in CA
- FredIsRedUpgrade.prototype.down = function down(spec) {
- return Promise.resolve(spec);
- };
- FredIsRedUpgrade.prototype._fredIsRedUpgrade = function _fredIsRedUpgrade(spec) {
- // some old spec does not have properties
- if (!spec.properties) {
- spec.properties = {};
- }
- spec.properties['fredIsRed'] = false;
- };
- return FredIsRedUpgrade;
- }(UpgradeBase);
- return new FredIsRedUpgrade();
- });
- //# sourceMappingURL=FredIsRedUpgrade.js.map
|