~makyo/juju-gui/coords

« back to all changes in this revision

Viewing changes to app/app.js

  • Committer: Jeff Pihach
  • Date: 2013-10-11 20:21:35 UTC
  • mfrom: (1129.2.3 bundle-deploy-button)
  • Revision ID: jeff.pihach@canonical.com-20131011202135-i28ba3kayqgc4qug
Deploy bundles from the bundle detail view

Clicking the 'Deploy' button from the bundle detail view
now deploys the bundle. Also added notifications for this
button and for drag and drop bundle deployment.

R=gary.poster
CC=
https://codereview.appspot.com/14419062

Show diffs side-by-side

added added

removed removed

Lines of Context:
575
575
      // To use the new service Inspector use the deploy method
576
576
      // from the Y.juju.GhostDeployer extension
577
577
      cfg.deploy = Y.bind(this.deployService, this);
 
578
 
 
579
      cfg.deployBundle = this.deployBundle.bind(this);
 
580
 
578
581
      // Watch specific things, (add units), remove db.update above
579
582
      // Note: This hides under the flag as tests don't properly clean
580
583
      // up sometimes and this binding creates spooky interaction
599
602
    },
600
603
 
601
604
    /**
 
605
      Calls the deployer import method with the bundle data
 
606
      to deploy the bundle to the environment.
 
607
 
 
608
      @method deployBundle
 
609
      @param {Object} bundle Bundle data.
 
610
    */
 
611
    deployBundle: function(bundle) {
 
612
      var notifications = this.db.notifications;
 
613
      this.env.deployerImport(
 
614
          Y.JSON.stringify({
 
615
            bundle: bundle
 
616
          }), null, Y.bind(utils.deployBundleCallback, null, notifications));
 
617
    },
 
618
 
 
619
    /**
602
620
    Export the YAML for this environment.
603
621
 
604
622
    @method exportYAML