-
Notifications
You must be signed in to change notification settings - Fork 67
Expand file tree
/
Copy pathindex.php
More file actions
79 lines (72 loc) · 3.52 KB
/
index.php
File metadata and controls
79 lines (72 loc) · 3.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<?php
/**
* @author Semenov Alexander <[email protected]>
* @link http://skeeks.com/
* @copyright 2010 SkeekS (СкикС)
* @date 29.04.2015
*/
?>
<h2><?= \Yii::t('skeeks/cms', 'Servers to store the files.') ?></h2>
<?php $count = 0; foreach (\Yii::$app->storage->getClusters() as $cluster) : ?>
<div class="sx-box g-pa-10 sx-bg-primary">
<div class="row">
<div class="col-md-12">
<h3><b><?= $count + 1; ?>. <?= $cluster->name; ?></b></h3>
</div>
<div class="col-md-6">
<p><b><?= \Yii::t('skeeks/cms', 'Public file path') ?>: </b> <?= $cluster->publicBaseUrl; ?></p>
<p><b><?= \Yii::t('skeeks/cms', 'The folder on the server') ?>: </b> <?= $cluster->rootBasePath; ?></p>
<p><b><?= \Yii::t('skeeks/cms',
'Total available space') ?></b>: <?= Yii::$app->formatter->asShortSize($cluster->getTotalSpace()); ?>
</p>
<p><b><?= \Yii::t('skeeks/cms',
'Used') ?></b>: <?= Yii::$app->formatter->asShortSize($cluster->getUsedSpace()); ?></p>
<p><b><?= \Yii::t('skeeks/cms',
'Free') ?></b>: <?= Yii::$app->formatter->asShortSize($cluster->getFreeSpace()); ?></p>
<?php if ($cluster instanceof \skeeks\cms\components\storage\ClusterLocal) : ?>
<?php if ($cluster->publicBaseUrlIsAbsolute) : ?>
<p><b><?= \Yii::t('skeeks/cms', 'Files download from domain') ?>
: </b> <?= $cluster->publicBaseUrlIsAbsolute; ?></p>
<?php endif; ?>
<?php endif; ?>
</div>
<div class="col-md-6">
<?
$baseOptions =
[
'title' => ['text' => \Yii::t('skeeks/cms', 'At percent ratio')],
'chart' => [
'type' => 'pie',
],
'plotOptions' =>
[
'pie' =>
[
'allowPointSelect' => 'true',
'cursor' => "pointer",
'depth' => 35,
'dataLabels' =>
[
'enabled' => 'true',
'format' => '{point.name}',
]
]
],
'series' => [
[
'type' => 'pie',
'name' => '%',
'data' =>
[
[\Yii::t('skeeks/cms', 'Free') . " " . round($cluster->getFreeSpacePct()) . "%", round($cluster->getFreeSpacePct())],
[\Yii::t('skeeks/cms', 'Used') . " " . round($cluster->getUsedSpacePct()) . "%", round($cluster->getUsedSpacePct())],
]
],
]
];
echo \skeeks\widget\highcharts\Highcharts::widget(['options' => $baseOptions]);
?>
</div>
</div>
</div>
<?php endforeach; ?>