public function actionUpdate($id = null) { $model = DevServiceForm::load($id); if (!$model) { throw new CHttpException(404); } Asset::registerJS('application.static.js.lib.ace'); $instances = ServiceManager::getRunningInstance($id); $this->renderForm('DevServiceForm', $model, ['isRunning' => count($instances) > 0, 'instances' => $instances, 'log' => ServiceManager::readLog($id)]); }