Skip to content

Commit

Permalink
inited
Browse files Browse the repository at this point in the history
  • Loading branch information
hiqsol committed Apr 22, 2015
0 parents commit dcaccea
Show file tree
Hide file tree
Showing 12 changed files with 273 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# yii console command
/yii

# composer vendor dir
/vendor

# composer itself and lock file
composer.phar
composer.lock

# phpunit itself and local config
phpunit.phar
/phpunit.xml

# IDE project files
.idea
nbproject
.buildpath
.project
.settings

# windows thumbnail cache
Thumbs.db

# Mac DS_Store Files
.DS_Store

7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
hiqdev/hipanel-module-server changelog
--------------------------------------

### 0.1.0 under development

- inited

32 changes: 32 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
The hipanel-module-server extension is free software.
It is released under the terms of the following BSD 3-clause License.

Copyright © 2014-2015 by HiQDev (http://hiqdev.com)
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
* Neither the name of HiQDev nor HiPanel nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
12 changes: 12 additions & 0 deletions Module.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php
/**
* @link http://hiqdev.com/hipanel-module-server
* @license http://hiqdev.com/hipanel-module-server/license
* @copyright Copyright (c) 2015 HiQDev
*/

namespace hipanel\modules\server;

class Module extends \hipanel\base\Module
{
}
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Server Plugin for HiPanel
-------------------------

Servers

For more info see wiki:
https://github.com/hiqdev/hipanel-module-server/wiki
49 changes: 49 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"name": "hiqdev/hipanel-module-server",
"type": "yii2-extension",
"description": "Server Plugin for HiPanel",
"keywords": ["server","hipanel","plugin"],
"homepage": "https://hiqdev.com/hipanel-module-server",
"license": "BSD-3-clause",
"support": {
"email": "support@hiqdev.com",
"source": "https://github.com/hiqdev/hipanel-module-server",
"issues": "https://github.com/hiqdev/hipanel-module-server/issues",
"wiki": "https://github.com/hiqdev/hipanel-module-server/wiki",
"forum": "https://forum.hiqdev.com/yii2"
},
"authors": [
{
"role": "Project lead",
"name": "Andrii Vasyliev",
"email": "sol@hiqdev.com",
"homepage": "https://hipanel.com/"
},
{
"role": "Lead backend developer",
"name": "Dmitry Naumenko",
"email": "silverfire@hiqdev.com",
"homepage": "http://silverfire.me/"
},
{
"role": "Lead frontend developer",
"name": "Andrey Klochok",
"email": "tafid@hiqdev.com",
"homepage": "https://hiqdev.com/"
},
{
"role": "QA Lead",
"name": "Yuriy Myronchuk",
"email": "bladeroot@hiqdev.com",
"homepage": "https://hiqdev.com/"
}
],
"require": {
"yiisoft/yii2": "2.*"
},
"autoload": {
"psr-4": {
"hipanel\\modules\\server\\": ""
}
}
}
13 changes: 13 additions & 0 deletions controllers/ServerController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php
/**
* @link http://hiqdev.com/hipanel-module-server
* @license http://hiqdev.com/hipanel-module-server/license
* @copyright Copyright (c) 2015 HiQDev
*/

namespace hipanel\modules\server\controllers;

class ServerController extends \hipanel\base\CrudController
{

}
23 changes: 23 additions & 0 deletions grid/ServerGridView.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php
/**
* @link http://hiqdev.com/hipanel-module-server
* @license http://hiqdev.com/hipanel-module-server/license
* @copyright Copyright (c) 2015 HiQDev
*/

namespace hipanel\modules\server\grid;

use hipanel\grid\MainColumn;

class ServerGridView extends \hipanel\grid\BoxedGridView
{
static public function defaultColumns()
{
return [
'server' => [
'class' => MainColumn::className(),
'filterAttribute' => 'server_like',
],
];
}
}
35 changes: 35 additions & 0 deletions models/Server.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php
/**
* @link http://hiqdev.com/hipanel-module-server
* @license http://hiqdev.com/hipanel-module-server/license
* @copyright Copyright (c) 2015 HiQDev
*/

namespace hipanel\modules\server\models;

use Yii;

class Server extends \hipanel\base\Model
{

use \hipanel\base\ModelTrait;

/**
* @inheritdoc
*/
public function rules ()
{
return [
];
}

/**
* @inheritdoc
*/
public function attributeLabels ()
{
return $this->mergeAttributeLabels([
'remoteid' => Yii::t('app', 'Remote ID'),
]);
}
}
12 changes: 12 additions & 0 deletions models/ServerSearch.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php
/**
* @link http://hiqdev.com/hipanel-module-server
* @license http://hiqdev.com/hipanel-module-server/license
* @copyright Copyright (c) 2015 HiQDev
*/

namespace hipanel\modules\server\models;

class ServerSearch extends Server{
use \hipanel\base\SearchModelTrait;
}
24 changes: 24 additions & 0 deletions views/server/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php
/**
* @link http://hiqdev.com/hipanel-module-server
* @license http://hiqdev.com/hipanel-module-server/license
* @copyright Copyright (c) 2015 HiQDev
*/

use hipanel\modules\server\grid\ServerGridView;

$this->title = Yii::t('app', 'Servers');
$this->params['breadcrumbs'][] = $this->title;
$this->params['subtitle'] = Yii::$app->request->queryParams ? 'filtered list' : 'full list';

?>

<?= serverGridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
'checkbox',
'seller_id','client_id',
'server'
],
]) ?>
32 changes: 32 additions & 0 deletions views/server/view.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php
/**
* @link http://hiqdev.com/hipanel-module-server
* @license http://hiqdev.com/hipanel-module-server/license
* @copyright Copyright (c) 2015 HiQDev
*/

use hipanel\modules\server\grid\ServerGridView;
use hipanel\widgets\Pjax;
use yii\helpers\Html;

$this->title = Html::encode($model->domain);
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Domains'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;

?>

<? Pjax::begin(Yii::$app->params['pjax']) ?>
<div class="row">

<div class="col-md-4">
<?= ServerGridView::detailView([
'model' => $model,
'columns' => [
'seller_id','client_id',
['attribute' => 'server'],
],
]) ?>
</div>

</div>
<?php Pjax::end() ?>

0 comments on commit dcaccea

Please sign in to comment.