Ejemplo n.º 1
0
 public function execute()
 {
     $arrRequest = Saf_SmartMain::getCgi();
     $arrInput = $arrRequest["post"];
     $pageService = new Service_Page_Apiplatform_CurlProxy("param_apiplatform_curlproxy");
     $ret = $pageService->execute($arrInput);
     Navilib_View::output($ret, Navilib_View::JSON);
     Navilib_LogHook::addNotice('err_no', $ret["errno"]);
 }
Ejemplo n.º 2
0
 public function execute()
 {
     $arrRequest = Saf_SmartMain::getCgi();
     $arrInput = $arrRequest["get"];
     $pageService = new Service_Page_Apiplatform_GetAllAppName("param_apiplatform_getallappname");
     $ret = $pageService->execute($arrInput);
     //header("Access-Control-Allow-Origin: *"); //允许所有域名发起的跨域请求
     Navilib_View::output($ret, Navilib_View::JSON);
     Navilib_LogHook::addNotice('err_no', $ret["errno"]);
 }
Ejemplo n.º 3
0
 public function execute()
 {
     $arrRequest = Saf_SmartMain::getCgi();
     $arrInput = $arrRequest['get'];
     $pageService = new Service_Page_Apiplatform_RegressionTest('param_apiplatform_regressiontest');
     $pageInfo = $pageService->execute($arrInput);
     Navilib_LogHook::addNotice('err_no', $pageInfo["errno"]);
     if (Navilib_CommonError::SUCCESS !== $pageInfo["errno"]) {
         Navilib_View::output($pageInfo, Navilib_View::JSON);
     } else {
         $tpl = Bd_TplFactory::getInstance();
         $tpl->assign('urlHost', $pageInfo['data']['urlHost']);
         $tpl->assign('proxyHost', $pageInfo['data']['proxyHost']);
         $tpl->assign('appName', $pageInfo['data']['appName']);
         $tpl->assign('userName', CURRENT_USER);
         $tpl->display('naviServerAdmin/apiplatform/RegressionTest.tpl');
     }
 }
Ejemplo n.º 4
0
 public function execute()
 {
     $arrRequest = Saf_SmartMain::getCgi();
     $arrInput = $arrRequest['get'];
     $pageService = new Service_Page_Apiplatform_Testman('param_apiplatform_testman');
     $pageInfo = $pageService->execute($arrInput);
     Navilib_LogHook::addNotice('err_no', $pageInfo["errno"]);
     if (Navilib_CommonError::SUCCESS !== $pageInfo["errno"]) {
         Navilib_View::output($pageInfo, Navilib_View::JSON);
     } else {
         $tpl = Bd_TplFactory::getInstance();
         $tpl->assign('freqDomain', $pageInfo['data']['freqDomain']);
         $tpl->assign('freqModule', $pageInfo['data']['freqModule']);
         $tpl->assign('history', $pageInfo['data']['history']);
         $tpl->assign('offset', $pageInfo['data']['offset']);
         $tpl->assign('hasPre', $pageInfo['data']['hasPre']);
         $tpl->assign('hasNext', $pageInfo['data']['hasNext']);
         $tpl->assign('userName', CURRENT_USER);
         $tpl->display('naviServerAdmin/apiplatform/Testman.tpl');
     }
 }
Ejemplo n.º 5
0
 /**
  * @param timestamp 时间戳,唯一标识
  * @param status  2 推送 3放弃 
  * @param $sync  true 同步通知, false 异步通知
  **/
 public static function updateIntelligenceStatus($timestamp, $status, $sync = true)
 {
     $conf = Bd_Conf::getAppConf('intelligence');
     $url = $conf['url'];
     $prefix = $conf['sign_prefix'];
     $key = $conf['sign_key'];
     $params['create_date'] = $timestamp;
     $params['state'] = $status;
     $params['sign'] = Navilib_Utils::getSign($params, $prefix, $key);
     if ($sync) {
         $ret = Navilib_NetUtil::getUrlContent($url, $params);
         $ret = $ret ? json_decode($ret, true) : array();
         if ($ret && $ret['errno'] == 0) {
             return true;
         }
         Navilib_LogHook::warning('[updateIntelligenceStatus error] [' . $ret['errmsg'] . ']');
         return false;
     } else {
         $return['url'] = $url;
         $return['params'] = base64_encode(json_encode($params));
         return $return;
     }
 }