Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4924df2ef3 | ||
| 2e141a5d52 | |||
|
|
cb1978bcaf | ||
|
|
387f5122f1 |
@@ -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)
|
||||
|
||||
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user