public function load()
 {
     parent::load();
     $model = new CPUInfo();
     $this->view->cpuinfos = $model->get();
     $this->setpagetitle(self::default_title());
 }
 public function load()
 {
     parent::load();
     $downtime_model = new Downtime();
     $this->downtimes = $downtime_model->getindex(array("start_time" => time(), "end_time" => time()));
     $this->view->statuses = array("Operational" => array($this->getStatus(246, "https://twiki.grid.iu.edu/bin/view/Operations/MyOSGServiceLevelAgreement"), $this->getStatus(266, "https://twiki.grid.iu.edu/bin/view/Operations/OIMServiceLevelAgreement"), $this->getStatus(325, "https://twiki.grid.iu.edu/bin/view/Operations/SoftwareRepoServiceLevelAgreement"), $this->getStatus(250, "https://twiki.grid.iu.edu/bin/view/Operations/RSVServiceLevelAgreement")), "Accounting" => array($this->getStatus(255, "https://twiki.grid.iu.edu/bin/view/Operations/ServiceLevelAgreements")), "Submission" => array($this->getStatus(336, "https://twiki.grid.iu.edu/bin/view/Operations/ServiceLevelAgreements"), $this->getStatus(308, "https://twiki.grid.iu.edu/bin/view/Operations/GlideInWMSServiceLevelAgreement")), "File Distribution" => array($this->getStatus(364, "https://twiki.grid.iu.edu/bin/view/Operations/ServiceLevelAgreements"), $this->getStatus(366, "https://twiki.grid.iu.edu/bin/view/Operations/ServiceLevelAgreements")), "User Interface" => array($this->getStatus(261, "https://twiki.grid.iu.edu/bin/view/Operations/OSGDisplayServiceLevelAgreement"), $this->getStatus(265, "https://twiki.grid.iu.edu/bin/view/Operations/GOCTicketServiceLevelAgreement"), $this->getStatus(401, "https://twiki.grid.iu.edu/bin/view/Operations/GOCTicketServiceLevelAgreement")), "Documentation" => array($this->getStatus(281, "https://twiki.grid.iu.edu/bin/view/Operations/OSGDocRepoServiceLevelAgreement"), $this->getStatus(280, "https://twiki.grid.iu.edu/bin/view/Operations/OSGWebPageServiceLevelAgreement"), $this->getStatus(334, "https://twiki.grid.iu.edu/bin/view/Operations/JIRAServiceLevelAgreement"), $this->getStatus(197, "https://twiki.grid.iu.edu/bin/view/Operations/TWikiServiceLevelAgreement")), "Best Effort" => array($this->getStatus(247, "https://twiki.grid.iu.edu/bin/view/Operations/BDIIServiceLevelAgreement"), $this->getStatus(270, "https://twiki.grid.iu.edu/bin/view/Operations/SoftwareCacheServiceLevelAgreement")));
     $this->setpagetitle(self::default_title());
 }
 public function load()
 {
     parent::load();
     $model = new Project();
     $this->view->projects = $model->get();
     if (isset($_REQUEST["project_attrs_showpublication"])) {
         $model = new ProjectPublication();
         $this->view->publications = $model->getindex();
     }
     $this->setpagetitle(self::default_title());
 }
 public function load()
 {
     parent::load();
     $model = new Metric();
     $this->view->metrics = $model->getindex();
     //additional info
     if (isset($_REQUEST["metric_attrs_showservices"])) {
         $model = new MetricService();
         $this->view->metricservices = $model->getgroupby("metric_id");
         $model = new Service();
         $this->view->services = $model->getindex();
     }
     $this->setpagetitle(self::default_title());
 }
 public function load()
 {
     if (user()->isGuest()) {
         $this->view->detail = "This page is only for registered OIM user";
         $this->render("error/404", null, true);
         return;
     }
     parent::load();
     $model = new Contact();
     $param = array("person" => 1, "disable" => 0);
     if (isset($_REQUEST["contacts"])) {
         $ids = array();
         foreach ($_REQUEST as $key => $value) {
             if (substr($key, 0, 9) == "contacts_") {
                 $ids[] = substr($key, 9);
             }
         }
         $param["ids"] = $ids;
     }
     $this->view->contacts = $model->getindex($param);
     $model = new DN();
     $this->view->contacts_dns = $model->getgroupby("contact_id", array("disable" => 0));
     $this->setpagetitle(self::default_title());
 }
 public function load()
 {
     parent::load();
     $model = new ResourceGroup();
     $this->view->resource_groups_by_gridtype = $model->getgroupby("osg_grid_type_id");
     $model = new Resource();
     $this->view->resources_by_resource_group = $model->getgroupby("resource_group_id");
     $model = new GridTypes();
     $this->view->grid_types = $model->getindex();
     $model = new Service();
     $this->view->services = $model->getindex();
     $model = new ResourceServices();
     $this->view->services_by_resource = $model->getgroupby("resource_id");
     $this->view->counts = array();
     //filter service groups
     $this->view->service_groups = array();
     $model = new ServiceGroup();
     $service_groups = $model->getindex();
     foreach ($service_groups as $id => $service_group) {
         if (isset($_REQUEST["count_sg_" . $id])) {
             $this->view->service_groups[$id] = $service_group;
         }
     }
     $this->view->resource_counts = array();
     //for each grid type
     foreach ($this->view->resource_groups_by_gridtype as $grid_type_id => $resource_groups) {
         $resource_counts = 0;
         //for each resource groups,
         foreach ($resource_groups as $resource_group) {
             $resources = $this->view->resources_by_resource_group[$resource_group->id];
             //for each resource
             foreach ($resources as $resource) {
                 //apply filter
                 if (isset($_REQUEST["count_active"])) {
                     if ($resource->active == 0) {
                         continue;
                     }
                 }
                 if (isset($_REQUEST["count_enabled"])) {
                     if ($resource->disable == 1) {
                         continue;
                     }
                 }
                 $resource_counts++;
                 //pull counter for current grid type
                 //$services = $this->services_by_resource[$resource->id];
                 if (!isset($this->view->counts[$grid_type_id])) {
                     $this->view->counts[$grid_type_id] = array();
                 }
                 $count_service = $this->view->counts[$grid_type_id];
                 //for each services
                 if (isset($this->view->services_by_resource[$resource->id])) {
                     foreach ($this->view->services_by_resource[$resource->id] as $service) {
                         if (!isset($count_service[$service->id])) {
                             $count_service[$service->id] = 0;
                         }
                         $count_service[$service->id] = $count_service[$service->id] + 1;
                     }
                 }
                 $this->view->counts[$grid_type_id] = $count_service;
             }
         }
         $this->view->resource_counts[$grid_type_id] = $resource_counts;
     }
     $this->setpagetitle(self::default_title());
 }
 public function indexAction()
 {
     parent::indexAction();
     //message("warning", "This is an experimental feature");
 }