Skip to content

Commit

Permalink
Merge pull request #833 from signal18/utils
Browse files Browse the repository at this point in the history
Update metadata table, add time lock ms and table catalog
  • Loading branch information
caffeinated92 authored Sep 5, 2024
2 parents 67f5327 + 57a6f68 commit 4495117
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion share/dashboard/app/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
<md-tab ng-if="selectedServer && !selectedQuery" ng-click="onTabClicked('ServiceOpenSVC')" md-select-id="ServiceOpenSVC" md-on-select="onTabSelected" label="Service OpenSVC">
<div ng-if="selectedTab=='ServiceOpenSVC'" ng-include src="'static/tab-server-serviceopensvc.html'"></div>
</md-tab>
<md-tab ng-if="selectedServer && !selectedQuery && selectedCluster.apiUsers[user].grants['db-show-logs']==true" ng-click="onTabClicked('MetaDataLocks')" md-select-id="MetaDataLocks" md-on-select="onTabSelected" label="Metatata Locks">
<md-tab ng-if="selectedServer && !selectedQuery && selectedCluster.apiUsers[user].grants['db-show-logs']==true" ng-click="onTabClicked('MetaDataLocks')" md-select-id="MetaDataLocks" md-on-select="onTabSelected" label="Metadata Locks">
<div ng-if="selectedTab=='MetaDataLocks'" ng-include src="'static/tab-server-meta-data-locks.html'"></div>
</md-tab>
<md-tab ng-if="selectedServer && !selectedQuery && selectedCluster.apiUsers[user].grants['db-show-logs']==true" ng-click="onTabClicked('QueryResponseTime')" md-select-id="QueryResponseTime" md-on-select="onTabSelected" label="Response Time">
Expand Down
16 changes: 13 additions & 3 deletions share/dashboard/app/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -918,27 +918,37 @@ app.controller('DashboardController', function (
align: 'left',
valign: 'bottom',
sortable: true,
width: "15%"
}, {
field: 'lockMode.String',
title: 'Schema',
title: 'Lock Mode',
align: 'left',
valign: 'bottom',
sortable: true,
width: "20%"
}, {
field: 'lockDuration.String',
title: 'Duration',
align: 'left',
valign: 'bottom',
sortable: true,
}, {
field: 'lockTimeMs.Int64',
title: 'Lock Time (ms)',
align: 'left',
valign: 'bottom',
sortable: true,
width: "15%"
}, {
field: 'lockType.String',
title: 'Lock Type',
align: 'left',
valign: 'bottom',
sortable: true
}, {
field: 'lockCatalog.String',
title: 'Catalog',
align: 'left',
valign: 'bottom',
sortable: true
}, {
field: 'lockSchema.String',
title: 'Schema',
Expand Down
2 changes: 2 additions & 0 deletions utils/dbhelper/dbhelper.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ type MetaDataLock struct {
Thread_id uint64 `json:"threadId" db:"THREAD_ID"`
Lock_mode sql.NullString `json:"lockMode" db:"LOCK_MODE"`
Lock_duration sql.NullString `json:"lockDuration" db:"LOCK_DURATION"`
Lock_time_ms sql.NullInt64 `json:"lockTimeMs" db:"LOCK_TIME_MS"`
Lock_type sql.NullString `json:"lockType" db:"LOCK_TYPE"`
Lock_catalog sql.NullString `json:"lockCatalog" db:"TABLE_CATALOG"`
Lock_schema sql.NullString `json:"lockSchema" db:"TABLE_SCHEMA"`
Lock_name sql.NullString `json:"lockName" db:"TABLE_NAME"`
}
Expand Down

0 comments on commit 4495117

Please sign in to comment.