Merge "Fixed: Dashboard: "Run action" functionality doesn't work"
This commit is contained in:
commit
8693b94e24
@ -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):
|
||||
|
@ -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(
|
||||
|
@ -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):
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user