Hi - just wondering whether there has been any progress on the 6.x that hasn't been reported back on here

Comments

snufkin’s picture

Not really, I haven't had the time. I am planning to go along the line of the drush integration, but if you have features to suggest, i am happy to hear it.

robloach’s picture

I have a pretty awesome patch coming up.... I'll throw it up here tomorrow.

robloach’s picture

Title: Gosh - the first 'issue' » Port to Drupal 6
Component: Miscellaneous » Code
Assigned: Unassigned » robloach
Category: feature » task
Priority: Normal » Critical
Status: Active » Needs review
StatusFileSize
new12.68 KB

This patch ports the module to Drupal 6, as well as cleans up the code a bit.

New Features

  • If the jQuery Plugin module is available, will use jQuery Cookie to keep the Terminal up across different pages.
  • Introduces hook_terminal to expose functions to the terminal rather then termanal_$command as well as documentation in terminal.api.php
  • Switches from managing own Terminal log table to a watchdog.
robloach’s picture

StatusFileSize
new13.52 KB
  • Allows modulename.terminal.inc files.
  • Fixes up some help functions.
snufkin’s picture

Looks great. A note: the terminal_history table was used for recording the command history so we can provide a working command history just like on in a shell. Temporary storage could be a cookie, or js variable, but if we store it in the db then its retained after the former arent (losing cookies, revisiting page).

robloach’s picture

Status: Needs review » Needs work

Ah, I see. So we could replicate the "history" bash command :-) .

robloach’s picture

Status: Needs work » Needs review
StatusFileSize
new15.32 KB
  • Switches back to {terminal_history}.
  • Adds a "history" command to bring up your recent commands run.
snufkin’s picture

Version: 5.x-1.x-dev » 6.x-1.x-dev
Status: Needs review » Fixed

Committed with a few cosmetic changes to the patch (now passes coder review, altered the hook_update_N to just add the field etc).

robloach’s picture

Nice, great job :-) .....

You're probably missing:

  $new_field = $schema['terminal_history']['fields']['time'];
  db_add_field($ret, 'terminal_history', 'time', $new_field);

.... in the update function too ;-) . The log tracks the time when the command was executed too.

What is the next issue to work on? Yes/No confirmations? I was also thinking we should add an "access callback" and "access arguments" to each function as well, so that each function could have granular control over who can call it.

snufkin’s picture

Ah damn i should've thought about that field too...

I think we should be looking at implementing the dialogue option to get the Drush integration possible first. We can look at the granular access control later on when we are getting more functionality.

Can you take a look at the provided JS library? I have the feeling we need to fork it, I don't really see any other way to extend it to be able to handle this.

robloach’s picture

Status: Fixed » Needs review
StatusFileSize
new4.29 KB

This patch includes the things missing from your last commit....

  1. terminal.terminal.inc, which includes the hook and the help/history commands
  2. terminal.api.php, which includes the Terminal API documentation
  3. The time column of the Terminal table.

... As for confirmations, I think that should and could be handled on the server side. What we'd need is a state machine to manage the Terminal's current state. I think that discussion should be over here: #641970: Handle y/n dialogues :-) .

snufkin’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.