相关疑难解决方法(0)

如何将html文件的内容包含到jenkins email-ext的模板中?

我正在使用Jenkins和email-ext发送构建通知.Build生成在out目录中存储为简单HTML的小型自定义报告.现在我可以轻松地将此报告附加到电子邮件中,但我想要的是将此报告呈现给电子邮件正文本身.我知道我可以编写自己的果冻模板,但这需要访问构建服务器(安装果冻脚本),我也想避免这种情况.所以我的问题是:

  1. 我可以将任意文件的内容(在构建期间生成)包含到Email-Ext插件的Content字段中吗?
  2. 如果我不能,在詹金斯发送这样的报告最简单的方法是什么?

jenkins email-ext

9
推荐指数
2
解决办法
1万
查看次数

在嵌入式Vue应用中操纵浏览器网址

我目前将Vue应用渲染为Vue应用。我是通过将子应用程序的index.html文件嵌入到主应用程序的div容器中来实现的。

<template>
  <div id="customAppContainer"></div>
</template>

<script>
export default {
  mounted() {
    this.updateCustomAppContainer();
  },
  methods: {
    updateCustomAppContainer() {
      const fullRoute = this.$router.currentRoute.fullPath;
      const routeSegments = fullRoute.split("/");
      const appsIndex = routeSegments.indexOf("apps");
      const appKey = routeSegments[appsIndex + 1];

      document.getElementById(
        "customAppContainer"
      ).innerHTML = `<object style="width: 100%; height:100%;" data="http://localhost:3000/subApps/${appKey}"></object>`;
    }
  },
  watch: {
    $route(to, from) {
      this.updateCustomAppContainer();
    }
  }
};
</script>
Run Code Online (Sandbox Code Playgroud)

如果您想了解更多信息,请在这里看看

将Vue应用安装到主Vue应用的容器中

我对这个问题的回答

/sf/answers/4078608131/

我的子应用在的object标记中呈现,customAppContainer具有自己的路线,基本路线是

export default new Router({
    base: '/my-first-custom-app/',
    mode: 'history',
    routes: [
        {
            path: '/',
            component: PageOne, …
Run Code Online (Sandbox Code Playgroud)

html javascript vue.js

8
推荐指数
0
解决办法
330
查看次数

为 CurrentUser 将 ExecutionPolicy 设置为 Unrestricted 是否构成安全漏洞?

我喜欢在 Windows 10 上的 PowerShell 中使用几个别名。

我希望它们在会话之间保持不变,因此我将它们放在 C:\Users{username}\Documents\WindowsPowerShell 下的 profile.ps1 文件中。

我收到这个烦人的“无法加载,因为在此系统上禁用了运行脚本。” 错误消息,并找到了有关如何摆脱它的页面:https : //social.technet.microsoft.com/Forums/en-US/3e4a9006-d47d-4e19-96f4-10327ae0c5b1/not-able-to- run-script-in-windows-10?forum=winserverpowershell

在这里有人说这条线会有所帮助:

Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force -Verbose
Run Code Online (Sandbox Code Playgroud)

但是,将执行策略设置为对我的用户不受限制是否危险?

security powershell executionpolicy windows-10

4
推荐指数
1
解决办法
2454
查看次数