Exemplo n.º 1
0
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
*/
$_SERVER['SCRIPT_NAME'] !== "/controller.php" ? require_once __DIR__ . "/classes/Requires.php" : (Links::$pretty = true);
//Make sure we can connect and select the executions collection in MongoDB
MongoConnection::connect();
MongoConnection::selectCollection("executions");
//Get groups
$groups = array();
$result = MySQLQueries::get_groups();
while ($row = MySQLConnection::fetch_object($result)) {
    $groups[] = $row;
}
//Get the servers in the default group
$servers_in_default_group = array();
$result = MySQLQueries::get_servers_by_groups(array());
while ($row = MySQLConnection::fetch_object($result)) {
    $servers_in_default_group[] = $row;
}
//Get recipes
$recipes = array();
$result = MySQLQueries::get_recipes();
while ($row = MySQLConnection::fetch_object($result)) {
    $recipes[] = $row;
}