コード例 #1
0
ファイル: create.js プロジェクト: steve-gregory/troposphere
 ModalHelpers.renderModal(ProjectCreateModal, null, function(name, description, groupOwner) {
     actions.ProjectActions.create({
         name: name,
         description: description,
         owner: groupOwner
     });
 })
コード例 #2
0
 onProjectCreateConfirm: function(name, description) {
     this.viewBasic();
     actions.ProjectActions.create({
         name: name,
         description
     });
 },
コード例 #3
0
ファイル: moveResources.js プロジェクト: Tharon-C/troposphere
 ModalHelpers.renderModal(ProjectMoveResourceModal, props, function(newProject) {
     actions.ProjectActions.moveResources({
         currentProject: currentProject,
         resources: resources,
         newProject: newProject
     });
     callback();
 });
コード例 #4
0
ファイル: addImage.js プロジェクト: Tharon-C/troposphere
        ModalHelpers.renderModal(ProjectAddImageModal, props, function(project, image) {
            // Call the ProjectAction directly after confirmation.
            actions.ProjectActions.addResourceToProject(image, project, {
                silent: false
            });
            // Delete the cached query - Its results are invalid now.
            delete stores.ProjectImageStore.queryModels["?application__id=" + image.id];
            // Notify the user of the successful addition.
            NotificationController.success(null, "Image " + image.get("name") + " added to Project " + project.get("name") + ".");

        });
コード例 #5
0
    _migrateResourceIntoProject: function (resource, project) {
      actions.ProjectActions.addResourceToProject(resource, project);

      if (resource instanceof Instance) {
        Utils.dispatch(NullProjectInstanceConstants.REMOVE_INSTANCE_FROM_NULL_PROJECT, {
          instance: resource
        });
      } else if (resource instanceof Volume) {
        Utils.dispatch(NullProjectVolumeConstants.REMOVE_VOLUME_FROM_NULL_PROJECT, {
          volume: resource
        });
      }
    },
コード例 #6
0
    _migrateResourceIntoRealProject: function (resource, oldProject, newProject) {
      actions.ProjectActions.addResourceToProject(resource, newProject);

      if (oldProject) {
        if (resource instanceof Instance) {
          Utils.dispatch(ProjectInstanceConstants.REMOVE_PROJECT_INSTANCE, {
            instance: resource,
            project: oldProject
          });
        } else if (resource instanceof Volume) {
          Utils.dispatch(ProjectVolumeConstants.REMOVE_PROJECT_VOLUME, {
            volume: resource,
            project: oldProject
          });
        }
      }
    },
コード例 #7
0
ファイル: create.js プロジェクト: Duke-GCB/troposphere
 ModalHelpers.renderModal(ProjectCreateModal, null, function (name, description) {
   actions.ProjectActions.create({
     name: name,
     description: description
   });
 })
コード例 #8
0
ファイル: addImage.js プロジェクト: amit4111989/troposphere
      ModalHelpers.renderModal(ProjectAddImageModal, props, function (project, image) {
        // Call the ProjectAction directly after confirmation.
        actions.ProjectActions.addResourceToProject(image, project, {silent: false});

      });
コード例 #9
0
 onReportSelectedResources: function () {
   actions.ProjectActions.reportResources(
     this.props.project,
     this.state.selectedResources
   );
 },
コード例 #10
0
 onDeleteSelectedResources: function () {
   actions.ProjectActions.deleteResources(
     this.state.selectedResources,
     this.props.project
   );
 },
コード例 #11
0
 handleSave: function (params) {
   this.setState({isEditing: false});
   actions.ProjectActions.updateProjectAttributes(this.props.project, params)
 },