Skip to content

Commit 01a58ff

Browse files
committed
minor fixex
1 parent bf0ccb0 commit 01a58ff

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

client/src/components/apps/form.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1824,7 +1824,7 @@ export default defineComponent({
18241824
domainRules: [
18251825
(v: any) => !!v || 'Domain is required',
18261826
(v: any) => v.length <= 253 || 'Name must be less than 253 characters',
1827-
(v: any) => /^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$/.test(v) || 'Not a domain',
1827+
(v: any) => /^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$/.test(v) || v === 'localhost' || 'Not a domain',
18281828
(v: any) => this.checkDomainAvailability(v) || 'Domain already taken',
18291829
],
18301830
cronjobScheduleRules: [

client/src/components/templates/index.vue

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ type TemplatesList = {
248248
//Axios instance without Auth headers to load templates
249249
const templates = axios.create();
250250
templates.defaults.headers.common = {};
251+
const router = useRouter();
251252
252253
export default defineComponent({
253254
sockets: {
@@ -298,10 +299,20 @@ export default defineComponent({
298299
this.dialog = false;
299300
},
300301
openInstall(templateurl: string, pipeline: string, phase: string) {
301-
const router = useRouter();
302302
// redirect to install page
303303
const templateurlB64 = btoa(templateurl);
304-
router.push({ name: 'App Form', params: { pipeline: pipeline, phase: phase, app: 'new'}, query: { template: templateurlB64 }})
304+
// Use this.$router instead of useRouter()
305+
this.$router.push({
306+
name: 'App Form',
307+
params: {
308+
pipeline: pipeline,
309+
phase: phase,
310+
app: 'new'
311+
},
312+
query: {
313+
template: templateurlB64
314+
}
315+
})
305316
},
306317
openInstallDialog(template: Template) {
307318
this.clickedTemplate = template;

0 commit comments

Comments
 (0)