This is an automated email from the ASF dual-hosted git repository.

jihao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new f5c19f6  [TE] frontend - remove unnecessary flag for 
noExistingSubscriptionGroup (#4256)
f5c19f6 is described below

commit f5c19f663b64ba573b1c5aed92ce3c08b8736fb4
Author: Harley Jackson <[email protected]>
AuthorDate: Fri May 31 10:19:49 2019 -0700

    [TE] frontend - remove unnecessary flag for noExistingSubscriptionGroup 
(#4256)
---
 .../app/pods/manage/yaml/controller.js             | 31 +++-------------------
 1 file changed, 4 insertions(+), 27 deletions(-)

diff --git a/thirdeye/thirdeye-frontend/app/pods/manage/yaml/controller.js 
b/thirdeye/thirdeye-frontend/app/pods/manage/yaml/controller.js
index ba3e890..3e15ffd 100644
--- a/thirdeye/thirdeye-frontend/app/pods/manage/yaml/controller.js
+++ b/thirdeye/thirdeye-frontend/app/pods/manage/yaml/controller.js
@@ -18,45 +18,22 @@ export default Controller.extend({
   disableSubGroupSave: true,
 
   /**
-   * Flag to trigger special case of no existing subscription groups for an 
alert
-   * @method noExistingSubscriptionGroup
-   * @return {Boolean}
-   */
-  noExistingSubscriptionGroup: computed(
-    'subscriptionGroupNames',
-    function() {
-      const subscriptionGroupNames = get(this, 'subscriptionGroupNames');
-      if (subscriptionGroupNames && Array.isArray(subscriptionGroupNames) && 
subscriptionGroupNames.length > 0) {
-        return false;
-      }
-      return true;
-    }
-  ),
-
-  /**
    * Change subscription group button text depending on whether creating or 
updating
    * @method subGroupButtonText
    * @return {String}
    */
   subGroupButtonText: computed(
-    'noExistingSubscriptionGroup',
     'groupName',
     function() {
-      const {
-        noExistingSubscriptionGroup,
-        groupName
-      } = this.getProperties('noExistingSubscriptionGroup', 'groupName');
-      return (noExistingSubscriptionGroup || !groupName || groupName.name === 
CREATE_GROUP_TEXT) ? "Create Group" : "Update Group";
+      const groupName = get(this, 'groupName');
+      return (!groupName || groupName.name === CREATE_GROUP_TEXT) ? "Create 
Group" : "Update Group";
     }
   ),
 
   // Method for handling subscription group, whether there are any or not
   async _handleSubscriptionGroup(subscriptionYaml, notifications, 
subscriptionGroupId) {
-    const {
-      noExistingSubscriptionGroup,
-      groupName
-    } = this.getProperties('noExistingSubscriptionGroup', 'groupName');
-    if (noExistingSubscriptionGroup || !groupName || groupName.name === 
CREATE_GROUP_TEXT) {
+    const groupName = get(this, 'groupName');
+    if (!groupName || groupName.name === CREATE_GROUP_TEXT) {
       //POST settings
       const setting_url = '/yaml/subscription';
       const settingsPostProps = {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to