Merge "Fixed: Dashboard: "Run action" functionality doesn't work"

This commit is contained in:
Jenkins 2016-12-26 09:33:52 +00:00 committed by Gerrit Code Review
commit 8693b94e24
5 changed files with 16 additions and 7 deletions

View File

@ -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):

View File

@ -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(

View File

@ -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):

View File

@ -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):