Skip to content

Commit

Permalink
Start to work on Requests
Browse files Browse the repository at this point in the history
  • Loading branch information
tafid committed Nov 24, 2015
1 parent 41427fc commit b0f2fb9
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 5 deletions.
4 changes: 4 additions & 0 deletions src/SidebarMenu.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ public function items()
'label' => Yii::t('app', 'Service'),
'url' => ['/hosting/service/index'],
],
'request' => [
'label' => Yii::t('app', 'Requests'),
'url' => ['/hosting/request/index'],
],
],
],
];
Expand Down
8 changes: 4 additions & 4 deletions src/controllers/BackupController.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ public function actions()
],
'delete' => [
'class' => 'hipanel\actions\SmartDeleteAction',
'success' => Yii::t('app', 'Backup deleting task has been added to queue'),
'error' => Yii::t('app', 'An error occurred when trying to delete backup')
'success' => Yii::t('hipanel/hosting', 'Backup deleting task has been added to queue'),
'error' => Yii::t('hipanel/hosting', 'An error occurred when trying to delete backup')
],
];
}

public function getObjectOptions()
{
return [
'hdomain' => Yii::t('app', 'Domain'),
'db' => Yii::t('app', 'Data Bases'),
'hdomain' => Yii::t('hipanel/hosting', 'Domain'),
'db' => Yii::t('hipanel/hosting', 'Data Bases'),
];
}
}
24 changes: 23 additions & 1 deletion src/controllers/RequestController.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,29 @@

namespace hipanel\modules\hosting\controllers;

use Yii;

class RequestController extends \hipanel\base\CrudController
{

public function actions()
{
return [
'index' => [
'class' => 'hipanel\actions\IndexAction',
'data' => function ($action) {
return [
'objectOptions' => $action->controller->getObjectOptions(),
];
},
],
'view' => [
'class' => 'hipanel\actions\ViewAction',
],
'delete' => [
'class' => 'hipanel\actions\SmartDeleteAction',
'success' => Yii::t('hipanel/hosting', 'Backup deleting task has been added to queue'),
'error' => Yii::t('hipanel/hosting', 'An error occurred when trying to delete backup')
],
];
}
}
1 change: 1 addition & 0 deletions src/views/crontab/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ function Plugin(element, options) {
}
});
return this;
},
startQuerier: function () {
Expand Down

0 comments on commit b0f2fb9

Please sign in to comment.