forked from EC-CUBE/ec-cube
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from EC-CUBE/4.1-feature
Merge from upstream
- Loading branch information
Showing
110 changed files
with
2,174 additions
and
625 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of EC-CUBE | ||
* | ||
* Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved. | ||
* | ||
* http://www.ec-cube.co.jp/ | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace DoctrineMigrations; | ||
|
||
use Doctrine\DBAL\Schema\Schema; | ||
use Doctrine\Migrations\AbstractMigration; | ||
use Eccube\Entity\Master\LoginHistoryStatus; | ||
|
||
/** | ||
* Auto-generated Migration: Please modify to your needs! | ||
*/ | ||
final class Version20210319122142 extends AbstractMigration | ||
{ | ||
public function up(Schema $schema): void | ||
{ | ||
$lang = env('ECCUBE_LOCALE'); | ||
$statuses = [ | ||
LoginHistoryStatus::FAILURE => $lang === 'en' ? 'Failure' : '失敗', | ||
LoginHistoryStatus::SUCCESS => $lang === 'en' ? 'Success' : '成功', | ||
]; | ||
|
||
$sortNo = $this->connection->fetchColumn('SELECT MAX(sort_no) + 1 FROM mtb_login_history_status'); | ||
if (is_null($sortNo)) { | ||
$sortNo = 0; | ||
} | ||
|
||
foreach ($statuses as $id => $name) { | ||
$statusExists = $this->connection->fetchColumn( | ||
'SELECT COUNT(*) FROM mtb_login_history_status WHERE id = :id', | ||
[':id' => $id] | ||
); | ||
|
||
if ($statusExists == 0) { | ||
$this->addSql( | ||
"INSERT INTO mtb_login_history_status (id, name, sort_no, discriminator_type) VALUES (?, ?, ?, 'loginhistorystatus')", | ||
[$id, $name, $sortNo++] | ||
); | ||
} | ||
} | ||
} | ||
|
||
public function down(Schema $schema): void | ||
{ | ||
// this down() migration is auto-generated, please modify it to your needs | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
{ | ||
"name": "ec-cube/Hoge", | ||
"name": "ec-cube/HogePlugin", | ||
"version": "1.0.0", | ||
"description": "プラグインサンプル", | ||
"type": "eccube-plugin", | ||
"extra": { | ||
"code": "Hoge" | ||
"code": "HogePlugin" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of EC-CUBE | ||
* | ||
* Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved. | ||
* | ||
* http://www.ec-cube.co.jp/ | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Page\Admin; | ||
|
||
class LoginHistoryPage extends AbstractAdminPageStyleGuide | ||
{ | ||
public static $URL = '/setting/system/login_history'; | ||
|
||
public static $検索条件 = ['id' => 'admin_search_login_history_multi']; | ||
public static $検索ボタン = '#search_form .c-outsideBlock__contents button'; | ||
public static $詳細検索ボタン = '//*[@id="search_form"]/div[1]/div[1]/div/div/div[2]/a/span'; | ||
public static $検索結果_メッセージ = '//*[@id="search_form"]/div[2]/span'; | ||
|
||
public function __construct(\AcceptanceTester $I) | ||
{ | ||
parent::__construct($I); | ||
} | ||
|
||
public static function go(\AcceptanceTester $I) | ||
{ | ||
$page = new self($I); | ||
|
||
return $page->goPage(self::$URL, 'ログイン履歴システム設定'); | ||
} | ||
|
||
/** | ||
* 指定したログインID/IPアドレスで検索する。 | ||
* | ||
* @param string $multi ログインID/IPアドレス | ||
* | ||
* @return $this | ||
*/ | ||
public function 検索($multi = '') | ||
{ | ||
$this->tester->fillField(self::$検索条件, $multi); | ||
$this->tester->click(self::$検索ボタン); | ||
$this->tester->see('ログイン履歴システム設定', '.c-pageTitle'); | ||
|
||
return $this; | ||
} | ||
|
||
public function 詳細検索_ステータス($value) | ||
{ | ||
$this->tester->click(self::$詳細検索ボタン); | ||
$this->tester->wait(1); | ||
$this->tester->checkOption(['id' => 'admin_search_login_history_Status_'.$value]); | ||
$this->tester->click(self::$検索ボタン); | ||
$this->tester->see('ログイン履歴システム設定', '.c-pageTitle'); | ||
|
||
return $this; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
version: '3' | ||
|
||
services: | ||
ec-cube: | ||
volumes: | ||
- ".:/var/www/html:cached" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
version: '3' | ||
|
||
volumes: | ||
mysql-database: | ||
driver: local | ||
|
||
services: | ||
ec-cube: | ||
depends_on: | ||
- mysql | ||
environment: | ||
DATABASE_URL: "mysql://dbuser:secret@mysql/eccubedb" | ||
DATABASE_SERVER_VERSION: 10 | ||
|
||
mysql: | ||
image: mysql:5.7 | ||
environment: | ||
MYSQL_ROOT_PASSWORD: root | ||
MYSQL_DATABASE: eccubedb | ||
MYSQL_USER: dbuser | ||
MYSQL_PASSWORD: secret | ||
volumes: | ||
- mysql-database:/var/lib/mysql | ||
ports: | ||
- 13306:3306 | ||
networks: | ||
- backend |
File renamed without changes.
Oops, something went wrong.