Skip to content

Commit

Permalink
Fix #157 by upgrading predis; Upgraded docker compose; Fixed submit b…
Browse files Browse the repository at this point in the history
…utton being cut off (#174)
  • Loading branch information
idontusenumbers authored Dec 13, 2021
1 parent cc9f24c commit 57268d9
Show file tree
Hide file tree
Showing 10 changed files with 57 additions and 47 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
44 changes: 32 additions & 12 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion css/frame.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ margin-left: -8em;
}

form .button {
margin-left: -7em;
}


Expand Down
29 changes: 15 additions & 14 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 0 additions & 2 deletions edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,7 @@

<input type="hidden" name="oldvalue" value="<?php echo format_html($value)?>">

<p>
<input type="submit" class="button" value="<?php echo $edit ? 'Edit' : 'Add'?>">
</p>

</form>
<?php
Expand Down
14 changes: 6 additions & 8 deletions export.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function export_redis($key, $filter = false, $transform = false) {
$outputKey = str_replace($filter, $transform, $key);
else
$outputKey = $key;

// String
if ($type == 'string') {
echo 'SET "',addslashes($outputKey),'" "',addslashes($redis->get($key)),'"',PHP_EOL;
Expand Down Expand Up @@ -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']));
Expand All @@ -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);
}

Expand All @@ -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);
}
}
Expand Down Expand Up @@ -195,7 +195,7 @@ function export_json($key) {
<option value="redis" <?php echo (isset($_GET['type']) && ($_GET['type'] == 'redis')) ? 'selected="selected"' : ''?>>Redis</option>
<option value="json" <?php echo (isset($_GET['type']) && ($_GET['type'] == 'json' )) ? 'selected="selected"' : ''?>>JSON</option>
</select>
</p>
</p>

<?php if (!isset($_GET['key'])): ?>
<p>
Expand All @@ -209,9 +209,7 @@ function export_json($key) {
</p>
<?php endif; ?>

<p>
<input type="submit" class="button" value="Export">
</p>

</form>
<?php
Expand Down
2 changes: 0 additions & 2 deletions import.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,7 @@
<textarea name="commands" id="commands" cols="80" rows="20"></textarea>
</p>

<p>
<input type="submit" class="button" value="Import">
</p>

</form>
<?php
Expand Down
2 changes: 0 additions & 2 deletions rename.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@
<input type="text" name="key" id="key" size="30" <?php echo isset($_GET['key']) ? 'value="'.format_html($_GET['key']).'"' : ''?>>
</p>

<p>
<input type="submit" class="button" value="Rename">
</p>

</form>
<?php
Expand Down
2 changes: 0 additions & 2 deletions ttl.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@
<input type="text" name="ttl" id="ttl" size="30" <?php echo isset($_GET['ttl']) ? 'value="'.format_html($_GET['ttl']).'"' : ''?>> <span class="info">(-1 to remove the TTL)</span>
</p>

<p>
<input type="submit" class="button" value="Edit TTL">
</p>

</form>
<?php
Expand Down

0 comments on commit 57268d9

Please sign in to comment.