Skip to content

Commit

Permalink
Fix javascript on crontab view
Browse files Browse the repository at this point in the history
  • Loading branch information
tafid committed Nov 19, 2015
1 parent a971f0c commit 9adcd1f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions src/controllers/CrontabController.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,18 @@ public function actionGetRequestState()
return $response;
}

public function actionGetInfo()
public function actionGetInfo($id)
{
Yii::$app->response->format = Response::FORMAT_JSON;
$response = [];
$id = Yii::$app->request->post('id');
if ($id) {
try {
$response = Crontab::perform('GetInfo', ['id' => $id]);
} catch (Exception $e) {
$response['error'] = $e->errorInfo['response'];
$response = $e->errorInfo['response'];
}

}
return $response['crontab'];
return $response;
}
}
2 changes: 1 addition & 1 deletion src/views/crontab/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use hipanel\widgets\ActionBox;
use hipanel\widgets\Pjax;

$this->title = Yii::t('app', 'Crons');
$this->title = Yii::t('hipanel/hosting', 'Crons');
$this->params['breadcrumbs'][] = $this->title;
$this->params['subtitle'] = array_filter(Yii::$app->request->get($model->formName(), [])) ? 'filtered list' : 'full list';

Expand Down
2 changes: 1 addition & 1 deletion src/views/crontab/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function Plugin(element, options) {
url: "request-fetch",
dataType: 'json',
method: 'post',
data: { data: data },
data: { id: this.crontab.id },
beforeSend: function () {
_this._loadingOn();
},
Expand Down

0 comments on commit 9adcd1f

Please sign in to comment.