diff --git a/mistraldashboard/action_executions/tables.py b/mistraldashboard/action_executions/tables.py index e8c5958..330a7da 100644 --- a/mistraldashboard/action_executions/tables.py +++ b/mistraldashboard/action_executions/tables.py @@ -23,10 +23,10 @@ from horizon import exceptions from horizon import tables from mistraldashboard import api -import mistraldashboard.default.SmartCell as SmartCell +from mistraldashboard.default import smart_cell from mistraldashboard.default import utils -SmartCell.init() +smart_cell.init() class UpdateRow(tables.Row): diff --git a/mistraldashboard/actions/tables.py b/mistraldashboard/actions/tables.py index d3ecc5d..44562d0 100644 --- a/mistraldashboard/actions/tables.py +++ b/mistraldashboard/actions/tables.py @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ungettext_lazy @@ -19,8 +20,11 @@ from horizon import tables from horizon.utils import filters from mistraldashboard import api +from mistraldashboard.default import smart_cell from mistraldashboard.default import utils +smart_cell.init() + class CreateAction(tables.LinkAction): name = "create" @@ -81,9 +85,14 @@ def cut(action, length=100): class RunAction(tables.LinkAction): name = "run" verbose_name = _("Run") - url = "horizon:mistral:actions:run" classes = ("ajax-modal",) + def get_link_url(self, datum): + obj_id = datum.name + url = "horizon:mistral:actions:run" + + return reverse(url, args=[obj_id]) + class ActionsTable(tables.DataTable): name = tables.Column( diff --git a/mistraldashboard/default/SmartCell.py b/mistraldashboard/default/smart_cell.py similarity index 100% rename from mistraldashboard/default/SmartCell.py rename to mistraldashboard/default/smart_cell.py diff --git a/mistraldashboard/executions/tables.py b/mistraldashboard/executions/tables.py index 0e2ee8e..4ca97fb 100644 --- a/mistraldashboard/executions/tables.py +++ b/mistraldashboard/executions/tables.py @@ -21,11 +21,11 @@ from horizon import exceptions from horizon import tables from mistraldashboard import api -import mistraldashboard.default.SmartCell as SmartCell +from mistraldashboard.default import smart_cell from mistraldashboard.default.utils import humantime from mistraldashboard.default.utils import label -SmartCell.init() +smart_cell.init() class DeleteExecution(tables.DeleteAction): diff --git a/mistraldashboard/tasks/tables.py b/mistraldashboard/tasks/tables.py index 7d978f5..971b63c 100644 --- a/mistraldashboard/tasks/tables.py +++ b/mistraldashboard/tasks/tables.py @@ -22,11 +22,11 @@ from horizon import exceptions from horizon import tables from mistraldashboard import api -import mistraldashboard.default.SmartCell as SmartCell +from mistraldashboard.default import smart_cell from mistraldashboard.default.utils import humantime from mistraldashboard.default.utils import label -SmartCell.init() +smart_cell.init() class UpdateRow(tables.Row):