Merge "Fixed: Dashboard: "Run action" functionality doesn't work"
This commit is contained in:
@@ -23,10 +23,10 @@ from horizon import exceptions
|
|||||||
from horizon import tables
|
from horizon import tables
|
||||||
|
|
||||||
from mistraldashboard import api
|
from mistraldashboard import api
|
||||||
import mistraldashboard.default.SmartCell as SmartCell
|
from mistraldashboard.default import smart_cell
|
||||||
from mistraldashboard.default import utils
|
from mistraldashboard.default import utils
|
||||||
|
|
||||||
SmartCell.init()
|
smart_cell.init()
|
||||||
|
|
||||||
|
|
||||||
class UpdateRow(tables.Row):
|
class UpdateRow(tables.Row):
|
||||||
|
@@ -12,6 +12,7 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
from django.core.urlresolvers import reverse
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from django.utils.translation import ungettext_lazy
|
from django.utils.translation import ungettext_lazy
|
||||||
|
|
||||||
@@ -19,8 +20,11 @@ from horizon import tables
|
|||||||
from horizon.utils import filters
|
from horizon.utils import filters
|
||||||
|
|
||||||
from mistraldashboard import api
|
from mistraldashboard import api
|
||||||
|
from mistraldashboard.default import smart_cell
|
||||||
from mistraldashboard.default import utils
|
from mistraldashboard.default import utils
|
||||||
|
|
||||||
|
smart_cell.init()
|
||||||
|
|
||||||
|
|
||||||
class CreateAction(tables.LinkAction):
|
class CreateAction(tables.LinkAction):
|
||||||
name = "create"
|
name = "create"
|
||||||
@@ -81,9 +85,14 @@ def cut(action, length=100):
|
|||||||
class RunAction(tables.LinkAction):
|
class RunAction(tables.LinkAction):
|
||||||
name = "run"
|
name = "run"
|
||||||
verbose_name = _("Run")
|
verbose_name = _("Run")
|
||||||
url = "horizon:mistral:actions:run"
|
|
||||||
classes = ("ajax-modal",)
|
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):
|
class ActionsTable(tables.DataTable):
|
||||||
name = tables.Column(
|
name = tables.Column(
|
||||||
|
@@ -21,11 +21,11 @@ from horizon import exceptions
|
|||||||
from horizon import tables
|
from horizon import tables
|
||||||
|
|
||||||
from mistraldashboard import api
|
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 humantime
|
||||||
from mistraldashboard.default.utils import label
|
from mistraldashboard.default.utils import label
|
||||||
|
|
||||||
SmartCell.init()
|
smart_cell.init()
|
||||||
|
|
||||||
|
|
||||||
class DeleteExecution(tables.DeleteAction):
|
class DeleteExecution(tables.DeleteAction):
|
||||||
|
@@ -22,11 +22,11 @@ from horizon import exceptions
|
|||||||
from horizon import tables
|
from horizon import tables
|
||||||
|
|
||||||
from mistraldashboard import api
|
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 humantime
|
||||||
from mistraldashboard.default.utils import label
|
from mistraldashboard.default.utils import label
|
||||||
|
|
||||||
SmartCell.init()
|
smart_cell.init()
|
||||||
|
|
||||||
|
|
||||||
class UpdateRow(tables.Row):
|
class UpdateRow(tables.Row):
|
||||||
|
Reference in New Issue
Block a user