azure-cli
Version:
Microsoft Azure Cross Platform Command Line tool
48 lines (18 loc) • 2.46 kB
JavaScript
/*** Generated by streamline 0.10.17 (callbacks) - DO NOT EDIT ***/ "use strict"; var __rt=require('streamline/lib/callbacks/runtime').runtime(__filename, false),__func=__rt.__func,__cb=__rt.__cb; var utils = require("../../../util/utils");
var insightsUtils = require("./insights.utils");
var $ = utils.getLocaleString;
exports.init = function(cli) {
var log = cli.output;
var insightsDiagnosticCommand = cli.category("insights").category("logprofile").description($("Configure log profiles")).command("list").description($("List log profiles.")).usage("[options]").execute(function __1(options, _) { var __frame = { name: "__1", line: 29 }; return __func(_, this, arguments, __1, 1, __frame, function __$__1() {
return insightsDiagnosticCommand._prepareAndExecute(options, __cb(_, __frame, 1, 34, function __$__1() { _(); }, true)); }); });
insightsDiagnosticCommand._prepareAndExecute = function insightsDiagnosticCommand__prepareAndExecute__2(options, _) { var client, __this = this; var __frame = { name: "insightsDiagnosticCommand__prepareAndExecute__2", line: 33 }; return __func(_, this, arguments, insightsDiagnosticCommand__prepareAndExecute__2, 1, __frame, function __$insightsDiagnosticCommand__prepareAndExecute__2() {
client = insightsUtils.createInsightsManagementClient(log, options);
return __this._executeCmd(client, cli, log, options, __cb(_, __frame, 2, 9, function __$insightsDiagnosticCommand__prepareAndExecute__2() { _(); }, true)); }); };
insightsDiagnosticCommand._executeCmd = function insightsDiagnosticCommand__executeCmd__3(client, cli, log, options, _) { var getResponse, i, logProfile; var __frame = { name: "insightsDiagnosticCommand__executeCmd__3", line: 38 }; return __func(_, this, arguments, insightsDiagnosticCommand__executeCmd__3, 4, __frame, function __$insightsDiagnosticCommand__executeCmd__3() {
return client.logProfilesOperations.list(__cb(_, __frame, 1, 51, function ___(__0, __1) { getResponse = __1;
for (i = 0; (i < getResponse.logProfileCollection.value.length); i++) {
logProfile = getResponse.logProfileCollection.value[i];
logProfile.properties.id = logProfile.id;
logProfile.properties.name = logProfile.name;
getResponse.logProfileCollection.value[i] = logProfile.properties; };
insightsUtils.formatOutput(cli, log, options, getResponse.logProfileCollection.value); _(); }, true)); }); };};