Skip to content

Commit

Permalink
API endpoint for active Jupyter servers per project
Browse files Browse the repository at this point in the history
  • Loading branch information
zagganas committed Apr 29, 2022
1 parent 6cce223 commit 6f3b55a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions controllers/ApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,17 @@ public function actionPeriodStatistics()
$this->asJson($usage);
}

public function actionActiveJupyterProjects()
{
$servers=JupyterServer::find()->select(['project'])->where(['active'=>true])->distinct()->all();
$projects=[];
foreach ($servers as $server)
{
$projects[$server->project]=true;
}
return $this->asJson($projects);
}



}

0 comments on commit 6f3b55a

Please sign in to comment.