Skip to content

Commit 7da225e

Browse files
authored
Merge pull request #772 from globocom/add_link_chgs_database_details
Add new url to show changes in chg_register api
2 parents c3a86cc + 4364dd0 commit 7da225e

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

dbaas/logical/models.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
from util import get_credentials_for
2929
from util import get_or_none_credentials_for
3030
from dbaas_credentials.models import CredentialType
31-
31+
from system.models import Configuration
3232

3333

3434
LOG = logging.getLogger(__name__)
@@ -524,6 +524,15 @@ def get_log_url(self):
524524
else:
525525
return self.__kibana_url()
526526

527+
def get_chg_register_url(self):
528+
endpoint = Configuration.get_by_name('chg_register_url')
529+
url = "{endpoint}/chg_register/{database_name}".format(
530+
endpoint=endpoint,
531+
database_name=self.name
532+
)
533+
print('URL:', url)
534+
return url
535+
527536
def get_dex_url(self):
528537
if Configuration.get_by_name_as_int('dex_analyze') != 1:
529538
return ""

dbaas/logical/templates/logical/database/details/details_tab.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@
2525
</a>
2626
</div>
2727
</div>
28+
<div class="control-group">
29+
<div class="control-label"><label>Changes in Service Now:</label></div>
30+
<div class="controls">
31+
<a href="{{ database.get_chg_register_url }}" class="btn btn-primary" title="Logs" data-content="Logs" target="_blank">
32+
<i class="icon-file icon-white"></i>
33+
</a>
34+
</div>
35+
</div>
2836
<div class="control-group">
2937
<div class="control-label"><label>Project:</label></div>
3038
<div class="controls">

0 commit comments

Comments
 (0)