From 6c9fe87b7eed4a114bb7e74c671138e55907e4db Mon Sep 17 00:00:00 2001 From: Charlie Hayes Date: Sat, 11 Dec 2021 22:32:21 -0600 Subject: [PATCH] Fix #157 by upgrading predis; Upgraded docker compose; Fixed submit button being cut off --- Dockerfile | 4 ++-- composer.json | 4 ++-- composer.lock | 44 ++++++++++++++++++++++++++++++++------------ css/frame.css | 1 - docker-compose.yml | 29 +++++++++++++++-------------- edit.php | 2 -- export.php | 14 ++++++-------- import.php | 2 -- rename.php | 2 -- ttl.php | 2 -- 10 files changed, 57 insertions(+), 47 deletions(-) diff --git a/Dockerfile b/Dockerfile index fd40ac1..16f313d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ -FROM composer:1.7 +FROM composer:2.2 -ENV TINI_VERSION 0.18.0-r0 +ENV TINI_VERSION 0.19.0-r0 RUN apk add --no-cache tini=$TINI_VERSION diff --git a/composer.json b/composer.json index 823fd5f..544a765 100644 --- a/composer.json +++ b/composer.json @@ -13,9 +13,9 @@ } ], "require": { - "predis/predis": "1.1.x-dev", + "predis/predis": "v1.1.9", "paragonie/random_compat": ">=2" }, "minimum-stability": "stable", - "target-dir": "ErikDubbelboer/phpRedisAdmin" + "target-dir": "ErikDubbelboer/phpRedisAdmin" } diff --git a/composer.lock b/composer.lock index 43a24c3..41f9438 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "719c08328f6db3021508e7ef84d95588", + "content-hash": "ad3fb9bfb043b086870b317dc9eff9b7", "packages": [ { "name": "paragonie/random_compat", @@ -49,20 +49,25 @@ "pseudorandom", "random" ], + "support": { + "email": "info@paragonie.com", + "issues": "https://github.com/paragonie/random_compat/issues", + "source": "https://github.com/paragonie/random_compat" + }, "time": "2020-10-15T08:29:30+00:00" }, { "name": "predis/predis", - "version": "v1.1.x-dev", + "version": "v1.1.9", "source": { "type": "git", "url": "https://github.com/predis/predis.git", - "reference": "111d100ee389d624036b46b35ed0c9ac59c71313" + "reference": "c50c3393bb9f47fa012d0cdfb727a266b0818259" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/predis/predis/zipball/111d100ee389d624036b46b35ed0c9ac59c71313", - "reference": "111d100ee389d624036b46b35ed0c9ac59c71313", + "url": "https://api.github.com/repos/predis/predis/zipball/c50c3393bb9f47fa012d0cdfb727a266b0818259", + "reference": "c50c3393bb9f47fa012d0cdfb727a266b0818259", "shasum": "" }, "require": { @@ -89,27 +94,42 @@ { "name": "Daniele Alessandri", "email": "suppakilla@gmail.com", - "homepage": "http://clorophilla.net/" + "homepage": "http://clorophilla.net/", + "role": "Creator & Maintainer" + }, + { + "name": "Till Krüss", + "homepage": "https://till.im/", + "role": "Maintainer" } ], "description": "Flexible and feature-complete Redis client for PHP and HHVM", - "homepage": "http://github.com/nrk/predis", + "homepage": "http://github.com/predis/predis", "keywords": [ "nosql", "predis", "redis" ], - "time": "2017-07-12T14:39:17+00:00" + "support": { + "issues": "https://github.com/predis/predis/issues", + "source": "https://github.com/predis/predis/tree/v1.1.9" + }, + "funding": [ + { + "url": "https://github.com/sponsors/tillkruss", + "type": "github" + } + ], + "time": "2021-10-05T19:02:38+00:00" } ], "packages-dev": [], "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "predis/predis": 20 - }, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": [], - "platform-dev": [] + "platform-dev": [], + "plugin-api-version": "2.1.0" } diff --git a/css/frame.css b/css/frame.css index e54ca9e..8969e10 100644 --- a/css/frame.css +++ b/css/frame.css @@ -14,7 +14,6 @@ margin-left: -8em; } form .button { -margin-left: -7em; } diff --git a/docker-compose.yml b/docker-compose.yml index dab64b9..5ef83df 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,15 +1,16 @@ -phpredisadmin: - build: . - environment: - - ADMIN_USER=admin - - ADMIN_PASS=admin - - REDIS_1_HOST=redis - - REDIS_1_PORT=6379 - links: - - redis - ports: - - "80:80" +services: + phpredisadmin: + build: . + environment: + - ADMIN_USER=admin + - ADMIN_PASS=admin + - REDIS_1_HOST=redis + - REDIS_1_PORT=6379 + links: + - redis + ports: + - "80:80" -redis: - image: redis - command: --loglevel verbose + redis: + image: redis + command: --loglevel verbose diff --git a/edit.php b/edit.php index 9642171..0e0b360 100644 --- a/edit.php +++ b/edit.php @@ -185,9 +185,7 @@ -

-

get($key)),'"',PHP_EOL; @@ -124,7 +124,7 @@ function export_json($key) { // JSON if ($_POST['type'] == 'json') { - + // Single key if (isset($_GET['key'])) { echo json_encode(export_json($_GET['key'])); @@ -137,13 +137,13 @@ function export_json($key) { // if we have a filter and no match, nothing to do if($filter !== false && stripos($key, $filter) === false) continue; - + // we rename the keys as necessary if($filter !== false && $transform !== false) $outputKey = str_replace($filter, $transform, $key); else $outputKey = $key; - + $vals[$outputKey] = export_json($key); } @@ -165,7 +165,7 @@ function export_json($key) { // if we have a filter and no match, we skip if($filter !== false && stripos($key, $filter) === false) continue; - + export_redis($key, $filter, $transform); } } @@ -195,7 +195,7 @@ function export_json($key) { -

+

@@ -209,9 +209,7 @@ function export_json($key) {

-

-

-

-

>

-

-

> (-1 to remove the TTL)

-

-