Compare commits

...

4 Commits
v7.2.3 ... main

Author SHA1 Message Date
semantic-release-bot
4924df2ef3 chore(release): 7.2.4 [skip ci]
## [7.2.4](https://git.datacontroller.io/dc/dc/compare/v7.2.3...v7.2.4) (2025-10-14)

### Bug Fixes

* ensure reload after applying licence key ([cb1978b](cb1978bcaf))
* snyk report security patches ([387f512](387f5122f1))
2025-10-14 11:44:18 +00:00
2e141a5d52 chore(git): merge pull request 'fix: snyk report security patches' (#192) from dc_snyk into main
All checks were successful
Release / Build-production-and-ng-test (push) Successful in 3m42s
Release / Build-and-test-development (push) Successful in 8m52s
Release / release (push) Successful in 8m13s
Reviewed-on: #192
Reviewed-by: mihajlo <mihajlo@4gl.io>
Reviewed-by: sead <sead@noreply.git.datacontroller.io>
2025-10-14 11:28:05 +00:00
Trevor Moody
cb1978bcaf fix: ensure reload after applying licence key
All checks were successful
Build / Build-and-ng-test (pull_request) Successful in 4m2s
Build / Build-and-test-development (pull_request) Successful in 8m49s
Lighthouse Checks / lighthouse (20.15.1) (pull_request) Successful in 18m48s
2025-10-14 12:05:27 +01:00
Trevor Moody
387f5122f1 fix: snyk report security patches
Some checks failed
Build / Build-and-ng-test (pull_request) Successful in 4m0s
Lighthouse Checks / lighthouse (20.15.1) (pull_request) Successful in 19m23s
Build / Build-and-test-development (pull_request) Failing after 11m1s
2025-10-10 12:54:22 +01:00
6 changed files with 206 additions and 252 deletions

View File

@@ -1,3 +1,11 @@
## [7.2.4](https://git.datacontroller.io/dc/dc/compare/v7.2.3...v7.2.4) (2025-10-14)
### Bug Fixes
* ensure reload after applying licence key ([cb1978b](https://git.datacontroller.io/dc/dc/commit/cb1978bcaf23b0bf45b5d3b78b9707fd4e48a5f4))
* snyk report security patches ([387f512](https://git.datacontroller.io/dc/dc/commit/387f5122f1ea6dff55d23c9223f17737283a94d3))
## [7.2.3](https://git.datacontroller.io/dc/dc/compare/v7.2.2...v7.2.3) (2025-10-02)

View File

@@ -171,23 +171,8 @@ export class EditRecordComponent implements OnInit {
}
public copyToClip(text: string) {
const modalElement = document.querySelector('#recordModalRef .modal-title')
if (modalElement) {
const selBox = document.createElement('textarea')
selBox.style.position = 'fixed'
selBox.style.left = '0'
selBox.style.top = '0'
selBox.style.opacity = '0'
selBox.style.zIndex = '5000'
selBox.value = text
modalElement.appendChild(selBox)
selBox.focus()
selBox.select()
document.execCommand('copy')
modalElement.removeChild(selBox)
this.generatedRecordUrl = text
}
navigator.clipboard.writeText(text)
this.generatedRecordUrl = text
}
async generateEditRecordUrl() {

View File

@@ -1,178 +1,181 @@
import { Component, OnInit, ViewEncapsulation } from '@angular/core'
import { ActivatedRoute, Router } from '@angular/router'
import { AppService, LicenceService, SasService } from '../services'
import { LicenseKeyData } from '../models/LicenseKeyData'
import { RequestWrapperResponse } from '../models/request-wrapper/RequestWrapperResponse'
enum LicenseActions {
key = 'key',
register = 'register',
limit = 'limit',
update = 'update'
}
@Component({
selector: 'app-licensing',
templateUrl: './licensing.component.html',
styleUrls: ['./licensing.component.scss'],
encapsulation: ViewEncapsulation.None
})
export class LicensingComponent implements OnInit {
public action: LicenseActions | null = null
public licenseErrors: { [key: string]: string } = {
missing: `Licence key is missing - please contact <a class="color-green" href="mailto: support@datacontroller.io">support@datacontroller.io</a> and enter valid keys below.`,
expired: `Licence key is expired - please contact <a class="color-green" href="mailto: support@datacontroller.io">support@datacontroller.io</a> and enter valid keys below.`,
invalid: `Licence key is invalid - please contact <a class="color-green" href="mailto: support@datacontroller.io">support@datacontroller.io</a> and enter valid keys below.`,
missmatch: `Your SYSSITE (below) is not found in the licence key - please contact <a class="color-green" href="mailto: support@datacontroller.io">support@datacontroller.io</a> and enter valid keys below.`
}
public keyError: string | undefined
public errorDetails: string | undefined
public missmatchedKey: string | undefined
public licenceKeyValue: string = ''
public activationKeyValue: string = ''
public applyingKeys: boolean = false
public syssite = this.appService.syssite
public currentLicenceKey = this.licenceService.licenceKey
public currentActivationKey = this.licenceService.activationKey
public isAppFreeTier = this.licenceService.isAppFreeTier
public userCountLimitation = this.licenceService.userCountLimitation
public licenseKeyData: LicenseKeyData | null = null
public inputType: 'file' | 'paste' = 'file'
public licenceFileError: string | undefined
public licenceFileLoading: boolean = false
public licencefile: { filename: string } = {
filename: ''
}
constructor(
private route: ActivatedRoute,
private licenceService: LicenceService,
private sasService: SasService,
private appService: AppService
) {}
ngOnInit(): void {
this.licenceKeyValue = this.currentLicenceKey || ''
this.activationKeyValue = this.currentActivationKey || ''
this.route.queryParams.subscribe((queryParams: any) => {
this.keyError = queryParams.error
this.missmatchedKey = queryParams.missmatchId
if (queryParams.details) {
this.errorDetails = atob(queryParams.details)
}
})
this.route.params.subscribe((params: any) => {
let actionInUrl = params.action
if (actionInUrl) {
if (Object.values(LicenseActions).includes(actionInUrl)) {
this.action = actionInUrl
}
}
})
this.licenseKeyData = this.licenceService.getLicenseKeyData()
}
public trimKeys() {
this.licenceKeyValue = this.licenceKeyValue.trim()
this.activationKeyValue = this.activationKeyValue.trim()
}
public copySyssite(copyIconRef: any, copyTooltip: any, syssite: string[]) {
const syssiteString = syssite.join('\n')
navigator.clipboard.writeText(syssiteString).then(() => {
copyIconRef.setAttribute('shape', 'check')
copyIconRef.setAttribute('class', 'is-success')
copyTooltip.innerText = 'Copied!'
setTimeout(() => {
copyIconRef.setAttribute('shape', 'copy')
copyIconRef.removeAttribute('class')
copyTooltip.innerText = 'Copy to clipboard'
}, 1000)
})
}
public applyKeys() {
this.applyingKeys = true
let table = {
keyupload: [
{
ACTIVATION_KEY: this.activationKeyValue,
LICENCE_KEY: this.licenceKeyValue
}
]
}
this.sasService
.request('admin/registerkey', table)
.then((res: RequestWrapperResponse) => {
if (
res.adapterResponse.return &&
res.adapterResponse.return[0] &&
res.adapterResponse.return[0].MSG === 'SUCCESS'
) {
location.replace(location.href.split('#')[0])
}
})
.finally(() => {
this.applyingKeys = false
})
}
public onFileCapture(event: any, dropped = false) {
let file = dropped ? event[0] : event.target.files[0]
this.licencefile.filename = file.name
if (!file) return
this.licenceFileLoading = true
const reader = new FileReader()
reader.onload = (evt) => {
this.licenceFileError = 'Error reading file.'
if (!evt || !evt.target) return
if (evt.target.readyState != 2) return
if (evt.target.error) return
if (!evt.target.result) return
this.licenceFileLoading = false
this.licenceFileError = undefined
const fileArr = evt.target.result.toString().split('\n')
this.activationKeyValue = fileArr[1]
this.licenceKeyValue = fileArr[0]
}
reader.readAsText(file)
}
public switchType(type: 'paste' | 'file') {
this.inputType = type
}
get disableApplyButton(): boolean {
if (this.licenceKeyValue.length < 1 || this.activationKeyValue.length < 1)
return true
if (
this.licenceKeyValue === this.currentLicenceKey &&
this.activationKeyValue === this.currentActivationKey
)
return true
return false
}
}
import { Component, OnInit, ViewEncapsulation } from '@angular/core'
import { ActivatedRoute, Router } from '@angular/router'
import { AppService, LicenceService, SasService } from '../services'
import { LicenseKeyData } from '../models/LicenseKeyData'
import { RequestWrapperResponse } from '../models/request-wrapper/RequestWrapperResponse'
enum LicenseActions {
key = 'key',
register = 'register',
limit = 'limit',
update = 'update'
}
@Component({
selector: 'app-licensing',
templateUrl: './licensing.component.html',
styleUrls: ['./licensing.component.scss'],
encapsulation: ViewEncapsulation.None
})
export class LicensingComponent implements OnInit {
public action: LicenseActions | null = null
public licenseErrors: { [key: string]: string } = {
missing: `Licence key is missing - please contact <a class="color-green" href="mailto: support@datacontroller.io">support@datacontroller.io</a> and enter valid keys below.`,
expired: `Licence key is expired - please contact <a class="color-green" href="mailto: support@datacontroller.io">support@datacontroller.io</a> and enter valid keys below.`,
invalid: `Licence key is invalid - please contact <a class="color-green" href="mailto: support@datacontroller.io">support@datacontroller.io</a> and enter valid keys below.`,
missmatch: `Your SYSSITE (below) is not found in the licence key - please contact <a class="color-green" href="mailto: support@datacontroller.io">support@datacontroller.io</a> and enter valid keys below.`
}
public keyError: string | undefined
public errorDetails: string | undefined
public missmatchedKey: string | undefined
public licenceKeyValue: string = ''
public activationKeyValue: string = ''
public applyingKeys: boolean = false
public syssite = this.appService.syssite
public currentLicenceKey = this.licenceService.licenceKey
public currentActivationKey = this.licenceService.activationKey
public isAppFreeTier = this.licenceService.isAppFreeTier
public userCountLimitation = this.licenceService.userCountLimitation
public licenseKeyData: LicenseKeyData | null = null
public inputType: 'file' | 'paste' = 'file'
public licenceFileError: string | undefined
public licenceFileLoading: boolean = false
public licencefile: { filename: string } = {
filename: ''
}
constructor(
private route: ActivatedRoute,
private router: Router,
private licenceService: LicenceService,
private sasService: SasService,
private appService: AppService
) {}
ngOnInit(): void {
this.licenceKeyValue = this.currentLicenceKey || ''
this.activationKeyValue = this.currentActivationKey || ''
this.route.queryParams.subscribe((queryParams: any) => {
this.keyError = queryParams.error
this.missmatchedKey = queryParams.missmatchId
if (queryParams.details) {
this.errorDetails = atob(queryParams.details)
}
})
this.route.params.subscribe((params: any) => {
let actionInUrl = params.action
if (actionInUrl) {
if (Object.values(LicenseActions).includes(actionInUrl)) {
this.action = actionInUrl
}
}
})
this.licenseKeyData = this.licenceService.getLicenseKeyData()
}
public trimKeys() {
this.licenceKeyValue = this.licenceKeyValue.trim()
this.activationKeyValue = this.activationKeyValue.trim()
}
public copySyssite(copyIconRef: any, copyTooltip: any, syssite: string[]) {
const syssiteString = syssite.join('\n')
navigator.clipboard.writeText(syssiteString).then(() => {
copyIconRef.setAttribute('shape', 'check')
copyIconRef.setAttribute('class', 'is-success')
copyTooltip.innerText = 'Copied!'
setTimeout(() => {
copyIconRef.setAttribute('shape', 'copy')
copyIconRef.removeAttribute('class')
copyTooltip.innerText = 'Copy to clipboard'
}, 1000)
})
}
public applyKeys() {
this.applyingKeys = true
let table = {
keyupload: [
{
ACTIVATION_KEY: this.activationKeyValue,
LICENCE_KEY: this.licenceKeyValue
}
]
}
this.sasService
.request('admin/registerkey', table)
.then((res: RequestWrapperResponse) => {
if (
res.adapterResponse.return &&
res.adapterResponse.return[0] &&
res.adapterResponse.return[0].MSG === 'SUCCESS'
) {
this.router.navigateByUrl('/').then(() => {
window.location.reload()
})
}
})
.finally(() => {
this.applyingKeys = false
})
}
public onFileCapture(event: any, dropped = false) {
let file = dropped ? event[0] : event.target.files[0]
this.licencefile.filename = file.name
if (!file) return
this.licenceFileLoading = true
const reader = new FileReader()
reader.onload = (evt) => {
this.licenceFileError = 'Error reading file.'
if (!evt || !evt.target) return
if (evt.target.readyState != 2) return
if (evt.target.error) return
if (!evt.target.result) return
this.licenceFileLoading = false
this.licenceFileError = undefined
const fileArr = evt.target.result.toString().split('\n')
this.activationKeyValue = fileArr[1]
this.licenceKeyValue = fileArr[0]
}
reader.readAsText(file)
}
public switchType(type: 'paste' | 'file') {
this.inputType = type
}
get disableApplyButton(): boolean {
if (this.licenceKeyValue.length < 1 || this.activationKeyValue.length < 1)
return true
if (
this.licenceKeyValue === this.currentLicenceKey &&
this.activationKeyValue === this.currentActivationKey
)
return true
return false
}
}

View File

@@ -746,28 +746,13 @@ export class LineageComponent {
return URL.createObjectURL(svg_blob)
}
private getSVGBlob() {
let svg: any = document.getElementById('graph')
let serializer = new XMLSerializer()
let svg_blob = new Blob([serializer.serializeToString(svg)], {
type: 'image/svg+xml'
})
return svg_blob
}
downloadSVG() {
d3Viz.graphviz('#graph').resetZoom()
if (navigator.appVersion.toString().indexOf('.NET') > 0) {
window.navigator.msSaveBlob(this.getSVGBlob(), this.constructName('svg'))
} else {
let downloadLink = document.createElement('a')
downloadLink.href = this.getSVGURL()
downloadLink.download = this.constructName('svg')
document.body.appendChild(downloadLink)
downloadLink.click()
document.body.removeChild(downloadLink)
}
let downloadLink = document.createElement('a')
downloadLink.href = this.getSVGURL()
downloadLink.download = this.constructName('svg')
downloadLink.click()
}
async downloadPNG() {
@@ -795,16 +780,11 @@ export class LineageComponent {
var a = document.createElement('a')
var blob = new Blob([csvArray], { type: 'text/csv' })
if (navigator.appVersion.toString().indexOf('.NET') > 0) {
window.navigator.msSaveBlob(blob, this.constructName('csv'))
} else {
var url = window.URL.createObjectURL(blob)
a.href = url
a.download = this.constructName('csv')
a.click()
window.URL.revokeObjectURL(url)
a.remove()
}
var url = window.URL.createObjectURL(blob)
a.href = url
a.download = this.constructName('csv')
a.click()
window.URL.revokeObjectURL(url)
}
private getDotUrl() {
@@ -813,23 +793,11 @@ export class LineageComponent {
return window.URL.createObjectURL(dot_blob)
}
private getDotBlob() {
let data = this.vizInput
let dot_blob = new Blob([data], { type: 'text/plain' })
return dot_blob
}
downloadDot() {
if (navigator.appVersion.toString().indexOf('.NET') > 0) {
window.navigator.msSaveBlob(this.getDotBlob(), this.constructName('txt'))
} else {
let downloadLink = document.createElement('a')
downloadLink.href = this.getDotUrl()
downloadLink.download = this.constructName('txt')
document.body.appendChild(downloadLink)
downloadLink.click()
document.body.removeChild(downloadLink)
}
let downloadLink = document.createElement('a')
downloadLink.href = this.getDotUrl()
downloadLink.download = this.constructName('txt')
downloadLink.click()
}
public showSvg() {

View File

@@ -536,17 +536,7 @@ export class ViewerComponent
}
public copyToClip() {
let selBox = document.createElement('textarea')
selBox.style.position = 'fixed'
selBox.style.left = '0'
selBox.style.top = '0'
selBox.style.opacity = '0'
selBox.value = this.webQueryText
document.body.appendChild(selBox)
selBox.focus()
selBox.select()
document.execCommand('copy')
document.body.removeChild(selBox)
navigator.clipboard.writeText(this.webQueryText)
}
public goToViewer() {

View File

@@ -1,6 +1,6 @@
{
"name": "dcfrontend",
"version": "7.2.3",
"version": "7.2.4",
"description": "Data Controller",
"devDependencies": {
"@saithodev/semantic-release-gitea": "^2.1.0",