This commit is contained in:
@@ -235,6 +235,13 @@ export default {
|
|||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case socktype.Purchase:
|
||||||
|
vm.$router.push({
|
||||||
|
name: "purchase-edit",
|
||||||
|
params: { recordid: tid.id }
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
|
||||||
case socktype.SubscriptionServer:
|
case socktype.SubscriptionServer:
|
||||||
vm.$router.push({
|
vm.$router.push({
|
||||||
name: "subscription-server-edit",
|
name: "subscription-server-edit",
|
||||||
|
|||||||
63
src/components/ssh-control.vue
Normal file
63
src/components/ssh-control.vue
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
<template>
|
||||||
|
<v-text-field
|
||||||
|
dense
|
||||||
|
v-bind="$attrs"
|
||||||
|
type="url"
|
||||||
|
prepend-icon="$sockiTerminal"
|
||||||
|
:readonly="readonly"
|
||||||
|
:disabled="disabled"
|
||||||
|
:label="label"
|
||||||
|
:rules="rules"
|
||||||
|
:value="value"
|
||||||
|
:error-messages="errorMessages"
|
||||||
|
v-on="$listeners"
|
||||||
|
@click:prepend="openUrl"
|
||||||
|
></v-text-field>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
label: { type: String, default: null },
|
||||||
|
value: { type: String, default: null },
|
||||||
|
rules: { type: Array, default: undefined },
|
||||||
|
readonly: { type: Boolean, default: false },
|
||||||
|
disabled: { type: Boolean, default: false },
|
||||||
|
errorMessages: { type: Array, default: null }
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
openUrl() {
|
||||||
|
if (this.value) {
|
||||||
|
window.open(`ssh:${this.value}`, "ssh");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
/*
|
||||||
|
TO USE THIS:
|
||||||
|
Must have a SSH URI handler set in registry on windows to open putty like this:
|
||||||
|
|
||||||
|
----------------
|
||||||
|
Windows Registry Editor Version 5.00
|
||||||
|
|
||||||
|
[HKEY_CLASSES_ROOT\ssh]
|
||||||
|
@="URL:SSH Protocol"
|
||||||
|
"URL Protocol"=""
|
||||||
|
|
||||||
|
[HKEY_CLASSES_ROOT\ssh\DefaultIcon]
|
||||||
|
@="%%ProgramFiles%%\\PuTTY\\putty.exe"
|
||||||
|
|
||||||
|
[HKEY_CLASSES_ROOT\ssh\shell]
|
||||||
|
|
||||||
|
[HKEY_CLASSES_ROOT\ssh\shell\open]
|
||||||
|
|
||||||
|
[HKEY_CLASSES_ROOT\ssh\shell\open\command]
|
||||||
|
@="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -Command \"$val='%l'; $val = $val.TrimEnd('/');if ($val.StartsWith('ssh://')) { $val = $val.SubString(6) }; & 'C:\\Program Files\\PuTTY\\putty.exe' \"$val\"\""
|
||||||
|
|
||||||
|
|
||||||
|
----------------
|
||||||
|
|
||||||
|
Also in putty need to set default to use pagent agent and then open the keys in KeePass so relies on a lot specific to us but it works great
|
||||||
|
https://documentation.help/PuTTY/config-saving.html#S4.1.2
|
||||||
|
|
||||||
|
*/
|
||||||
|
</script>
|
||||||
@@ -47,6 +47,7 @@ import decimalControl from "./components/decimal-control.vue";
|
|||||||
import percentControl from "./components/percent-control.vue";
|
import percentControl from "./components/percent-control.vue";
|
||||||
import phoneControl from "./components/phone-control.vue";
|
import phoneControl from "./components/phone-control.vue";
|
||||||
import emailControl from "./components/email-control.vue";
|
import emailControl from "./components/email-control.vue";
|
||||||
|
import sshControl from "./components/ssh-control.vue";
|
||||||
import urlControl from "./components/url-control.vue";
|
import urlControl from "./components/url-control.vue";
|
||||||
import roleControl from "./components/role-control.vue";
|
import roleControl from "./components/role-control.vue";
|
||||||
import durationControl from "./components/duration-control.vue";
|
import durationControl from "./components/duration-control.vue";
|
||||||
@@ -169,6 +170,7 @@ Vue.component("gz-decimal", decimalControl);
|
|||||||
Vue.component("gz-phone", phoneControl);
|
Vue.component("gz-phone", phoneControl);
|
||||||
Vue.component("gz-email", emailControl);
|
Vue.component("gz-email", emailControl);
|
||||||
Vue.component("gz-url", urlControl);
|
Vue.component("gz-url", urlControl);
|
||||||
|
Vue.component("gz-ssh", sshControl);
|
||||||
Vue.component("gz-role-picker", roleControl);
|
Vue.component("gz-role-picker", roleControl);
|
||||||
Vue.component("gz-duration-picker", durationControl);
|
Vue.component("gz-duration-picker", durationControl);
|
||||||
Vue.component("gz-error", errorControl);
|
Vue.component("gz-error", errorControl);
|
||||||
|
|||||||
@@ -217,6 +217,7 @@ import {
|
|||||||
faTachometerAlt,
|
faTachometerAlt,
|
||||||
faTags,
|
faTags,
|
||||||
faTasks,
|
faTasks,
|
||||||
|
faTerminal,
|
||||||
faThList,
|
faThList,
|
||||||
faTicketAlt,
|
faTicketAlt,
|
||||||
faTimesCircle,
|
faTimesCircle,
|
||||||
@@ -413,6 +414,7 @@ library.add(
|
|||||||
faTachometerAlt,
|
faTachometerAlt,
|
||||||
faTags,
|
faTags,
|
||||||
faTasks,
|
faTasks,
|
||||||
|
faTerminal,
|
||||||
faThList,
|
faThList,
|
||||||
faTicketAlt,
|
faTicketAlt,
|
||||||
faTimesCircle,
|
faTimesCircle,
|
||||||
@@ -1413,6 +1415,12 @@ const CUSTOM_ICONS = {
|
|||||||
icon: ["fas", "tasks"]
|
icon: ["fas", "tasks"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
sockiTerminal: {
|
||||||
|
component: FontAwesomeIcon,
|
||||||
|
props: {
|
||||||
|
icon: ["fas", "terminal"]
|
||||||
|
}
|
||||||
|
},
|
||||||
sockiThList: {
|
sockiThList: {
|
||||||
component: FontAwesomeIcon,
|
component: FontAwesomeIcon,
|
||||||
props: {
|
props: {
|
||||||
|
|||||||
@@ -14,7 +14,6 @@
|
|||||||
:readonly="formState.readOnly"
|
:readonly="formState.readOnly"
|
||||||
:label="$sock.t('Customer')"
|
:label="$sock.t('Customer')"
|
||||||
:error-messages="form().serverErrors(this, 'customerId')"
|
:error-messages="form().serverErrors(this, 'customerId')"
|
||||||
:rules="[form().required(this, 'customerId')]"
|
|
||||||
@input="fieldValueChanged('customerId')"
|
@input="fieldValueChanged('customerId')"
|
||||||
></gz-pick-list>
|
></gz-pick-list>
|
||||||
</v-col>
|
</v-col>
|
||||||
@@ -243,7 +242,7 @@ export default {
|
|||||||
concurrency: 0,
|
concurrency: 0,
|
||||||
customerId: 0,
|
customerId: 0,
|
||||||
vendorId: 1,
|
vendorId: 1,
|
||||||
productId: 0,
|
productId: null,
|
||||||
salesOrderNumber: null,
|
salesOrderNumber: null,
|
||||||
purchaseDate: window.$gz.locale.nowUTC8601String(),
|
purchaseDate: window.$gz.locale.nowUTC8601String(),
|
||||||
expireDate: null,
|
expireDate: null,
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<gz-error :error-box-message="formState.errorBoxMessage"></gz-error>
|
<gz-error :error-box-message="formState.errorBoxMessage"></gz-error>
|
||||||
<v-form ref="form">
|
<v-form ref="form">
|
||||||
<v-row dense>
|
<v-row dense>
|
||||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
<!-- <v-col cols="12" sm="6" lg="4" xl="3">
|
||||||
<v-text-field
|
<v-text-field
|
||||||
ref="name"
|
ref="name"
|
||||||
v-model="obj.name"
|
v-model="obj.name"
|
||||||
@@ -17,6 +17,30 @@
|
|||||||
data-cy="name"
|
data-cy="name"
|
||||||
@input="fieldValueChanged('name')"
|
@input="fieldValueChanged('name')"
|
||||||
></v-text-field>
|
></v-text-field>
|
||||||
|
</v-col> -->
|
||||||
|
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||||
|
<gz-ssh
|
||||||
|
ref="name"
|
||||||
|
v-model="obj.name"
|
||||||
|
:readonly="formState.readOnly"
|
||||||
|
:label="$sock.t('SubServerName')"
|
||||||
|
data-cy="name"
|
||||||
|
:rules="[form().required(this, 'name')]"
|
||||||
|
:error-messages="form().serverErrors(this, 'name')"
|
||||||
|
@input="fieldValueChanged('name')"
|
||||||
|
></gz-ssh>
|
||||||
|
</v-col>
|
||||||
|
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||||
|
<v-text-field
|
||||||
|
ref="iPAddress"
|
||||||
|
v-model="obj.iPAddress"
|
||||||
|
dense
|
||||||
|
:readonly="formState.readOnly"
|
||||||
|
:label="$sock.t('SubServerIP')"
|
||||||
|
data-cy="iPAddress"
|
||||||
|
:error-messages="form().serverErrors(this, 'iPAddress')"
|
||||||
|
@input="fieldValueChanged('iPAddress')"
|
||||||
|
></v-text-field>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||||
@@ -182,7 +206,7 @@
|
|||||||
ref="cost"
|
ref="cost"
|
||||||
v-model="obj.cost"
|
v-model="obj.cost"
|
||||||
:readonly="formState.readOnly"
|
:readonly="formState.readOnly"
|
||||||
:label="$ay.t('LoanUnitRateMonthCost')"
|
:label="$sock.t('LoanUnitRateMonthCost')"
|
||||||
data-cy="cost"
|
data-cy="cost"
|
||||||
:rules="[
|
:rules="[
|
||||||
form().decimalValid(this, 'cost'),
|
form().decimalValid(this, 'cost'),
|
||||||
@@ -1273,15 +1297,8 @@ async function clickHandler(menuItem) {
|
|||||||
window.$gz.form.setLastReportMenuItem(FORM_KEY, res, m.vm);
|
window.$gz.form.setLastReportMenuItem(FORM_KEY, res, m.vm);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "WorkOrderList":
|
case "terminal":
|
||||||
m.vm.$router.push({
|
alert("putty -agent -ssh sportseffect.onayanova.com");
|
||||||
name: "svc-workorders",
|
|
||||||
params: {
|
|
||||||
aType: m.vm.sockType,
|
|
||||||
objectId: m.vm.obj.id,
|
|
||||||
name: m.vm.obj.name
|
|
||||||
}
|
|
||||||
});
|
|
||||||
break;
|
break;
|
||||||
case "QuoteList":
|
case "QuoteList":
|
||||||
m.vm.$router.push({
|
m.vm.$router.push({
|
||||||
@@ -1386,12 +1403,12 @@ function generateMenu(vm) {
|
|||||||
}
|
}
|
||||||
menuOptions.menuItems.push({ divider: true, inset: false });
|
menuOptions.menuItems.push({ divider: true, inset: false });
|
||||||
|
|
||||||
// menuOptions.menuItems.push({
|
menuOptions.menuItems.push({
|
||||||
// title: "WorkOrderList",
|
title: "OpenTerminal",
|
||||||
// icon: "$sockiTools",
|
icon: "$sockiTerminal",
|
||||||
// key: FORM_KEY + ":WorkOrderList",
|
key: FORM_KEY + ":terminal",
|
||||||
// vm: vm
|
vm: vm
|
||||||
// });
|
});
|
||||||
|
|
||||||
// menuOptions.menuItems.push({
|
// menuOptions.menuItems.push({
|
||||||
// title: "QuoteList",
|
// title: "QuoteList",
|
||||||
@@ -1443,7 +1460,8 @@ async function fetchTranslatedText() {
|
|||||||
"SubServerTrialCompany",
|
"SubServerTrialCompany",
|
||||||
"SubServerOperatingSystem",
|
"SubServerOperatingSystem",
|
||||||
"SubServerCustomerDomain",
|
"SubServerCustomerDomain",
|
||||||
"LoanUnitRateMonthCost"
|
"LoanUnitRateMonthCost",
|
||||||
|
"SubServerIP"
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user