Ejemplo n.º 1
0
 public function associateGroupAndNode($node_id, $group_id)
 {
     $assoc = new NodeGroupAssociation();
     $assoc->group_id = $group_id;
     $assoc->node_id = $node_id;
     if ($assoc->save()) {
         return Response::json(array('success' => 'true', 'new_id' => $assoc->id, 'new_name' => NodeGroup::find($group_id)->name));
     } else {
         return Response::json(array('success' => 'false'));
     }
 }
Ejemplo n.º 2
0
			<div class="trim_long shift5 activatable"><?php 
        echo $node->friendly_availability_zone;
        ?>
</div>
			</div>
			<div class="uk-width-1-6 node_base_image_id activatable"><div class="trim shift5"><?php 
        echo $node->service_provider_base_image_id;
        ?>
</div></div>
			<div class="uk-width-1-6 node_hostname activatable"><div class="trim_long shift5"><?php 
        echo $node->hostname;
        ?>
</div></div>
			<div class="uk-width-1-6 node_packages"><div class="shift5">
				<?php 
        foreach (NodeGroupAssociation::where('node_id', '=', $node->id)->get() as $grp) {
            ?>
				<?php 
            $groupInfo = NodeGroup::find($grp->group_id);
            ?>
				<div class="nos-deletable" rel="<?php 
            echo $grp->id;
            ?>
"><span><?php 
            echo $groupInfo->name;
            ?>
</span><a href="#" class="remove">x</a></div>
				<?php 
        }
        ?>
			</div></div>